/* ============================================
   GUFTER Chile — Custom Styles
   ============================================ */

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('fonts/inter-var-subset.woff2') format('woff2');
    unicode-range: U+20-7e, U+a0-a1, U+a9-aa, U+ae, U+b0-b3, U+ba, U+bf, U+c1, U+c3-c4, U+c9, U+cb, U+cd, U+cf, U+d1, U+d3, U+d5-d7, U+da, U+dc-dd, U+e1, U+e3-e4, U+e9, U+eb, U+ed, U+ef, U+f1, U+f3, U+f5-f7, U+fa, U+fc-fd, U+ff, U+106-107, U+128-129, U+139-13a, U+143-144, U+154-155, U+15a-15b, U+168-169, U+178-17a, U+1d7-1d8, U+1f4-1f5, U+301, U+303, U+308, U+1e26-1e27, U+1e2e-1e31, U+1e3e-1e3f, U+1e4c-1e4f, U+1e54-1e55, U+1e78-1e79, U+1e7c-1e7d, U+1e82-1e85, U+1e8c-1e8d, U+1e97, U+1ebc-1ebd, U+1ef8-1ef9, U+2013-2014, U+2018-2019, U+201c-201d, U+2022, U+2026, U+20ac, U+2192, U+2248;
}

:root {
    --color-brand: #facc15;
    --header-height: 52px;
}

@media (min-width: 640px) {
    :root {
        --header-height: 56px;
    }
}

/* ============================================
   BASE
   ============================================ */

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   ANIMATIONS
   ============================================ */

.animate-fade {
    animation: fadeIn 0.45s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================================
   MOBILE HAMBURGER MENU
   ============================================ */

#mobile-menu {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#mobile-menu.menu-open {
    display: flex;
    opacity: 1;
}

#mobile-menu[inert] {
    pointer-events: none;
}

#mobile-menu > button,
#mobile-menu > div {
    animation: slideDown 0.4s ease-out backwards;
}

#mobile-menu > button:nth-child(1) { animation-delay: 0.05s; }
#mobile-menu > button:nth-child(2) { animation-delay: 0.12s; }
#mobile-menu > div:nth-child(3)    { animation-delay: 0.2s; }

/* Prevent body scroll when menu is open */
body.menu-is-open {
    overflow: hidden;
}

/* ============================================
   NAV ACTIVE STATE
   ============================================ */

.nav-link {
    position: relative;
    padding-bottom: 4px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: #0f172a;
    border-radius: 2px;
    transform: translateX(-50%);
    transition: width 0.25s ease;
}

.nav-link.active::after {
    width: 100%;
}

/* ============================================
   SCROLL TARGETS
   ============================================ */

#quienes-somos {
    scroll-margin-top: var(--header-height);
}

#catalogo {
    scroll-margin-top: var(--header-height);
}

/* ============================================
   PRODUCT IMAGES
   ============================================ */

/* product-img class kept for hooks; no non-standard rendering hint. */

/* ============================================
   FOCUS STYLES
   ============================================ */

button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--color-brand);
    outline-offset: 2px;
}

/* ============================================
   HERO SECTION (mobile tweaks)
   ============================================ */

@media (max-width: 639px) {
    .hero-section {
        min-height: 340px;
        height: auto;
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
}

/* ============================================
   CARD HOVER EFFECTS (enhanced)
   ============================================ */

.card-category {
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.card-category:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.12);
}

.card-product {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card-product:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.10);
}

/* ============================================
   CTA BUTTONS (enhanced)
   ============================================ */

.cta-whatsapp {
    position: relative;
    overflow: hidden;
}

.cta-whatsapp::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.5s ease;
}

.cta-whatsapp:hover::after {
    left: 100%;
}

/* ============================================
   REDUCED MOTION
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .animate-fade { animation: none; }
    #mobile-menu { transition: none; }
    #mobile-menu > button,
    #mobile-menu > div { animation: none; }
    .card-category,
    .card-product { transition: none; }
    .cta-whatsapp::after { display: none; }
    .nav-link::after { transition: none; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    header,
    footer,
    #mobile-menu,
    .no-print { display: none !important; }
    body { background: white !important; color: black !important; }
    main { padding: 1rem; }
    img { max-width: 300px; }
}

/* ============================================
   AVISO DE COOKIES (inyectado por ga.js)
   ============================================ */

.cookie-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 150;
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 24px;
    padding: 18px 20px;
    background: #0f172a;
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 4px solid var(--color-brand);
    border-radius: 14px;
    box-shadow: 0 20px 40px rgba(2, 6, 23, 0.45);
    font-size: 14px;
    line-height: 1.5;
    animation: fadeIn 0.35s ease-out;
}

.cookie-banner__text {
    flex: 1 1 320px;
    margin: 0;
}

.cookie-banner__text strong {
    color: #fff;
}

.cookie-banner__actions {
    display: flex;
    gap: 10px;
    flex: 0 0 auto;
    margin-left: auto;
}

.cookie-btn {
    font-weight: 900;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 12px 20px;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.cookie-btn--primary {
    background: var(--color-brand);
    color: #0f172a;
    border: 1px solid var(--color-brand);
}

.cookie-btn--primary:hover {
    background: #fde047;
}

.cookie-btn--ghost {
    background: transparent;
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.cookie-btn--ghost:hover {
    border-color: #fff;
    color: #fff;
}

.cookie-btn:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

@media (max-width: 480px) {
    .cookie-banner__actions {
        width: 100%;
    }
    .cookie-btn {
        flex: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cookie-banner {
        animation: none;
    }
}
