:root {
    --dark: #0b0b0b;
    --yellow: #f5c400;
    --light: #ffffff;
    --gray: #9ca3af;
}

/* ===== GLOBAL RESET / SAFETY ===== */
* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    overflow-x: hidden;
    background-color: #e6e6e6;
    background-image: url("../img/site-bg.jpg");
    background-repeat: no-repeat;
    background-position: center top;
    background-attachment: fixed;
    background-size: cover;
    min-height: 100vh;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Generic container helper (won't break if unused) */
.container {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
}

/* ===== HEADER ===== */
.header {
    background: url("../img/header-bg.jpg") no-repeat center center;
    background-size: cover;
    background-color: #333;
    color: #fff;
}


/* ===== PROMO BANNER ===== */
.promo-banner {
    background: linear-gradient(135deg, #c0392b 0%, #e74c3c 50%, #c0392b 100%);
    background-size: 200% 100%;
    color: #fff;
    text-align: center;
    padding: 14px 20px;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    line-height: 1.6;
    animation: promo-slide 3s ease-in-out infinite;
}
.promo-banner strong {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-right: 6px;
}
.promo-banner-cta {
    display: inline-block;
    background: #fff;
    color: #c0392b;
    font-weight: 800;
    padding: 3px 14px;
    border-radius: 20px;
    margin-left: 8px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.promo-banner-fire {
    font-size: 1.2rem;
    margin: 0 4px;
}
@keyframes promo-slide {
    0%, 100% { background-position: 0% 50%; }
    50%       { background-position: 100% 50%; }
}
@media (max-width: 600px) {
    .promo-banner { font-size: 0.88rem; padding: 12px 14px; }
    .promo-banner strong { font-size: 1rem; display: block; margin-bottom: 4px; }
    .promo-banner-cta { display: block; margin: 6px auto 0; width: fit-content; }
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.header-logo img {
    max-width: 160px;
    height: auto;
    display: block;
}

/* ===== NAVIGATION ===== */
.main-nav {
    margin-top: 6px;
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
}

.main-nav a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
}

.main-nav a:hover {
    border-bottom: 2px solid #f5b301;
}

header .main-nav a {
    color: #ffffff !important;
}

header .main-nav a:hover {
    color: #ffffff !important;
}

/* ===== SEARCH ===== */
.search-form {
    display: flex;
    gap: 8px;
    justify-content: center;
    width: 100%;
    flex-wrap: wrap;
}

.search-form input {
    padding: 10px 14px;
    border-radius: 999px;
    border: none;
    font-size: 14px;
    width: min(520px, 100%);
}

.search-form button {
    border: none;
    background: #2563eb;
    color: white;
    padding: 10px 16px;
    border-radius: 999px;
    cursor: pointer;
}

.search-form button:hover {
    background: #1d4ed8;
}

/* ===== HERO ===== */
.hero-text {
    position: relative;
    width: min(1100px, calc(100% - 32px));
    margin: 60px auto 40px auto;
    padding: 20px;
    text-align: center;
    font-weight: 700;
    color: #f8f8f8;
    font-size: clamp(20px, 4vw, 36px);
    line-height: 1.25;
    background: transparent;
    text-wrap: balance;
}

.hero-text h1,
.hero-text h2,
.hero-text p {
    margin-left: auto;
    margin-right: auto;
}

.hero-text p {
    margin-top: 12px;
    margin-bottom: 18px;
    font-weight: 600;
    font-size: clamp(14px, 2.6vw, 18px);
    color: rgba(248, 248, 248, 0.92);
}

.hero-text h2 {
    margin-top: 18px;
    font-size: clamp(18px, 3.2vw, 26px);
}

/* ===== PRODUCTOS (HOME GRID) ===== */
.productos {
    width: min(1200px, calc(100% - 32px));
    margin: 30px auto 60px;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.producto-link {
    text-decoration: none;
    color: inherit;
    display: block;
    min-width: 0;
}

.producto {
    background: #ffffff;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    min-width: 0;
}

.producto:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.15);
}

.producto img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 12px;
}

.producto h3 {
    margin: 12px 0 6px;
    font-size: 1.1rem;
}

.producto p {
    font-size: 0.95rem;
    color: #555;
}

.producto strong {
    display: block;
    margin-top: 10px;
    font-size: 1.1rem;
    color: #ff9800;
}

.precio {
    font-size: 1.1rem;
    font-weight: bold;
    color: #ff9800;
    margin-top: 8px;
}

/* If you use a placeholder for missing images */
.no-image {
    width: 100%;
    border-radius: 12px;
    background: #f3f4f6;
    color: #6b7280;
    display: grid;
    place-items: center;
    min-height: 160px;
    font-weight: 700;
}

/* ===== VENDIDO ===== */
.vendido {
    opacity: 0.55;
    position: relative;
}

.vendido::after {
    content: "VENDIDO";
    position: absolute;
    top: 20px;
    right: -40px;
    background: #e53935;
    color: white;
    padding: 6px 50px;
    transform: rotate(45deg);
    font-size: 0.75rem;
    font-weight: bold;
}

/* ===== PRODUCT DETAIL ===== */
.galeria-producto {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
    margin: 25px 0;
}

.galeria-producto img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 14px;
}

.precio-grande {
    font-size: 1.6rem;
    font-weight: 700;
    color: #ff9800;
    margin: 20px 0;
}

.sold-grande {
    display: inline-block;
    background: #b91c1c;
    color: white;
    padding: 8px 14px;
    border-radius: 8px;
    font-weight: 700;
    margin: 15px 0;
}

.descripcion-producto {
    font-size: 1rem;
    line-height: 1.6;
    color: #374151;
    margin-top: 20px;
}

/* ===== CONTACT PAGE ===== */
.page-box {
    width: min(800px, calc(100% - 32px));
    margin: 60px auto;
    padding: 40px;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.1);
}

.page-box h1 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2rem;
}

.contact-form {
    display: grid;
    gap: 22px;
}

.contact-form .field {
    display: flex;
    flex-direction: column;
}

.contact-form label {
    font-weight: 600;
    margin-bottom: 6px;
    color: #111827;
}

.contact-form input,
.contact-form textarea {
    padding: 14px 16px;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    font-size: 1rem;
    background: #f9fafb;
}

.contact-form textarea {
    min-height: 140px;
    resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #ff9800;
    background: #ffffff;
}

.contact-form button {
    margin-top: 10px;
    align-self: center;
    padding: 14px 40px;
    font-size: 1rem;
}

/* ===== ADMIN DASHBOARD ===== */
.admin-caja {
    width: min(1200px, calc(100% - 32px));
    margin: 40px auto;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    padding: 30px;
}

.admin-caja h1,
.admin-caja h2 {
    margin-bottom: 20px;
}

.admin-barra {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.admin-barra h1 {
    font-size: 22px;
    color: #333;
    margin: 0;
}

.admin-barra a {
    text-decoration: none;
    font-weight: 600;
    color: #111827;
}

.admin-barra a:hover {
    color: #ff9800;
}

/* ===== ADMIN TABLE ===== */
.admin-tabla {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.admin-tabla th {
    background: #edf2f7;
    text-align: left;
    padding: 12px;
    font-size: 14px;
    color: #4a5568;
    text-transform: uppercase;
}

.admin-tabla td {
    padding: 12px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 14px;
    vertical-align: middle;
}

.admin-tabla td:nth-child(2) {
    max-width: 260px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-tabla td:last-child {
    white-space: nowrap;
}

.admin-tabla tr:hover {
    background: #f7fafc;
}

/* Make admin tables usable on mobile (horizontal scroll instead of breaking layout) */
.admin-tabla-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ===== ADMIN BUTTONS ===== */
.btn-admin {
    background: #4a5568;
    color: #fff;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 14px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s ease;
    display: inline-block;
}

.btn-admin:hover {
    background: #2d3748;
}

.btn-admin.secundario {
    background: #718096;
}

.btn-admin.secundario:hover {
    background: #4a5568;
}

.btn-admin.peligro,
.btn-admin.danger {
    background: #c53030;
    color: white;
}

.btn-admin.peligro:hover,
.btn-admin.danger:hover {
    background: #9b2c2c;
}

/* ===== ADMIN FORMS ===== */
.admin-caja label {
    font-weight: 600;
    display: block;
    margin-top: 16px;
}

.admin-caja input,
.admin-caja textarea {
    width: 100%;
    padding: 10px;
    margin-top: 6px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
}

.admin-caja input:focus,
.admin-caja textarea:focus {
    outline: none;
    border-color: #ff9800;
}

.admin-caja form {
    max-width: 360px;
    margin: 0 auto;
}

.admin-caja form input,
.admin-caja form button {
    text-align: center;
}

.admin-form {
    max-width: 700px;
    margin: 0 auto;
}

.admin-form input,
.admin-form textarea {
    font-size: 1rem;
    padding: 14px;
}

.admin-form textarea {
    min-height: 120px;
    resize: vertical;
}

.admin-form .fila {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* ===== ADMIN CHECKBOXES ===== */
.checks {
    display: flex;
    gap: 30px;
    align-items: center;
    margin-top: 20px;
    flex-wrap: wrap;
}

.check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    cursor: pointer;
}

.check input {
    width: 18px;
    height: 18px;
    accent-color: #ff9800;
}

/* ===== ADMIN ERROR ===== */
.error-admin {
    background: #fee2e2;
    color: #991b1b;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 600;
    text-align: center;
}

/* ===== PAGINATION ===== */
.paginacion {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.paginacion a {
    padding: 6px 12px;
    background: #e2e8f0;
    color: #2d3748;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    display: inline-block;
}

.paginacion a.active {
    background: #4a5568;
    color: #fff;
}

.paginacion a:hover {
    background: #cbd5e0;
}

/* ===== FOOTER ===== */
.footer {
    background: #2f1c1c;
    color: #eee;
    padding: 40px 20px 20px;
    font-size: 14px;
    margin-top: 60px;
}

.footer a {
    color: #ffffff;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 40px;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
}

.footer-col {
    flex: 1 1 260px;
    line-height: 1.6;
}

.footer-col strong {
    display: block;
    margin-bottom: 8px;
}

.footer-bottom {
    border-top: 1px solid #333;
    margin-top: 30px;
    padding-top: 15px;
    font-size: 12px;
    text-align: center;
    color: #aaa;
}

/* ===== COOKIE CONSENT ===== */
.cookie-banner {
    position: fixed;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 360px;
    background: #111;
    color: #fff;
    padding: 16px;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    z-index: 10000;
    text-align: center;
}

.cookie-banner button {
    margin-top: 10px;
    width: 100%;
    background: #ffd700;
    border: none;
    padding: 12px;
    font-weight: bold;
    border-radius: 6px;
}

/* ===== WHATSAPP FLOAT ===== */
.whatsapp-float {
    position: fixed;
    bottom: 22px;
    right: 22px;
    width: 72px;
    height: 72px;
    background: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
    z-index: 9999;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.whatsapp-float:hover {
    transform: scale(1.08);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.whatsapp-float img {
    width: 38px;
    height: 38px;
}

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 768px) {
    body {
        background-attachment: scroll;
        background-size: cover;
        background-repeat: no-repeat;
        background-position: center top;
    }

    .header-inner {
        padding-top: 14px;
        padding-bottom: 14px;
    }

    .main-nav {
        gap: 14px;
        margin-top: 0;
    }

    .main-nav a {
        font-size: 0.85rem;
        letter-spacing: 0.6px;
    }

    .search-form {
        gap: 10px;
    }

    .search-form input {
        width: 100%;
        max-width: 520px;
    }

    .search-form button {
        width: 100%;
        max-width: 520px;
    }

    .hero-text {
        margin: 18px auto 18px auto;
        padding: 10px 0;
        font-size: 1.2rem;
        line-height: 1.4;
        width: min(1100px, calc(100% - 32px));
    }

    .productos {
        margin-top: 10px;
        width: min(1200px, calc(100% - 32px));
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .producto {
        padding: 14px;
    }

    .producto img {
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .page-box {
        padding: 22px;
        margin: 28px auto;
    }

    .admin-caja {
        padding: 18px;
    }

    .admin-form .fila {
        grid-template-columns: 1fr;
    }

    .whatsapp-float {
        width: 60px;
        height: 60px;
        right: 16px;
        bottom: 16px;
    }

    .whatsapp-float img {
        width: 34px;
        height: 34px;
    }
}

/* iOS Safari: prevent fixed background "jump" */
@supports (-webkit-touch-callout: none) {
    body {
        background-attachment: scroll;
    }
}
/* ===== MODERN ENHANCEMENTS (Add to end of style.css) ===== */

/* 1. Smooth scrolling & better typography */
html {
    scroll-behavior: smooth;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 2. Header glassmorphism effect */
.header {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    background: linear-gradient(135deg, rgba(30,30,30,0.92), rgba(50,50,50,0.88)), 
                url("../img/header-bg.jpg") no-repeat center center;
    background-size: cover;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

/* 3. Nav links with smooth underline animation */
.main-nav a {
    position: relative;
    padding-bottom: 6px;
    border-bottom: none;
    transition: color 0.25s ease;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #f5b301, #ffcf40);
    transition: width 0.3s ease, left 0.3s ease;
}

.main-nav a:hover::after {
    width: 100%;
    left: 0;
}

.main-nav a:hover {
    border-bottom: none;
    color: #f5c400;
}

/* 4. Search input focus glow */
.search-form input {
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
    border: 2px solid transparent;
}

.search-form input:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2);
    border-color: #2563eb;
}

/* 5. Search button gradient & hover */
.search-form button {
    background: linear-gradient(135deg, #2563eb, #1e40af);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.search-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

/* 6. Product cards with subtle gradient border on hover */
.producto {
    border: 1px solid rgba(0,0,0,0.06);
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                box-shadow 0.3s ease,
                border-color 0.3s ease;
}

.producto:hover {
    border-color: rgba(245, 180, 1, 0.3);
}

/* 7. Price with gradient text */
.precio,
.precio-grande {
    background: linear-gradient(135deg, #ff9800, #f57c00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 8. Footer gradient top border */
.footer {
    background: linear-gradient(180deg, #3a2020 0%, #2f1c1c 100%);
    border-top: 3px solid;
    border-image: linear-gradient(90deg, #f5b301, #ff9800, #f5b301) 1;
}

/* 9. Footer links hover effect */
.footer a {
    transition: color 0.2s ease;
}

.footer a:hover {
    color: #f5c400;
    text-decoration: none;
}

/* 10. WhatsApp pulse animation */
@keyframes pulse-ring {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(1.4); opacity: 0; }
}

.whatsapp-float::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #25d366;
    animation: pulse-ring 2s ease-out infinite;
    z-index: -1;
}

/* 11. Cookie banner modern style */
.cookie-banner {
    background: rgba(17, 17, 17, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
}

.cookie-banner button {
    background: linear-gradient(135deg, #ffd700, #f5b301);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.cookie-banner button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(245, 180, 1, 0.4);
}

/* 12. Hero text subtle shadow for readability */
.hero-text h1,
.hero-text h2,
.hero-text p {
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

/* 13. Product image zoom on hover */
.producto img {
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.producto:hover img {
    transform: scale(1.05);
}

/* 14. Admin buttons modern style */
.btn-admin {
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-admin:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 15. Form inputs modern focus */
.contact-form input:focus,
.contact-form textarea:focus,
.admin-caja input:focus,
.admin-caja textarea:focus {
    box-shadow: 0 0 0 3px rgba(255, 152, 0, 0.15);
}
/* ===== ADDITIONAL MODERN ENHANCEMENTS ===== */

/* 16. Logo hover effect */
.header-logo img {
    transition: transform 0.3s ease, filter 0.3s ease;
}

.header-logo:hover img {
    transform: scale(1.05);
    filter: drop-shadow(0 0 8px rgba(245, 196, 0, 0.4));
}

/* 17. Improved "No Image" placeholder */
.no-image {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    position: relative;
    overflow: hidden;
}

.no-image::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50px;
    height: 50px;
    transform: translate(-50%, -50%);
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%239ca3af'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z'/%3E%3C/svg%3E") no-repeat center;
    opacity: 0.5;
}

/* 18. Modernized VENDIDO ribbon */
.vendido::after {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    box-shadow: 0 3px 10px rgba(185, 28, 28, 0.4);
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* 19. Page box entrance animation */
.page-box {
    animation: fadeSlideUp 0.5s ease-out;
}

@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 20. Hero text entrance animation */
.hero-text {
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 21. Staggered product card animations */
.producto-link {
    animation: cardEntrance 0.4s ease-out backwards;
}

.producto-link:nth-child(1) { animation-delay: 0.05s; }
.producto-link:nth-child(2) { animation-delay: 0.1s; }
.producto-link:nth-child(3) { animation-delay: 0.15s; }
.producto-link:nth-child(4) { animation-delay: 0.2s; }
.producto-link:nth-child(5) { animation-delay: 0.25s; }
.producto-link:nth-child(6) { animation-delay: 0.3s; }

@keyframes cardEntrance {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 22. Pagination modern style */
.paginacion a {
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.paginacion a:hover {
    background: #4a5568;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.paginacion a.active {
    background: linear-gradient(135deg, #4a5568, #2d3748);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* 23. Footer columns hover effect */
.footer-col strong {
    position: relative;
    display: inline-block;
    padding-bottom: 4px;
}

.footer-col strong::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: linear-gradient(90deg, #f5b301, transparent);
}

/* 24. Contact form floating labels effect (optional - requires HTML changes) */
.contact-form input:not(:placeholder-shown),
.contact-form textarea:not(:placeholder-shown) {
    background: #ffffff;
}

/* 25. Subtle grid lines for productos section */
.productos {
    position: relative;
}

/* 26. Product card loading skeleton (for slow connections) */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.producto img[src=""],
.producto img:not([src]) {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* 27. Better focus states for accessibility */
.main-nav a:focus,
.search-form input:focus,
.search-form button:focus,
.footer a:focus,
.btn-admin:focus {
    outline: 2px solid #f5c400;
    outline-offset: 3px;
}

/* 28. Smooth section transitions on scroll */
.hero-text,
.productos,
.page-box,
.footer {
    transition: opacity 0.3s ease;
}

/* 29. Gallery images with lightbox-ready cursor */
.galeria-producto img {
    cursor: zoom-in;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.galeria-producto img:hover {
    transform: scale(1.03);
    box-shadow: 0 12px 30px rgba(0,0,0,0.2);
}

/* 30. Admin table row highlight animation */
.admin-tabla tr {
    transition: background 0.15s ease;
}

.admin-tabla tr:hover td {
    background: rgba(245, 180, 1, 0.05);
}
/* ===== LEGAL PAGES (ALL) ===== */
.legal-page,
.legal-page p,
.legal-page li,
.legal-page h1,
.legal-page h2,
.legal-page h3,
.legal-page strong {
  color: #ffffff; /* change this */
}
.legal-page a,
.legal-page a:visited {
  color: #ffd700; /* change this */
  text-decoration: underline;
}
/* ===== WATERMARK ON EACH IMAGE ===== */
.galeria-img-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    cursor: pointer;
}

.galeria-img-wrap img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 14px;
    display: block;
}

.galeria-img-wrap::after {
    content: '';
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 70px;
    height: 70px;
    background: url('../img/logo.png') no-repeat center center;
    background-size: contain;
    opacity: 0.5;
    pointer-events: none;
    z-index: 2;
}

/* ===== LIGHTBOX POPUP ===== */
#lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 99999;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

#lightbox.active {
    display: flex;
}

#lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 100000;
}
/* ===== WATERMARK ON PRODUCT CARDS (Home + Inventory) ===== */
.producto {
    position: relative;
}

.producto > img {
    position: relative;
}

.producto::after {
    content: '';
    position: absolute;
    top: 26px;
    right: 26px;
    width: 55px;
    height: 55px;
    background: url('/desguace/assets/img/logo.png') no-repeat center center;
    background-size: contain;
    opacity: 0.5;
    pointer-events: none;
    z-index: 3;
}

/* ===== WATERMARK ON LIGHTBOX POPUP ===== */
#lightbox {
    position: fixed;
}

#lightbox-img {
    position: relative;
    z-index: 100000;
}
#lightbox.active::after {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    background: url('/desguace/assets/img/logo.png') no-repeat center center;
    background-size: contain;
    opacity: 0.4;
    pointer-events: none;
    z-index: 100001;
}
/* ===== SHIPPING BADGE ===== */
.envio-gratis {
    display: inline-block;
    background: linear-gradient(135deg, #ff9800, #f57c00);
    color: #fff;
    padding: 8px 20px;
    border-radius: 999px;
    font-size: clamp(13px, 2.2vw, 16px);
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-top: 6px;
    margin-bottom: 10px;
}

/* ===== TESTIMONIALS CAROUSEL ===== */
.testimonios {
    width: min(1200px, calc(100% - 32px));
    margin: 50px auto 30px;
}
.testimonios-container {
    position: relative;
}
.testimonios h2 {
    color: #ffffff;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.testimonios-slider {
    display: flex;
    gap: 16px;
    overflow: hidden;
    scroll-behavior: smooth;
}
.testimonio-card {
    flex: 0 0 calc(33.333% - 11px);
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 20px 22px;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}
.testimonio-titulo {
    display: block;
    font-weight: 700;
    color: #1f2937;
    font-size: 15px;
    margin-bottom: 10px;
}
.testimonio-rating {
    color: #6b7280;
    font-size: 13px;
    margin-bottom: 12px;
}
.estrellas-doradas {
    color: #f5b301;
    letter-spacing: 2px;
}
.testimonio-card p {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 14px 0;
}
.testimonio-autor {
    margin-top: 12px;
    font-size: 13px;
    color: #6b7280;
}
.testimonio-autor strong {
    color: #1f2937;
    font-weight: 600;
    margin-right: 6px;
    display: inline;
    font-size: 13px;
}
.testimonio-autor em {
    font-style: italic;
}
.testimonios-nav {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
}
.testimonios-nav button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.15);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.2s ease;
}
.testimonios-nav button:hover {
    background: rgba(255,255,255,0.3);
}
@media (max-width: 768px) {
    .testimonio-card {
        flex: 0 0 100%;
    }
}
@media (min-width: 769px) and (max-width: 1024px) {
    .testimonio-card {
        flex: 0 0 calc(50% - 8px);
    }
}
/* ===== CHATBOT FLOAT (left side) ===== */
.chatbot-float {
    position: fixed;
    bottom: 22px;
    left: 22px;
    width: 72px;
    height: 72px;
    background: #e65100;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
    z-index: 9999;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: none;
    color: #fff;
    font-size: 28px;
}

.chatbot-float:hover {
    transform: scale(1.08);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.chatbot-float::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #e65100;
    animation: pulse-ring 2s ease-out infinite;
    z-index: -1;
}

.chatbot-window {
    display: none;
    position: fixed;
    bottom: 100px;
    left: 22px;
    width: 360px;
    max-width: calc(100vw - 44px);
    max-height: 70vh;
    background: #1a1a1a;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    z-index: 10000;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
}

.chatbot-window.open {
    display: flex;
}

.chatbot-header {
    background: #e65100;
    color: #fff;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    font-size: 14px;
}

.chatbot-header-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chatbot-header-avatar {
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
}

.chatbot-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.8;
}

.chatbot-close:hover {
    opacity: 1;
}

.chatbot-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 200px;
    max-height: 350px;
}

.chatbot-msg {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.5;
    white-space: pre-line;
}

.chatbot-msg.bot {
    background: #2a2a2a;
    color: #e0e0e0;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.chatbot-msg.user {
    background: #e65100;
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chatbot-quick {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 16px 12px;
}

.chatbot-quick button {
    background: #2a2a2a;
    color: #ccc;
    border: 1px solid #444;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.chatbot-quick button:hover {
    background: #e65100;
    color: #fff;
    border-color: #e65100;
}

.chatbot-phone {
    text-align: center;
    padding: 8px;
    border-top: 1px solid #333;
}

.chatbot-phone a {
    color: #999;
    font-size: 11px;
    text-decoration: none;
}

.chatbot-phone a:hover {
    color: #e65100;
}

.chatbot-input {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid #333;
}

.chatbot-input input {
    flex: 1;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 10px 14px;
    color: #fff;
    font-size: 13px;
    outline: none;
}

.chatbot-input input:focus {
    border-color: #e65100;
}

.chatbot-input button {
    background: #e65100;
    border: none;
    border-radius: 8px;
    padding: 10px 14px;
    color: #fff;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.2s;
}

.chatbot-input button:hover {
    background: #ff6d00;
}

.chatbot-typing {
    display: flex;
    gap: 4px;
    padding: 10px 14px;
}

.chatbot-typing .dot {
    animation: typingDot 1.4s infinite;
    font-size: 20px;
    line-height: 1;
    color: #888;
}

.chatbot-typing .dot:nth-child(2) {
    animation-delay: 0.2s;
}

.chatbot-typing .dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingDot {
    0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
    30% { opacity: 1; transform: translateY(-4px); }
}

@keyframes pulse-ring {
    0% { transform: scale(1); opacity: 0.4; }
    100% { transform: scale(1.5); opacity: 0; }
}

@media (max-width: 768px) {
    .chatbot-float {
        bottom: 16px;
        left: 16px;
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
    .chatbot-window {
        bottom: 85px;
        left: 10px;
        width: calc(100vw - 20px);
    }
}
.contact-alert {
    padding: 14px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 15px;
    font-weight: 500;
}
.contact-alert-success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}
.contact-alert-error {
    background: #fbe9e7;
    color: #c62828;
    border: 1px solid #ef9a9a;
}
.btn-comprar-ahora {
    display: inline-block;
    background: #e65100;
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    padding: 14px 40px;
    border-radius: 8px;
    text-decoration: none;
    text-align: center;
    margin-top: 10px;
    margin-bottom: 20px;
    transition: background 0.2s;
}
.btn-comprar-ahora:hover {
    background: #bf4500;
    color: #ffffff;
}
.aviso-online {
    max-width: 900px;
    margin: 0 auto 30px auto;
    padding: 24px 30px;
    background: #1e1e1e;
    border-left: 4px solid #e65100;
    border-radius: 6px;
    font-size: 15px;
    line-height: 1.7;
    color: #cccccc;
}
.aviso-online p {
    margin: 0 0 12px 0;
}
.aviso-online p:last-child {
    margin-bottom: 0;
}

