/* =====================================================================
   TIENDA — CAPA DE REFINAMIENTO
   ---------------------------------------------------------------------
   Se carga DESPUÉS de tienda.css, ajuste-pantallas.css y
   tienda-portada.css. No cambia la paleta: ordena la barra superior y
   baja el ruido general (degradés de fondo, sombras, cursivas falsas).

   Tipografía: Young Serif para títulos, Figtree para todo lo demás
   (las dos se cargan desde Google Fonts en el <head> de cada página).
   Young Serif tiene UN solo peso: por eso los títulos van en 400 con
   font-synthesis apagado; si no, el navegador inventa una negrita fea.

   Para volver atrás alcanza con quitar el <link> de este archivo.
   ===================================================================== */

body.tienda {
    --t-font-body: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --t-font-display: "Young Serif", Georgia, "Times New Roman", serif;
    --t-radius: 18px;
    --t-radius-sm: 12px;
    --t-shadow: 0 18px 44px -18px rgba(60, 7, 42, .22);
    --t-shadow-sm: 0 6px 18px -8px rgba(60, 7, 42, .16);
    --t-line: color-mix(in srgb, var(--t-border) 70%, var(--t-ink) 8%);
}

/* ------------------------------------------------------------ BASE */
/* Fondo liso: los dos degradés radiales ensuciaban la página sin aportar. */
body.tienda,
body.tienda[data-theme="dark"] {
    background: var(--t-bg) !important;
    font-family: var(--t-font-body);
    font-feature-settings: "ss01" 0;
    text-rendering: optimizeLegibility;
}
body.tienda :is(button, input, select, textarea) { font-family: inherit; }

body.tienda :is(h1, h2, h3),
body.tienda .t-resenas__head h2 {
    font-family: var(--t-font-display);
    font-weight: 400;
    font-synthesis: none;
    letter-spacing: -.012em;
}
/* Young Serif no tiene cursiva: la palabra destacada va en color, derecha. */
body.tienda :is(h1, h2, h3) :is(em, i) {
    font-style: normal;
    color: var(--t-primary-ink);
}
/* Nombres de producto y títulos chicos: legibles, en la fuente de texto. */
body.tienda h4,
body.tienda .t-card__name {
    font-family: var(--t-font-body);
    font-weight: 650;
    letter-spacing: -.005em;
}

body.tienda :is(.t-hero__pause, .t-brand-strip__item strong) { font-family: var(--t-font-body); }

/* Etiquetas en versalitas: más chicas y con aire, no gritando. */
body.tienda :is(.t-section-kicker, .t-slide__eyebrow) {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .12em;
}

/* ----------------------------------------------------- BARRA DE AVISO */
body.tienda .t-announce {
    padding: 8px 48px 8px 20px;
    font-size: .8rem;
    font-weight: 500;
    letter-spacing: .005em;
}

/* ================================================== BARRA SUPERIOR */
/* Todo lo estructural va desde 721px: por debajo, la cabecera móvil y el
   panel lateral (.t-nav con position: fixed) tienen sus propias reglas. */
@media (min-width: 721px) {
    body.tienda .t-header,
    body.tienda[data-theme="dark"] .t-header {
        background: var(--t-surface) !important;
        border-bottom: 1px solid var(--t-line) !important;
        box-shadow: none !important;
        backdrop-filter: none;
    }

    /* La grilla reservaba una columna para el lema aunque estuviera
       oculto, y el buscador quedaba apretado. Con flex, lo oculto no
       ocupa lugar. */
    body.tienda .t-header__bar {
        display: flex;
        align-items: center;
        gap: 28px;
        max-width: 1320px;
        min-height: 72px;
        padding: 12px 28px;
    }
    body.tienda .t-header__bar > .t-search { flex: 1 1 auto; max-width: 640px; margin: 0 auto; }
    body.tienda .t-header__occasion {
        flex: 0 1 190px;
        font-size: .7rem;
        letter-spacing: .06em;
        line-height: 1.35;
    }

    /* ---- Logo ---- */
    body.tienda .t-header .t-logo { gap: 10px; flex: none; }
    body.tienda .t-header .t-logo__mark {
        width: 42px; height: 42px;
        border-radius: 12px;
        box-shadow: inset 0 0 0 1px rgba(234, 11, 128, .14);
    }
    body.tienda .t-header .t-logo__text {
        font-family: var(--t-font-body);
        font-size: 1.32rem;
        font-weight: 800;
        letter-spacing: -.035em;
    }

    /* ---- Buscador ---- */
    body.tienda .t-header .t-search,
    body.tienda[data-theme="dark"] .t-header .t-search {
        min-height: 46px;
        padding: 4px;
        border: 1px solid var(--t-line) !important;
        border-radius: 12px;
        background: var(--t-surface-2) !important;
        transition: border-color .15s, background-color .15s, box-shadow .15s;
    }
    body.tienda .t-header .t-search:hover { border-color: color-mix(in srgb, var(--t-primary) 30%, var(--t-border)) !important; }
    body.tienda .t-header .t-search:focus-within {
        background: var(--t-surface) !important;
        border-color: var(--t-primary) !important;
        box-shadow: 0 0 0 3px color-mix(in srgb, var(--t-primary) 16%, transparent);
    }
    body.tienda .t-header .t-search__input { padding: 8px 14px; font-size: .94rem; }
    body.tienda .t-header .t-search__input::placeholder { color: var(--t-muted); opacity: 1; }
    /* Texto + lupa, en el color de la tinta: contraste alto en los dos
       temas sin depender del fucsia (blanco sobre #ea0b80 no llega a AA). */
    body.tienda .t-header .t-search .t-search__btn {
        position: relative;
        display: inline-flex; align-items: center; gap: 7px;
        min-width: 0;
        white-space: nowrap;
        padding: 0 16px;
        border-radius: 9px;
        background: var(--t-ink);
        color: var(--t-bg) !important;
        font-size: .84rem;
        font-weight: 600;
        letter-spacing: .01em;
    }
    body.tienda .t-header .t-search .t-search__btn:hover { background: var(--t-primary-dark); color: #fff !important; }
    body.tienda .t-header .t-search .t-search__btn > span { display: inline; }
    body.tienda .t-header .t-search .t-search__btn svg { width: 16px; height: 16px; }
    body.tienda .t-header .t-search__sugg { top: calc(100% + 6px); border-radius: 12px; }

    /* ---- Acciones ---- */
    body.tienda .t-header__actions { gap: 2px; flex: none; }
    body.tienda .t-header .t-icon-btn,
    body.tienda[data-theme="dark"] .t-header .t-icon-btn {
        width: 40px; height: 40px;
        border: 0 !important;
        border-radius: 10px;
        background: transparent !important;
        color: var(--t-ink) !important;
    }
    body.tienda .t-header .t-icon-btn:hover,
    body.tienda[data-theme="dark"] .t-header .t-icon-btn:hover { background: var(--t-surface-2) !important; }
    body.tienda .t-header .t-icon-btn:hover svg { color: var(--t-primary-ink); }
    body.tienda .t-header .t-icon-btn svg { width: 20px; height: 20px; }

    body.tienda .t-header .t-badge {
        top: 3px; right: 1px;
        min-width: 17px; height: 17px;
        padding: 0 4px;
        font-size: .64rem;
        font-weight: 700;
        background: var(--t-primary-dark);
        color: #fff !important;
        box-shadow: 0 0 0 2px var(--t-surface);
    }

    body.tienda .t-header .t-account {
        margin-left: 10px;
        padding-left: 12px;
        border-left: 1px solid var(--t-line);
    }
    body.tienda .t-header .t-login-link { gap: 9px; padding: 6px 8px; border-radius: 10px; }
    body.tienda .t-header .t-login-link__icon {
        display: grid; place-items: center;
        width: 32px; height: 32px;
        border-radius: 50%;
        background: var(--t-surface-2);
        color: var(--t-primary-ink);
    }
    body.tienda .t-header .t-login-link__icon svg { width: 17px; height: 17px; }
    body.tienda .t-header .t-login-link__labels small {
        font-size: .68rem;
        letter-spacing: 0;
        text-transform: none;
        color: var(--t-muted);
    }
    body.tienda .t-header .t-login-link__labels strong { font-size: .84rem; font-weight: 650; }

    /* ---- Navegación ----
       Antes: franja color berenjena con un bloque fucsia pegado a la
       izquierda. Ahora: misma superficie que la cabecera, separada por
       una línea fina; el color queda para lo que importa (Ofertas y el
       estado activo). */
    body.tienda .t-nav,
    body.tienda[data-theme="dark"] .t-nav {
        background: var(--t-surface) !important;
        border-top: 0;
        border-bottom: 1px solid var(--t-line) !important;
    }
    body.tienda .t-nav__inner { max-width: 1320px; min-height: 48px; padding: 0 28px; gap: 4px; }

    body.tienda .t-nav .t-dept-toggle,
    body.tienda[data-theme="dark"] .t-nav .t-dept-toggle {
        margin-right: 10px;
        padding: 8px 14px;
        border-radius: 10px;
        background: var(--t-ink);
        color: var(--t-bg) !important;
        font-size: .84rem;
        font-weight: 600;
        letter-spacing: .005em;
    }
    body.tienda .t-nav .t-dept-toggle:hover,
    body.tienda .t-nav .t-dept-toggle[aria-expanded="true"] { background: var(--t-primary-dark); color: #fff !important; }

    body.tienda .t-nav .t-nav__link {
        position: relative;
        padding: 14px 12px;
        color: color-mix(in srgb, var(--t-ink) 82%, transparent);
        font-size: .875rem;
        font-weight: 500;
        letter-spacing: 0;
        background: none;
    }
    body.tienda .t-nav .t-nav__link::after {
        content: "";
        position: absolute; left: 12px; right: 12px; bottom: -1px;
        height: 2px;
        border-radius: 2px;
        background: var(--t-primary);
        transform: scaleX(0);
        transform-origin: left;
        transition: transform .2s ease;
    }
    body.tienda .t-nav .t-nav__link:hover { color: var(--t-ink); background: none; }
    body.tienda .t-nav .t-nav__link:hover::after,
    body.tienda .t-nav .t-nav__link[aria-current]::after { transform: scaleX(1); }
    body.tienda .t-nav .t-nav__link__ico { opacity: .55; }
    body.tienda .t-nav .t-nav__link:hover .t-nav__link__ico { opacity: .9; }
    body.tienda .t-nav .t-nav__link--hot,
    body.tienda .t-nav .t-nav__link--hot .t-nav__link__ico { color: var(--t-primary-ink); opacity: 1; font-weight: 600; }

    body.tienda .t-dept-panel,
    body.tienda[data-theme="dark"] .t-dept-panel {
        top: calc(100% + 6px);
        left: 28px;
        border: 1px solid var(--t-line) !important;
        border-radius: 14px;
        box-shadow: var(--t-shadow) !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.tienda .t-nav .t-nav__link::after { transition: none; }
}

/* Tablet (721–1080px): acá también aparece la hamburguesa, y logo +
   buscador + acciones + cuenta no entran con textos. Se van las
   etiquetas de la cuenta y el texto "Buscar" (queda oculto a la vista
   pero lo sigue leyendo el lector de pantalla). */
@media (min-width: 721px) and (max-width: 1080px) {
    body.tienda .t-header__bar { gap: 16px; padding: 10px 20px; }
    body.tienda .t-header__bar > .t-search { min-width: 200px; }
    body.tienda .t-header .t-search .t-search__btn { padding: 0 12px; }
    body.tienda .t-header .t-search .t-search__btn > span {
        position: absolute; width: 1px; height: 1px; overflow: hidden;
        clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
    }
    body.tienda .t-header .t-login-link__labels,
    body.tienda .t-header .t-account__chev { display: none; }
    body.tienda .t-header .t-account { margin-left: 4px; padding-left: 8px; }
    body.tienda .t-header .t-login-link { padding: 4px; }
}

/* Celular: la disposición la manejan tienda.css y ajuste-pantallas.css
   (hay cuentas de ancho hechas al píxel para 320px). Acá sólo color y
   bordes, para que se lea como la misma cabecera que en escritorio. */
@media (max-width: 720px) {
    body.tienda .t-header,
    body.tienda[data-theme="dark"] .t-header {
        background: var(--t-surface) !important;
        border-bottom: 1px solid var(--t-line) !important;
        box-shadow: none !important;
    }
    body.tienda .t-header .t-logo__text { font-weight: 800; letter-spacing: -.035em; }
    body.tienda .t-header .t-search,
    body.tienda[data-theme="dark"] .t-header .t-search {
        border: 1px solid var(--t-line) !important;
        border-radius: 12px;
        background: var(--t-surface-2) !important;
    }
    body.tienda .t-header .t-search .t-search__btn {
        background: var(--t-ink);
        color: var(--t-bg) !important;
    }
    body.tienda .t-header .t-icon-btn,
    body.tienda[data-theme="dark"] .t-header .t-icon-btn {
        border: 0 !important;
        background: transparent !important;
        color: var(--t-ink) !important;
    }
    body.tienda .t-header .t-login-link__icon { color: var(--t-ink); }
}

/* ======================================================= GENERAL */
/* Tarjetas: borde fino en lugar de sombra; la sombra aparece al pasar. */
body.tienda .t-card {
    border: 1px solid var(--t-line);
    border-radius: 14px;
    box-shadow: none;
    transition: border-color .18s, box-shadow .18s, transform .18s;
}
@media (hover: hover) {
    body.tienda .t-card:hover {
        border-color: color-mix(in srgb, var(--t-primary) 28%, var(--t-border));
        box-shadow: var(--t-shadow-sm);
        transform: translateY(-2px);
    }
}
@media (prefers-reduced-motion: reduce) {
    body.tienda .t-card:hover { transform: none; }
}
body.tienda .t-card__name { font-size: .95rem; line-height: 1.3; }
body.tienda .t-card__price strong,
body.tienda .t-card__price { font-weight: 700; letter-spacing: -.01em; }

/* ================================================ HADA DE CONTRATACIÓN */
/* Guiño a Navi (Zelda): el hada revolotea sobre la esquina de la burbuja
   del "¡Ey, escuchá!". Va dentro de la burbuja, así que desaparece con
   ella (ver programarColapsoBurbuja en tienda.js). */
body.tienda .t-hiring-guide { bottom: 26px; }
body.tienda .t-hiring-guide__bubble {
    margin-top: 32px;
    border-color: color-mix(in srgb, var(--t-primary) 22%, var(--t-border));
    border-radius: 6px 16px 16px 16px;
    box-shadow: var(--t-shadow);
}
body.tienda .t-hiring-guide__message { padding: 16px 42px 14px 50px; }
body.tienda .t-hiring-guide__message span {
    color: var(--t-primary-ink);
    font-size: .72rem;
    letter-spacing: .1em;
}
body.tienda .t-hiring-guide__message strong { font-family: var(--t-font-display); font-weight: 400; font-size: 1.08rem; }

.t-hada {
    position: absolute;
    top: -40px;
    left: -6px;
    width: 66px;
    height: 66px;
    pointer-events: none;
    filter: drop-shadow(0 0 4px rgba(234, 11, 128, .6)) drop-shadow(0 0 12px rgba(255, 255, 255, .95));
    animation: t-hada-vuelo 3.2s ease-in-out infinite;
}
.t-hada svg { display: block; width: 100%; height: 100%; overflow: visible; }
/* Se anima el grupo entero desde el centro del hada: cada ala ya trae su
   propio rotate() en el SVG, y un transform-origin por ala lo desarma. */
.t-hada__alas {
    transform-box: view-box;
    transform-origin: 32px 33px;
    animation: t-hada-aleteo .16s ease-in-out infinite alternate;
}

@keyframes t-hada-vuelo {
    0%, 100% { transform: translate(0, 0) rotate(-4deg); }
    30%      { transform: translate(3px, -6px) rotate(3deg); }
    60%      { transform: translate(-2px, -2px) rotate(-1deg); }
}
@keyframes t-hada-aleteo { from { transform: scale(1, 1); } to { transform: scale(.9, .62); } }

@media (prefers-reduced-motion: reduce) {
    .t-hada, .t-hada__alas { animation: none; }
}

/* ======================================== CARRITO Y FAVORITOS (paneles) */
/* Estado vacío con ícono y salida al catálogo, en lugar de una línea suelta. */
.t-panel-vacio {
    display: grid;
    justify-items: center;
    gap: 6px;
    padding: 36px 18px 30px;
    text-align: center;
}
.t-panel-vacio__ico {
    display: grid; place-items: center;
    width: 56px; height: 56px;
    margin-bottom: 6px;
    border-radius: 50%;
    background: var(--t-surface-2);
    color: var(--t-primary-ink);
}
.t-panel-vacio__ico svg { width: 24px; height: 24px; }
.t-panel-vacio strong { font-family: var(--t-font-display); font-weight: 400; font-size: 1.15rem; color: var(--t-ink); }
.t-panel-vacio p { margin: 0 0 10px; max-width: 28ch; color: var(--t-muted); font-size: .9rem; line-height: 1.45; }

body.tienda .t-cart-panel__head h3 { font-size: 1.2rem; }
body.tienda .t-cart-item { gap: 12px; align-items: center; }
body.tienda .t-cart-item__img,
body.tienda .t-cart-item__noimg { width: 60px; height: 60px; border-radius: 10px; object-fit: cover; }
body.tienda .t-cart-item__name { font-weight: 600; line-height: 1.3; }

/* "Quitar" y "Ver": acciones de texto con ícono, discretas. */
body.tienda .t-cart-item__remove {
    display: inline-flex; align-items: center; gap: 4px;
    margin-top: 2px;
    padding: 4px 0;
    border: 0; background: none;
    color: var(--t-muted);
    font-size: .78rem; font-weight: 500;
    text-decoration: none;
    cursor: pointer;
}
body.tienda .t-cart-item__remove:hover { color: var(--t-primary-ink); }
body.tienda .t-cart-item__remove svg { flex: none; }
.t-wish-item__links { display: flex; gap: 14px; }

/* Cantidad: un solo control con borde, botones cuadrados de 30px. */
body.tienda .t-cart-item__qty:not(.t-cart-item__qty--single) {
    display: inline-flex; align-items: center;
    border: 1px solid var(--t-line);
    border-radius: 10px;
    background: var(--t-surface);
    overflow: hidden;
}
body.tienda .t-cart-item__qty:not(.t-cart-item__qty--single) button {
    display: grid; place-items: center;
    width: 32px; height: 32px;
    border: 0; border-radius: 0;
    background: transparent;
    color: var(--t-ink);
}
body.tienda .t-cart-item__qty:not(.t-cart-item__qty--single) button:hover { background: var(--t-surface-2); color: var(--t-primary-ink); }
body.tienda .t-cart-item__qty:not(.t-cart-item__qty--single) span { min-width: 24px; text-align: center; font-weight: 600; font-size: .9rem; }

/* Favoritos: el botón de agregar va a la derecha, como en las tarjetas. */
.t-wish-item__add {
    display: inline-flex; align-items: center; gap: 6px;
    flex: none;
    padding: 8px 12px;
    border: 1px solid var(--t-line);
    border-radius: 10px;
    background: var(--t-surface-2);
    color: var(--t-ink);
    font: inherit; font-size: .82rem; font-weight: 600;
    cursor: pointer;
    transition: background-color .15s, color .15s, border-color .15s;
}
.t-wish-item__add:hover { border-color: var(--t-primary); color: var(--t-primary-ink); }
.t-wish-item__add.is-agregado { background: var(--t-ink); border-color: var(--t-ink); color: var(--t-bg); }
.t-wish-item__agotado { flex: none; color: var(--t-muted); font-size: .78rem; }

/* Pie de favoritos: WhatsApp a lo ancho y "Vaciar" como acción secundaria. */
body.tienda #t-wish-foot { display: grid; gap: 8px; }
body.tienda #t-wish-foot[hidden] { display: none; }
body.tienda #t-wish-foot .t-btn--whatsapp { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
body.tienda #t-wish-clear { justify-self: center; border: 0; background: none; color: var(--t-muted); font-weight: 500; }
body.tienda #t-wish-clear:hover { color: var(--t-danger); }

/* ================================================== SEGUIR MI PEDIDO */
/* La tarjeta de modal es una grilla de dos columnas (login con imagen al
   costado); acá no hay imagen y el formulario quedaba en la mitad izquierda. */
body.tienda #t-seg-modal .t-modal__card { grid-template-columns: 1fr; width: min(440px, calc(100vw - 32px)); }
body.tienda #t-seg-modal .t-auth-modal__body { width: auto; }
body.tienda #t-seg-modal h4 { margin: 0 0 4px; font-family: var(--t-font-display); font-weight: 400; font-size: 1.4rem; }
.t-modal-ico {
    display: grid; place-items: center;
    width: 46px; height: 46px;
    margin-bottom: 12px;
    border-radius: 12px;
    background: var(--t-surface-2);
    color: var(--t-primary-ink);
}
