/* ═══════════════════════════════════════════════════════════════
 * MOTION-CORE.CSS — Brillo de Amalia
 * Tokens de diseño, utilidades de animación y accesibilidad
 * Se carga en TODAS las páginas (~2KB)
 * ═══════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────
 * 1. DESIGN TOKENS (tokens Stitch)
 * ───────────────────────────────────────────── */
:root {
    /* Paleta */
    --bda-primary:    #2c3e50;
    --bda-secondary:  #95a5a6;
    --bda-accent:     #bdc3c7;
    --bda-bg-light:   #fcfcfc;
    --bda-bg-dark:    #1a1a1a;
    --bda-text:       #374151;   /* gray-800 equivalente */
    --bda-text-light: #6b7280;   /* gray-500 */
    --bda-error:      #e74c3c;
    --bda-success:    #27ae60;

    /* Tipografía */
    --bda-font-display: 'Newsreader', serif;
    --bda-font-sans:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Espaciado (referencia Stitch py-24 = 6rem) */
    --bda-section-y:    6rem;
    --bda-container-x:  1.5rem;

    /* Radios (Stitch: rounded-sm = 0.125rem, DEFAULT = 0.25rem) */
    --bda-radius:       0.25rem;
    --bda-radius-lg:    0.5rem;
    --bda-radius-full:  9999px;

    /* Motion tokens */
    --bda-ease:         cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --bda-ease-out:     cubic-bezier(0.22, 1, 0.36, 1);
    --bda-ease-in-out:  cubic-bezier(0.76, 0, 0.24, 1);
    --bda-ease-spring:  cubic-bezier(0.34, 1.56, 0.64, 1);
    --bda-duration-xs:  0.15s;
    --bda-duration-fast: 0.3s;
    --bda-duration-base: 0.6s;
    --bda-duration-slow: 1s;
    --bda-duration-glacial: 1.5s;

    /* Shared storefront surfaces */
    --bda-glow-soft: rgba(255, 255, 255, 0.42);
    --bda-glow-silver: rgba(189, 195, 199, 0.34);
    --bda-sheen-start: rgba(255, 255, 255, 0);
    --bda-sheen-mid: rgba(255, 255, 255, 0.52);
    --bda-sheen-end: rgba(255, 255, 255, 0);
    --bda-surface-blur: 18px;
    --bda-cta-surface-blur: 10px;

    /* Z-index scale */
    --bda-z-base:      1;
    --bda-z-dropdown:  100;
    --bda-z-sticky:    200;
    --bda-z-overlay:   998;
    --bda-z-modal:     999;
    --bda-z-toast:     1100;
}

/*
 * La expresion primaria del sitio es clara.
 * No heredamos un dark mode automatico del sistema porque rompe el contraste
 * de la direccion visual editorial y de varios bloques de la Home.
 */

/* ─────────────────────────────────────────────
 * 2. ESTADOS INICIALES (para GSAP reveals)
 * ───────────────────────────────────────────── */

/* Reveal genérico — ocultar solo cuando motion está listo */
html.bda-motion-ready body.bda-storefront [data-reveal] {
    opacity: 0;
    transform: translateY(30px);
    will-change: opacity, transform;
}

/* Reveal desde izquierda */
html.bda-motion-ready body.bda-storefront [data-reveal-direction="left"] {
    transform: translateX(-30px) translateY(0);
}

/* Reveal desde derecha */
html.bda-motion-ready body.bda-storefront [data-reveal-direction="right"] {
    transform: translateX(30px) translateY(0);
}

/* Clip-path wipe (editorial) */
html.bda-motion-ready body.bda-storefront [data-reveal-clip] {
    clip-path: inset(0 0 100% 0);
    will-change: clip-path;
}

/* Mask reveal (Props-like): contenedor recorta, inner sube */
[data-reveal-mask] {
    overflow: hidden;
}
[data-reveal-mask] .bda-mask-inner {
    display: inline-block;
    transform: none;
    will-change: auto;
}
html.bda-motion-ready body.bda-storefront [data-reveal-mask] .bda-mask-inner {
    transform: translate3d(0, 110%, 0);
    will-change: transform;
}

/* Stagger children — padres invisibles hasta animación */
html.bda-motion-ready body.bda-storefront [data-stagger-child] {
    opacity: 0;
    transform: translateY(25px);
    will-change: opacity, transform;
}

/* ─────────────────────────────────────────────
 * 3. NAVBAR SCROLLED (toggle por JS)
 * ───────────────────────────────────────────── */
.bda-nav,
.site-header,
header[data-sticky] {
    transition: height var(--bda-duration-fast) var(--bda-ease),
                box-shadow var(--bda-duration-fast) var(--bda-ease),
                background-color var(--bda-duration-fast) var(--bda-ease);
}

.bda-nav-scrolled {
    box-shadow: 0 1px 10px rgba(0, 0, 0, 0.06) !important;
}

/* ─────────────────────────────────────────────
 * 4. TRANSICIONES BASE DE COMPONENTES
 * ───────────────────────────────────────────── */

/* Links — underline animada */
.bda-link-animated {
    position: relative;
    display: inline-block;
}
.bda-link-animated::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: currentColor;
    transition: width var(--bda-duration-fast) var(--bda-ease-out);
}
.bda-link-animated:hover::after {
    width: 100%;
}

/* CTA shared system — storefront premium language */
body.bda-storefront .bda-btn,
body.bda-storefront .bda-hero-cta,
body.bda-storefront .bda-plp-quick-add a,
body.bda-storefront .single_add_to_cart_button {
    --bda-cta-bg: linear-gradient(135deg, rgba(44, 62, 80, 0.96), rgba(44, 62, 80, 0.88));
    --bda-cta-text: #ffffff;
    --bda-cta-border: rgba(44, 62, 80, 0.16);
    --bda-cta-shadow: 0 18px 36px rgba(17, 24, 39, 0.16), inset 0 1px 0 var(--bda-glow-soft);
    --bda-cta-hover-border: rgba(44, 62, 80, 0.24);
    --bda-cta-hover-shadow: 0 22px 42px rgba(17, 24, 39, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.52);
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    overflow: hidden;
    isolation: isolate;
    min-height: 3.25rem;
    padding: 0.875rem 1.75rem;
    border-radius: 999px;
    border: 1px solid var(--bda-cta-border);
    background: var(--bda-cta-bg);
    color: var(--bda-cta-text);
    box-shadow: var(--bda-cta-shadow);
    text-decoration: none;
    cursor: pointer;
    backdrop-filter: blur(var(--bda-cta-surface-blur));
    -webkit-backdrop-filter: blur(var(--bda-cta-surface-blur));
    transition:
        box-shadow 0.35s var(--bda-ease-out),
        border-color 0.35s var(--bda-ease),
        background 0.35s var(--bda-ease),
        color 0.35s var(--bda-ease);
}

body.bda-storefront .bda-btn::before,
body.bda-storefront .bda-hero-cta::before,
body.bda-storefront .bda-plp-quick-add a::before,
body.bda-storefront .single_add_to_cart_button::before {
    content: '';
    position: absolute;
    inset: 1px;
    border-radius: inherit;
    pointer-events: none;
    background:
        radial-gradient(circle at 20% 18%, var(--bda-glow-soft), transparent 42%),
        radial-gradient(circle at 82% 78%, var(--bda-glow-silver), transparent 48%);
    opacity: 0.72;
    z-index: -1;
}

body.bda-storefront .bda-btn::after,
body.bda-storefront .bda-hero-cta::after,
body.bda-storefront .bda-plp-quick-add a::after,
body.bda-storefront .single_add_to_cart_button::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    transform: translateX(-140%);
    background: linear-gradient(110deg, var(--bda-sheen-start), var(--bda-sheen-mid), var(--bda-sheen-end));
}

body.bda-storefront .bda-btn.is-sheening::after,
body.bda-storefront .bda-hero-cta.is-sheening::after,
body.bda-storefront .bda-plp-quick-add a.is-sheening::after,
body.bda-storefront .single_add_to_cart_button.is-sheening::after {
    animation: bda-sheen-sweep 0.9s var(--bda-ease-out);
}

body.bda-storefront .bda-btn:focus-visible,
body.bda-storefront .bda-hero-cta:focus-visible,
body.bda-storefront .bda-plp-quick-add a:focus-visible,
body.bda-storefront .single_add_to_cart_button:focus-visible {
    border-color: rgba(44, 62, 80, 0.32);
    box-shadow:
        0 0 0 4px rgba(44, 62, 80, 0.1),
        var(--bda-cta-hover-shadow);
}

body.bda-storefront .bda-btn:active,
body.bda-storefront .bda-hero-cta:active,
body.bda-storefront .bda-plp-quick-add a:active,
body.bda-storefront .single_add_to_cart_button:active {
    transform: translateY(0) scale(0.985);
}

body.bda-storefront .bda-hero-cta,
body.bda-storefront .single_add_to_cart_button {
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

body.bda-storefront .bda-hero-cta--secondary {
    --bda-cta-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(248, 250, 252, 0.62));
    --bda-cta-text: #16202b;
    --bda-cta-border: rgba(149, 165, 166, 0.32);
    --bda-cta-shadow: 0 18px 34px rgba(17, 24, 39, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.72);
    --bda-cta-hover-border: rgba(44, 62, 80, 0.18);
    --bda-cta-hover-shadow: 0 20px 38px rgba(17, 24, 39, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

body.bda-storefront .bda-plp-quick-add a {
    width: 100%;
    padding-inline: 1.35rem;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

@media (hover: hover) and (pointer: fine) {
    body.bda-storefront .bda-btn:hover,
    body.bda-storefront .bda-hero-cta:hover,
    body.bda-storefront .bda-plp-quick-add a:hover,
    body.bda-storefront .single_add_to_cart_button:hover {
        transform: translateY(-2px);
        border-color: var(--bda-cta-hover-border);
        box-shadow: var(--bda-cta-hover-shadow);
    }

    body.bda-storefront .bda-btn,
    body.bda-storefront .bda-hero-cta,
    body.bda-storefront .bda-plp-quick-add a,
    body.bda-storefront .single_add_to_cart_button {
        transition:
            transform 0.35s var(--bda-ease-out),
            box-shadow 0.35s var(--bda-ease-out),
            border-color 0.35s var(--bda-ease),
            background 0.35s var(--bda-ease),
            color 0.35s var(--bda-ease);
    }
}

/* Card image zoom (ya definido en Stitch, reforzamos) */
.bda-card-img {
    transition: transform 0.7s var(--bda-ease-out);
    will-change: transform;
}
.bda-card-img:hover,
*:hover > .bda-card-img {
    transform: scale(1.05);
}

/* ─────────────────────────────────────────────
 * 5. UTILIDADES
 * ───────────────────────────────────────────── */

/* Brand nav shared across Home and Woo routes */
body.bda-storefront {
    --bda-admin-bar-offset: 0px;
    --bda-nav-offset: 7.5rem;
}

body.bda-storefront.admin-bar {
    --bda-admin-bar-offset: 32px;
}

@media (max-width: 782px) {
    body.bda-storefront.admin-bar {
        --bda-admin-bar-offset: 46px;
    }
}

body.bda-storefront .bda-nav {
    position: fixed;
    inset: 0 0 auto 0;
    top: var(--bda-admin-bar-offset);
    z-index: 980;
    background: linear-gradient(180deg, rgba(252, 252, 252, 0.92), rgba(252, 252, 252, 0.8));
    border-bottom: 1px solid rgba(149, 165, 166, 0.24);
    backdrop-filter: blur(var(--bda-surface-blur));
    -webkit-backdrop-filter: blur(var(--bda-surface-blur));
    box-shadow: 0 12px 32px rgba(17, 24, 39, 0.06);
}

body.bda-storefront .bda-nav-shell {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    min-height: 84px;
    gap: 1.5rem;
}

body.bda-storefront .bda-nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

body.bda-storefront .bda-nav-links--right {
    justify-content: flex-end;
}

body.bda-storefront .bda-nav-links a,
body.bda-storefront .bda-nav-links button {
    appearance: none;
    padding: 0;
    border: 0;
    background: transparent;
    font-size: 0.78rem;
    font-weight: 600;
    font-family: inherit;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #344256;
    text-decoration: none;
    cursor: pointer;
}

body.bda-storefront .bda-nav-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    text-decoration: none;
    color: #1b2430;
    text-align: center;
}

body.bda-storefront .bda-brand-logo {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
}

body.bda-storefront .bda-brand-logo--horizontal {
    width: clamp(240px, 19vw, 320px);
}

body.bda-storefront .bda-brand-logo--compact {
    width: clamp(88px, 9vw, 128px);
}

body.bda-search-open {
    overflow: hidden;
}

body.bda-storefront .bda-search-trigger[aria-expanded="true"] {
    color: #111827;
}

body.bda-storefront .bda-search-overlay {
    position: fixed;
    inset: var(--bda-admin-bar-offset) 0 0;
    z-index: 970;
    background: rgba(17, 24, 39, 0.18);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

body.bda-storefront .bda-search-overlay[hidden],
body.bda-storefront .bda-search-panel[hidden] {
    display: none !important;
}

body.bda-storefront .bda-search-panel {
    position: fixed;
    top: calc(var(--bda-admin-bar-offset) + var(--bda-nav-offset) - 0.65rem);
    left: 50%;
    z-index: 990;
    display: grid;
    gap: 1rem;
    width: min(42rem, calc(100vw - 2rem));
    max-height: calc(100vh - var(--bda-admin-bar-offset) - 2rem);
    overflow: auto;
    padding: clamp(1rem, 2vw, 1.35rem);
    border: 1px solid rgba(149, 165, 166, 0.28);
    border-radius: var(--bda-radius-lg);
    background:
        radial-gradient(circle at 12% 0%, rgba(255, 255, 255, 0.86), transparent 34%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(247, 249, 250, 0.94));
    box-shadow:
        0 28px 72px rgba(15, 23, 42, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.86);
    transform: translateX(-50%);
}

body.bda-storefront .bda-search-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

body.bda-storefront .bda-search-panel-eyebrow {
    display: block;
    margin-bottom: 0.28rem;
    color: #64748b;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

body.bda-storefront .bda-search-panel-title {
    margin: 0;
    color: #111827;
    font-family: var(--bda-font-display);
    font-size: clamp(1.9rem, 4vw, 2.65rem);
    line-height: 0.95;
}

body.bda-storefront .bda-search-panel-close {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 2.5rem;
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid rgba(149, 165, 166, 0.28);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    color: #253241;
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
}

body.bda-storefront .bda-search-panel-copy {
    max-width: 35rem;
    margin: 0;
    color: #526174;
    font-size: 0.95rem;
    line-height: 1.65;
}

body.bda-storefront .bda-product-search-form {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    width: 100%;
    padding: 0.45rem;
    border: 1px solid rgba(149, 165, 166, 0.28);
    border-radius: var(--bda-radius-lg);
    background: rgba(255, 255, 255, 0.9);
    box-shadow:
        0 16px 36px rgba(15, 23, 42, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

body.bda-storefront .bda-product-search-field {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 2.9rem;
    padding: 0 0.85rem;
    border: 0;
    background: transparent;
    color: #111827;
    font-family: var(--bda-font-sans);
    font-size: 1rem;
    line-height: 1.2;
}

body.bda-storefront .bda-product-search-field::placeholder {
    color: #7a8796;
}

body.bda-storefront .bda-product-search-field:focus {
    outline: none;
}

body.bda-storefront .bda-product-search-button {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-height: 2.9rem;
    padding: 0 1.2rem;
    border: 1px solid rgba(44, 62, 80, 0.18);
    border-radius: 999px;
    background: #2c3e50;
    color: #fff;
    cursor: pointer;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

body.bda-storefront .bda-search-panel-link {
    justify-self: start;
    color: #2c3e50;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    text-decoration: none;
}

body.bda-storefront .bda-product-search-form:focus-within {
    border-color: rgba(44, 62, 80, 0.42);
    box-shadow:
        0 0 0 4px rgba(44, 62, 80, 0.08),
        0 18px 40px rgba(15, 23, 42, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.94);
}

body.bda-storefront:not(.home) .ct-header,
body.bda-storefront:not(.home) #header,
body.bda-storefront:not(.home) .site-header,
body.bda-storefront:not(.home) .site-header-container {
    display: none !important;
}

body.bda-storefront:not(.home) .site-main {
    padding-top: calc(var(--bda-nav-offset) + var(--bda-admin-bar-offset));
}

body.bda-storefront .bda-homepage {
    position: relative;
    isolation: isolate;
}

body.bda-storefront .bda-homepage::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 18% 14%, rgba(255, 255, 255, 0.36), transparent 24%),
        radial-gradient(circle at 82% 24%, rgba(189, 195, 199, 0.16), transparent 20%);
    mix-blend-mode: screen;
}

body.bda-storefront .bda-homepage > * {
    position: relative;
    z-index: 1;
}

@media (max-width: 767px) {
    body.bda-storefront .bda-nav-shell {
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 0.75rem;
        padding-block: 0.85rem;
    }

    body.bda-storefront .bda-nav-links {
        gap: 0.85rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    body.bda-storefront .bda-nav-links a,
    body.bda-storefront .bda-nav-links button {
        font-size: 0.7rem;
        letter-spacing: 0.1em;
    }

    body.bda-storefront .bda-brand-logo--horizontal {
        width: clamp(190px, 52vw, 240px);
    }

    body.bda-storefront .bda-search-panel {
        top: calc(var(--bda-admin-bar-offset) + var(--bda-nav-offset) - 0.3rem);
        width: calc(100vw - 1rem);
        padding: 1rem;
    }

    body.bda-storefront .bda-product-search-form {
        gap: 0.42rem;
        padding: 0.38rem;
    }

    body.bda-storefront .bda-product-search-field {
        min-height: 2.75rem;
        padding-inline: 0.65rem;
        font-size: 0.94rem;
    }

    body.bda-storefront .bda-product-search-button {
        min-height: 2.75rem;
        padding-inline: 0.9rem;
        font-size: 0.66rem;
        letter-spacing: 0.1em;
    }
}

/* Final visual audit pass: compact mobile navigation so commerce surfaces
 * start sooner and sticky nav does not consume a quarter of the viewport. */
@media (max-width: 767px) {
    body.bda-storefront {
        --bda-nav-offset: 6.85rem;
    }

    body.bda-storefront .bda-nav-shell {
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "brand brand"
            "left right";
        row-gap: 0.38rem;
        column-gap: 0.7rem;
        min-height: 0;
        padding-block: 0.48rem 0.56rem;
    }

    body.bda-storefront .bda-nav-brand {
        grid-area: brand;
        min-height: 2.65rem;
    }

    body.bda-storefront .bda-nav-links--left {
        grid-area: left;
        justify-self: end;
    }

    body.bda-storefront .bda-nav-links--right {
        grid-area: right;
        justify-self: start;
    }

    body.bda-storefront .bda-nav-links {
        gap: clamp(0.52rem, 2.8vw, 0.82rem);
        flex-wrap: nowrap;
    }

    body.bda-storefront .bda-nav-links a,
    body.bda-storefront .bda-nav-links button {
        font-size: clamp(0.58rem, 2.6vw, 0.66rem);
        letter-spacing: 0.095em;
        white-space: nowrap;
    }

    body.bda-storefront .bda-brand-logo--horizontal {
        width: clamp(150px, 38vw, 188px);
    }
}

@media (max-width: 430px) {
    body.bda-storefront {
        --bda-nav-offset: 6.45rem;
    }

    body.bda-storefront .bda-nav-shell {
        column-gap: 0.48rem;
        padding-inline: 0.85rem;
    }

    body.bda-storefront .bda-nav-links {
        gap: 0.44rem;
    }

    body.bda-storefront .bda-product-search-button {
        padding-inline: 0.72rem;
    }
}

@media (min-width: 768px) and (max-width: 900px) {
    body.bda-storefront {
        --bda-nav-offset: 5.25rem;
    }

    body.bda-storefront .bda-nav-shell {
        min-height: 74px;
        gap: 0.65rem;
        padding-inline: 1.15rem;
    }

    body.bda-storefront .bda-nav-links {
        min-width: 0;
        gap: 0.82rem;
        flex-wrap: nowrap;
    }

    body.bda-storefront .bda-nav-links a,
    body.bda-storefront .bda-nav-links button,
    body.bda-storefront .bda-cart-trigger {
        font-size: 0.66rem;
        letter-spacing: 0.105em;
        white-space: nowrap;
    }

    body.bda-storefront .bda-brand-logo--horizontal {
        width: clamp(165px, 23vw, 205px);
    }
}

/* Ocultar scrollbar (reusar patrón Stitch) */
.bda-no-scrollbar::-webkit-scrollbar { display: none; }
.bda-no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* Container principal (respeta tokens Stitch) */
.bda-container {
    width: 100%;
    max-width: 80rem; /* max-w-7xl = 80rem */
    margin-inline: auto;
    padding-inline: var(--bda-container-x);
}
@media (min-width: 1024px) {
    .bda-container { padding-inline: 2rem; }
}

/* Section spacing */
.bda-section {
    padding-block: var(--bda-section-y);
}

/* Overlay genérico */
.bda-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    pointer-events: none;
    transition: background var(--bda-duration-fast) ease;
    z-index: var(--bda-z-overlay);
}
.bda-overlay.is-active {
    background: rgba(0, 0, 0, 0.35);
    pointer-events: all;
}

/* ─────────────────────────────────────────────
 * 6. ACCESIBILIDAD — prefers-reduced-motion
 * ───────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    [data-reveal],
    [data-reveal-direction="left"],
    [data-reveal-direction="right"],
    [data-reveal-clip],
    [data-reveal-mask],
    [data-stagger-child] {
        opacity: 1 !important;
        transform: none !important;
        clip-path: none !important;
        will-change: auto !important;
    }

    [data-reveal-mask] .bda-mask-inner {
        transform: none !important;
        will-change: auto !important;
    }

    .bda-card-img {
        will-change: auto !important;
    }

    body.bda-storefront .bda-btn::after,
    body.bda-storefront .bda-hero-cta::after,
    body.bda-storefront .bda-plp-quick-add a::after,
    body.bda-storefront .single_add_to_cart_button::after {
        display: none !important;
    }

    body.bda-storefront .bda-btn:hover,
    body.bda-storefront .bda-hero-cta:hover,
    body.bda-storefront .bda-plp-quick-add a:hover,
    body.bda-storefront .single_add_to_cart_button:hover,
    body.bda-storefront .bda-btn:active,
    body.bda-storefront .bda-hero-cta:active,
    body.bda-storefront .bda-plp-quick-add a:active,
    body.bda-storefront .single_add_to_cart_button:active {
        transform: none !important;
    }
}

@keyframes bda-sheen-sweep {
    from {
        transform: translateX(-140%);
    }
    to {
        transform: translateX(140%);
    }
}

/* Shared pill CTA: extracted from the approved "Conocer historia" gesture. */
body.bda-storefront .bda-pill-cta {
    --bda-pill-accent: #3f4b59;
    --bda-pill-surface: rgba(255, 255, 255, 0.9);
    --bda-pill-text: #253241;
    --bda-pill-bubble: 3.05rem;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 3.35rem;
    padding: 0.35rem 0.35rem 0.35rem 1.35rem;
    overflow: hidden;
    isolation: isolate;
    border: 1px solid rgba(63, 75, 89, 0.26);
    border-radius: 999px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.82)),
        var(--bda-pill-surface);
    color: var(--bda-pill-text);
    box-shadow:
        0 16px 34px rgba(15, 23, 42, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    transition:
        color 0.35s var(--bda-ease),
        border-color 0.35s var(--bda-ease),
        box-shadow 0.35s var(--bda-ease-out),
        transform 0.35s var(--bda-ease-out);
}

body.bda-storefront .bda-pill-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    background: var(--bda-pill-accent);
    clip-path: inset(0 0 0 calc(100% - var(--bda-pill-bubble)) round 999px);
    transition: clip-path 0.42s var(--bda-ease-out);
}

body.bda-storefront .bda-pill-cta-label {
    position: relative;
    z-index: 1;
    color: currentColor;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
    transition: color 0.35s var(--bda-ease);
}

body.bda-storefront .bda-pill-cta-icon {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 calc(var(--bda-pill-bubble) - 0.7rem);
    width: calc(var(--bda-pill-bubble) - 0.7rem);
    height: calc(var(--bda-pill-bubble) - 0.7rem);
    border-radius: 999px;
    background: var(--bda-pill-accent);
    color: #fff;
    font-size: 0.78rem;
    line-height: 1;
    transition:
        background 0.35s var(--bda-ease),
        color 0.35s var(--bda-ease),
        transform 0.35s var(--bda-ease-out);
}

body.bda-storefront .bda-pill-cta--compact {
    width: 100%;
    min-height: 3.05rem;
    padding-left: 1.05rem;
    letter-spacing: 0.12em;
}

body.bda-storefront .bda-pill-cta--secondary {
    --bda-pill-surface: rgba(250, 251, 252, 0.86);
}

body.bda-storefront .bda-nav {
    transition:
        transform 0.28s var(--bda-ease-out),
        opacity 0.22s var(--bda-ease),
        box-shadow var(--bda-duration-fast) var(--bda-ease),
        background-color var(--bda-duration-fast) var(--bda-ease);
    will-change: transform;
}

body.bda-storefront .bda-nav.bda-nav--hidden {
    transform: translateY(calc(-100% - 12px));
    opacity: 0;
    pointer-events: none;
}

body.bda-storefront .bda-nav.bda-nav--revealed {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

@media (hover: hover) and (pointer: fine) {
    body.bda-storefront .bda-pill-cta:hover,
    body.bda-storefront .bda-pill-cta:focus-visible {
        color: #fff;
        border-color: rgba(63, 75, 89, 0.44);
        box-shadow:
            0 20px 42px rgba(15, 23, 42, 0.14),
            inset 0 1px 0 rgba(255, 255, 255, 0.4);
        transform: translateY(-2px);
    }

    body.bda-storefront .bda-pill-cta:hover::before,
    body.bda-storefront .bda-pill-cta:focus-visible::before {
        clip-path: inset(0 0 0 0 round 999px);
    }

    body.bda-storefront .bda-pill-cta:hover .bda-pill-cta-icon,
    body.bda-storefront .bda-pill-cta:focus-visible .bda-pill-cta-icon {
        background: #fff;
        color: var(--bda-pill-accent);
        transform: translateX(2px);
    }
}

/* Focus visible (a11y) */
:focus-visible {
    outline: 2px solid var(--bda-primary);
    outline-offset: 3px;
}
