/* =============================================================================
 * polish.css — capa final de refinamiento visual (UI/UX Pro Max audit)
 * Se carga DESPUÉS de editorial.css, conversion.css y a11y.css para poder
 * sobreescribir hovers, transiciones y afinar micro-interacciones.
 *
 * Filosofía: no introducir componentes nuevos, solo elevar el detalle visual
 * de lo que ya existe (sombras, bordes, animaciones, tipografía numérica).
 *
 * Nota: las declaraciones font-variation-settings (opsz/SOFT/WONK) vestigiales
 * del diseño anterior con Fraunces fueron limpiadas en F11 — ya no quedan en
 * ningún CSS. Si se reintroduce una variable serif, volver a evaluar.
 * ========================================================================== */


/* =============================================================================
 * 0. TOKENS DE REFUERZO — depth, glow y ease
 * ========================================================================== */
:root {
    /* Sombras con tinte dorado para dark mode premium */
    --shadow-gold-soft:  0 8px 28px -12px rgba(226, 190, 101, 0.22);
    --shadow-gold-deep:  0 24px 48px -18px rgba(0, 0, 0, 0.6),
                         0 0 0 1px rgba(226, 190, 101, 0.35),
                         0 0 32px -8px rgba(226, 190, 101, 0.18);
    /* --shadow-inset-top vive ahora en variables.css. Aquí llevaba un brillo
       dorado pensado para el fondo negro de la tienda de CBD; sobre las
       tarjetas blancas de esta no se veía. */

    /* Gradients reutilizables */
    --gradient-gold-sweep: linear-gradient(
        110deg,
        transparent 0%,
        transparent 30%,
        rgba(255, 255, 255, 0.18) 48%,
        transparent 66%,
        transparent 100%
    );
    --gradient-section-soft: radial-gradient(
        ellipse 80% 60% at 50% 0%,
        rgba(226, 190, 101, 0.04),
        transparent 70%
    );

    /* --ease-out-expo y --ease-overshoot también viven en variables.css. */
}


/* =============================================================================
 * 1. TIPOGRAFÍA — numerales premium en precios y datos
 * ========================================================================== */

/* Precios: old-style nums + tabular + tracking suave. Se aplica a todas las
   clases de precio del sistema para coherencia visual. */
.card-product__price,
.product-info__price #product-price,
.product-card__price,
.qv-price,
.price,
.pack-card-home [class*="price"] {
    font-feature-settings: "tnum" 1, "onum" 1, "ss01" 1;
    font-variant-numeric: tabular-nums oldstyle-nums;
    letter-spacing: 0.01em;
}

/* Numerales tabulares en datos y contadores (evita layout shift) */
.data-sheet__row dd,
.hero__meta dd,
.icon-btn__count,
.shop-sidebar__count,
.pagination__item,
.mobile-cta-dock__price {
    font-variant-numeric: tabular-nums;
}

/* Smoothing + kerning donde Manrope no aplica variation-settings */
body {
    font-feature-settings: "kern" 1, "liga" 1, "calt" 1, "ss01" 1;
}


/* =============================================================================
 * 2. HERO — stats row (refuerzo de confianza above-the-fold)
 * ========================================================================== */

.hero__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 18px 28px;
    margin: clamp(1rem, 2.5vh, 1.75rem) 0 0;
    padding-top: clamp(1rem, 2vh, 1.5rem);
    border-top: 1px solid rgba(226, 190, 101, 0.28);
    max-width: 680px;
}
.hero__stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.hero__stat-label {
    font-size: 0.62rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
    font-weight: 500;
}
.hero__stat-value {
    font-family: var(--font-display);
    font-size: 1rem;
    color: #fff;
    font-weight: 600;
    letter-spacing: -0.005em;
    font-variant-numeric: tabular-nums;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.hero__stat-value svg {
    color: var(--color-gold);
    flex-shrink: 0;
    width: 14px;
    height: 14px;
}
@media (max-width: 640px) {
    .hero__stats { gap: 14px 22px; }
    .hero__stat-label { font-size: 0.56rem; }
    .hero__stat-value { font-size: 0.92rem; }
}


/* =============================================================================
 * 3. BOTONES — shine sweep + elevación premium
 * ========================================================================== */

/* Shine sweep: franja dorada-clara que atraviesa el botón primary al hover.
   Se consigue con un pseudo-elemento con gradient y animación de translate X. */
.btn--primary {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    /* Glow ámbar en reposo (fuente única de box-shadow del CTA) + brillo interior.
       El efecto ::before lo posee signature.css (radial que sigue al cursor);
       aquí NO redeclaramos ::before para evitar conflicto de transform. */
    box-shadow: 0 1px 0 0 rgba(255, 255, 255, 0.22) inset,
                var(--shadow-cta-rest);
}

/* Ghost/secondary con underline reveal (usa currentColor → ámbar) */
.btn--secondary {
    position: relative;
}
.btn--secondary::after {
    content: "";
    position: absolute;
    left: 28px;
    right: 28px;
    bottom: 10px;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 300ms var(--ease-out-expo);
    opacity: 0.4;
}
.btn--secondary:hover::after,
.btn--secondary:focus-visible::after {
    transform: scaleX(1);
}

/* Press state: compresión sutil — feedback táctil */
.btn:active:not([disabled]) {
    transform: scale(0.98);
    transition-duration: 80ms;
}

@media (prefers-reduced-motion: reduce) {
    .btn--primary::before,
    .btn--secondary::after { transition: none; }
}


/* =============================================================================
 * 4. PRODUCT CARD — depth + hover refinado
 * ========================================================================== */

.card-product,
.product-card {
    /* Borde superior con highlight interno sutil (simula luz cayendo) */
    box-shadow: var(--shadow-card-idle), var(--shadow-inset-top);
}
@media (hover: hover) {
    .card-product:hover,
    .product-card:hover {
        box-shadow: var(--shadow-gold-deep);
    }
}

/* Badge sale con pulse sutil — llama atención sin ser molesto */
.card-product__badge--sale,
.badge--sale {
    animation: badge-pulse 3s ease-in-out infinite;
}
@keyframes badge-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(196, 69, 54, 0); }
    50%      { box-shadow: 0 0 0 4px rgba(196, 69, 54, 0.15); }
}

/* Badge "Nuevo" con dot verde vivo al lado */
.card-product__badge--new::before {
    content: "";
    display: inline-block;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: currentColor;
    margin-right: 6px;
    vertical-align: 2px;
    box-shadow: 0 0 0 0 currentColor;
    animation: dot-pulse 2.2s ease-out infinite;
}
@keyframes dot-pulse {
    0%   { box-shadow: 0 0 0 0 currentColor; opacity: 1; }
    70%  { box-shadow: 0 0 0 6px rgba(107, 142, 78, 0); opacity: 0.8; }
    100% { box-shadow: 0 0 0 0 rgba(107, 142, 78, 0); opacity: 1; }
}

/* Stock low con dot ambar pulsante */
.card-product__stock-low::before {
    content: "";
    display: inline-block;
    width: 5px; height: 5px;
    border-radius: 50%;
    background: currentColor;
    margin-right: 6px;
    vertical-align: 2px;
    animation: dot-pulse-amber 1.8s ease-in-out infinite;
}
@keyframes dot-pulse-amber {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.5; transform: scale(0.85); }
}

@media (prefers-reduced-motion: reduce) {
    .card-product__badge--sale,
    .badge--sale,
    .card-product__badge--new::before,
    .card-product__stock-low::before { animation: none; }
}


/* =============================================================================
 * 5. HEADER — aquí ya no
 * -----------------------------------------------------------------------------
 * Había una «barra de cristal» con degradado negro al 88 %, blur de 12 px y
 * borde dorado: la cabecera del proyecto de origen, que era oscura. Esta
 * cabecera es blanca y la define header.css, que se carga después, así que el
 * fondo oscuro no llegaba a verse — pero el `backdrop-filter` sí ganaba, y
 * quedaba un desenfoque calculado para un fondo translúcido aplicado sobre uno
 * opaco, donde no hace nada salvo pedirle trabajo a la GPU en cada scroll.
 * La cabecera se toca en header.css.
 * ========================================================================== */

.site-header.is-scrolled {
    border-bottom-color: rgba(226, 190, 101, 0.35);
    box-shadow: 0 8px 24px -12px rgba(0, 0, 0, 0.5);
}


/* =============================================================================
 * 6. CART ICON — pop animation al actualizar contador
 * ========================================================================== */

.icon-btn__count {
    transform-origin: center;
    transition: transform 300ms var(--ease-overshoot);
}
.icon-btn__count.is-bumped {
    animation: count-bump 500ms var(--ease-overshoot);
}
@keyframes count-bump {
    0%   { transform: scale(1); }
    35%  { transform: scale(1.35); }
    100% { transform: scale(1); }
}


/* =============================================================================
 * 7. SECTIONS — background treatment sutil
 * ========================================================================== */

/* section--soft ya tiene bg-soft. Le añadimos un wash radial sutil gold para
   romper la uniformidad sin cambiar la identidad visual. */
.section--soft {
    position: relative;
    isolation: isolate;
}
.section--soft::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--gradient-section-soft);
    pointer-events: none;
    z-index: -1;
}


/* =============================================================================
 * 8. DIVIDERS — separadores editoriales
 * ========================================================================== */

/* Separador refinado: línea degradada + símbolo tipográfico centrado */
.divider-decor {
    gap: 18px;
}
.divider-decor::before,
.divider-decor::after {
    background: linear-gradient(to var(--dir, right), transparent, var(--color-gold-dark));
    max-width: 120px;
    opacity: 0.8;
}
.divider-decor::before { --dir: right; }
.divider-decor::after  { --dir: left;  }


/* =============================================================================
 * 9. SECTION TITLES — refuerzo del eyebrow + hairline dorado
 * ========================================================================== */

.section-title .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    letter-spacing: 0.22em;
    font-size: 0.72rem;
}
.section-title .eyebrow::before,
.section-title .eyebrow::after {
    content: "";
    display: inline-block;
    width: 24px;
    height: 1px;
    background: var(--color-gold);
    opacity: 0.45;
}


/* =============================================================================
 * 10. LINKS INLINE — underline reveal premium en prose
 * ========================================================================== */

.editorial-prose a,
.blog-article__content a,
article p a {
    background-image: linear-gradient(to right, var(--color-gold), var(--color-gold));
    background-size: 0 1px;
    background-position: 0 100%;
    background-repeat: no-repeat;
    border-bottom: 1px solid var(--color-gold-dark);
    text-decoration: none;
    transition: background-size 320ms var(--ease-out-expo),
                color var(--dur-fast) ease;
}
.editorial-prose a:hover,
.blog-article__content a:hover,
article p a:hover {
    background-size: 100% 1px;
    border-bottom-color: transparent;
    color: var(--color-gold-light);
}


/* =============================================================================
 * 11. INPUTS — estado focus refinado con ring gold
 * ========================================================================== */

.input:focus,
.select:focus,
.textarea:focus {
    border-color: var(--color-gold) !important;
    box-shadow:
        0 0 0 3px rgba(226, 190, 101, 0.18),
        0 0 0 1px var(--color-gold) !important;
    outline: none !important;
}


/* =============================================================================
 * 12. SCROLL PROGRESS BAR — indicador sutil en top
 * ========================================================================== */

.scroll-progress {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 2px;
    z-index: 1000;
    pointer-events: none;
    background: transparent;
}
.scroll-progress__bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--color-gold-dark), var(--color-gold) 50%, var(--color-gold-light));
    transition: width 80ms linear;
    box-shadow: 0 0 8px rgba(226, 190, 101, 0.5);
}

@media (prefers-reduced-motion: reduce) {
    .scroll-progress__bar { transition: none; }
}


/* =============================================================================
 * 13. BACK-TO-TOP
 *
 * Borrado. Esta copia pintaba el botón con fondo negro al 78 % y texto
 * --color-gold, que en esta paleta es un verde grisáceo: negro sobre negro.
 * No se veía porque footer.css se cargaba después y lo tapaba, no porque
 * estuviera bien.
 *
 * La declaración única vive ahora en components.css. Ver el comentario de allí.
 * ========================================================================== */


/* =============================================================================
 * 14. TRUST CHIPS — componente reutilizable de confianza
 * ========================================================================== */

.trust-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
}
.trust-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(226, 190, 101, 0.06);
    border: 1px solid rgba(226, 190, 101, 0.25);
    color: var(--color-text);
    font-size: 0.74rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    border-radius: 100px;
    transition: border-color var(--dur-fast) ease, background var(--dur-fast) ease;
}
.trust-chip svg {
    color: var(--color-gold);
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}
.trust-chip--sage  { border-color: rgba(147, 201, 84, 0.35); }
.trust-chip--sage svg { color: var(--color-brand); }
.trust-chip--burgundy { border-color: rgba(229, 65, 46, 0.35); }
.trust-chip--burgundy svg { color: var(--color-burgundy-light); }


/* =============================================================================
 * 15. PRICE BLOCK — treatment editorial en ficha
 * ========================================================================== */

.product-info__price {
    position: relative;
}
.product-info__price::before {
    content: "";
    position: absolute;
    left: 0;
    top: -1px;
    width: 32px;
    height: 1px;
    background: var(--color-gold);
    opacity: 0.6;
}


/* =============================================================================
 * 16. SCROLLBAR — treatment gold refinado
 * ========================================================================== */

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--color-brand-dark), var(--color-brand-deep));
    border: 2px solid var(--color-bg);
    border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--color-gold), var(--color-gold-dark));
}


/* =============================================================================
 * 17. SELECTION — selección de texto refinada
 * ========================================================================== */

::selection {
    background: rgba(226, 190, 101, 0.35);
    color: #fff;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.4);
}


/* =============================================================================
 * 18. FIGURA ABSTRACTA EN HEROS — detalle gold en esquina
 * ========================================================================== */

.hero--home .hero__inner::before {
    content: "";
    position: absolute;
    top: -12px;
    right: 0;
    width: 48px;
    height: 48px;
    border-top: 1px solid var(--color-gold);
    border-right: 1px solid var(--color-gold);
    opacity: 0.5;
    pointer-events: none;
}
@media (max-width: 768px) {
    .hero--home .hero__inner::before { display: none; }
}


/* =============================================================================
 * 19. FOCUS RING — uniform con color de marca
 * ========================================================================== */

/* a11y.css ya tiene focus-visible, reforzamos con color gold + smooth transition */
a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible,
[tabindex]:focus-visible {
    transition: outline-offset 120ms ease, box-shadow 120ms ease;
}


/* =============================================================================
 * 20. SMOOTH SCROLL + sticky offset para anchors
 * ========================================================================== */

html {
    scroll-padding-top: 96px;
}


/* =============================================================================
 * 21. LEAD PARAGRAPH — tratamiento editorial refinado
 * ========================================================================== */

.lead,
p.lead {
    font-size: clamp(1.05rem, 1.15vw, 1.25rem);
    line-height: 1.55;
    color: var(--color-text);
    font-weight: 300;
    max-width: 58ch;
    letter-spacing: -0.005em;
}


/* =============================================================================
 * 22. DISCLAIMER BOX — tratamiento más premium
 * ========================================================================== */

.disclaimer-box {
    position: relative;
    background: linear-gradient(
        90deg,
        rgba(226, 190, 101, 0.04),
        rgba(226, 190, 101, 0.02) 50%,
        rgba(226, 190, 101, 0.04)
    );
    border-color: rgba(226, 190, 101, 0.3);
    padding: 14px 24px;
}


/* =============================================================================
 * 23. VALUE CARDS — refinamiento icon + border-top gold
 * ========================================================================== */

.home-value {
    position: relative;
    padding: var(--space-4) var(--space-3);
    transition: transform 300ms var(--ease-out-expo);
}
.home-value__icon {
    filter: drop-shadow(0 4px 12px rgba(226, 190, 101, 0.25));
    transition: transform 400ms var(--ease-out-expo);
}
@media (hover: hover) {
    .home-value:hover .home-value__icon { transform: scale(1.08) rotate(-3deg); }
}


/* =============================================================================
 * 23b. RETURNING POPUP — fine print coherente con first-order-popup
 * ========================================================================== */

.returning-pop__fine {
    margin: 14px 0 0;
    font-size: 0.72rem;
    color: var(--color-text-dim);
    line-height: 1.5;
    text-align: center;
}


/* =============================================================================
 * 24. MICRO BREAKPOINT — 1920px+ (monitor grande): ya no hace falta
 *
 * Aquí había un `@media (min-width: 1920px)` con `padding-inline:
 * clamp(88px, 6vw, 140px)` para `.container`. No hacía lo que parecía: a 1920
 * el `max-width` de 1 320 px ya deja unos 300 px de aire por lado, así que ese
 * padding no separaba del borde —eso ya estaba resuelto—, lo que hacía era
 * ESTRECHAR el contenido hasta unos 1 040 px. Una rejilla de cuatro productos
 * se veía con tarjetas MÁS PEQUEÑAS en un monitor grande que en un portátil.
 *
 * Con él se va su parche, `.hero__inner { padding-inline: 0 }`, que solo
 * existía para compensarlo. El aire lateral lo pone `--container-pad` y el
 * tope `--container-max`, los dos en variables.css, y valen para todas las
 * anchuras sin excepciones por pantalla.
 * ========================================================================== */
