/* ============================================================================
   PeakMC — Tienda: maquetación y componentes
   ============================================================================ */

.shell {
    width: var(--shell);
    margin-inline: auto;
}

/* ============================================================================
   BARRA SUPERIOR
   ============================================================================ */

.topbar {
    position: sticky;
    top: 0;
    z-index: 60;
    padding: 14px 0;
    transition: padding 0.4s var(--ease-soft);
}

/* Al bajar, la barra se compacta y el cristal se hace más denso: da la sensación
   de que la interfaz se aparta para dejar sitio al contenido. */
.topbar.is-stuck { padding: 8px 0; }

.topbar__inner {
    display: flex;
    align-items: center;
    gap: var(--gap-md);
    padding: 10px 12px 10px 20px;
    border-radius: var(--r-pill);
    /* Sin scroll la barra flota desnuda sobre el cielo; al bajar aparece el
       cristal oscuro. La opacidad se anima, no el color, para que no parpadee. */
    background: transparent;
    box-shadow: none;
    transition: background 0.45s var(--ease-soft), box-shadow 0.45s var(--ease-soft);
}

.topbar.is-stuck .topbar__inner {
    background: linear-gradient(158deg, rgba(74, 20, 8, 0.44), rgba(52, 14, 6, 0.54));
    -webkit-backdrop-filter: blur(26px) saturate(1.6);
    backdrop-filter: blur(26px) saturate(1.6);
    box-shadow:
        inset 0 0 0 1px rgba(255, 220, 180, 0.22),
        inset 1.5px 1.5px 0 rgba(255, 232, 200, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.24),
        0 14px 40px rgba(50, 14, 2, 0.34);
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    flex: none;
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 800;
    font-size: 1.34rem;
    /* Menos apretado que antes: a -0.04em las letras se tocaban */
    letter-spacing: -0.025em;
    line-height: 1;
    color: var(--on-sky);
}

.brand__mark {
    width: 40px;
    height: 40px;
    flex: none;
    object-fit: contain;
    filter: drop-shadow(0 3px 8px rgba(120, 60, 10, 0.4));
    transition: transform 0.6s var(--ease-back);
}

.brand:hover .brand__mark { transform: rotate(-10deg) scale(1.08); }

/*  El "MC" del logotipo.
    Antes iba en mono al 72% con opacidad 0.6: sobre el rojo oscuro de la
    cabecera se embarraba y parecía un texto a medio cargar. Ahora es un
    volado en oro, a plena opacidad y con tracking abierto — el mismo recurso
    que usan las marcas para el sufijo, y así se lee como parte del logotipo y
    no como un añadido.                                                        */
.brand__mc {
    font-family: 'Figtree', sans-serif;
    font-size: 0.46em;
    font-weight: 700;
    letter-spacing: 0.16em;
    /* Se alinea con la parte alta de la "P", no con la línea base */
    vertical-align: 0.72em;
    margin-left: 3px;
    color: var(--gold);
    text-shadow: 0 1px 6px rgba(120, 60, 5, 0.4);
}

/* En el pie el panel es claro: el oro pálido no se vería */
.brand--ink { color: var(--ink-strong); }
.brand--ink .brand__mc {
    color: var(--gold-deep);
    text-shadow: none;
}

.nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-inline: auto;
}

.nav__link {
    position: relative;
    padding: 9px 16px;
    border-radius: var(--r-pill);
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--on-sky-soft);
    transition: color 0.3s var(--ease-soft), background 0.3s var(--ease-soft);
}

.nav__link:hover,
.nav__link.is-active {
    color: var(--on-sky);
    background: rgba(255, 244, 226, 0.14);
}

/* Subrayado que crece desde el centro al pasar por encima */
.nav__link::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 4px;
    width: 0;
    height: 2px;
    border-radius: 2px;
    background: var(--gold);
    transform: translateX(-50%);
    transition: width 0.35s var(--ease-out);
}

.nav__link.is-active::after { width: 22px; }

.topbar__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: none;
}

/*  Contador del carrito.

    Va en el flujo del botón, no flotando en la esquina: `.btn` lleva
    `overflow: hidden` para recortar el barrido de brillo, y eso cortaba por la
    mitad cualquier cosa posicionada fuera de sus límites.

    Cuando el carrito está vacío no ocupa sitio (ancho y margen a cero), así
    que el botón no da un salto al aparecer el primer producto: se abre.        */
/*  Con el carrito vacío simplemente no está. Animar el ancho de 0 a `auto` no
    funciona —`auto` no es un valor interpolable— así que aparece de golpe con
    un rebote corto, que además se lee mejor: algo entró en el carrito.        */
.cart-btn__count {
    display: none;
}

.cart-btn__count.is-visible {
    display: inline-grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    margin-left: 8px;
    padding: 0 6px;
    border-radius: var(--r-pill);
    background: var(--ember);
    color: #fff;
    font-family: 'DM Mono', monospace;
    font-size: 0.72rem;
    font-weight: 500;
    line-height: 1;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
    animation: contador-entra 0.4s var(--ease-back);
}

@keyframes contador-entra {
    from { transform: scale(0.2); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

/*  Los controles de la cabecera viven sobre la franja alta del cielo, que es la
    oscura: aquí el cristal se tiñe de crema en vez de tinta o no se leería. */
.topbar .btn--glass {
    background: rgba(255, 244, 226, 0.13);
    color: var(--on-sky);
    box-shadow:
        inset 0 0 0 1px rgba(255, 228, 196, 0.30),
        inset 1.5px 1.5px 0 rgba(255, 240, 218, 0.38),
        0 6px 20px rgba(50, 14, 2, 0.24);
}

.topbar .btn--glass:hover { background: rgba(255, 244, 226, 0.24); }

/* Ficha del jugador conectado */
.account {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 16px 5px 6px;
    border-radius: var(--r-pill);
    background: rgba(255, 244, 226, 0.13);
    box-shadow: inset 0 0 0 1px rgba(255, 228, 196, 0.30);
    color: var(--on-sky);
    cursor: pointer;
    transition: background 0.3s var(--ease-soft);
}

.account:hover { background: rgba(255, 244, 226, 0.24); }

.account__avatar {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    image-rendering: pixelated;
    background: rgba(59, 26, 10, 0.2);
    box-shadow: 0 2px 8px rgba(74, 24, 4, 0.25);
}

.account__name {
    font-weight: 700;
    font-size: 0.9rem;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account__platform {
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--on-sky-faint);
}

/* Botón hamburguesa (solo móvil) */
.burger { display: none; }

/* ============================================================================
   PORTADA
   ============================================================================ */

.hero {
    position: relative;
    min-height: min(92vh, 860px);
    display: grid;
    align-items: center;
    padding: var(--gap-xl) 0 var(--gap-lg);
    overflow: hidden;
}

.hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: var(--gap-lg);
    align-items: center;
}

/* Todo lo de la portada va sobre el cielo, no dentro de un panel: tinta crema. */
.hero__copy {
    max-width: 42ch;
    color: var(--on-sky);
}

.hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: var(--gap-sm);
    padding: 7px 16px;
    border-radius: var(--r-pill);
    background: rgba(255, 244, 226, 0.13);
    box-shadow: inset 0 0 0 1px rgba(255, 228, 196, 0.28);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--on-sky);
}

/* Punto verde parpadeante del estado del servidor */
.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--mint);
    animation: pulse-ring 2.2s var(--ease-soft) infinite;
}

.pulse-dot--off { background: #b4b4b4; animation: none; }

.hero__title {
    font-size: clamp(3rem, 8vw, 6rem);
    line-height: 0.95;
    letter-spacing: -0.045em;
    margin-bottom: var(--gap-sm);
    color: var(--on-sky);
    /* Sombra larga y muy suave: despega el titular del cielo sin que se note */
    text-shadow: 0 3px 24px rgba(60, 16, 2, 0.35);
    text-wrap: balance;
}

/*  La palabra destacada.
    Antes llevaba un degradado naranja recortado en el texto, sobre un fondo
    también naranja: poco contraste y un recurso muy visto. Ahora se subraya con
    un trazo de oro por detrás de la línea base — sigue siendo el color de la
    marca, pero el texto conserva todo su contraste.                           */
/*  El trazo es el FONDO del propio <em>, no un pseudo-elemento con z-index
    negativo: así se pinta siempre por detrás de su texto, sin depender de qué
    contexto de apilamiento cree la animación de entrada del titular.          */
.hero__title em {
    font-style: normal;
    white-space: nowrap;
    padding-inline: 0.07em;
    border-radius: 0.08em;
    background-image: linear-gradient(100deg, var(--gold-deep), var(--gold) 55%, #ffdd7a);
    background-repeat: no-repeat;
    background-position: 0 86%;
    background-size: 0% 0.2em;
    /* Se traza de izquierda a derecha al cargar, como con un rotulador */
    animation: swash 0.85s var(--ease-out) 0.6s forwards;
}

@keyframes swash {
    to { background-size: 100% 0.2em; }
}

.hero__lead {
    font-size: 1.15rem;
    line-height: 1.62;
    max-width: 46ch;
    color: var(--on-sky-soft);
    margin-bottom: var(--gap-md);
    text-wrap: pretty;
}

.hero__cta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: var(--gap-md);
}

/* Dirección IP del servidor: se copia al pulsar */
.ip-badge {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 11px 12px 11px 20px;
    border-radius: var(--r-pill);
    cursor: pointer;
    font-family: 'DM Mono', monospace;
    font-size: 0.92rem;
    color: var(--on-sky);
    background: rgba(255, 244, 226, 0.12);
    box-shadow:
        inset 0 0 0 1px rgba(255, 228, 196, 0.28),
        inset 1.5px 1.5px 0 rgba(255, 240, 218, 0.34),
        0 6px 20px rgba(50, 14, 2, 0.22);
}

.ip-badge__copy {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    color: var(--ink-strong);
    background: rgba(255, 240, 218, 0.86);
    transition: background 0.3s var(--ease-soft), transform 0.3s var(--ease-back);
}

.ip-badge:hover .ip-badge__copy { background: var(--gold); transform: scale(1.1); }

.hero__stats {
    display: flex;
    gap: var(--gap-lg);
    flex-wrap: wrap;
    padding-top: var(--gap-sm);
    /* Filete de separación en lugar de un hueco vacío: da estructura editorial */
    border-top: 1px solid rgba(255, 228, 196, 0.22);
}

.stat__value {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 1.9rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.035em;
    color: var(--on-sky);
}

.stat__label {
    margin-top: 3px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--on-sky-faint);
}

/* El logo de la marca */
.hero__stage {
    position: relative;
    display: grid;
    place-items: center;
    aspect-ratio: 1 / 1;
    min-height: 340px;
}

/* Resplandor cálido detrás del logo: lo separa del cielo sin recuadrarlo */
.hero__stage::before {
    content: '';
    position: absolute;
    width: 72%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 214, 130, 0.5), transparent 68%);
    filter: blur(40px);
}

/*  La imagen viene ya recortada (704x560, apaisada), así que se dimensiona por
    ancho. Antes llevaba un 53% de vacío transparente alrededor y había que
    inflarla para que se viera del tamaño correcto.                            */
.hero__logo {
    position: relative;
    width: min(100%, 560px);
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 26px 46px rgba(60, 16, 2, 0.42));
    /* Balanceo mínimo y lento: da algo de vida sin llamar la atención */
    animation: logo-idle 7s var(--ease-soft) infinite;
}

@keyframes logo-idle {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50%      { transform: translateY(-12px) rotate(-1.2deg); }
}

/* ============================================================================
   SECCIONES
   ============================================================================ */

.section { padding: var(--gap-xl) 0; }

.section__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--gap-md);
    margin-bottom: var(--gap-lg);
    flex-wrap: wrap;
}

/*  Las cabeceras de sección van sueltas sobre el cielo, así que también en
    crema. Al usar el navegador con anclas caen siempre en la franja alta.     */
.section__title {
    font-size: clamp(2rem, 4.2vw, 3.1rem);
    letter-spacing: -0.04em;
    color: var(--on-sky);
    text-shadow: 0 2px 18px rgba(60, 16, 2, 0.3);
}

/* Antetítulo: pequeña etiqueta que da ritmo editorial y evita el salto seco */
.section__eyebrow {
    display: block;
    margin-bottom: 10px;
    font-family: 'DM Mono', monospace;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold);
}

.section__sub {
    color: var(--on-sky-soft);
    font-size: 1.02rem;
    max-width: 50ch;
    margin-top: 10px;
    text-wrap: pretty;
}

/* ============================================================================
   CATEGORÍAS
   ============================================================================ */

.rail {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 4px 4px 16px;
    scrollbar-width: thin;
    scroll-snap-type: x proximity;
}

.rail::-webkit-scrollbar { height: 6px; }
.rail::-webkit-scrollbar-thumb {
    background: rgba(59, 26, 10, 0.25);
    border-radius: 3px;
}

.cat {
    flex: none;
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 22px 10px 10px;
    border: 0;
    border-radius: var(--r-pill);
    cursor: pointer;
    background: rgba(255, 246, 234, 0.46);
    -webkit-backdrop-filter: blur(24px) saturate(1.4);
    backdrop-filter: blur(24px) saturate(1.4);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.5),
        inset 1.5px 1.5px 0 rgba(255, 255, 255, 0.75),
        inset -1px -1px 0 rgba(120, 52, 12, 0.12),
        0 6px 20px rgba(74, 24, 4, 0.14);
    transition:
        transform 0.4s var(--ease-back),
        background 0.35s var(--ease-soft),
        box-shadow 0.35s var(--ease-soft);
}

.cat:hover {
    transform: translateY(-3px);
    background: rgba(255, 250, 242, 0.62);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.6),
        inset 1.5px 1.5px 0 rgba(255, 255, 255, 0.85),
        0 12px 28px rgba(74, 24, 4, 0.2);
}

.cat.is-active {
    background: linear-gradient(150deg, #ffd45c, var(--gold-deep));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.7),
        0 10px 26px rgba(180, 110, 10, 0.4);
}

.cat__icon {
    width: 48px;
    height: 48px;
    flex: none;
    object-fit: contain;
    image-rendering: pixelated;
    filter: drop-shadow(0 3px 6px rgba(90, 40, 5, 0.3));
    transition: transform 0.5s var(--ease-back);
}

.cat:hover .cat__icon { transform: scale(1.14) rotate(-8deg); }

.cat__text { text-align: left; line-height: 1.2; }
.cat__name { font-weight: 700; font-size: 0.95rem; color: var(--ink-strong); }
.cat__count { font-size: 0.72rem; color: var(--ink-faint); }

/* ============================================================================
   TARJETA DE PRODUCTO
   ============================================================================ */

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
    gap: var(--gap-md);
}

/*  La tarjeta se vale por sí sola: el cielo detrás va de rojo oscuro a oro
    según dónde caiga al desplazarse, así que el velo tiene que ser suficiente
    para que la tinta oscura se lea siempre igual.                             */
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 24px;
    border-radius: var(--r-lg);
    cursor: pointer;
    background: linear-gradient(
        158deg,
        rgba(255, 248, 238, 0.56) 0%,
        rgba(255, 239, 221, 0.46) 55%,
        rgba(255, 233, 210, 0.50) 100%
    );
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.45),
        inset 2px 2px 0 rgba(255, 255, 255, 0.75),
        inset -1.5px -1.5px 0 rgba(120, 52, 12, 0.13),
        inset 0 -26px 32px -30px rgba(80, 30, 4, 0.40),
        0 12px 34px rgba(74, 24, 4, 0.16);
    transition:
        transform 0.5s var(--ease-out),
        box-shadow 0.5s var(--ease-soft),
        background 0.5s var(--ease-soft);
}

.card:hover {
    background: linear-gradient(
        158deg,
        rgba(255, 251, 245, 0.66) 0%,
        rgba(255, 243, 228, 0.56) 55%,
        rgba(255, 237, 216, 0.60) 100%
    );
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.6),
        inset 2px 2px 0 rgba(255, 255, 255, 0.9),
        inset -1.5px -1.5px 0 rgba(120, 52, 12, 0.12),
        inset 0 -26px 32px -30px rgba(80, 30, 4, 0.34),
        0 26px 60px rgba(74, 24, 4, 0.26);
}

.card__badges {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-end;
    z-index: 2;
}

.card__stage {
    position: relative;
    height: 168px;
    display: grid;
    place-items: center;
    margin-bottom: 16px;
}

/* Halo del color de acento detrás del ítem */
.card__stage::before {
    content: '';
    position: absolute;
    width: 62%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent, var(--gold)) 0%, transparent 68%);
    opacity: 0.4;
    filter: blur(22px);
    transition: opacity 0.5s var(--ease-soft), transform 0.6s var(--ease-out);
}

.card:hover .card__stage::before { opacity: 0.75; transform: scale(1.16); }

/*  Los sprites son de 16x16 reales: `pixelated` los amplía respetando el borde
    del píxel. Sin esto el navegador los interpolaría y quedarían borrosos, que
    es exactamente lo contrario del pixel art.

    Sin flotación permanente: con doce tarjetas en pantalla, doce iconos
    subiendo y bajando a la vez es ruido, no vida.                             */
.card__art {
    position: relative;
    width: 128px;
    height: 128px;
    object-fit: contain;
    image-rendering: pixelated;
    filter: drop-shadow(0 12px 18px rgba(90, 40, 5, 0.32));
    transition: transform 0.5s var(--ease-out), filter 0.5s var(--ease-soft);
}

.card:hover .card__art {
    transform: translateY(-9px) scale(1.07);
    filter: drop-shadow(0 20px 26px rgba(90, 40, 5, 0.4));
}

/* Imagen subida por el staff: recuadro redondeado en vez de recorte flotante */
.card__art--photo {
    width: 100%;
    height: 100%;
    image-rendering: auto;
    border-radius: var(--r-md);
    object-fit: cover;
    animation: none;
    filter: none;
    box-shadow: 0 10px 26px rgba(90, 40, 5, 0.25);
}

.card__cat {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-faint);
    margin-bottom: 5px;
}

.card__name {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 1.24rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: var(--ink-strong);
    margin-bottom: 5px;
}

.card__tagline {
    font-size: 0.88rem;
    color: var(--ink-soft);
    line-height: 1.45;
    margin-bottom: 16px;
    /* Dos líneas máximo: si no, las tarjetas de una fila quedan de alturas distintas */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 16px;
    /* Filete que separa el precio del texto: sin él la tarjeta es una lista
       suelta de párrafos y el precio no pesa lo que debería. */
    border-top: 1px solid rgba(120, 52, 12, 0.14);
}

.price { display: flex; align-items: baseline; gap: 8px; }

.price__now {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--ink-strong);
}

.price__was {
    font-family: 'DM Mono', monospace;
    font-size: 0.85rem;
    color: var(--ink-faint);
    text-decoration: line-through;
}

.price__period {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-faint);
}

.card__add {
    width: 44px;
    height: 44px;
    flex: none;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    background: linear-gradient(160deg, #ffd45c, var(--gold-deep));
    color: var(--ink-strong);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 6px 18px rgba(180, 110, 10, 0.4);
    transition: transform 0.35s var(--ease-back), box-shadow 0.35s var(--ease-soft);
}

.card__add:hover { transform: scale(1.13) rotate(90deg); }
.card__add:active { transform: scale(0.94); }

/* Estado vacío del catálogo */
.empty {
    grid-column: 1 / -1;
    display: grid;
    place-items: center;
    gap: 14px;
    padding: var(--gap-xl) var(--gap-md);
    text-align: center;
    border-radius: var(--r-lg);
}

.empty__art { width: 128px; height: 128px; image-rendering: pixelated; opacity: 0.9; animation: float-soft 5s ease-in-out infinite; }
.empty__title { font-size: 1.35rem; }
.empty__text { color: var(--ink-soft); max-width: 40ch; }

/* Esqueletos de carga */
.skeleton {
    border-radius: var(--r-lg);
    min-height: 340px;
    background: linear-gradient(100deg,
        rgba(255, 255, 255, 0.14) 30%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0.14) 70%);
    background-size: 220% 100%;
    animation: skeleton-sweep 1.5s linear infinite;
}

@keyframes skeleton-sweep {
    from { background-position: 180% 0; }
    to   { background-position: -80% 0; }
}

/* ============================================================================
   RANKING DE COMPRADORES
   ============================================================================ */

.podium {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: var(--gap-sm);
}

.buyer {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border-radius: var(--r-md);
    background: linear-gradient(
        158deg,
        rgba(255, 248, 238, 0.54) 0%,
        rgba(255, 238, 220, 0.44) 100%
    );
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.45),
        inset 2px 2px 0 rgba(255, 255, 255, 0.72),
        inset -1.5px -1.5px 0 rgba(120, 52, 12, 0.12),
        0 10px 28px rgba(74, 24, 4, 0.14);
    transition: transform 0.4s var(--ease-back), box-shadow 0.4s var(--ease-soft);
}

.buyer:hover {
    transform: translateY(-4px);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.6),
        inset 2px 2px 0 rgba(255, 255, 255, 0.88),
        0 20px 44px rgba(74, 24, 4, 0.22);
}

/* El primero manda: se marca con un canto dorado, no con otro tamaño */
.podium .buyer:first-child {
    box-shadow:
        inset 0 0 0 1.5px rgba(255, 200, 61, 0.85),
        inset 2px 2px 0 rgba(255, 255, 255, 0.8),
        0 14px 36px rgba(180, 110, 10, 0.28);
}

.buyer__rank {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--ink-ghost);
    min-width: 30px;
}

.buyer:nth-child(1) .buyer__rank { color: var(--gold-deep); }
.buyer:nth-child(2) .buyer__rank { color: #a8a29b; }
.buyer:nth-child(3) .buyer__rank { color: var(--copper); }

.buyer__avatar {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    image-rendering: pixelated;
    box-shadow: 0 4px 12px rgba(74, 24, 4, 0.28);
}

.buyer__name { font-weight: 700; color: var(--ink-strong); }
.buyer__spent { font-family: 'DM Mono', monospace; font-size: 0.82rem; color: var(--ink-faint); }

/* ============================================================================
   VENTANAS MODALES
   ============================================================================ */

.modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: var(--gap-md);
    background: rgba(70, 25, 5, 0.42);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s var(--ease-soft), visibility 0.4s;
}

.modal.is-open { opacity: 1; visibility: visible; }

.modal__panel {
    position: relative;
    width: min(880px, 100%);
    max-height: 90vh;
    overflow: hidden auto;
    transform: translateY(28px) scale(0.97);
    opacity: 0;
    transition: transform 0.55s var(--ease-back), opacity 0.4s var(--ease-soft);
}

.modal.is-open .modal__panel { transform: none; opacity: 1; }

.modal__close {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 5;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.24);
    color: var(--ink-strong);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
    transition: transform 0.35s var(--ease-back), background 0.3s var(--ease-soft);
}

.modal__close:hover { transform: rotate(90deg); background: rgba(255, 255, 255, 0.4); }

/* ---------------------------------------------------------------- LOGIN --- */
/*  Dos columnas: el visor 3D de la skin a la izquierda, el formulario a la
    derecha. En móvil el visor pasa arriba y se encoge.                       */

.login { display: grid; grid-template-columns: 0.85fr 1fr; }

.login__viewer {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 420px;
    padding: var(--gap-md);
    /* Fondo oscuro: una skin de Minecraft necesita contraste para leerse, y de
       paso hace de contrapunto al cristal claro del formulario. */
    background:
        radial-gradient(80% 60% at 50% 15%, rgba(255, 200, 61, 0.22), transparent 70%),
        linear-gradient(165deg, #2b1a3d 0%, #1a1026 60%, #150c1f 100%);
}

.login__skin {
    position: relative;
    width: 100%;
    height: 100%;
    max-height: 400px;
    transition: opacity 0.5s var(--ease-soft);
}

/* Mientras se resuelve la skin, el visor baja de opacidad en vez de saltar */
.login__skin.is-loading { opacity: 0.45; }

.login__skin canvas { width: 100% !important; height: 100% !important; }

.login__viewer-tag {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 15px;
    border-radius: var(--r-pill);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.4s var(--ease-soft);
}

.login__viewer-tag.is-visible { opacity: 1; }

.login__form {
    display: flex;
    flex-direction: column;
    gap: var(--gap-sm);
    padding: clamp(26px, 4vw, 44px);
}

.login__title { font-size: clamp(1.7rem, 3.2vw, 2.2rem); }

.login__hint {
    font-size: 0.9rem;
    color: var(--ink-soft);
    line-height: 1.5;
}

/* Campo del nick con la cabeza del jugador dentro */
.nick {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 10px 10px 12px;
    border-radius: var(--r-md);
    background: rgba(255, 255, 255, 0.16);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.3),
        inset 1.5px 1.5px 0 rgba(255, 255, 255, 0.4);
    transition: box-shadow 0.3s var(--ease-soft), background 0.3s var(--ease-soft);
}

.nick:focus-within {
    background: rgba(255, 255, 255, 0.26);
    box-shadow:
        inset 0 0 0 1.5px var(--gold),
        inset 1.5px 1.5px 0 rgba(255, 255, 255, 0.55),
        0 0 0 4px rgba(255, 200, 61, 0.22);
}

.nick__head {
    width: 38px;
    height: 38px;
    flex: none;
    border-radius: 9px;
    image-rendering: pixelated;
    background: rgba(59, 26, 10, 0.18);
    transition: transform 0.4s var(--ease-back);
}

.nick:focus-within .nick__head { transform: scale(1.06); }

.nick__input {
    flex: 1;
    min-width: 0;
    padding: 6px 0;
    border: 0;
    background: transparent;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--ink-strong);
}

.nick__input:focus { outline: none; }
.nick__input::placeholder { color: var(--ink-faint); font-weight: 500; }

/* Indicador de estado (buscando / encontrado / no premium) */
.nick__status {
    flex: none;
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    margin-right: 6px;
}

.nick__spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(59, 26, 10, 0.2);
    border-top-color: var(--gold-deep);
    border-radius: 50%;
    animation: spin-slow 0.7s linear infinite;
}

/* ---------------------------------------------------- DETALLE DE PRODUCTO - */

.detail { display: grid; grid-template-columns: 0.9fr 1fr; }

.detail__stage {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 380px;
    padding: var(--gap-md);
    background:
        radial-gradient(70% 60% at 50% 45%, rgba(255, 255, 255, 0.3), transparent 70%),
        linear-gradient(160deg, rgba(255, 220, 160, 0.35), rgba(255, 160, 90, 0.22));
}

.detail__sprite {
    width: min(70%, 256px);
    height: auto;
    image-rendering: pixelated;
    filter: drop-shadow(0 20px 34px rgba(90, 40, 5, 0.35));
}

.detail__photo {
    width: 100%;
    max-height: 340px;
    object-fit: contain;
    border-radius: var(--r-md);
}

.detail__body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: clamp(26px, 4vw, 44px);
}

.detail__title { font-size: clamp(1.8rem, 3.5vw, 2.5rem); }

.detail__desc {
    color: var(--ink-soft);
    line-height: 1.65;
    white-space: pre-line;   /* respeta los saltos que escribió el staff */
}

.perks { display: flex; flex-direction: column; gap: 9px; }

.perk {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    font-size: 0.93rem;
    color: var(--ink);
}

.perk__tick {
    flex: none;
    display: grid;
    place-items: center;
    width: 21px;
    height: 21px;
    margin-top: 2px;
    border-radius: 50%;
    background: rgba(63, 185, 138, 0.22);
    color: #1c6b4d;
    font-size: 0.7rem;
    font-weight: 800;
}

.detail__buy {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--gap-sm);
    margin-top: auto;
    padding-top: var(--gap-sm);
    border-top: 1px solid rgba(59, 26, 10, 0.12);
    flex-wrap: wrap;
}

/* ============================================================================
   CAJÓN DEL CARRITO
   ============================================================================ */

.drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 110;
    width: min(440px, 100%);
    display: flex;
    flex-direction: column;
    border-radius: var(--r-xl) 0 0 var(--r-xl);
    transform: translateX(105%);
    transition: transform 0.55s var(--ease-out);
}

.drawer.is-open { transform: none; }

.drawer__scrim {
    position: fixed;
    inset: 0;
    z-index: 105;
    background: rgba(70, 25, 5, 0.38);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.45s var(--ease-soft), visibility 0.45s;
}

.drawer__scrim.is-open { opacity: 1; visibility: visible; }

.drawer__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--gap-sm);
    padding: 24px 26px 16px;
}

.drawer__title { font-size: 1.4rem; }

.drawer__list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 11px;
    padding: 6px 26px;
}

.drawer__foot {
    display: flex;
    flex-direction: column;
    gap: 13px;
    padding: 20px 26px 26px;
    border-top: 1px solid rgba(59, 26, 10, 0.12);
}

.line {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 12px;
    border-radius: var(--r-md);
    background: rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.26);
    animation: rise-in 0.45s var(--ease-out);
}

.line__art {
    width: 48px;
    height: 48px;
    flex: none;
    object-fit: contain;
    image-rendering: pixelated;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.2);
}

.line__body { flex: 1; min-width: 0; }
.line__name {
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--ink-strong);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.line__price { font-family: 'DM Mono', monospace; font-size: 0.82rem; color: var(--ink-faint); }

.qty {
    display: flex;
    align-items: center;
    gap: 3px;
    flex: none;
    padding: 3px;
    border-radius: var(--r-pill);
    background: rgba(255, 255, 255, 0.28);
}

.qty__btn {
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    color: var(--ink-strong);
    font-weight: 800;
    transition: background 0.25s var(--ease-soft);
}

.qty__btn:hover { background: rgba(255, 255, 255, 0.7); }

.qty__value {
    min-width: 22px;
    text-align: center;
    font-family: 'DM Mono', monospace;
    font-size: 0.88rem;
}

.total {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
}

.total__label { font-weight: 700; color: var(--ink-soft); }
.total__value {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 1.9rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--ink-strong);
}

.coupon { display: flex; gap: 8px; }
.coupon .input { flex: 1; padding: 11px 15px; }

/* ============================================================================
   AVISOS FLOTANTES
   ============================================================================ */

.toasts {
    position: fixed;
    bottom: 22px;
    left: 22px;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: min(370px, calc(100vw - 44px));
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 14px 20px 14px 15px;
    border-radius: var(--r-md);
    pointer-events: auto;
    animation: toast-in 0.5s var(--ease-back);
}

.toast.is-leaving { animation: toast-out 0.35s var(--ease-soft) forwards; }

@keyframes toast-in {
    from { opacity: 0; transform: translateX(-28px) scale(0.94); }
    to   { opacity: 1; transform: none; }
}

@keyframes toast-out {
    to { opacity: 0; transform: translateX(-24px) scale(0.95); }
}

.toast__icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex: none;
    border-radius: 10px;
    font-size: 1rem;
}

.toast--ok    .toast__icon { background: rgba(63, 185, 138, 0.25); color: #1c6b4d; }
.toast--error .toast__icon { background: rgba(217, 59, 43, 0.22); color: #8f1f13; }
.toast--info  .toast__icon { background: rgba(255, 200, 61, 0.3); color: #7a5200; }

.toast__text { font-size: 0.9rem; line-height: 1.4; color: var(--ink-strong); }
.toast__title { font-weight: 700; }

/* ============================================================================
   PIE
   ============================================================================ */

.footer {
    margin-top: var(--gap-xl);
    padding: var(--gap-lg) 0 var(--gap-md);
}

.footer__inner {
    display: grid;
    grid-template-columns: 1.4fr repeat(2, minmax(0, 1fr));
    gap: var(--gap-lg);
    padding: clamp(28px, 4vw, 48px);
    border-radius: var(--r-xl) var(--r-xl) 0 0;
}

.footer__title {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-faint);
    margin-bottom: 14px;
}

.footer__links { display: flex; flex-direction: column; gap: 9px; }

.footer__link {
    color: var(--ink-soft);
    font-size: 0.92rem;
    width: fit-content;
    transition: color 0.25s var(--ease-soft), transform 0.3s var(--ease-out);
}

.footer__link:hover { color: var(--ink-strong); transform: translateX(4px); }

.footer__legal {
    margin-top: var(--gap-md);
    padding-top: var(--gap-sm);
    border-top: 1px solid rgba(59, 26, 10, 0.12);
    font-size: 0.8rem;
    color: var(--ink-faint);
    text-align: center;
}

/* ============================================================================
   ITEMS DE FONDO
   ============================================================================ */

/*  La capa va ENTRE el cielo (-3) y el contenido: es lo que hace que el
    backdrop-filter de los paneles tenga por fin algo que refractar. Delante
    del contenido solo taparía texto; detrás del cielo no se vería.            */
.decor {
    position: fixed;
    inset: 0;
    z-index: -2;
    overflow: hidden;
    pointer-events: none;
    /* Que no se pueda seleccionar ni arrastrar por accidente */
    user-select: none;
}

.decor__item {
    position: absolute;
    /* Arranca por encima del borde superior, fuera de la vista */
    top: -20vh;
    opacity: 0.5;
    filter: drop-shadow(0 8px 16px rgba(60, 16, 2, 0.35));

    /*  Dos animaciones a la vez sobre propiedades INDEPENDIENTES: la caída usa
        "translate" y el giro usa "rotate". Si ambas usaran "transform", la
        segunda pisaría a la primera y el ítem no caería.                      */
    animation-name: caer, girar;
    animation-timing-function: linear, linear;
    animation-iteration-count: infinite, infinite;
    will-change: translate, rotate;
}

/* De encima de la pantalla a bien por debajo del borde inferior */
@keyframes caer {
    from { translate: 0 0; }
    to   { translate: 0 140vh; }
}

@keyframes girar {
    from { rotate: 0deg; }
    to   { rotate: var(--giro, 180deg); }
}

/* ============================================================================
   ESCALADO DE ICONOS
   ============================================================================ */

/*  Dos casos que necesitan tratos opuestos:

    · sprite--pixel → dibujo de 16x16 que se AMPLÍA. Con "pixelated" el borde
      del píxel queda duro; sin ello el navegador interpola y sale borroso.

    · sprite--image → imagen propia de assets/items/, que ya viene grande y se
      REDUCE. Aquí "pixelated" descartaría píxeles a saltos y saldría dentada:
      hay que dejar que el navegador la remuestree.                            */

.sprite--pixel { image-rendering: pixelated; }
.sprite--image { image-rendering: auto; }

/* ============================================================================
   PÁGINAS INTERIORES
   ============================================================================ */

/*  Primera sección de una página sin portada: necesita aire bajo la barra
    superior, que es fija y si no se comería el titular.                       */
.section--first { padding-top: calc(var(--gap-lg) + 40px); }

/* ------------------------------------------------------------- PASOS ------ */

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--gap-sm);
}

.step {
    position: relative;
    padding: 28px 26px;
    border-radius: var(--r-lg);
}

/*  El item del paso, arriba a la derecha. Se inclina y crece al pasar por
    encima de la tarjeta: es el detalle que invita a mirar el paso entero.     */
.step__icon {
    position: absolute;
    top: 20px;
    right: 22px;
    width: 48px;
    height: 48px;
    image-rendering: pixelated;
    opacity: 0.9;
    filter: drop-shadow(0 6px 12px rgba(90, 40, 5, 0.3));
    transition: transform 0.5s var(--ease-back), filter 0.5s var(--ease-soft);
}

.step:hover .step__icon {
    transform: translateY(-6px) rotate(-10deg) scale(1.12);
    filter: drop-shadow(0 12px 18px rgba(90, 40, 5, 0.38));
}

.step__num {
    display: block;
    margin-bottom: 14px;
    font-family: 'DM Mono', monospace;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    color: var(--gold-deep);
}

.step__title {
    font-size: 1.25rem;
    margin-bottom: 9px;
    color: var(--ink-strong);
}

.step__text {
    font-size: 0.93rem;
    line-height: 1.6;
    color: var(--ink-soft);
}

/* ------------------------------------------------------- PREGUNTAS -------- */

.faq {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/*  <details> nativo: se abre y se cierra sin una línea de JavaScript, funciona
    con teclado y el buscador del navegador encuentra el texto de dentro.      */
.faq__item {
    border-radius: var(--r-lg);
    overflow: hidden;
}

.faq__q {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--gap-sm);
    padding: 20px 24px;
    cursor: pointer;
    list-style: none;
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 700;
    font-size: 1.06rem;
    letter-spacing: -0.02em;
    color: var(--ink-strong);
    transition: color 0.25s var(--ease-soft);
}

/* Fuera el triángulo por defecto, que cada navegador dibuja distinto */
.faq__q::-webkit-details-marker { display: none; }

/* Signo + que gira hasta convertirse en − al abrir */
.faq__q::after {
    content: '';
    flex: none;
    width: 13px;
    height: 13px;
    background:
        linear-gradient(var(--ink-strong), var(--ink-strong)) center / 100% 2.2px no-repeat,
        linear-gradient(var(--ink-strong), var(--ink-strong)) center / 2.2px 100% no-repeat;
    transition: transform 0.4s var(--ease-back);
}

.faq__item[open] .faq__q::after { transform: rotate(135deg); }

.faq__q:hover { color: var(--ember); }

.faq__a {
    padding: 0 24px 24px;
    color: var(--ink-soft);
    line-height: 1.68;
    animation: faq-open 0.4s var(--ease-out);
}

@keyframes faq-open {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: none; }
}

.faq__a p + p { margin-top: 12px; }
.faq__a strong { color: var(--ink-strong); }

.faq__a a {
    color: #a8460f;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.faq__list {
    margin: 12px 0 0;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.faq__list li { padding-left: 4px; }

/* Bloque de datos (IP y puerto de Bedrock) */
.faq__data {
    display: flex;
    gap: var(--gap-md);
    flex-wrap: wrap;
    margin: 16px 0;
    padding: 16px 20px;
    border-radius: var(--r-md);
    background: rgba(255, 255, 255, 0.4);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55);
}

.faq__data-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-faint);
}

.faq__data-value {
    display: block;
    margin-top: 3px;
    font-size: 1.02rem;
    font-weight: 500;
    color: var(--ink-strong);
}

/* ------------------------------------------------------------- NOTA ------- */

.note {
    margin-top: var(--gap-md);
    padding: 28px 30px;
    border-radius: var(--r-lg);
}

.note__title { font-size: 1.2rem; margin-bottom: 10px; }

.note__text {
    color: var(--ink-soft);
    line-height: 1.65;
    max-width: 62ch;
    margin-bottom: 16px;
}

.note__text:last-child { margin-bottom: 0; }

/* ------------------------------------------------------------- LEGAL ------ */

.legal {
    padding: clamp(28px, 4vw, 52px);
    border-radius: var(--r-lg);
    /* Medida de lectura: un texto legal a todo lo ancho no lo lee nadie */
    max-width: 78ch;
    color: var(--ink);
    line-height: 1.72;
}

.legal__updated {
    display: inline-block;
    margin-bottom: var(--gap-md);
    padding: 6px 14px;
    border-radius: var(--r-pill);
    background: rgba(255, 255, 255, 0.45);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
    font-family: 'DM Mono', monospace;
    font-size: 0.78rem;
    color: var(--ink-soft);
}

.legal h2 {
    margin: var(--gap-md) 0 10px;
    font-size: 1.18rem;
    letter-spacing: -0.02em;
    color: var(--ink-strong);
}

.legal h2:first-of-type { margin-top: 0; }

.legal p { color: var(--ink-soft); }
.legal p + p { margin-top: 11px; }
.legal strong { color: var(--ink-strong); }

.legal ul {
    margin: 12px 0 0;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    color: var(--ink-soft);
}

.legal a {
    color: #a8460f;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ------------------------------------------------------------- 404 -------- */

.notfound {
    display: grid;
    place-items: center;
    gap: 14px;
    padding: clamp(40px, 8vw, 80px) var(--gap-md);
    border-radius: var(--r-xl);
    text-align: center;
}

.notfound__art {
    width: 140px;
    height: auto;
    opacity: 0.9;
    filter: drop-shadow(0 16px 28px rgba(90, 40, 5, 0.3));
}

.notfound__title { font-size: clamp(1.7rem, 4vw, 2.4rem); }

.notfound__text {
    color: var(--ink-soft);
    max-width: 42ch;
}

.notfound__cta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 8px;
}

/* ============================================================================
   ADAPTACIÓN A PANTALLAS PEQUEÑAS
   ============================================================================ */

@media (max-width: 1020px) {
    .hero__grid { grid-template-columns: 1fr; }
    .hero__stage { order: -1; min-height: 320px; }
    .hero__copy { max-width: none; }
    .footer__inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
    .login,
    .detail { grid-template-columns: 1fr; }

    .login__viewer { min-height: 260px; }
    .login__skin { max-height: 240px; }
    .detail__stage { min-height: 240px; }

    .nav {
        position: fixed;
        inset: auto 12px 12px;
        z-index: 70;
        justify-content: space-around;
        padding: 8px;
        border-radius: var(--r-pill);
        background: rgba(255, 250, 242, 0.32);
        -webkit-backdrop-filter: blur(24px) saturate(1.8);
        backdrop-filter: blur(24px) saturate(1.8);
        box-shadow:
            inset 0 0 0 1px rgba(255, 255, 255, 0.35),
            0 12px 34px rgba(74, 24, 4, 0.24);
    }

    .nav__link { font-size: 0.82rem; padding: 8px 12px; }
    .toasts { bottom: 86px; }
    .account__name, .account__platform { display: none; }
    .account { padding: 5px; }

    /* La navegación pasa a ser una barra fija abajo: hay que dejarle hueco */
    .footer { padding-bottom: 90px; }

    /* En el botón del carrito basta el icono y el contador */
    .cart-btn__text { display: none; }

    .section--first { padding-top: var(--gap-lg); }
}

@media (max-width: 560px) {
    :root { --gap-xl: 48px; --gap-lg: 28px; --gap-md: 18px; }

    .footer__inner { grid-template-columns: 1fr; }
    .grid { grid-template-columns: 1fr; }
    .topbar__inner { padding: 8px 8px 8px 14px; }
    .brand { font-size: 1.1rem; }
    .brand__mark { width: 34px; height: 34px; }

    /* ---------------------------------------------------------- PORTADA -- */

    /*  El logo medía 345 px: el 42% de la pantalla de un móvil. Empujaba el
        titular a los 559 px y el botón de "Ver la tienda" a los 776, o sea
        fuera de la vista. Lo primero que veía alguien era un logo enorme y
        nada de lo que la tienda ofrece.

        Ahora el logo se queda en un tamaño de marca y el mensaje entra
        completo en la primera pantalla, con su botón incluido.                */
    .hero {
        min-height: auto;
        padding: var(--gap-md) 0 var(--gap-lg);
    }

    .hero__grid { gap: var(--gap-sm); }

    .hero__stage {
        min-height: 0;
        aspect-ratio: auto;
    }

    .hero__logo { width: min(56%, 190px); }

    /* El resplandor de detrás también, o desborda al logo pequeño */
    .hero__stage::before { width: 48%; }

    .hero__title {
        font-size: clamp(2.1rem, 11vw, 2.8rem);
        margin-bottom: 10px;
    }

    .hero__lead {
        font-size: 1rem;
        margin-bottom: var(--gap-sm);
    }

    .hero__eyebrow { margin-bottom: 12px; }

    /* Los botones a lo ancho: en un móvil se aciertan mucho mejor */
    .hero__cta { gap: 10px; }
    .hero__cta .btn--lg,
    .hero__cta .ip-badge { width: 100%; justify-content: center; }

    .hero__stats {
        gap: 0;
        justify-content: space-between;
    }

    .stat__value { font-size: 1.5rem; }
    .stat__label { font-size: 0.62rem; letter-spacing: 0.08em; }

    /* ---------------------------------------------------------- CARRITO -- */

    /*  Hoja inferior: sube desde abajo y deja ver un poco de la tienda
        arriba, que es como se comporta un panel de móvil.                    */
    .drawer {
        top: auto;
        height: 88vh;
        border-radius: var(--r-xl) var(--r-xl) 0 0;
        transform: translateY(102%);
    }

    .drawer.is-open { transform: none; }

    .drawer__head { padding: 18px 20px 12px; }
    .drawer__list { padding: 6px 20px; }
    .drawer__foot { padding: 16px 20px 22px; }

    /* --------------------------------------------------------- TARJETAS -- */

    .card { padding: 18px; }
    .card__stage { height: 132px; margin-bottom: 12px; }
    .card__art { width: 96px; height: 96px; }
    .card__name { font-size: 1.12rem; }

    /* ---------------------------------------------------------- MODALES -- */

    .modal { padding: 0; align-items: flex-end; }

    .modal__panel {
        width: 100%;
        max-height: 94vh;
        border-radius: var(--r-xl) var(--r-xl) 0 0;
    }

    .login__viewer { min-height: 200px; }
    .login__skin { max-height: 180px; }
    .login__form { padding: 22px 20px 26px; }
    .login__title { font-size: 1.35rem; }
    .detail__stage { min-height: 190px; }
    .detail__body { padding: 22px 20px 26px; }

    /* -------------------------------------------------------------- PIE -- */

    .section__title { font-size: clamp(1.7rem, 7vw, 2.1rem); }
    .section__sub { font-size: 0.95rem; }
    .section__head { margin-bottom: var(--gap-md); }
}

/* ============================================================================
   ZONAS TÁCTILES
   ============================================================================ */

/*  Con ratón basta con acertar unos pocos píxeles; con el dedo no. Las guías
    de Apple y de Android piden 44 px de lado, y aquí había botones de 35.
    Se aplica por puntero grueso, no por ancho de pantalla: una tablet grande
    con dedos tiene el mismo problema que un móvil.                            */
@media (pointer: coarse) {
    .btn--sm { min-height: 44px; padding-inline: 18px; }
    .nav__link { min-height: 44px; display: inline-flex; align-items: center; }
    .modal__close { width: 44px; height: 44px; }
    .qty__btn { width: 36px; height: 36px; }
    .card__add { width: 48px; height: 48px; }
    .account { min-height: 44px; }
    .cat { min-height: 56px; }

    /* Sin cursor no hay hover: el reflejo del cristal solo estorbaría */
    .glass--live::after { display: none; }
}
