/* ══════════════════════════════════════════════════════════════════════════
   HOME — "El cuarto"
   Depende de th-tokens.css. Namespace .thf-h3 para no tocar el tema.

   Dirección: taller industrial, de trato suave. Tres decisiones cargan el
   carácter:
     1. Controles en pastilla y superficies redondeadas. Nada cuadrado.
     2. Una sola pieza de metal (mostaza) y nada más de color.
     3. Contraste tipográfico real: Archivo expandida en mayúsculas contra
        IBM Plex Mono para datos. Ni una fuente sola haciendo todo.

   El "cuarto" no es decoración: es una caída de luz de ciclorama detrás de la
   prenda y una sombra de piso. Sirve para que el producto se vea colocado en
   un espacio, que es lo que pidió el fundador.
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Base ─────────────────────────────────────────────────────────────── */

.thf-h3 {
    position: relative;
    isolation: isolate;
    padding-bottom: var(--th-band);
    line-height: 1.45;
}

.thf-h3 :where(table) { width: 100%; }
.thf-h3 :where(th) { font-weight: 500; text-align: left; }

.thf-h3-wrap {
    width: 100%;
    max-width: var(--th-max);
    margin-inline: auto;
    padding-inline: var(--th-gutter);
}

.thf-h3-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* fixed, no absolute: anclado al viewport se esconde de verdad arriba del
   borde. Con position:absolute quedaba visible porque su contenedor empieza
   debajo del nav sticky. */
.thf-h3-skip {
    border-radius: var(--th-r-pill);
    position: fixed;
    left: var(--th-gutter);
    top: 0;
    z-index: var(--th-z-toast);
    transform: translateY(-120%);
    padding: var(--th-3) var(--th-5);
    background: var(--th-metal);
    color: var(--th-metal-ink);
    font-family: var(--th-font-mono);
    font-size: var(--th-fs-ui);
    font-weight: 600;
    transition: transform var(--th-dur-fast) var(--th-ease);
}

.thf-h3-skip:focus { transform: translateY(0); outline-offset: -4px; }

/* Encabezados: grotesca expandida, versalitas, apretada. */
.thf-h3-h1,
.thf-h3-h2 {
    font-family: var(--th-font-display);
    font-variation-settings: 'wdth' var(--th-wdth-wide);
    font-weight: 700;
    text-transform: none;
    letter-spacing: -.015em;
    text-wrap: balance;
}

.thf-h3-h1 { font-size: var(--th-fs-h1); line-height: 1.05; }
.thf-h3-h2 { font-size: var(--th-fs-h2); line-height: 1.1; }

/* ══ PORTADA ══════════════════════════════════════════════════════════
   La home abre con el logo animado y el buscador. El nav entra después,
   cuando la portada sale de cuadro.

   El fondo se mueve: dos focos que derivan en direcciones distintas y un
   brillo que barre muy despacio. Ciclos largos y desfasados (23 s, 31 s,
   19 s) para que nunca se repita el mismo cuadro y no se sienta un loop.
   Todo con transform sobre capas grandes y desenfocadas: no toca layout.
   ═════════════════════════════════════════════════════════════════════ */

.thf-h3-portada {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(2rem, 5vh, 4rem);
    min-height: 100vh;
    min-height: 100svh;
    padding: var(--th-16) var(--th-gutter) var(--th-12);
    overflow: hidden;
    background: var(--th-bg);
}

.thf-h3-portada-luz {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.thf-h3-luz {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 92vmax;
    height: 92vmax;
    margin: -46vmax 0 0 -46vmax;
    border-radius: 50%;
    will-change: transform;
}

/* Foco calido: el del neon. Nace arriba a la derecha. */
.thf-h3-luz--a {
    background: radial-gradient(circle at center,
        rgba(255, 212, 0, .10) 0%,
        rgba(255, 212, 0, .04) 34%,
        transparent 62%);
    animation: thf-h3-deriva-a 23s cubic-bezier(.45, 0, .55, 1) infinite;
}

/* Foco frio: le da profundidad al cuarto y evita el amarillo plano. */
.thf-h3-luz--b {
    background: radial-gradient(circle at center,
        rgba(210, 225, 255, .07) 0%,
        rgba(210, 225, 255, .025) 30%,
        transparent 58%);
    animation: thf-h3-deriva-b 31s cubic-bezier(.45, 0, .55, 1) infinite;
}

@keyframes thf-h3-deriva-a {
    0%, 100% { transform: translate3d(18%, -22%, 0) scale(1); }
    50%      { transform: translate3d(-14%, 10%, 0) scale(1.18); }
}

@keyframes thf-h3-deriva-b {
    0%, 100% { transform: translate3d(-24%, 16%, 0) scale(1.1); }
    50%      { transform: translate3d(20%, -12%, 0) scale(.92); }
}

/* El brillo: una banda diagonal muy tenue que cruza la portada. */
.thf-h3-brillo {
    position: absolute;
    top: -60%;
    left: -35%;
    width: 45%;
    height: 220%;
    background: linear-gradient(100deg,
        transparent 0%,
        rgba(255, 255, 255, .045) 45%,
        rgba(255, 255, 255, .075) 50%,
        rgba(255, 255, 255, .045) 55%,
        transparent 100%);
    filter: blur(26px);
    animation: thf-h3-barre 19s cubic-bezier(.5, 0, .5, 1) infinite;
    will-change: transform;
}

@keyframes thf-h3-barre {
    0%   { transform: translateX(0) rotate(8deg); }
    100% { transform: translateX(340%) rotate(8deg); }
}

/* ── El logo, a escala de portada ─────────────────────────────────── */

.thf-h3-portada-logo {
    position: relative;
    z-index: 1;
    margin: 0;
    width: min(82vw, 860px);
    color: #fff;
}

.thf-h3-portada-logo img { display: block; width: 100%; height: auto; }
.thf-h3-portada-logo .thf-logo-word { fill: #fff !important; }

.thf-h3-portada-tagline {
    position: relative;
    z-index: 1;
    margin: clamp(-1.35rem, -2.5vh, -.75rem) 0 0;
    color: var(--th-ink-2);
    font-family: var(--th-font-display);
    font-size: clamp(.88rem, 1.35vw, 1.05rem);
    font-weight: 500;
    line-height: 1.3;
    text-align: center;
    text-wrap: balance;
}

.thf-h3-portada .thf-h3-buscar {
    position: relative;
    z-index: 2;
    width: min(46rem, calc(100vw - (var(--th-gutter) * 2)));
    padding: 0;
    border: 0;
}

.thf-h3-portada .thf-h3-search { width: 100%; margin: 0; }

/* ── Bajar ────────────────────────────────────────────────────────── */

.thf-h3-bajar {
    position: relative;
    z-index: 1;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    width: 52px;
    height: 36px;
    padding: 8px;
    color: var(--th-ink-3);
    transition: color var(--th-dur-base) var(--th-ease);
}

.thf-h3-bajar:hover { color: var(--th-metal); }

.thf-h3-bajar svg {
    animation: thf-h3-invita 3.4s cubic-bezier(.4, 0, .6, 1) infinite;
}

.thf-h3-section-next {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: max-content;
    max-width: calc(100% - (var(--th-gutter) * 2));
    margin: var(--th-12) auto 0;
    gap: var(--th-3);
    color: var(--th-ink-2);
    font-family: var(--th-font-display);
    font-size: var(--th-fs-body);
    font-weight: 600;
    transition: color var(--th-dur-fast) var(--th-ease);
}

.thf-h3-section-next:hover { color: var(--th-ink); }
.thf-h3-section-next svg { animation: thf-h3-invita 3.4s cubic-bezier(.4, 0, .6, 1) infinite; }

#thf-h3-activity,
#thf-h3-catalogo { scroll-margin-top: 96px; }

@keyframes thf-h3-invita {
    0%, 100% { transform: translateY(0);   opacity: .45; }
    50%      { transform: translateY(5px); opacity: 1; }
}

/* ══ BANDA DE BUSQUEDA ════════════════════════════════════════════════ */

.thf-h3-buscar {
    padding-block: var(--th-band);
    border-bottom: 1px solid var(--th-line);
    scroll-margin-top: 84px;
}

.thf-h3-buscar .thf-h3-search { margin-inline: auto; }

/* ── El buscador: una ranura negra que despierta al tocarla ───────── */

.thf-h3-search-backdrop {
    position: fixed;
    inset: 0;
    z-index: var(--th-z-overlay);
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
    background: rgba(8, 8, 10, .6) !important;
    -webkit-backdrop-filter: blur(9px) saturate(76%);
            backdrop-filter: blur(9px) saturate(76%);
    transition: opacity var(--th-dur-base) var(--th-ease);
}

.thf-h3-search-backdrop.is-visible {
    opacity: 1;
    pointer-events: auto;
}

body.thf-h3-search-active { overflow: hidden; }

.thf-h3-search {
    border-radius: var(--th-r-pill);
    position: relative;
    z-index: var(--th-z-dropdown);
    display: flex;
    align-items: center;
    gap: var(--th-1);
    width: min(100%, 680px);
    min-height: 58px;
    margin-top: clamp(2rem, 1.2rem + 2.6vw, 3rem);
    padding: 5px 5px 5px var(--th-5);
    background: var(--th-bg);
    border: 1px solid var(--th-line-strong);
    transition: border-color var(--th-dur-fast) var(--th-ease),
                background var(--th-dur-fast) var(--th-ease);
}

.thf-h3-search:focus-within {
    border-color: var(--th-ink-3);
    background: var(--th-bg);
}

.thf-h3-search.is-open {
    position: fixed;
    top: clamp(1.25rem, 5vh, 3.5rem);
    left: 50%;
    z-index: var(--th-z-modal);
    width: min(60rem, calc(100vw - 3rem));
    margin: 0;
    transform: translateX(-50%);
    border-color: var(--th-line-strong);
    background: rgba(8, 8, 10, .94);
    animation: thf-h3-search-arrive var(--th-dur-base) var(--th-ease) both;
}

@keyframes thf-h3-search-arrive {
    from { opacity: 0; transform: translate(-50%, 10px) scale(.985); }
    to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

.thf-h3-search-input {
    flex: 1;
    min-width: 0;
    height: 46px;
    padding: 0 var(--th-2);
    appearance: none;
    -webkit-appearance: none;
    background-color: transparent !important;
    background-image: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    outline: 0;
    font-family: var(--th-font-mono);
    font-size: clamp(.9375rem, .9rem + .25vw, 1.0625rem);
    font-weight: 500;
    color: var(--th-ink);
    -webkit-text-fill-color: var(--th-ink);
    caret-color: var(--th-metal);
    transition: font-size var(--th-dur-fast) var(--th-ease);
}

.thf-h3-search.is-open .thf-h3-search-input { font-size: 1.0625rem; }

.thf-h3-search-input.is-placeholder-swapping::placeholder { opacity: 0; }

.thf-h3-search-input::placeholder {
    color: var(--th-ink-3);
    -webkit-text-fill-color: var(--th-ink-3);
    opacity: 1;
    font-weight: 400;
    transition: opacity var(--th-dur-fast) var(--th-ease);
}

/* El contenedor ya marca el foco con borde + halo de metal. */
.thf-h3-search-input:focus-visible { outline: none; }
.thf-h3-search-input::-webkit-search-cancel-button { display: none; }

/* [hidden] debe ganarle a display:grid, o el botón limpiar se ve vacío */
.thf-h3-search-clear[hidden] { display: none; }

.thf-h3-search-clear {
    border-radius: var(--th-r-pill);
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    color: var(--th-ink-3);
    transition: color var(--th-dur-fast) var(--th-ease),
                background var(--th-dur-fast) var(--th-ease);
}

.thf-h3-search-clear:hover {
    color: var(--th-ink);
    background: var(--th-line);
}

.thf-h3-search-go {
    border-radius: var(--th-r-pill);
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    min-width: 46px;
    height: 46px;
    padding: 0;
    background: transparent;
    color: var(--th-ink-2);
    border: 1px solid var(--th-line-strong);
    font-family: var(--th-font-mono);
    font-size: var(--th-fs-label);
    font-weight: 600;
    line-height: 1;
    letter-spacing: .025em;
    text-transform: none;
    transition: color var(--th-dur-fast) var(--th-ease),
                border-color var(--th-dur-fast) var(--th-ease),
                background var(--th-dur-fast) var(--th-ease);
}

.thf-h3-search-go:hover {
    color: var(--th-metal);
    border-color: var(--th-metal);
    background: var(--th-metal-dim);
}

.thf-h3-search-go:active { background: var(--th-line); }

.thf-h3-search-close {
    display: none;
    flex: 0 0 auto;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: var(--th-r-pill);
    color: var(--th-ink-3);
    transition: color var(--th-dur-fast) var(--th-ease),
                background var(--th-dur-fast) var(--th-ease);
}

.thf-h3-search.is-open .thf-h3-search-close { display: grid; }
.thf-h3-search-close:hover { color: var(--th-ink); background: var(--th-line); }

/* ── Sugerencias ──────────────────────────────────────────────────── */

.thf-h3-suggest {
    border-radius: var(--th-r-md);
    position: absolute;
    inset-inline: 0;
    top: calc(100% + var(--th-3));
    max-height: calc(100vh - 9rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: var(--th-3);
    background: rgba(15, 15, 18, .82);
    border: 1px solid var(--th-line-strong);
    -webkit-backdrop-filter: blur(20px) saturate(82%);
            backdrop-filter: blur(20px) saturate(82%);
    animation: thf-h3-results-in var(--th-dur-base) var(--th-ease) both;
}

@keyframes thf-h3-results-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.thf-h3-suggest[hidden] { display: none; }

.thf-h3-suggest-group {
    padding: var(--th-3) var(--th-3) var(--th-2);
    font-family: var(--th-font-mono);
    font-size: var(--th-fs-label);
    font-weight: 500;
    letter-spacing: .04em;
    text-transform: none;
    color: var(--th-ink-3);
}

.thf-h3-suggest-facets {
    display: flex;
    flex-wrap: wrap;
    gap: var(--th-2);
    padding-bottom: var(--th-3);
    border-bottom: 1px solid var(--th-line);
}

.thf-h3-suggest-facets .thf-h3-suggest-group { flex: 0 0 100%; }

.thf-h3-suggest-facets .thf-h3-opt {
    width: auto;
    min-height: 46px;
    padding: var(--th-2) var(--th-3);
    border-radius: var(--th-r-pill);
    background: rgba(22, 22, 26, .72);
    border: 1px solid var(--th-line);
}

.thf-h3-suggest-pieces {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--th-2);
    padding-top: var(--th-2);
}

.thf-h3-suggest-pieces .thf-h3-suggest-group { grid-column: 1 / -1; }

.thf-h3-suggest-pieces .thf-h3-opt {
    min-height: 86px;
    padding: var(--th-2);
    border-radius: var(--th-r-sm);
    background: rgba(22, 22, 26, .56);
}

.thf-h3-opt {
    display: flex;
    align-items: center;
    gap: var(--th-3);
    width: 100%;
    padding: var(--th-2) var(--th-5);
    text-align: left;
    color: var(--th-ink-2);
    cursor: pointer;
    scroll-margin: var(--th-2);
}

.thf-h3-opt:hover,
.thf-h3-opt.is-active { background: var(--th-surface-2); color: var(--th-ink); }

.thf-h3-opt-thumb {
    border-radius: var(--th-r-sm);
    flex-shrink: 0;
    width: 56px;
    height: 70px;
    object-fit: cover;
    background: var(--th-surface-2);
}

.thf-h3-opt-icon {
    border-radius: var(--th-r-pill);
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    color: var(--th-ink-3);
    border: 1px solid var(--th-line);
    font-family: var(--th-font-mono);
    font-size: 11px;
    font-weight: 600;
}

.thf-h3-opt-main { flex: 1; min-width: 0; }

.thf-h3-opt-title {
    display: block;
    font-size: var(--th-fs-ui);
    font-weight: 500;
    color: var(--th-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.thf-h3-opt-sub {
    display: block;
    margin-top: 1px;
    font-family: var(--th-font-mono);
    font-size: var(--th-fs-label);
    color: var(--th-ink-3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.thf-h3-opt-side {
    flex-shrink: 0;
    font-family: var(--th-font-mono);
    font-size: var(--th-fs-ui);
    font-weight: 600;
    color: var(--th-ink);
}

.thf-h3-opt mark { background: none; color: var(--th-metal); font-weight: 600; }

.thf-h3-suggest-foot {
    position: sticky;
    bottom: 0;
    display: block;
    width: 100%;
    margin-top: var(--th-3);
    padding: var(--th-4) var(--th-3);
    text-align: left;
    background: rgba(15, 15, 18, .92);
    border-top: 1px solid var(--th-line);
    font-family: var(--th-font-mono);
    font-size: var(--th-fs-ui);
    color: var(--th-ink-2);
}

.thf-h3-suggest-foot:hover,
.thf-h3-suggest-foot.is-active { background: var(--th-surface-2); color: var(--th-ink); }

.thf-h3-suggest-none {
    padding: var(--th-6) var(--th-5);
    font-size: var(--th-fs-body);
    color: var(--th-ink-2);
}

/* ── El escenario: la prenda colocada en el cuarto ─────────────────── */

.thf-h3-stage {
    position: relative;
    align-self: center;
    width: min(100%, 30rem);
}

/* Sombra de piso: elipse difusa bajo la prenda. Es lo que hace que no
   flote en la nada. */
.thf-h3-stage::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -6%;
    width: 74%;
    height: 9%;
    transform: translateX(-50%);
    background: radial-gradient(50% 50% at 50% 50%, rgba(0, 0, 0, .85) 0%, transparent 72%);
    filter: blur(6px);
    pointer-events: none;
}

.thf-h3-stage-media {
    border-radius: var(--th-r-md);
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 5;
    object-fit: cover;
}

.thf-h3-stage-piece { display: block; position: relative; }

.thf-h3-stage-piece .thf-h3-stage-media {
    transition: transform var(--th-dur-slow) var(--th-ease);
}

.thf-h3-stage-piece:hover .thf-h3-stage-media,
.thf-h3-stage-piece:focus-visible .thf-h3-stage-media { transform: scale(1.02); }

.thf-h3-stage-tag {
    display: grid;
    gap: 2px;
    margin-top: var(--th-4);
    padding-top: var(--th-3);
    border-top: 1px solid var(--th-line);
}

.thf-h3-stage-brand {
    font-family: var(--th-font-mono);
    font-size: var(--th-fs-label);
    letter-spacing: .04em;
    text-transform: none;
    color: var(--th-ink-3);
}

.thf-h3-stage-name {
    font-family: var(--th-font-display);
    font-variation-settings: 'wdth' 108;
    font-size: 1.0625rem;
    font-weight: 600;
    line-height: 1.2;
    color: var(--th-ink);
}

/* Tinta, no metal: arriba del pliegue el metal ya lo llevan el punto del
   wordmark y el botón de buscar. Un tercero lo devalúa. */
.thf-h3-stage-price {
    margin-top: var(--th-1);
    font-size: var(--th-fs-price);
    font-weight: 600;
    color: var(--th-ink);
}

@media (min-width: 1000px) {
    /* center, no end: la columna de texto es más corta que la prenda, y
       alinearlas por abajo abría un hueco negro enorme arriba a la izquierda. */
    .thf-h3-room-inner {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 22rem);
        align-items: center;
        gap: var(--th-16);
    }

    .thf-h3-stage { width: 100%; }
}

/* ══ BANDAS ═══════════════════════════════════════════════════════════ */

.thf-h3-band { padding-block: var(--th-band); }

.thf-h3-band--tint {
    background: var(--th-surface);
    border-block: 1px solid var(--th-line);
}

.thf-h3-band--live { padding-top: calc(var(--th-band) * .75); }

.thf-h3-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--th-3) var(--th-6);
    margin-bottom: var(--th-8);
    padding-bottom: var(--th-4);
    border-bottom: 1px solid var(--th-line-strong);
}

.thf-h3-head-note {
    flex: 1 1 100%;
    order: 3;
    max-width: 56ch;
    margin-top: calc(var(--th-2) * -1);
    font-size: var(--th-fs-body);
    color: var(--th-ink-2);
    text-wrap: pretty;
}

.thf-h3-head-note--white {
    color: var(--th-ink);
}

.thf-h3-h2--white {
    color: var(--th-ink);
}

/* Astra aplica su color de encabezado con mayor especificidad. En esta
   superficie todos los titulos de seccion pertenecen al sistema oscuro. */
.thf-h3 .thf-h3-h1,
.thf-h3 .thf-h3-h2 {
    color: var(--th-ink);
}

.thf-h3-head-link {
    display: inline-flex;
    align-items: center;
    gap: var(--th-2);
    min-height: 32px;
    white-space: nowrap;
    font-family: var(--th-font-mono);
    font-size: var(--th-fs-label);
    font-weight: 500;
    letter-spacing: .025em;
    text-transform: none;
    color: var(--th-ink-3);
    transition: color var(--th-dur-fast) var(--th-ease);
}

.thf-h3-head-link span {
    display: inline-block;
    transition: transform var(--th-dur-fast) var(--th-ease);
}

.thf-h3-head-link:hover { color: var(--th-metal); }
.thf-h3-head-link:hover span { transform: translateX(3px); }

/* ══ RIEL ═════════════════════════════════════════════════════════════ */

.thf-h3-rail-shell {
    margin-inline: calc(var(--th-gutter) * -1);
    padding-inline: var(--th-gutter);
    -webkit-mask-image: linear-gradient(90deg, #000 0 92%, transparent 100%);
            mask-image: linear-gradient(90deg, #000 0 92%, transparent 100%);
}

.thf-h3-rail {
    display: flex;
    gap: var(--th-5);
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    padding-bottom: var(--th-2);
}

.thf-h3-rail::-webkit-scrollbar { display: none; }

.thf-h3-rail-item {
    flex: 0 0 clamp(10rem, 6rem + 13vw, 15rem);
    scroll-snap-align: start;
}

/* ══ TARJETA: el nombre manda ═════════════════════════════════════════ */

.thf-h3-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: var(--th-4);
}

.thf-h3-shot {
    border-radius: var(--th-r-md);
    position: relative;
    display: block;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: var(--th-surface);
}

.thf-h3-shot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--th-dur-slow) var(--th-ease),
                opacity var(--th-dur-base) var(--th-ease);
}

.thf-h3-shot-back { position: absolute; inset: 0; opacity: 0; }

.thf-h3-card:hover .thf-h3-shot img,
.thf-h3-card:focus-visible .thf-h3-shot img { transform: scale(1.04); }

.thf-h3-card:hover .thf-h3-shot-back,
.thf-h3-card:focus-visible .thf-h3-shot-back { opacity: 1; }

.thf-h3-card-body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: var(--th-1);
    min-width: 0;
}

.thf-h3-card-brand {
    font-family: var(--th-font-mono);
    font-size: var(--th-fs-label);
    font-weight: 500;
    letter-spacing: .035em;
    text-transform: none;
    color: var(--th-ink-3);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* El nombre de la pieza: lo más grande de la tarjeta, en la display. */
.thf-h3-card-name {
    font-family: var(--th-font-display);
    font-variation-settings: 'wdth' 106;
    font-size: 1.0625rem;
    font-weight: 600;
    line-height: 1.18;
    color: var(--th-ink);
    overflow-wrap: anywhere;
    text-decoration: 1px solid underline transparent;
    text-underline-offset: 4px;
    transition: text-decoration-color var(--th-dur-fast) var(--th-ease);
}

.thf-h3-card:hover .thf-h3-card-name,
.thf-h3-card:focus-visible .thf-h3-card-name { text-decoration-color: var(--th-metal); }

.thf-h3-card-foot {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--th-2);
    margin-top: auto;
    padding-top: var(--th-2);
}

.thf-h3-card-price {
    font-size: var(--th-fs-price);
    font-weight: 600;
    color: var(--th-ink);
}

.thf-h3-card-size {
    flex-shrink: 0;
    font-family: var(--th-font-mono);
    font-size: var(--th-fs-label);
    color: var(--th-ink-3);
}

/* ══ SUBASTAS EN VIVO ═════════════════════════════════════════════════ */

.thf-h3-livedot {
    display: inline-block;
    width: 9px;
    height: 9px;
    margin-right: var(--th-3);
    background: var(--th-live);
    border-radius: var(--th-r-pill);
    vertical-align: middle;
    animation: thf-h3-blink 1.6s steps(1, end) infinite;
}

@keyframes thf-h3-blink {
    0%, 55% { opacity: 1; }
    56%, 100% { opacity: .25; }
}

/* Cuatro columnas fijas: thf_h3_auctions() devuelve 4 como máximo, y con
   auto-fill sobraba una columna vacía a la derecha. */
.thf-h3-auctions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--th-8) var(--th-5);
}

.thf-h3-auction-empty {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(16rem, 32rem);
    gap: var(--th-8);
    align-items: end;
    min-height: 9rem;
    padding: var(--th-8);
    border: 1px solid var(--th-line-strong);
    background: var(--th-surface);
}

.thf-h3-auction-empty-state {
    font-family: var(--th-font-display);
    font-size: clamp(1.6rem, 3vw, 3rem);
    font-weight: 650;
    color: var(--th-ink);
}

.thf-h3-auction-empty p { color: var(--th-ink-2); text-wrap: pretty; }

@media (min-width: 900px) {
    .thf-h3-auctions { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.thf-h3-lot { display: flex; flex-direction: column; gap: var(--th-4); height: 100%; }

.thf-h3-lot-shot {
    border-radius: var(--th-r-md);
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--th-surface);
    border: 1px solid var(--th-line-strong);
}

.thf-h3-lot-shot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--th-dur-slow) var(--th-ease);
}

.thf-h3-lot:hover .thf-h3-lot-shot img { transform: scale(1.04); }

/* flex:1 para que el reloj pueda irse al fondo con margin-top:auto y todas
   las fichas cierren a la misma línea aunque el nombre ocupe dos renglones. */
.thf-h3-lot-body { display: flex; flex: 1 1 auto; flex-direction: column; gap: var(--th-1); min-width: 0; }

.thf-h3-lot-bid {
    display: flex;
    align-items: baseline;
    gap: var(--th-2);
    margin-top: var(--th-2);
}

.thf-h3-lot-bid b {
    font-family: var(--th-font-mono);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--th-metal);
}

.thf-h3-lot-bid span {
    font-family: var(--th-font-mono);
    font-size: var(--th-fs-label);
    color: var(--th-ink-3);
}

.thf-h3-lot-clock {
    margin-top: auto;
    padding-top: var(--th-2);
    font-size: var(--th-fs-label);
    letter-spacing: .08em;
    color: var(--th-ink-2);
}

.thf-h3-lot-clock[data-ending="1"] { color: var(--th-live); }

/* ══ ACTIVIDAD: VENTAS + TIENDAS ══════════════════════════════════════ */

.thf-h3-activity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(28rem, 100%), 1fr));
    gap: var(--th-12);
}

.thf-h3-activity-panel { min-width: 0; }

.thf-h3-activity .thf-h3-head-link { color: var(--th-ink-2); }
.thf-h3-activity .thf-h3-head-link:hover { color: var(--th-ink); }

@media (min-width: 960px) {
    .thf-h3-activity-panel .thf-h3-head { min-height: 7.5rem; }

    .thf-h3-activity-panel--stores {
        padding-left: var(--th-12);
        border-left: 1px solid var(--th-line-strong);
    }
}

/* Las ventas se revelan como un registro que avanza renglón por renglón. */
.thf-h3.is-motion-ready [data-h3-reveal]:not(.is-visible) .thf-h3-sale {
    opacity: 0;
    transform: translateX(-28px);
    clip-path: inset(0 100% 0 0);
}

.thf-h3.is-motion-ready [data-h3-reveal].is-visible .thf-h3-sale {
    animation: thf-h3-sale-in 520ms var(--th-ease) both;
    animation-delay: calc(var(--i) * 65ms);
}

@keyframes thf-h3-sale-in {
    from { opacity: 0; transform: translateX(-28px); clip-path: inset(0 100% 0 0); }
    to { opacity: 1; transform: translateX(0); clip-path: inset(0 0 0 0); }
}

/* Las tiendas pesan más visualmente: suben con una cadencia más corta. */
.thf-h3.is-motion-ready [data-h3-reveal]:not(.is-visible) .thf-h3-stores > li {
    opacity: 0;
    transform: translateY(24px);
    clip-path: inset(0 0 35% 0);
}

.thf-h3.is-motion-ready [data-h3-reveal].is-visible .thf-h3-stores > li {
    animation: thf-h3-store-in 500ms var(--th-ease) both;
    animation-delay: calc(80ms + var(--i) * 75ms);
}

@keyframes thf-h3-store-in {
    from { opacity: 0; transform: translateY(24px); clip-path: inset(0 0 35% 0); }
    to { opacity: 1; transform: translateY(0); clip-path: inset(0 0 0 0); }
}

/* ══ ÚLTIMAS VENTAS ═══════════════════════════════════════════════════ */

.thf-h3-sold {
    border-top: 1px solid var(--th-line);
    counter-reset: thf-sale;
}

/* Cuatro columnas: foto · pieza · talla · precio. Con tres, el precio se
   iba de renglón y la fila se partía en dos. */
.thf-h3-sale {
    display: grid;
    grid-template-columns: 2.5ch 44px minmax(0, 1fr) auto auto;
    align-items: center;
    gap: var(--th-4);
    padding-block: var(--th-3);
    border-bottom: 1px solid var(--th-line);
    counter-increment: thf-sale;
}

.thf-h3-sale::before {
    content: counter(thf-sale, decimal-leading-zero);
    font-family: var(--th-font-mono);
    font-size: .68rem;
    color: var(--th-ink-3);
}

.thf-h3-sale-shot {
    border-radius: var(--th-r-sm);
    width: 44px;
    height: 54px;
    overflow: hidden;
    background: var(--th-surface-2);
}

.thf-h3-sale-shot img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1); opacity: .62; }

.thf-h3-sale-body { min-width: 0; }

.thf-h3-sale-name {
    display: block;
    font-family: var(--th-font-display);
    font-variation-settings: 'wdth' 106;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
    color: var(--th-ink-2);
    overflow-wrap: anywhere;
}

.thf-h3-sale-size {
    min-width: 4ch;
    text-align: right;
    font-family: var(--th-font-mono);
    font-size: var(--th-fs-label);
    color: var(--th-ink-3);
}

.thf-h3-sale-price { min-width: 5ch; text-align: right; }

.thf-h3-sale-price {
    font-size: var(--th-fs-price);
    font-weight: 600;
    color: var(--th-ink);
}

@media (max-width: 560px) {
    .thf-h3-sale { grid-template-columns: 2.5ch 40px minmax(0, 1fr) auto; gap: var(--th-3); }
    .thf-h3-sale-size { display: none; }
    .thf-h3-sale-price { grid-column: 4; }
}

/* ══ TIENDAS ══════════════════════════════════════════════════════════ */

.thf-h3-stores {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(30rem, 100%), 1fr));
    gap: 0 var(--th-12);
    border-top: 1px solid var(--th-line);
}

.thf-h3-store {
    display: flex;
    align-items: center;
    gap: var(--th-5);
    padding-block: var(--th-5);
    border-bottom: 1px solid var(--th-line);
}

.thf-h3-store-shots { flex-shrink: 0; display: flex; }

.thf-h3-store-shots img {
    width: 56px;
    height: 70px;
    border-radius: var(--th-r-sm);
    object-fit: cover;
    background: var(--th-surface-2);
    border: 1px solid var(--th-line-strong);
    transition: transform var(--th-dur-base) var(--th-ease);
}

.thf-h3-store-shots img + img { margin-left: -26px; }
.thf-h3-store:hover .thf-h3-store-shots img:nth-child(2) { transform: translateX(14px); }
.thf-h3-store:hover .thf-h3-store-shots img:nth-child(3) { transform: translateX(28px); }

.thf-h3-store-body { flex: 1; min-width: 0; }

.thf-h3-store-name {
    display: block;
    font-family: var(--th-font-display);
    font-variation-settings: 'wdth' 112;
    font-size: 1.25rem;
    font-weight: 700;
    text-transform: none;
    letter-spacing: -.01em;
    color: var(--th-ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.thf-h3-store-meta {
    display: block;
    margin-top: 3px;
    font-family: var(--th-font-mono);
    font-size: var(--th-fs-label);
    color: var(--th-ink-3);
}

.thf-h3-store-meta b { font-weight: 600; color: var(--th-ink-2); }

.thf-h3-store-go {
    flex-shrink: 0;
    color: var(--th-ink-3);
    transition: transform var(--th-dur-fast) var(--th-ease),
                color var(--th-dur-fast) var(--th-ease);
}

.thf-h3-store:hover .thf-h3-store-go { transform: translateX(4px); color: var(--th-metal); }

/* ══ CATÁLOGO ═════════════════════════════════════════════════════════ */

.thf-h3-filter-stack {
    display: grid;
    justify-items: center;
    width: 100%;
    min-width: 0;
    gap: var(--th-3);
    margin-bottom: var(--th-10);
}

.thf-h3-filter-row {
    display: flex;
    justify-content: center;
    width: 100%;
    min-width: 0;
}

.thf-h3-filter-stage { animation: thf-h3-filter-in 260ms var(--th-ease) both; }
.thf-h3-filter-stage[hidden] { display: none; }

@keyframes thf-h3-filter-in {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: none; }
}

.thf-h3-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--th-2);
    margin-bottom: 0;
}

.thf-h3-filter {
    border-radius: var(--th-r-pill);
    display: inline-flex;
    align-items: baseline;
    gap: var(--th-2);
    padding: 8px var(--th-4);
    border: 1px solid var(--th-line);
    font-family: var(--th-font-mono);
    font-size: var(--th-fs-ui);
    font-weight: 500;
    color: var(--th-ink-2);
    transition: color var(--th-dur-fast) var(--th-ease),
                border-color var(--th-dur-fast) var(--th-ease),
                background var(--th-dur-fast) var(--th-ease);
}

.thf-h3-filter b { font-size: var(--th-fs-label); font-weight: 500; color: var(--th-ink-3); }

.thf-h3-filter:hover { border-color: var(--th-metal); color: var(--th-ink); }

.thf-h3-filter.is-active {
    background: var(--th-ink);
    border-color: var(--th-ink);
    color: var(--th-bg);
}

.thf-h3-filter.is-active b { color: rgba(8, 8, 10, .62); }

.thf-h3-filter-more { display: flex; justify-content: center; min-height: 34px; }
.thf-h3-filter-more[hidden] { display: none; }

.thf-h3-filter-add {
    display: inline-flex;
    align-items: center;
    gap: var(--th-2);
    min-height: 34px;
    padding: 6px var(--th-4);
    border-radius: var(--th-r-pill);
    background: var(--th-surface-2);
    color: var(--th-ink-2);
    font-family: var(--th-font-mono);
    font-size: var(--th-fs-label);
    transition: color var(--th-dur-fast) var(--th-ease), background var(--th-dur-fast) var(--th-ease);
}

.thf-h3-filter-add:hover,
.thf-h3-filter-add[aria-expanded="true"] { color: var(--th-ink); background: var(--th-line); }
.thf-h3-filter-add span { color: var(--th-metal); font-size: 1rem; line-height: 1; }

.thf-h3-filter-summary {
    min-height: 18px;
    color: var(--th-ink-3);
    font-size: var(--th-fs-label);
}

.thf-h3-products-head { position: relative; justify-content: center; text-align: center; }

.thf-h3-products-all {
    position: absolute;
    top: 50%;
    right: 0;
    display: inline-flex;
    align-items: center;
    gap: var(--th-2);
    padding: 9px var(--th-4);
    border-radius: var(--th-r-pill);
    background: rgba(22, 22, 26, .72);
    color: var(--th-ink-2);
    font-family: var(--th-font-mono);
    font-size: var(--th-fs-label);
    transform: translateY(-50%);
    -webkit-backdrop-filter: blur(14px);
            backdrop-filter: blur(14px);
    transition: color var(--th-dur-fast) var(--th-ease), background var(--th-dur-fast) var(--th-ease);
}

.thf-h3-products-all:hover { color: var(--th-ink); background: var(--th-surface-2); }
.thf-h3-products-all span { transition: transform var(--th-dur-fast) var(--th-ease); }
.thf-h3-products-all:hover span { transform: translateX(3px); }

.thf-h3-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(14rem, 100%), 1fr));
    gap: var(--th-10) var(--th-5);
}

.thf-h3-grid-item { min-width: 0; }
.thf-h3-grid-item[hidden] { display: none; }

.thf-h3-empty {
    padding-block: var(--th-12);
    font-size: var(--th-fs-body);
    color: var(--th-ink-2);
    text-align: center;
}

.thf-h3-empty[hidden] { display: none; }

.thf-h3-more { display: flex; justify-content: center; margin-top: var(--th-12); }

/* ══ FICHA TÉCNICA OVERLAY ════════════════════════════════════════════ */

body.thf-h3-modal-open { overflow: hidden; }

.thf-h3-product-modal {
    position: fixed;
    inset: 0;
    z-index: calc(var(--th-z-modal) + 10);
    display: grid;
    place-items: center;
    padding: clamp(1rem, 4vw, 3rem);
    opacity: 0;
    transition: opacity 300ms var(--th-ease);
}

.thf-h3-product-modal[hidden] { display: none; }
.thf-h3-product-modal.is-open { opacity: 1; }

.thf-h3-product-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(4, 4, 6, .58);
    -webkit-backdrop-filter: blur(20px) saturate(72%);
            backdrop-filter: blur(20px) saturate(72%);
}

.thf-h3-product-sheet {
    position: relative;
    display: grid;
    grid-template-columns: minmax(18rem, .9fr) minmax(20rem, 1.1fr);
    width: min(68rem, 100%);
    max-height: min(46rem, calc(100vh - 2rem));
    overflow: hidden;
    border: 1px solid rgba(242, 242, 239, .12);
    border-radius: 28px;
    background: rgba(15, 15, 18, .68);
    box-shadow: 0 34px 110px rgba(0, 0, 0, .58), inset 0 1px rgba(255, 255, 255, .06);
    -webkit-backdrop-filter: blur(34px) saturate(88%);
            backdrop-filter: blur(34px) saturate(88%);
    opacity: 0;
    filter: blur(8px);
    transform: translateY(34px) scale(.94);
    transform-origin: center 60%;
    transition: transform 420ms cubic-bezier(.16, 1, .3, 1),
                opacity 260ms var(--th-ease),
                filter 360ms var(--th-ease);
}

.thf-h3-product-modal.is-open .thf-h3-product-sheet { opacity: 1; filter: none; transform: none; }

.thf-h3-product-close {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 42px;
    min-width: 42px;
    height: 42px;
    padding: 0;
    box-sizing: border-box;
    border: 0;
    border-radius: 50%;
    background: rgba(242, 242, 239, .08);
    color: var(--th-ink);
    transition: background var(--th-dur-fast) var(--th-ease), transform var(--th-dur-fast) var(--th-ease);
}

.thf-h3-product-close:hover { background: rgba(242, 242, 239, .15); transform: rotate(4deg); }
.thf-h3-product-close svg { display: block; }

.thf-h3-product-media { min-height: 0; background: rgba(22, 22, 26, .72); overflow: hidden; }
.thf-h3-product-media img { width: 100%; height: 100%; object-fit: cover; opacity: .86; filter: saturate(.88) contrast(.96); transform: scale(1.015); transition: opacity 420ms var(--th-ease), transform 700ms var(--th-ease); }
.thf-h3-product-modal.is-open .thf-h3-product-media img { opacity: .92; transform: none; }

.thf-h3-product-info {
    min-width: 0;
    overflow-y: auto;
    padding: clamp(2rem, 5vw, 4.5rem);
}

.thf-h3-product-brand,
.thf-h3-product-specs dt {
    font-family: var(--th-font-mono);
    font-size: var(--th-fs-label);
    color: var(--th-ink-3);
}

.thf-h3-product-info h2 {
    margin-top: var(--th-2);
    font-family: var(--th-font-display);
    font-size: clamp(2rem, 4vw, 3.6rem);
    line-height: 1;
    color: var(--th-ink);
}

.thf-h3-product-price { margin-top: var(--th-5); font-size: 1.5rem; color: var(--th-ink); }

.thf-h3-product-specs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: var(--th-8);
    border-top: 1px solid var(--th-line);
}

.thf-h3-product-specs > div { padding: var(--th-4) 0; border-bottom: 1px solid var(--th-line); }
.thf-h3-product-specs dd { margin-top: 3px; color: var(--th-ink); overflow-wrap: anywhere; }
.thf-h3-product-description { margin-top: var(--th-6); color: var(--th-ink-2); line-height: 1.6; }
.thf-h3-product-actions { display: flex; flex-wrap: wrap; gap: var(--th-3); margin-top: var(--th-8); }
.thf-h3-product-actions .thf-h3-btn--ghost { border: 0; background: rgba(242, 242, 239, .08); }
.thf-h3-product-actions .thf-h3-btn--ghost:hover { background: rgba(242, 242, 239, .14); color: var(--th-ink); }

/* ══ BOTONES ══════════════════════════════════════════════════════════ */

.thf-h3-btn {
    border-radius: var(--th-r-pill);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--th-2);
    min-height: 48px;
    padding-inline: var(--th-8);
    font-family: var(--th-font-mono);
    font-size: var(--th-fs-ui);
    font-weight: 600;
    letter-spacing: .025em;
    text-transform: none;
    transition: background var(--th-dur-fast) var(--th-ease),
                color var(--th-dur-fast) var(--th-ease),
                border-color var(--th-dur-fast) var(--th-ease);
}

.thf-h3-btn span {
    display: inline-block;
    transition: transform var(--th-dur-fast) var(--th-ease);
}

.thf-h3-btn:hover span { transform: translateX(3px); }

.thf-h3-btn--primary { background: var(--th-metal); color: var(--th-metal-ink); }
.thf-h3-btn--primary:hover { background: var(--th-metal-2); }

.thf-h3-btn--ghost { border: 1px solid var(--th-line-strong); color: var(--th-ink); }
.thf-h3-btn--ghost:hover { border-color: var(--th-metal); color: var(--th-metal); }

/* ══ VENDER ═══════════════════════════════════════════════════════════ */

.thf-h3-close {
    margin-top: var(--th-band);
    padding-block: var(--th-band);
    background: var(--th-bg);
}

.thf-h3-close-inner {
    position: relative;
    display: grid;
    gap: var(--th-10);
    width: min(calc(100% - (var(--th-gutter) * 2)), calc(var(--th-max) - (var(--th-gutter) * 2)));
    padding: clamp(2rem, 5vw, 4.5rem);
    border: 1px solid rgba(242, 242, 239, .1);
    border-radius: 28px;
    overflow: hidden;
    background-color: rgba(15, 15, 18, .78);
    background-image:
        radial-gradient(ellipse 70% 120% at 8% 0%, rgba(210, 167, 44, .12), transparent 68%),
        radial-gradient(ellipse 55% 90% at 100% 100%, rgba(242, 242, 239, .06), transparent 72%);
    box-shadow: inset 0 1px rgba(255, 255, 255, .05);
}

.thf-h3-close-inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 8%;
    right: 8%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--th-metal), transparent);
    opacity: .68;
}

.thf-h3-close-inner > * { position: relative; z-index: 1; }

@media (min-width: 900px) {
    .thf-h3-close-inner {
        grid-template-columns: minmax(0, 1fr) minmax(0, 24rem);
        align-items: start;
        gap: var(--th-16);
    }

    .thf-h3-close-note { grid-column: 1 / -1; }
}

.thf-h3-close-main { max-width: 42ch; }

.thf-h3-close-lead {
    margin-top: var(--th-4);
    font-size: var(--th-fs-body);
    line-height: 1.6;
    color: var(--th-ink-2);
    text-wrap: pretty;
}

.thf-h3-close-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--th-3);
    margin-top: var(--th-8);
}

.thf-h3-close .thf-h3-btn--ghost {
    border: 0;
    background: rgba(242, 242, 239, .08);
}

.thf-h3-close .thf-h3-btn--ghost:hover { background: rgba(242, 242, 239, .14); color: var(--th-ink); }

.thf-h3-close-note {
    padding-top: var(--th-6);
    border-top: 1px solid rgba(242, 242, 239, .08);
    font-family: var(--th-font-mono);
    font-size: var(--th-fs-label);
    letter-spacing: .025em;
    text-transform: none;
    color: var(--th-ink-3);
}

.thf-h3-terms > div {
    display: grid;
    grid-template-columns: 6rem minmax(0, 1fr);
    gap: var(--th-4);
    padding-block: var(--th-4);
    border-top: 1px solid rgba(242, 242, 239, .08);
}

.thf-h3-terms > div:last-child { border-bottom: 1px solid rgba(242, 242, 239, .08); }

.thf-h3-terms dt {
    font-family: var(--th-font-mono);
    font-size: var(--th-fs-label);
    font-weight: 500;
    letter-spacing: .035em;
    text-transform: none;
    color: var(--th-ink-3);
}

.thf-h3-terms dd {
    font-size: var(--th-fs-body);
    line-height: 1.45;
    color: var(--th-ink-2);
    text-wrap: pretty;
}

/* ══ ENTRADA — una sola coreografía ═══════════════════════════════════ */

.thf-h3[data-h3-intro] .thf-h3-wordmark,
.thf-h3[data-h3-intro] .thf-h3-standfirst,
.thf-h3[data-h3-intro] .thf-h3-search,
.thf-h3[data-h3-intro] .thf-h3-stage {
    animation: thf-h3-rise var(--th-dur-slow) var(--th-ease) backwards;
}

.thf-h3[data-h3-intro] .thf-h3-standfirst { animation-delay: 70ms; }
.thf-h3[data-h3-intro] .thf-h3-search     { animation-delay: 130ms; }
.thf-h3[data-h3-intro] .thf-h3-stage      { animation-delay: 190ms; }

@keyframes thf-h3-rise {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .thf-h3-dot::after { animation: none; opacity: .4; }
    .thf-h3-search.is-open,
    .thf-h3-suggest { animation: none; }
    .thf-h3-search-backdrop { transition-duration: 0ms; }

    .thf-h3[data-h3-intro] .thf-h3-wordmark,
    .thf-h3[data-h3-intro] .thf-h3-standfirst,
    .thf-h3[data-h3-intro] .thf-h3-search,
    .thf-h3[data-h3-intro] .thf-h3-stage {
        animation: thf-h3-fade var(--th-dur-fast) linear backwards;
        animation-delay: 0ms;
    }

    @keyframes thf-h3-fade { from { opacity: 0; } to { opacity: 1; } }

    .thf-h3-livedot { animation: none; }
    .thf-h3-bajar svg,
    .thf-h3-section-next svg { animation: none; }
    .thf-h3-filter-stage { animation: none; }
    .thf-h3-product-modal,
    .thf-h3-product-sheet { transition: none; }

    .thf-h3.is-motion-ready [data-h3-reveal] .thf-h3-sale,
    .thf-h3.is-motion-ready [data-h3-reveal] .thf-h3-stores > li {
        opacity: 1;
        transform: none;
        clip-path: none;
        animation: none;
    }
}

/* ══ RESPONSIVE ═══════════════════════════════════════════════════════ */

@media (max-width: 720px) {
    .thf-h3-auction-empty { grid-template-columns: 1fr; min-height: 0; }

    .thf-h3-products-head { justify-content: center; text-align: center; }
    .thf-h3-filter-stack,
    .thf-h3-filter-row { max-width: 100%; overflow: hidden; }
    .thf-h3-filters { flex-wrap: nowrap; justify-content: flex-start; width: 100%; max-width: 100%; min-width: 0; overflow-x: auto; overscroll-behavior-inline: contain; padding: 2px 0 8px; margin: 0; scrollbar-width: none; }
    .thf-h3-filters::-webkit-scrollbar { display: none; }
    .thf-h3-filter { flex: 0 0 auto; }
    .thf-h3-filter-stack.is-drag-hint .thf-h3-filter-row:first-child .thf-h3-filters {
        animation: thf-h3-drag-hint 720ms var(--th-ease) both;
    }
    .thf-h3-activity-panel--sold .thf-h3-sale:nth-child(n + 6) { display: none; }
    .thf-h3-mobile-stores {
        padding-block: var(--th-band);
        border-top: 1px solid var(--th-line);
        background: var(--th-surface);
    }
    .thf-h3-mobile-stores .thf-h3-activity-panel {
        width: min(calc(100% - (var(--th-gutter) * 2)), calc(var(--th-max) - (var(--th-gutter) * 2)));
        margin-inline: auto;
        padding-top: 0;
        border-top: 0;
    }
    .thf-h3-portada-tagline { width: min(28rem, 86vw); }

    .thf-h3-product-modal { padding: 0; align-items: end; }
    .thf-h3-product-sheet {
        grid-template-columns: 1fr;
        width: 100%;
        max-height: 92vh;
        overflow-y: auto;
        border-radius: 24px 24px 0 0;
    }
    .thf-h3-product-media { aspect-ratio: 4 / 3; }
    .thf-h3-product-info { overflow: visible; padding: var(--th-8) var(--th-5); }
    .thf-h3-product-info h2 { font-size: 2rem; }

    .thf-h3-close-inner { width: calc(100% - (var(--th-gutter) * 2)); padding: var(--th-10) var(--th-5); border-radius: 22px; }

    .thf-h3-search {
        min-height: 56px;
        padding: 5px 5px 5px var(--th-3);
    }

    .thf-h3-search-input {
        flex: 1 1 auto;
        height: 44px;
        padding-inline: var(--th-1);
    }

    .thf-h3-search-go {
        width: 44px;
        min-width: 44px;
        height: 44px;
    }

    .thf-h3-search-clear,
    .thf-h3-search-close { width: 44px; height: 44px; }

    .thf-h3-search.is-open {
        top: var(--th-3);
        width: calc(100vw - 1.5rem);
    }

    .thf-h3-search.is-open .thf-h3-search-go { display: none; }

    .thf-h3-suggest {
        top: calc(100% + var(--th-2));
        max-height: calc(100vh - 5.5rem);
        padding: var(--th-2);
        overflow-x: hidden;
    }

    .thf-h3-suggest-pieces {
        min-width: 0;
        grid-template-columns: minmax(0, 1fr);
    }

    .thf-h3-suggest-pieces .thf-h3-opt {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }

    .thf-h3-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: var(--th-6) var(--th-3);
    }

    .thf-h3-stores { gap: 0; }

    .thf-h3-activity-grid { gap: var(--th-16); }

    .thf-h3-activity-panel--stores {
        padding-top: var(--th-10);
        border-top: 1px solid var(--th-line-strong);
    }
}

@keyframes thf-h3-drag-hint {
    0%, 100% { transform: translateX(0); }
    42% { transform: translateX(-18px); }
    72% { transform: translateX(6px); }
}

/* ══════════════════════════════════════════════════════════════════════
   PIEL DEL NAV GLOBAL, SOLO EN ESTA PÁGINA
   El nav vive en templates/global-header.php y sigue en la identidad
   anterior. Migrarlo completo es otro cambio; aquí se le pone la piel
   industrial para que la home no muestre dos identidades a la vez.
   ══════════════════════════════════════════════════════════════════════ */

body.thf-home-v3 { background: var(--th-bg); }

/* El nav SÍ se muestra en la home: home-v3.js lo mueve para que quede justo
   debajo de la portada, y de ahí en adelante se pega arriba. Estaba oculto con
   display:none, que es lo que hacía que la home no tuviera barra en absoluto. */

/* El wordmark del nav es el mismo SVG autonomo y animado del hero. */
body.thf-home-v3 nav.thf-gnav .thf-gnav-wordmark { width: 100%; height: auto; }

body.thf-home-v3 nav.thf-gnav .thf-gnav-search-bar {
    background: var(--th-surface);
    border: 1px solid var(--th-line-strong);
    border-radius: var(--th-r-pill);
    overflow: hidden;
}

body.thf-home-v3 nav.thf-gnav .thf-gnav-search-bar:focus-within { border-color: var(--th-metal); }

body.thf-home-v3 nav.thf-gnav #thf-search-input {
    color: var(--th-ink);
    font-family: var(--th-font-mono);
    caret-color: var(--th-metal);
}

body.thf-home-v3 nav.thf-gnav #thf-search-input::placeholder { color: var(--th-ink-3); }

body.thf-home-v3 nav.thf-gnav .thf-gnav-search-icon,
body.thf-home-v3 nav.thf-gnav .thf-gnav-clear-btn { color: var(--th-ink-3); }

body.thf-home-v3 nav.thf-gnav .thf-gnav-submit {
    background: var(--th-surface-2);
    color: var(--th-ink);
    border-radius: 0 var(--th-r-pill) var(--th-r-pill) 0;
    letter-spacing: .025em;
    text-transform: none;
}

body.thf-home-v3 nav.thf-gnav .thf-gnav-submit:hover { background: var(--th-line-strong); }

/* En la home la acción primaria es buscar: el metal no se reparte. */
body.thf-home-v3 nav.thf-gnav .thf-gnav-sell-btn,
body.thf-home-v3 nav.thf-gnav .thf-gnav-login-btn,
body.thf-home-v3 nav.thf-gnav .thf-gnav-user-btn {
    background: transparent;
    color: var(--th-ink);
    border: 1px solid var(--th-line-strong);
    border-radius: var(--th-r-pill);
    letter-spacing: .025em;
    text-transform: none;
}

body.thf-home-v3 nav.thf-gnav .thf-gnav-sell-btn:hover,
body.thf-home-v3 nav.thf-gnav .thf-gnav-login-btn:hover {
    border-color: var(--th-metal);
    color: var(--th-metal);
}

body.thf-home-v3 nav.thf-gnav .thf-gnav-sub {
    background: transparent;
    border-top: 1px solid var(--th-line);
}

body.thf-home-v3 nav.thf-gnav .thf-category-link {
    color: var(--th-ink-2) !important;
    font-family: var(--th-font-mono);
    letter-spacing: .035em;
    text-transform: none;
}

body.thf-home-v3 nav.thf-gnav .thf-category-link:hover,
body.thf-home-v3 nav.thf-gnav .thf-category-link.active { color: var(--th-metal) !important; }

body.thf-home-v3 nav.thf-gnav .thf-subcategory-dropdown {
    background: var(--th-surface);
    border: 1px solid var(--th-line-strong);
    border-radius: var(--th-r-lg);
}

body.thf-home-v3 nav.thf-gnav .thf-subcategory-link {
    color: var(--th-ink-2) !important;
    letter-spacing: .025em;
    text-transform: none;
}
body.thf-home-v3 nav.thf-gnav .thf-subcategory-link:hover { color: var(--th-ink) !important; }

body.thf-home-v3 nav.thf-gnav .thf-gnav-drawer { background: var(--th-bg); color: var(--th-ink); }

/* ══════════════════════════════════════════════════════════════════════
   EL NAV APARECE DESPUES DE LA PORTADA
   La barra existe desde el principio (la inyecta wp_body_open), pero en la
   home se mantiene fuera de cuadro hasta que la portada sale. Al entrar,
   el logo reproduce su animacion una vez.

   Va en fixed y no en sticky: asi entra deslizandose sin empujar el
   contenido ni provocar saltos de layout.
   ══════════════════════════════════════════════════════════════════════ */

/* El nav se MUEVE en el DOM para quedar justo despues de la portada (lo hace
   home-v3.js). Asi no hace falta esconderlo ni observar el scroll: se ve
   cuando te lo topas, y de ahi en adelante se pega arriba. Sticky nativo.

   Si el JS no corre, el nav se queda arriba y sticky como en el resto del
   sitio: se pierde el efecto, nunca la navegacion. */

body.thf-home-v3 nav.thf-gnav {
    position: sticky;
    top: 0;
    z-index: var(--th-z-sticky);
    background: rgba(8, 8, 10, .86);
    border-bottom: 1px solid var(--th-line-strong);
    color: var(--th-ink);
    -webkit-backdrop-filter: blur(18px) saturate(80%);
            backdrop-filter: blur(18px) saturate(80%);
}

body.thf-home-v3 nav.thf-gnav .thf-gnav-toprow {
    max-width: var(--th-max);
    height: 56px;
    padding-inline: var(--th-gutter);
}

body.thf-home-v3 nav.thf-gnav .thf-gnav-search {
    max-width: 34rem;
    margin-inline: auto;
}

body.thf-home-v3 nav.thf-gnav .thf-gnav-submit {
    display: none;
}

body.thf-home-v3 nav.thf-gnav .thf-gnav-logo {
    display: flex;
    align-items: center;
    /* min-height para que el objetivo táctil cumpla 24px aunque el logo,
       que es muy apaisado, mida menos de alto. */
    min-height: 34px;
    width: clamp(132px, 15vw, 178px);
}

@media (prefers-reduced-motion: reduce) {
    body.thf-home-v3 nav.thf-gnav { transition: opacity 120ms linear; }
    .thf-h3-filter-stack.is-drag-hint .thf-h3-filters { animation: none; }
}
