/* ==========================================================================
   Inicio de Tokka (templates/home.php). Paleta tomada de thirdway.com.
   Sin JS (o con "reducir movimiento") todo se ve en su lugar, sin fijar
   secciones; html.th-motion (lo pone home.js) activa los layouts fijos.
   ========================================================================== */
:root {
    --ink: #20221A;          /* warm-black */
    --paper: #F7F1E9;        /* warm-white: fondo */
    --paper-text: #F6F0E8;   /* texto claro sobre foto/oscuro */
    --white: #FFFFFF;
    --gray: #666763;
    --sand: #D4CDB7;
    --mint: #DEEFE3;
    --butter: #FFE7A6;
    --teal: #3D6062;
    --ochre: #8E7000;
    --khaki: #77714E;
    --olive: #444828;
    --brand: #008F85;        /* teal de Tokka, solo en detalles */

    --ink-60: rgba(32, 34, 26, 0.7);  /* 0.6 no pasaba contraste AA (4.3:1) */
    --ink-50: rgba(32, 34, 26, 0.5);
    --ink-15: rgba(32, 34, 26, 0.15);
    --ink-06: rgba(32, 34, 26, 0.06);
    --ink-04: rgba(32, 34, 26, 0.04);

    --gutter: clamp(16px, 3vw, 40px);
    --font: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body.th-body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.45;
    letter-spacing: -0.01em;
    text-align: left;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: clip;
}

.th-body img { display: block; max-width: 100%; }
.th-body a { color: inherit; }
.th-body button { font: inherit; color: inherit; }
.th-body h1, .th-body h2, .th-body h3, .th-body p, .th-body ul, .th-body ol { margin: 0; }
.th-body ul, .th-body ol { padding: 0; list-style: none; }

.th-body :focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 4px; }

.th-skip {
    position: fixed; left: 16px; top: -60px; z-index: 1000;
    padding: 10px 14px; background: var(--ink); color: var(--paper-text); border-radius: 4px; text-decoration: none;
}
.th-skip:focus { top: 16px; }

/* ---------- Piezas comunes ---------- */
.th-h2 {
    font-size: clamp(38px, 5.2vw, 76px);
    font-weight: 500;
    line-height: 0.98;
    letter-spacing: -0.045em;
    text-wrap: balance;
}
.th-lead { font-size: clamp(16px, 1.25vw, 19px); line-height: 1.45; color: var(--ink-60); max-width: 34em; }

.th-eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 13px; font-weight: 500; letter-spacing: 0;
    margin-bottom: 20px;
}
.th-eyebrow--light { color: var(--paper-text); }
.th-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.th-pill-num, .th-num {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 28px; height: 19px; padding: 0 6px;
    border: 1px solid currentColor; border-radius: 999px;
    font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; line-height: 1;
}

.th-btn {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 14px 20px;
    border-radius: 999px;
    background: var(--ink); color: var(--paper-text) !important;
    font-size: 15px; font-weight: 500; text-decoration: none;
    transition: transform 0.3s var(--ease), background-color 0.2s ease;
}
.th-btn:hover { transform: translateY(-2px); }
.th-btn span[aria-hidden] { transition: transform 0.3s var(--ease); }
.th-btn:hover span[aria-hidden] { transform: translateX(3px); }
.th-btn--light { background: var(--paper); color: var(--ink) !important; }
.th-btn--ghost { background: transparent; color: var(--ink) !important; box-shadow: inset 0 0 0 1px var(--ink-15); }
.th-btn--sm { padding: 10px 16px; font-size: 14px; }

.th-link { font-size: 15px; font-weight: 500; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.th-link:hover { text-decoration-thickness: 2px; }

/* ==========================================================================
   Barra superior + menú
   ========================================================================== */
.th-top {
    position: fixed; inset: 0 0 auto 0; z-index: 100;
    display: grid; grid-template-columns: 1fr auto 1fr; align-items: start;
    padding: 12px var(--gutter);
    pointer-events: none;
    color: var(--ink);
    transition: color 0.3s ease;
}
.th-top > * { pointer-events: auto; }
.th-top.is-on-dark { color: var(--paper-text); }

/* Mi cuenta / Iniciar sesión (donde Thirdway tiene el reloj). */
.th-account {
    justify-self: start; display: inline-flex; align-items: center; gap: 8px; height: 40px;
    font-size: 14px; font-weight: 500; text-decoration: none;
}
.th-account-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 22px; height: 22px; border-radius: 50%; border: 1px solid currentColor;
}
.th-account:hover { text-decoration: underline; text-underline-offset: 4px; }

.th-cta-top {
    justify-self: end; display: inline-flex; align-items: center; gap: 8px; height: 40px;
    font-size: 14px; font-weight: 500; text-decoration: none;
}
.th-cta-dot {
    display: inline-flex; align-items: center; justify-content: center;
    width: 22px; height: 22px; border-radius: 50%;
    background: currentColor; font-size: 12px;
}
.th-cta-dot { color: inherit; }
.th-cta-top .th-cta-dot { background: var(--ink); color: var(--paper-text); }
.th-top.is-on-dark .th-cta-top .th-cta-dot { background: var(--paper-text); color: var(--ink); }
.th-top-end, .th-account { transition: opacity 0.3s ease; }
.th-top:has(.th-menu.is-open) :is(.th-top-end, .th-account) { opacity: 0; pointer-events: none; }

/* Carrito con globito de cantidad (home.js lo llena). */
.th-cart { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; text-decoration: none; transition: background-color 0.2s ease; }
.th-cart:hover { background: var(--ink-06); }
.th-top.is-on-dark .th-cart:hover { background: rgba(246, 240, 232, 0.14); }
.th-cart-count {
    position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--brand); color: #fff; font-size: 11px; font-weight: 600; line-height: 1;
}
.th-cart-count[hidden] { display: none; }

/* Derecha: switcher de idioma (inicio y Nosotros) + carrito + Comprar. */
.th-top-end { justify-self: end; display: flex; align-items: center; gap: 16px; }
.th-lang { display: inline-flex; align-items: center; height: 28px; padding: 2px; border: 1px solid currentColor; border-radius: 999px; font-size: 12px; font-weight: 500; }
.th-lang a { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; text-decoration: none; opacity: 0.6; transition: opacity 0.2s ease, background-color 0.2s ease; }
.th-lang a:hover { opacity: 1; }
.th-lang a[aria-current] { opacity: 1; background: var(--ink); color: var(--paper-text); }
.th-top.is-on-dark .th-lang a[aria-current] { background: var(--paper-text); color: var(--ink); }

/* La pastilla: logo + ☰. Crece hacia abajo y a los lados al abrir. */
.th-menu {
    position: relative;
    width: 190px;
    background: var(--white);
    color: var(--ink);
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(32, 34, 26, 0.06);
    overflow: hidden;
    transition: width 0.55s var(--ease), box-shadow 0.3s ease;
}
.th-menu.is-open { width: min(480px, calc(100vw - 2 * var(--gutter))); box-shadow: 0 24px 60px rgba(32, 34, 26, 0.18); }

.th-menu-bar { display: flex; align-items: center; justify-content: space-between; height: 40px; padding: 0 6px 0 12px; }
.th-menu-logo img { width: 84px; height: auto; }

.th-menu-toggle {
    position: relative; width: 28px; height: 28px; border: 0; border-radius: 50%;
    background: var(--ink-06); cursor: pointer; transition: background-color 0.2s ease;
}
.th-menu-toggle:hover { background: rgba(32, 34, 26, 0.12); }
/* Dos líneas de 2px en pixel entero (con 1.5px se veían de distinto grosor). */
.th-menu-toggle span {
    position: absolute; left: 8px; width: 12px; height: 2px; border-radius: 2px; background: var(--ink);
    transition: transform 0.4s var(--ease), top 0.4s var(--ease), width 0.3s var(--ease);
}
.th-menu-toggle span:first-child { top: 10px; }
.th-menu-toggle span:last-child { top: 16px; width: 8px; }
.th-menu-toggle:hover span:last-child { width: 12px; }
.th-menu.is-open .th-menu-toggle span:first-child { top: 13px; transform: rotate(45deg); }
.th-menu.is-open .th-menu-toggle span:last-child { top: 13px; width: 12px; transform: rotate(-45deg); }

.th-menu-panel { padding: 8px 12px 12px; }
.th-menu-links { padding: 6px 0 18px; }
.th-menu-links a {
    display: flex; align-items: center;
    padding: 2px 0;
    font-size: clamp(22px, 2.2vw, 26px); font-weight: 500; line-height: 1.2; letter-spacing: -0.03em;
    text-decoration: none;
}
.th-menu-arrow {
    display: inline-block; width: 0; overflow: hidden; opacity: 0;
    transition: width 0.35s var(--ease), opacity 0.25s ease;
}
.th-menu-links a:hover .th-menu-arrow,
.th-menu-links a:focus-visible .th-menu-arrow { width: 1.1em; opacity: 1; }

.th-menu-lately { border-top: 1px solid var(--ink-15); padding-top: 10px; }
.th-menu-lately .th-eyebrow { font-size: 11px; margin-bottom: 10px; }
.th-menu-cards {
    display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); gap: 6px;
    overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain;
}
.th-menu-cards::-webkit-scrollbar { display: none; }
.th-mcard {
    position: relative; display: flex; flex-direction: column; gap: 2px;
    height: 150px; padding: 10px; border-radius: 2px; overflow: hidden;
    text-decoration: none;
    transition: transform 0.4s var(--ease);
}
.th-mcard:hover { transform: translateY(-2px); }
.th-mcard-kicker { font-size: 11px; opacity: 0.7; }
.th-mcard-title { font-size: 15px; font-weight: 500; letter-spacing: -0.02em; }
.th-mcard--butter { background: var(--butter); }
.th-mcard--teal { background: var(--teal); color: var(--paper-text); }
.th-mcard--sand { background: var(--sand); }
.th-mcard-card {
    position: absolute; right: -14px; bottom: 14px; width: 110px; aspect-ratio: 1.586; border-radius: 8px;
    background: var(--brand) url("logo-light.png") no-repeat 12px 12px / 46px auto;
    transform: rotate(-12deg); box-shadow: 0 10px 20px rgba(32, 34, 26, 0.2);
}
.th-mcard-big { margin-top: auto; font-size: 44px; font-weight: 500; letter-spacing: -0.05em; line-height: 0.9; }
.th-mcard-big small { display: block; font-size: 12px; letter-spacing: 0; opacity: 0.7; margin-top: 4px; }
.th-mcard-faces { display: flex; margin-top: auto; }
.th-mcard-faces img { width: 40px; height: 56px; object-fit: cover; object-position: top; border-radius: 4px; border: 2px solid var(--sand); margin-right: -10px; }

.th-menu-backdrop {
    position: fixed; inset: 0; z-index: 90;
    background: rgba(32, 34, 26, 0.6);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    opacity: 0; transition: opacity 0.45s ease;
}
.th-menu-backdrop.is-visible { opacity: 1; }

@media (max-width: 700px) {
    .th-top { grid-template-columns: auto 1fr; column-gap: 8px; }
    .th-account { display: none; }
    .th-menu { width: 160px; }
    .th-menu.is-open { width: calc(100vw - 2 * var(--gutter)); }
    .th-cta-top { font-size: 13px; }
    .th-top-end { gap: 6px; }
    .th-cart { width: 36px; height: 36px; }
    .th-lang a { padding: 0 6px; }
}
/* Celulares angostos (≤ 380 px): que quepan menú, ES/EN, carrito y Comprar. */
@media (max-width: 380px) {
    .th-menu { width: 132px; }
    .th-menu.is-open { width: calc(100vw - 2 * var(--gutter)); }
    .th-lang a { padding: 0 5px; }
    .th-top-end { gap: 4px; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.th-hero { position: relative; background: var(--ink); color: var(--paper-text); }
.th-hero-inner { position: relative; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; }
.th-hero-media { position: absolute; inset: 0; }
.th-hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 45%; }
.th-hero-shade {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(32, 34, 26, 0.25) 0%, rgba(32, 34, 26, 0) 30%, rgba(32, 34, 26, 0) 50%, rgba(32, 34, 26, 0.6) 100%);
}

.th-hero-copy {
    position: absolute; inset: auto var(--gutter) 28px var(--gutter);
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px); align-items: end; gap: 24px 40px;
}
.th-hero-title {
    font-size: clamp(54px, 10vw, 168px); font-weight: 500; line-height: 0.88; letter-spacing: -0.055em;
}
.th-hero-title > span { display: block; }
.th-hero-side { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; padding-bottom: 56px; }
.th-hero-side p { font-size: 16px; line-height: 1.4; color: rgba(246, 240, 232, 0.85); }

.th-scroll-hint {
    position: absolute; right: var(--gutter); bottom: 28px;
    display: flex; align-items: center; gap: 8px; font-size: 12px; color: rgba(246, 240, 232, 0.7);
}
.th-scroll-mouse { position: relative; width: 14px; height: 22px; border: 1px solid currentColor; border-radius: 8px; }
.th-scroll-mouse span {
    position: absolute; left: 50%; top: 4px; width: 2px; height: 5px; margin-left: -1px; border-radius: 1px; background: currentColor;
    animation: th-wheel 1.6s ease-in-out infinite;
}
@keyframes th-wheel { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(7px); opacity: 0; } 100% { opacity: 0; } }

@media (max-width: 700px) {
    .th-hero-copy { grid-template-columns: 1fr; bottom: 24px; }
    .th-hero-side { padding-bottom: 36px; }
    .th-hero-side p { font-size: 15px; max-width: 30em; }
    .th-scroll-hint { bottom: 24px; }
    .th-hero-media img { object-position: 62% 50%; }
}

/* ==========================================================================
   Pantalla de carga (solo con JS: html.th-loading la pone un script en <head>)
   ========================================================================== */
.th-loader { display: none; }
html.th-loading, html.th-loading body { overflow: hidden; }
html.th-loading .th-loader,
.th-loader.is-leaving {
    position: fixed; inset: 0; z-index: 500;
    display: flex; align-items: center; justify-content: center;
    background: var(--white);
}
.th-loader-inner { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 0 24px; text-align: center; }
.th-loader-logo { width: clamp(150px, 16vw, 220px); height: auto; animation: th-loader-in 0.9s var(--ease) both; }
.th-loader-text {
    font-size: clamp(18px, 1.6vw, 22px); font-weight: 500; letter-spacing: -0.03em; color: var(--ink);
    animation: th-loader-in 0.9s var(--ease) 0.15s both;
}
.th-loader-bar {
    position: absolute; left: 50%; bottom: 48px; width: 120px; height: 2px; margin-left: -60px;
    border-radius: 2px; background: var(--ink-06); overflow: hidden;
}
.th-loader-bar > span {
    display: block; height: 100%; width: 100%; background: var(--brand);
    transform-origin: left; transform: scaleX(0);
    animation: th-loader-bar 1.6s cubic-bezier(0.3, 0.7, 0.4, 1) forwards;
}
.th-loader-bar > span.is-done { animation: none; transform: scaleX(1); transition: transform 0.3s ease; }
@keyframes th-loader-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes th-loader-bar { to { transform: scaleX(0.85); } }

/* ==========================================================================
   Frases
   ========================================================================== */
.th-phrases {
    position: relative; color: var(--paper-text);
    background:
        radial-gradient(60% 70% at 20% 30%, rgba(0, 143, 133, 0.55), transparent 70%),
        radial-gradient(50% 60% at 80% 70%, rgba(142, 112, 0, 0.35), transparent 70%),
        radial-gradient(70% 80% at 60% 10%, rgba(222, 239, 227, 0.12), transparent 70%),
        var(--teal);
    background-size: 160% 160%;
    animation: th-drift 18s ease-in-out infinite alternate;
}
@keyframes th-drift { from { background-position: 0% 0%; } to { background-position: 100% 100%; } }

.th-phrases-sticky {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 120px var(--gutter);
    text-align: center;
}
.th-phrases-stack { display: grid; gap: 40px; }
.th-phrase {
    font-size: clamp(32px, 4.6vw, 72px); font-weight: 400; line-height: 1.02; letter-spacing: -0.045em;
    max-width: 16em; margin-inline: auto; text-wrap: balance;
}
.th-phrase .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.th-phrase .w > span { display: inline-block; }

html.th-motion .th-phrases { height: 420vh; }
html.th-motion .th-phrases-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; padding-block: 0; }
html.th-motion .th-phrases-stack { display: block; position: relative; width: 100%; min-height: 3.3em; font-size: clamp(32px, 4.6vw, 72px); }
html.th-motion .th-phrase { position: absolute; inset: 0 0 auto; font-size: 1em; }

/* ==========================================================================
   Perfiles (columnas que suben y bajan)
   ========================================================================== */
.th-showcase { position: relative; }
.th-showcase-sticky {
    display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px;
    align-items: center;
    padding: 120px var(--gutter);
}
.th-showcase-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; max-width: 520px; }
.th-showcase-copy .th-eyebrow { margin-bottom: -4px; }
.th-checks { display: grid; gap: 8px; font-size: 15px; }
.th-checks li { display: flex; align-items: center; gap: 10px; }
.th-checks li::before {
    content: ""; flex-shrink: 0; width: 18px; height: 18px; border-radius: 50%;
    background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F7F1E9' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") no-repeat center / 11px;
}

.th-showcase-cols {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px;
    height: 88vh; max-height: 900px; overflow: hidden;
    -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 12%, #000 88%, transparent 100%);
            mask-image: linear-gradient(180deg, transparent 0, #000 12%, #000 88%, transparent 100%);
}
.th-col { display: flex; flex-direction: column; gap: 14px; will-change: transform; }
.th-col[data-col="1"] { margin-top: -30%; }
.th-shot {
    display: block; border-radius: 18px; overflow: hidden; background: var(--white);
    box-shadow: 0 1px 0 var(--ink-06), 0 18px 40px -18px rgba(32, 34, 26, 0.25);
    transition: transform 0.4s var(--ease);
}
.th-shot img { width: 100%; height: auto; aspect-ratio: 520 / 1067; object-fit: cover; }

@media (max-width: 900px) {
    .th-showcase-sticky { grid-template-columns: 1fr; gap: 40px; padding-block: 88px 40px; }
    .th-showcase-cols { height: 620px; gap: 10px; }
    .th-col { gap: 10px; }
    .th-shot { border-radius: 12px; }
}

@media (min-width: 901px) {
    html.th-motion .th-showcase { height: 240vh; }
    html.th-motion .th-showcase-sticky { position: sticky; top: 0; height: 100vh; padding-block: 0; }
}

/* ==========================================================================
   Características (tabs en compu, acordeón en celular)
   ========================================================================== */
.th-features { padding: 120px var(--gutter); border-top: 1px solid var(--ink-15); }
.th-features-head { margin-bottom: 56px; }

.th-feat-list { display: grid; grid-template-columns: minmax(0, 1fr); }
.th-feat-tab {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    width: 100%; padding: 18px 0;
    border: 0; border-bottom: 1px solid var(--ink-15); background: none;
    text-align: left; cursor: pointer;
    font-size: clamp(19px, 1.7vw, 24px); font-weight: 400; letter-spacing: -0.025em;
    color: var(--ink-50);
    transition: color 0.25s ease;
}
.th-feat-tab:first-of-type { border-top: 1px solid var(--ink-15); }
.th-feat-tab:hover, .th-feat-tab[aria-expanded="true"] { color: var(--ink); }
.th-feat-tab[aria-expanded="true"] { font-weight: 500; }
.th-feat-plus {
    position: relative; flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%;
    border: 1px solid currentColor;
    transition: transform 0.45s var(--ease), background-color 0.25s ease;
}
.th-feat-plus::before, .th-feat-plus::after {
    content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 1.5px; margin: -0.75px 0 0 -5px; background: currentColor;
}
.th-feat-plus::after { transform: rotate(90deg); }
.th-feat-tab[aria-expanded="true"] .th-feat-plus { transform: rotate(45deg); background: var(--ink); color: var(--paper); }

.th-feat-panel { padding: 20px 0 28px; }
.th-feat-panel ul { display: grid; gap: 22px; }
.th-feat-panel li { position: relative; display: grid; gap: 4px; padding-left: 22px; }
.th-feat-panel li::before { content: ""; position: absolute; left: 2px; top: 0.55em; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }
.th-feat-panel strong { font-size: 17px; font-weight: 500; letter-spacing: -0.02em; }
.th-feat-panel span { font-size: 15px; color: var(--ink-60); max-width: 34em; }

.th-feat-ctas { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 48px; }

@media (min-width: 901px) {
    .th-feat-list { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); column-gap: 8vw; align-items: start; }
    .th-feat-tab { grid-column: 1; }
    .th-feat-tab:nth-of-type(1) { grid-row: 1; }
    .th-feat-tab:nth-of-type(2) { grid-row: 2; }
    .th-feat-tab:nth-of-type(3) { grid-row: 3; }
    .th-feat-tab:nth-of-type(4) { grid-row: 4; }
    .th-feat-tab:nth-of-type(5) { grid-row: 5; }
    .th-feat-panel {
        grid-column: 2; grid-row: 1 / span 5; align-self: start;
        padding: 18px 28px 28px; border-radius: 4px; background: var(--white);
        min-height: 100%;
    }
    .th-feat-panel ul { gap: 28px; }
    .th-feat-panel strong { font-size: 19px; }
    .th-feat-panel span { font-size: 16px; }
}

/* ==========================================================================
   ¿Cómo funciona? — celular fijo
   ========================================================================== */
.th-steps { position: relative; background: var(--white); }
.th-steps-sticky {
    display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 48px;
    padding: 120px var(--gutter);
}
.th-steps-list { display: grid; gap: 32px; counter-reset: none; }
.th-step { display: grid; grid-template-columns: auto 1fr; column-gap: 14px; row-gap: 6px; }
.th-step-num { grid-row: 1 / span 2; align-self: start; margin-top: 6px; }
.th-step-num { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 19px; padding: 0 6px; border: 1px solid currentColor; border-radius: 999px; font-size: 12px; font-weight: 500; }
.th-step h3 { font-size: clamp(22px, 2vw, 28px); font-weight: 500; letter-spacing: -0.035em; line-height: 1.1; }
.th-step p { color: var(--ink-60); max-width: 26em; }

.th-phone {
    position: relative; width: clamp(250px, 23vw, 320px); aspect-ratio: 9 / 20.5;
    border-radius: 46px; padding: 10px; background: var(--ink);
    box-shadow: 0 40px 80px -30px rgba(32, 34, 26, 0.45);
}
.th-phone::before {
    content: ""; position: absolute; left: 50%; top: 20px; z-index: 3; width: 34%; height: 22px; margin-left: -17%;
    border-radius: 999px; background: var(--ink);
}
.th-phone-screen { position: relative; width: 100%; height: 100%; border-radius: 36px; overflow: hidden; background: var(--paper); }
.th-screen { position: absolute; inset: 0; opacity: 0; transition: opacity 0.5s ease, transform 0.6s var(--ease); transform: translateY(12px) scale(0.98); }
.th-screen.is-active { opacity: 1; transform: none; }
.th-screen > img { width: 100%; height: 100%; object-fit: cover; object-position: top; padding-top: 38px; background: #f5f5f7; }

.th-screen--card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 24px; background: var(--paper); }
.th-screen-kicker, .th-screen-note { font-size: 12px; color: var(--ink-60); }
.th-card3d { perspective: 700px; width: 88%; }
.th-card-face {
    position: relative; aspect-ratio: 1.586; border-radius: 14px; padding: 14px;
    color: var(--paper-text);
    background: #fff;
    overflow: hidden;
    box-shadow: 0 18px 30px -12px rgba(32, 34, 26, 0.45);
    animation: th-card-float 4s ease-in-out infinite;
}
/* 5 diseños (templates/home.php → $card_designs), 2 s cada uno, en ciclo de 10 s. */
.th-card-layer {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
    opacity: 0;
    animation: th-card-cycle 10s linear infinite;
    animation-delay: calc(var(--i) * 2s);
}
.th-card-layer:first-child { opacity: 1; }
@keyframes th-card-cycle { 0%, 18% { opacity: 1; } 22%, 96% { opacity: 0; } 100% { opacity: 1; } }
@keyframes th-card-float { 0%, 100% { transform: rotateY(-14deg) rotateX(6deg) translateY(0); } 50% { transform: rotateY(10deg) rotateX(-4deg) translateY(-6px); } }
.th-swatches { display: flex; gap: 8px; }
.th-swatches span {
    width: 22px; height: 22px; border-radius: 50%; background: var(--c);
    box-shadow: 0 0 0 2px var(--paper), 0 0 0 3px var(--ink-15);
    animation: th-swatch-cycle 10s linear infinite;
    animation-delay: calc(var(--i) * 2s);
}
/* Personalizada: cualquier color. */
.th-swatches .th-swatch-custom { background: conic-gradient(#FF9A00, #E4007C, #0040CE, #008F85, #FF9A00); }
@keyframes th-swatch-cycle {
    0%, 18% { transform: scale(1.18); box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--ink); }
    22%, 100% { transform: none; box-shadow: 0 0 0 2px var(--paper), 0 0 0 3px var(--ink-15); }
}

.th-tap {
    position: absolute; left: 50%; top: 14%; width: 70px; height: 70px; margin: -35px 0 0 -35px; border-radius: 50%;
    border: 2px solid var(--brand);
    opacity: 0;
    animation: th-tap 2.8s ease-out infinite;
}
/* Sale justo cuando la tarjeta toca el celular (40 % de th-tapcard-tap). */
@keyframes th-tap { 0%, 38% { transform: scale(0.3); opacity: 0; } 40% { opacity: 1; } 80%, 100% { transform: scale(2.6); opacity: 0; } }

/* Tarjeta teal encima del celular en el paso 3: baja, toca y regresa. */
.th-tapcard {
    position: absolute; z-index: 4; left: 50%; top: -5%; width: 80%;
    margin-left: -40%;
    perspective: 800px;
    opacity: 0; pointer-events: none;
    transition: opacity 0.5s ease;
}
.th-phone:has(.th-screen[data-screen="2"].is-active) .th-tapcard { opacity: 1; }
.th-tapcard img {
    display: block; width: 100%; height: auto; border-radius: 12px;
    box-shadow: 0 22px 36px -14px rgba(32, 34, 26, 0.5), 0 0 0 1px rgba(32, 34, 26, 0.06);
    transform-origin: 50% 100%;
    animation: th-tapcard-tap 2.8s var(--ease) infinite;
}
@keyframes th-tapcard-tap {
    0%, 100% { transform: translateY(-22%) rotateX(38deg) rotateZ(-7deg); }
    40%, 58% { transform: translateY(0) rotateX(18deg) rotateZ(-4deg); }
}

.th-steps-words {
    display: flex; flex-direction: column; align-items: flex-start;
    font-size: clamp(40px, 5vw, 84px); font-weight: 500; letter-spacing: -0.055em; line-height: 0.98;
}
.th-steps-words span { color: var(--ink); }

@media (max-width: 900px) {
    .th-steps-sticky { grid-template-columns: 1fr; justify-items: center; gap: 40px; padding-block: 88px; }
    .th-steps-copy { justify-self: stretch; }
    .th-steps-words { display: none; }
    .th-phone { width: min(270px, 68vw); order: -1; }
}

html.th-motion .th-steps { height: 320vh; }
html.th-motion .th-steps-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; padding-block: 72px 24px; }
/* El celular fijo cabe en la pantalla (ancho ligado al alto) y deja arriba
   lugar para la tarjeta del paso 3 (.th-tapcard) sin tocar el menú. */
html.th-motion .th-phone { width: min(clamp(250px, 23vw, 320px), 33svh); margin-top: 40px; }
html.th-motion .th-step { opacity: 0.22; transition: opacity 0.4s ease; }
html.th-motion .th-step.is-active { opacity: 1; }
html.th-motion .th-steps-words span { color: var(--ink-15); transition: color 0.4s ease; }
html.th-motion .th-steps-words span.is-active { color: var(--ink); }

@media (max-width: 900px) {
    /* Celular fijo: el teléfono arriba y solo el paso activo abajo. */
    html.th-motion .th-steps-sticky { gap: 20px; align-content: center; padding-block: 64px 20px; }
    html.th-motion .th-phone { width: min(230px, 58vw, 27svh); margin-top: 36px; }
    html.th-motion .th-steps-list { display: grid; }
    html.th-motion .th-step { grid-area: 1 / 1; opacity: 0; transform: translateY(10px); transition: opacity 0.4s ease, transform 0.4s var(--ease); }
    html.th-motion .th-step.is-active { opacity: 1; transform: none; }
}

/* ==========================================================================
   Tienda
   ========================================================================== */
.th-shop { padding: 120px var(--gutter); }
.th-shop-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 40px; }
.th-shop-head .th-h2 { max-width: 12em; }
.th-shop-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.th-product { display: flex; flex-direction: column; gap: 12px; padding-bottom: 12px; }
.th-product-media { display: block; aspect-ratio: 4 / 3; border-radius: 2px; overflow: hidden; background: var(--ink-06); }
.th-product-media > img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.th-product:hover .th-product-media > img { transform: scale(1.04); }
.th-product-media--empty { display: flex; align-items: center; justify-content: center; background: var(--butter); }
.th-product-card {
    display: block; width: 58%; aspect-ratio: 1.586; border-radius: 12px; padding: 14px;
    background: var(--ink); box-shadow: 0 24px 40px -16px rgba(32, 34, 26, 0.5); transform: rotate(-8deg);
    transition: transform 0.8s var(--ease);
}
.th-product:hover .th-product-card { transform: rotate(-3deg) scale(1.03); }
.th-product-card img { width: 42%; }
.th-product-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; }
.th-product-price { font-weight: 500; }
.th-product-price del { opacity: 0.5; margin-right: 6px; }
.th-product-price ins { text-decoration: none; }
.th-product h3 { font-size: 24px; font-weight: 500; letter-spacing: -0.035em; line-height: 1.1; }
.th-product h3 a { text-decoration: none; }
.th-product-actions { display: flex; align-items: center; gap: 16px; margin-top: 4px; }

@media (max-width: 700px) {
    .th-shop-head { flex-direction: column; align-items: flex-start; }
}

/* ==========================================================================
   Cierre
   ========================================================================== */
.th-closing { position: relative; height: 92vh; min-height: 520px; overflow: hidden; background: var(--ink); }
.th-closing-media { position: absolute; inset: 0; }
.th-closing-media img { width: 100%; height: 118%; object-fit: cover; object-position: 30% 50%; filter: saturate(0.85); }
.th-closing-box {
    position: absolute; right: var(--gutter); bottom: var(--gutter);
    width: min(560px, calc(100% - 2 * var(--gutter)));
    padding: 24px 28px 28px; border-radius: 4px; background: var(--white);
}
.th-closing-box p { font-size: clamp(24px, 2.4vw, 34px); font-weight: 500; line-height: 1.08; letter-spacing: -0.04em; }
.th-closing-box a { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 2px; }

/* ==========================================================================
   Footer
   ========================================================================== */
.th-footer { background: var(--ink); color: var(--paper-text); padding: 72px var(--gutter) 24px; overflow: hidden; }
.th-footer a { text-decoration: none; }
.th-footer a:hover { text-decoration: underline; text-underline-offset: 4px; }
.th-footer-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; }
.th-footer-cols p { font-size: 14px; line-height: 1.45; margin-bottom: 18px; }
.th-footer-label { font-size: 12px !important; margin-bottom: 6px !important; color: rgba(246, 240, 232, 0.55); }
.th-footer-links a { display: inline-block; font-size: clamp(24px, 2.6vw, 34px); font-weight: 500; letter-spacing: -0.035em; line-height: 1.12; }
.th-footer-mark { width: 100%; height: auto; margin: 72px 0 24px; opacity: 0.96; }
.th-footer-legal { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 12px; color: rgba(246, 240, 232, 0.55); border-top: 1px solid rgba(246, 240, 232, 0.15); padding-top: 16px; }
.th-footer .th-footer-mark { order: 2; }
.th-footer { display: flex; flex-direction: column; }
.th-footer-cols { order: 1; }
.th-footer-legal { order: 3; }

@media (max-width: 700px) {
    .th-footer-cols { grid-template-columns: 1fr; gap: 24px; }
    .th-footer-mark { margin-top: 48px; }
}

/* ---------- Aparecer al entrar ---------- */
html.th-motion [data-reveal] { opacity: 0; transform: translateY(24px); }

@media (prefers-reduced-motion: reduce) {
    .th-phrases, .th-card-face, .th-card-layer, .th-swatches span, .th-tap, .th-tapcard img, .th-scroll-mouse span, .th-loader-logo, .th-loader-text { animation: none !important; }
}

/* ==========================================================================
   Escáner (inicio): tarjetas y gafetes colgados de un hilo pasan por un
   celular; el celular muestra en grande la que va pasando. Movimiento en
   home.js ("Escáner"); sin JS o con movimiento reducido queda quieto.
   Las tarjetas se miden en em: --u es el tamaño base (afuera / en el celular).
   ========================================================================== */
.th-scan { padding: 120px 0 110px; background: var(--paper); overflow: hidden; }
.th-scan-head { max-width: 760px; margin: 0 auto; padding: 0 var(--gutter); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.th-scan-head .th-lead { max-width: 40em; }

.th-scan-stage { --u: 13px; position: relative; height: 580px; margin-top: 48px; }
.th-scan-wire { position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(32, 34, 26, 0.28); }
.th-scan-track {
    position: absolute; left: 0; top: 50%; display: flex; align-items: center; gap: calc(var(--u) * 6);
    padding-left: calc(var(--u) * 3);
    transform: translate3d(0, -50%, 0); will-change: transform;
}
.th-scan-slot { flex: none; display: flex; justify-content: center; width: calc(var(--u) * 16); }
.th-scan-slot:nth-child(odd) .th-sc-item { transform: translateY(-8%) rotate(-2.5deg); }
.th-scan-slot:nth-child(even) .th-sc-item { transform: translateY(6%) rotate(2deg); }

/* ---------- Tarjeta y gafete ---------- */
.th-sc-item { position: relative; font-size: var(--u); color: #2b2b2b; box-shadow: 0 1.2em 2em -1em rgba(32, 34, 26, 0.35), 0 0 0 1px rgba(32, 34, 26, 0.05); }
.th-sc-item p { margin: 0; }
.th-sc-card { display: flex; width: 15em; height: 8.6em; border-radius: 0.35em; background: #fff; overflow: hidden; }
.th-sc-text { flex: 1; min-width: 0; padding: 1em 1.1em; display: flex; flex-direction: column; }
.th-sc-name { font-size: 1.05em; font-weight: 700; letter-spacing: -0.01em; line-height: 1.15; }
.th-sc-role { font-size: 0.66em; color: #6b6b6b; margin-top: 0.2em !important; }
.th-sc-data { font-size: 0.58em; line-height: 1.55; color: #555; margin-top: auto !important; }
.th-sc-co { font-size: 0.56em; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; margin-top: 0.6em !important; }

.th-sc-item--wine .th-sc-mark { width: 36%; background: linear-gradient(160deg, #3b0f1c, #8c3048); position: relative; }
.th-sc-item--wine .th-sc-mark::after { content: ""; position: absolute; left: 50%; top: 50%; width: 1.9em; height: 1.9em; margin: -0.95em 0 0 -0.95em; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff, #f1c9d3); }
.th-sc-item--wine .th-sc-name { color: #6b1d2f; }
.th-sc-item--wine .th-sc-co { color: #8c3048; }

.th-sc-item--ink { background: #20221A; color: #F6F0E8; }
.th-sc-item--ink .th-sc-mark { width: 0.35em; background: #D8B36A; }
.th-sc-item--ink .th-sc-name { color: #D8B36A; font-family: Georgia, "Times New Roman", serif; font-style: italic; font-size: 1.15em; }
.th-sc-item--ink .th-sc-role, .th-sc-item--ink .th-sc-data { color: rgba(246, 240, 232, 0.7); }
.th-sc-item--ink .th-sc-co { color: #F6F0E8; }

.th-sc-item--clean .th-sc-mark { width: 0.5em; background: var(--brand); }
.th-sc-item--clean .th-sc-co { color: var(--brand); }

.th-sc-badge { width: 9.6em; height: 13em; padding: 1.2em 0.9em 0; border-radius: 0.4em; background: #fff; display: flex; flex-direction: column; align-items: center; text-align: center; }
.th-sc-clip { position: absolute; top: -0.9em; width: 1.1em; height: 1.6em; border-radius: 0.2em; background: linear-gradient(90deg, #cfcfcf, #f4f4f4 50%, #bdbdbd); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); }
.th-sc-clip:first-child { left: 1.6em; }
.th-sc-clip:nth-child(2) { right: 1.6em; }
.th-sc-event { font-size: 0.55em; font-weight: 700; letter-spacing: 0.12em; align-self: stretch; padding: 0.7em 0.4em; border-radius: 0.3em; }
.th-sc-badge .th-sc-name { margin-top: auto !important; font-size: 1.05em; }
.th-sc-badge .th-sc-role { margin-bottom: auto !important; }
.th-sc-tag { align-self: stretch; margin: 0 -0.9em !important; padding: 0.55em 0; font-size: 0.72em; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: #fff; border-radius: 0 0 0.4em 0.4em; }
.th-sc-item--green .th-sc-event { background: #EEF3EA; color: #4f6b3a; }
.th-sc-item--green .th-sc-tag { background: #4f6b3a; }
.th-sc-item--gold .th-sc-event { background: #EBD9A8; color: #6d5413; }
.th-sc-item--gold .th-sc-tag { background: #9c7a2c; }

/* ---------- Celular del centro ---------- */
.th-scan-phone {
    position: absolute; z-index: 3; left: 50%; top: 50%; width: 290px; height: 580px; margin: -290px 0 0 -145px;
    display: flex; flex-direction: column; padding: 14px 14px 18px; border-radius: 44px;
    background: #fff; box-shadow: 0 40px 80px -30px rgba(32, 34, 26, 0.35), 0 0 0 1px rgba(32, 34, 26, 0.08);
}
.th-scan-time { margin: 0; padding: 4px 16px 10px; font-size: 13px; font-weight: 600; }
.th-scan-view { --u: 16px; position: relative; flex: 1; border-radius: 30px; background: #f3f1ec; overflow: hidden; }
.th-scan-corner { position: absolute; z-index: 2; width: 34px; height: 34px; border: 2px solid rgba(32, 34, 26, 0.7); }
.th-scan-corner--tl { top: 10%; left: 7%; border-right: 0; border-bottom: 0; border-radius: 8px 0 0 0; }
.th-scan-corner--tr { top: 10%; right: 7%; border-left: 0; border-bottom: 0; border-radius: 0 8px 0 0; }
.th-scan-corner--bl { bottom: 10%; left: 7%; border-right: 0; border-top: 0; border-radius: 0 0 0 8px; }
.th-scan-corner--br { bottom: 10%; right: 7%; border-left: 0; border-top: 0; border-radius: 0 0 8px 0; }
.th-scan-shot { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; opacity: 0; transform: scale(0.94); transition: opacity 0.35s ease, transform 0.45s var(--ease); }
.th-scan-shot.is-on { opacity: 1; transform: none; }
.th-scan-shot .th-sc-card { font-size: 15px; }
.th-scan-line {
    position: absolute; z-index: 2; left: 9%; right: 9%; top: 20%; height: 2px; border-radius: 2px; opacity: 0;
    background: var(--brand); box-shadow: 0 0 16px 4px rgba(0, 143, 133, 0.45);
}
.th-scan-view.is-scanning .th-scan-line { animation: th-scan-sweep 1.1s ease-in-out both; }
@keyframes th-scan-sweep { 0% { top: 20%; opacity: 0; } 12% { opacity: 1; } 50% { top: 78%; } 88% { opacity: 1; } 100% { top: 20%; opacity: 0; } }
.th-scan-saved {
    margin: 14px 0 0; align-self: center; display: inline-flex; align-items: center; gap: 6px; max-width: 100%;
    padding: 8px 14px; border-radius: 999px; background: var(--mint); color: var(--teal); font-size: 12.5px; font-weight: 500; white-space: nowrap;
    transition: opacity 0.3s ease, transform 0.3s var(--ease);
}
.th-scan-saved:not(.is-shown) { opacity: 0; transform: translateY(6px); }
html:not(.th-motion) .th-scan-saved { opacity: 1; transform: none; }
.th-scan-check { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%; background: var(--teal); color: #fff; font-size: 10px; }

.th-scan-foot { margin-top: 44px; padding: 0 var(--gutter); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.th-scan-note { font-size: 13px; color: var(--ink-60); }

@media (max-width: 700px) {
    .th-scan { padding: 88px 0 80px; }
    .th-scan-stage { --u: 10px; height: 440px; margin-top: 36px; }
    .th-scan-phone { width: 210px; height: 430px; margin: -215px 0 0 -105px; border-radius: 36px; padding: 10px 10px 14px; }
    .th-scan-view { --u: 12px; border-radius: 26px; }
    .th-scan-shot .th-sc-card { font-size: 11.5px; }
    .th-scan-corner { width: 26px; height: 26px; }
}
@media (prefers-reduced-motion: reduce) {
    .th-scan-view.is-scanning .th-scan-line { animation: none; }
    .th-scan-saved:not(.is-shown) { opacity: 1; transform: none; }
}

/* Texto solo para lectores de pantalla. */
.th-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* ---------- Carrito flotante (home.js, bloque "Carrito flotante") ---------- */
html.th-cd-lock, html.th-cd-lock body { overflow: hidden; }
.th-cd { position: fixed; inset: 0; z-index: 2147483000; /* arriba del aviso de cookies (2147482000) */ font-family: var(--font); color: var(--ink); }
.th-cd[hidden] { display: none; }
.th-cd-backdrop { position: absolute; inset: 0; background: rgba(32, 34, 26, 0.32); opacity: 0; transition: opacity 0.35s ease; }
.th-cd-panel {
    position: absolute; top: 8px; right: 8px; bottom: 8px; width: min(420px, calc(100vw - 16px));
    display: flex; flex-direction: column; background: var(--white); border-radius: 18px;
    box-shadow: 0 24px 60px rgba(32, 34, 26, 0.18); transform: translateX(calc(100% + 16px));
    transition: transform 0.42s var(--ease); overflow: hidden; text-align: left;
}
.th-cd.is-open .th-cd-backdrop { opacity: 1; }
.th-cd.is-open .th-cd-panel { transform: none; }
.th-cd.is-busy .th-cd-body, .th-cd.is-busy .th-cd-foot { opacity: 0.55; pointer-events: none; transition: opacity 0.2s; }
.th-cd-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 14px 24px; border-bottom: 1px solid var(--ink-15); }
.th-cd-head h2 { margin: 0; font-size: 22px; font-weight: 500; letter-spacing: -0.035em; }
.th-cd-n { color: var(--ink-50); font-weight: 400; }
.th-cd-x { width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--ink-06); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.th-cd-x:hover { background: var(--ink-15); }
.th-cd-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 8px 24px; scrollbar-width: none; }
.th-cd-body::-webkit-scrollbar { display: none; }
.th-cd-empty { min-height: 100%; display: flex; align-items: center; justify-content: center; color: var(--ink-60); font-size: 16px; padding: 40px 0; }
.th-cd-empty p { margin: 0; }
.th-cd-items { list-style: none; margin: 0; padding: 0; }
.th-cd-item { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--ink-15); }
.th-cd-item:last-child { border-bottom: 0; }
.th-cd-img { display: block; aspect-ratio: 1; border-radius: 10px; background: #F4F4F2; overflow: hidden; }
.th-cd-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.th-cd-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.th-cd-name { font-size: 16px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.2; color: var(--ink); text-decoration: none; }
.th-cd-name:hover { text-decoration: underline; text-underline-offset: 3px; }
.th-cd-var { font-size: 13px; color: var(--ink-60); }
.th-cd-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; }
.th-cd-qty { display: inline-flex; align-items: center; height: 34px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--ink-15); }
.th-cd-qty button { width: 34px; height: 34px; border: 0; background: none; color: var(--ink); font: inherit; font-size: 17px; cursor: pointer; border-radius: 50%; }
.th-cd-qty button:hover:not(:disabled) { background: var(--ink-06); }
.th-cd-qty button:disabled { opacity: 0.3; cursor: default; }
.th-cd-qty span { min-width: 22px; text-align: center; font-size: 14px; font-variant-numeric: tabular-nums; }
.th-cd-qtyfix { font-size: 14px; color: var(--ink-60); }
.th-cd-price { font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums; }
.th-cd-remove { align-self: flex-start; margin-top: 2px; padding: 0; border: 0; background: none; font: inherit; font-size: 13px; color: var(--ink-60); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.th-cd-remove:hover { color: var(--ink); }
.th-cd-foot { padding: 18px 24px calc(20px + env(safe-area-inset-bottom)); border-top: 1px solid var(--ink-15); display: flex; flex-direction: column; gap: 10px; }
.th-cd-total { display: flex; justify-content: space-between; align-items: baseline; font-size: 17px; }
.th-cd-total strong { font-size: 22px; font-weight: 500; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.th-cd-note { margin: 0 0 4px; font-size: 13px; color: var(--ink-60); }
.th-cd-foot .th-btn { width: 100%; justify-content: center; }
.th-cd-cartlink { align-self: center; font-size: 14px; color: var(--ink); text-underline-offset: 3px; padding: 4px; }
@media (max-width: 520px) {
    .th-cd-panel { top: auto; right: 0; bottom: 0; left: 0; width: 100%; max-height: 88dvh; border-radius: 18px 18px 0 0; transform: translateY(100%); }
    .th-cd-item { grid-template-columns: 80px minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { .th-cd-panel, .th-cd-backdrop { transition: none; } }
