/* ══════════════════════════════════════════════════════════════════
   Tienda de CREW — vidriera, ficha y carrito lateral.

   Mismo lenguaje que las tiendas de clubes (clubes/tienda.php): manda la foto y el
   cromo desaparece. Con la marca de CREW: fondo negro, turquesa para comprar y lima
   para lo que tiene que saltar a la vista (como en la página de inicio).

   Los tokens (--acc, --bg, --txt, --tenue, --linea…) los emite club_estilo_head()
   desde lib/tienda_vidriera.php. Cambiar un color acá no alcanza: va allá.
   ══════════════════════════════════════════════════════════════════ */

:root { --lima: #c8f535; --radio: 14px; --radio-sm: 10px; }

* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); color: var(--txt); min-height: 100vh; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
.tv-wrap { max-width: 1340px; margin: 0 auto; padding: 0 40px; }

/* ── Franja ── */
.tv-anuncio { background: var(--lima); color: #0b0b0b; text-align: center; font-size: 12.5px; font-weight: 700;
              letter-spacing: 0.3px; padding: 9px 16px; line-height: 1.4; }
.tv-anuncio a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* ── Encabezado ── */
.tv-hd { position: sticky; top: 0; z-index: 50; background: var(--bg); border-bottom: 1px solid var(--linea); }
.tv-hd-in { display: flex; align-items: center; gap: 28px; height: 66px; }
.tv-logo { display: flex; align-items: center; gap: 10px; }
.tv-logo img { height: 26px; width: auto; display: block; }
.tv-logo span { font-size: 16px; font-weight: 900; letter-spacing: 0.2em; }
.tv-nav { display: flex; gap: 26px; margin-left: auto; }
.tv-nav a { font-size: 13.5px; color: var(--tenue); transition: color .15s; }
.tv-nav a:hover { color: var(--txt); }
.tv-cart { position: relative; display: inline-flex; align-items: center; padding: 8px 4px; color: var(--txt); line-height: 0; }
.tv-cart svg { width: 22px; height: 22px; display: block; }
.tv-cart:hover, .tv-cart.lleno { color: var(--acc); }
.tv-cart-n { display: none; position: absolute; top: 0; right: -7px; min-width: 16px; height: 16px; padding: 0 4px;
             border-radius: 999px; background: var(--acc); color: var(--acc-txt);
             font-size: 10px; font-weight: 800; line-height: 16px; text-align: center; }
.tv-cart.lleno .tv-cart-n { display: block; }

/* ── Portada / carrusel ── */
.tv-portada { position: relative; overflow: hidden; display: grid; }
.pslide { grid-area: 1 / 1; position: relative; opacity: 0; transition: opacity .7s ease; pointer-events: none; }
.pslide.on { opacity: 1; pointer-events: auto; }
/* La foto va absoluta: si fluyera, una foto más alta que el bloque estiraba la diapositiva
   y el título y el botón (pegados abajo) quedaban en la parte recortada, sin verse. */
.pslide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.pslide::after { content: ''; position: absolute; inset: 0;
                 background: linear-gradient(180deg, rgba(0,0,0,0.2) 0%, transparent 40%, rgba(0,0,0,0.66) 100%); }
.portada-txt { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding-bottom: 50px; color: #fff; }
.portada-txt .portada-h { font-size: clamp(32px, 4.8vw, 60px); font-weight: 800; letter-spacing: -0.03em; line-height: 1; max-width: 16ch; }
.portada-txt p { font-size: 15px; color: rgba(255,255,255,0.84); margin-top: 14px; max-width: 46ch; line-height: 1.6; }
.portada-cta { display: inline-block; margin-top: 22px; background: var(--acc); color: var(--acc-txt); border-radius: 12px;
               font-size: 13px; font-weight: 800; letter-spacing: 0.04em; padding: 14px 26px; transition: transform .15s; }
.portada-cta:hover { transform: translateY(-2px); }
.p-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; background: rgba(0,0,0,0.34);
         border: 1px solid rgba(255,255,255,0.28); color: #fff; width: 44px; height: 44px; cursor: pointer;
         font-size: 18px; line-height: 1; display: flex; align-items: center; justify-content: center; border-radius: 50%; padding: 0; }
.p-nav:hover { background: rgba(0,0,0,0.6); }
.p-nav.prev { left: 22px; } .p-nav.next { right: 22px; }
.p-dots { position: absolute; bottom: 20px; left: 0; right: 0; z-index: 3; display: flex; gap: 8px; justify-content: center; }
.p-dot { width: 26px; height: 4px; border-radius: 4px; background: rgba(255,255,255,0.34); border: none; cursor: pointer; padding: 0; }
.p-dot.on { background: #fff; }

/* Sin portada: el título grande en lima, como la página de inicio */
.tv-cabecera { padding-top: 64px; }
.tv-cabecera h1 { font-size: clamp(36px, 5vw, 60px); font-weight: 800; letter-spacing: -0.035em; line-height: 1; color: var(--lima); }
.tv-cabecera p { font-size: 15.5px; color: var(--tenue); margin-top: 16px; max-width: 52ch; line-height: 1.6; }

/* ── Filtros ── */
.tv-filtros { position: sticky; top: 66px; z-index: 40; background: var(--bg); border-bottom: 1px solid var(--linea); margin-top: 40px; }
.tv-filtros-in { display: flex; align-items: center; gap: 28px; height: 56px; }
.tv-cats { display: flex; gap: 28px; overflow-x: auto; scrollbar-width: none; min-width: 0; height: 100%; }
.tv-cats::-webkit-scrollbar { display: none; }
.cat { font-size: 12.5px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; background: none; border: none;
       color: var(--muy-tenue); cursor: pointer; white-space: nowrap; padding: 0; height: 100%;
       border-bottom: 2px solid transparent; transition: color .16s; }
.cat:hover { color: var(--txt); }
.cat.on { color: var(--txt); border-bottom-color: var(--acc); }
.tv-buscar { margin-left: auto; flex-shrink: 0; }
.tv-buscar input { width: 200px; padding: 9px 14px; font-size: 13px; font-family: inherit; color: var(--txt);
                   background: var(--lienzo); border: 1px solid var(--linea); border-radius: 999px; }
.tv-buscar input::placeholder { color: var(--muy-tenue); }
.tv-buscar input:focus { outline: none; border-color: var(--acc); }

/* ── Grilla de productos ── */
.tv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--col-min), 1fr)); gap: var(--gap-y) var(--gap-x); padding-top: 40px; }
.prod { display: block; }
.prod-foto { position: relative; aspect-ratio: 3/4; background: var(--lienzo); overflow: hidden; margin-bottom: 14px; border-radius: var(--radio); }
.prod-foto img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s cubic-bezier(.2,.7,.3,1); }
.prod:hover .prod-foto img { transform: scale(1.045); }
.prod-foto .nada { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
                   color: var(--muy-tenue); font-size: 12px; letter-spacing: 0.06em; }
.tag { position: absolute; top: 12px; left: 12px; z-index: 2; font-size: 9.5px; font-weight: 800; letter-spacing: 0.12em;
       padding: 6px 11px; border-radius: 999px; background: var(--lima); color: #0b0b0b; }
.tag.neutro { background: rgba(0,0,0,0.78); color: #fff; }
.tag.sin { background: rgba(255,255,255,0.94); color: #000; }
.prod-cat { font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muy-tenue); margin-bottom: 5px; }
.prod-nom { font-size: 14.5px; font-weight: 600; line-height: 1.35; }
.prod-precio { font-size: 15px; font-weight: 800; margin-top: 6px; display: flex; align-items: baseline; gap: 9px; color: var(--acc); }
.prod-antes { font-weight: 400; color: var(--muy-tenue); text-decoration: line-through; font-size: 13px; }
.prod-nota { font-size: 12px; color: var(--tenue); margin-top: 5px; }
.prod-nota.poco { color: var(--alerta); font-weight: 700; }

.tv-vacio { padding: 90px 0; text-align: center; }
.tv-vacio h2 { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.tv-vacio p { color: var(--tenue); font-size: 14.5px; margin: 12px auto 0; max-width: 40ch; line-height: 1.6; }
.tv-avisos { margin-top: 70px; padding: 22px 0; border-top: 1px solid var(--linea); border-bottom: 1px solid var(--linea);
             font-size: 13.5px; color: var(--tenue); text-align: center; line-height: 1.6; }

/* ── Pie ── */
.tv-pie { margin-top: 80px; border-top: 1px solid var(--linea); }
.tv-pie-in { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap;
             padding-top: 26px; padding-bottom: 34px; font-size: 12.5px; color: var(--muy-tenue); }
/* El botón flotante de WhatsApp no puede tapar el final del pie. */
body:has(.tv-wa) .tv-pie-in { padding-bottom: 90px; }
.tv-pie nav { display: flex; gap: 20px; flex-wrap: wrap; }
.tv-pie a:hover { color: var(--txt); }

.tv-wa { position: fixed; right: 18px; bottom: 18px; z-index: 60; background: #25d366; color: #0b1f13; font-size: 13px; font-weight: 800;
         letter-spacing: 0.3px; padding: 13px 18px; border-radius: 40px; box-shadow: 0 6px 22px rgba(0,0,0,0.4); transition: transform .15s; }
.tv-wa:hover { transform: translateY(-2px); }

/* ══════════════════ Ficha de producto ══════════════════ */
.volver { padding-top: 26px; font-size: 12px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muy-tenue); }
.volver a:hover { color: var(--txt); }
.volver .sep { margin: 0 8px; opacity: .5; }
.layout { display: grid; grid-template-columns: 1.12fr 1fr; gap: 60px; padding-top: 22px; align-items: start; }

.gal { position: sticky; top: 90px; }
.gal-main { aspect-ratio: 3/4; background: var(--lienzo); overflow: hidden; position: relative; border-radius: 18px;
            display: flex; align-items: center; justify-content: center; touch-action: pan-y; }
.gal-main img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; display: block; }
.gal-main iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.gal-main .nada { color: var(--muy-tenue); font-size: 12.5px; letter-spacing: 0.06em; }
.gal-cont { position: absolute; right: 14px; bottom: 14px; background: rgba(0,0,0,0.6); color: #fff; font-size: 11px;
            font-weight: 700; padding: 5px 10px; border-radius: 999px; pointer-events: none; }
.gal-tira { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.gal-tira::-webkit-scrollbar { display: none; }
.th { position: relative; flex: 0 0 70px; height: 92px; background: var(--lienzo); overflow: hidden; border-radius: var(--radio-sm);
      cursor: pointer; border: 0; padding: 0; width: 70px; opacity: 0.5; transition: opacity .15s; }
.th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.th:hover { opacity: 0.85; }
.th.on { opacity: 1; box-shadow: inset 0 0 0 2px var(--acc); }
.th-vid { display: flex; align-items: center; justify-content: center; font-size: 9.5px; font-weight: 800; letter-spacing: 0.12em; color: var(--txt); }
.th-vid span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.45); color: #fff; }

.lb { position: fixed; inset: 0; background: rgba(0,0,0,0.94); z-index: 100; padding: 30px; display: none;
      align-items: center; justify-content: center; cursor: zoom-out; }
.lb.open { display: flex; }
.lb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lb .cerrar { position: absolute; top: 20px; right: 26px; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.7); }

.info .eyebrow { font-size: 10.5px; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; color: var(--acc); }
.info .eyebrow .sep { opacity: .45; margin: 0 7px; }
.info h1 { font-size: clamp(28px, 3vw, 40px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; margin: 12px 0 18px; }
.precio { font-size: 26px; font-weight: 800; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; color: var(--acc); }
.precio .antes { font-size: 17px; font-weight: 400; color: var(--muy-tenue); text-decoration: line-through; }
.precio .off { font-size: 11px; font-weight: 800; color: #0b0b0b; background: var(--lima); border-radius: 999px; padding: 4px 9px; letter-spacing: .04em; align-self: center; }
.transfer { font-size: 13px; color: var(--tenue); margin-top: 8px; }
.transfer b { color: var(--txt); font-weight: 700; }
.quedan { font-size: 13px; font-weight: 700; color: var(--alerta); margin-top: 10px; }
.desc { font-size: 14.5px; color: var(--txt-2); line-height: 1.75; white-space: pre-line; margin-top: 24px; }

.grupo { margin-top: 28px; }
.grupo-lbl { font-size: 11px; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase; color: var(--muy-tenue);
             margin-bottom: 12px; display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
.grupo-lbl b { color: var(--txt); letter-spacing: 0.04em; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt-btn { min-width: 52px; padding: 12px 16px; border: 1px solid var(--linea-2); background: none; color: var(--txt); border-radius: var(--radio-sm);
           font-size: 13px; font-weight: 700; cursor: pointer; transition: border-color .14s, background .14s; }
.opt-btn:hover:not(:disabled) { border-color: var(--tenue); }
.opt-btn.activo { border-color: var(--txt); background: var(--txt); color: var(--bg); }
.opt-btn.sin-stock { opacity: 0.28; text-decoration: line-through; cursor: not-allowed; }
.opt-btn .sw { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 7px; vertical-align: -1px; border: 1px solid var(--linea-2); }

.guia-link { background: none; border: none; padding: 0; cursor: pointer; flex-shrink: 0; font-size: 11px; font-weight: 700;
             letter-spacing: 0.09em; text-transform: uppercase; color: var(--acc); text-decoration: underline; text-underline-offset: 3px; }
.guia-ov { position: fixed; inset: 0; background: rgba(0,0,0,0.72); z-index: 110; display: none; align-items: center; justify-content: center; padding: 22px; }
.guia-ov.open { display: flex; }
.guia-box { background: var(--bg); border: 1px solid var(--linea-2); width: 100%; max-width: 560px; max-height: 86vh; display: flex; flex-direction: column; border-radius: 18px; overflow: hidden; }
.guia-hd { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 24px 26px 18px; border-bottom: 1px solid var(--linea); }
.guia-t { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; margin-top: 8px; }
.guia-x { background: none; border: none; padding: 0; cursor: pointer; font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--tenue); }
.guia-x:hover { color: var(--txt); }
.guia-scroll { overflow: auto; padding: 0 26px; }
.guia-tabla { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.guia-tabla th { text-align: left; font-size: 10.5px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muy-tenue); padding: 16px 10px 10px; white-space: nowrap; }
.guia-tabla td { padding: 11px 10px; border-top: 1px solid var(--linea); font-variant-numeric: tabular-nums; }
.guia-tabla th:first-child, .guia-tabla td:first-child { padding-left: 0; }
.guia-talle { font-weight: 700; }
.guia-pie { padding: 18px 26px 24px; font-size: 12.5px; color: var(--tenue); line-height: 1.6; }

.cant-ctrl { display: inline-flex; align-items: center; border: 1px solid var(--linea-2); border-radius: var(--radio-sm); overflow: hidden; }
.cant-ctrl button { width: 46px; height: 46px; background: none; color: var(--txt); border: none; font-size: 18px; cursor: pointer; }
.cant-ctrl button:hover { background: var(--lienzo); }
.cant-num { min-width: 46px; text-align: center; font-weight: 700; font-size: 15px; }

.pers { margin-top: 28px; padding: 20px; border: 1px solid var(--linea-2); border-radius: var(--radio); }
.pers-t { font-size: 11px; font-weight: 800; letter-spacing: 0.13em; text-transform: uppercase; color: var(--acc); }
.pers-s { font-size: 13px; color: var(--tenue); margin-top: 6px; line-height: 1.55; }
.pers-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.pers-campo label { display: block; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muy-tenue); margin-bottom: 7px; }
.pers-campo input { width: 100%; padding: 12px 13px; border: 1px solid var(--linea-2); background: var(--lienzo); color: var(--txt);
                    font-size: 14px; font-family: inherit; border-radius: var(--radio-sm); }
.pers-campo input:focus { outline: none; border-color: var(--acc); }
.pers-campo.ancho { grid-column: 1 / -1; }

.btn-add { width: 100%; margin-top: 26px; padding: 18px; border: none; cursor: pointer; border-radius: 12px;
           background: var(--acc); color: var(--acc-txt); font-size: 14px; font-weight: 800; letter-spacing: 0.04em; transition: filter .15s; }
.btn-add:hover:not(:disabled) { filter: brightness(1.08); }
.btn-add:disabled { opacity: 0.4; cursor: not-allowed; }
.add-msg { margin-top: 14px; font-size: 13px; font-weight: 600; min-height: 18px; }
.garantias { margin-top: 26px; border-top: 1px solid var(--linea); }
.garantias div { padding: 14px 0; border-bottom: 1px solid var(--linea); font-size: 13px; color: var(--tenue); line-height: 1.55; }
.garantias b { color: var(--txt); font-weight: 700; }

/* ══════════════════ Carrito lateral ══════════════════ */
.dr-bg { position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,0.6); opacity: 0; visibility: hidden; transition: opacity .22s, visibility .22s; }
.dr-bg.open { opacity: 1; visibility: visible; }
.dr { position: fixed; top: 0; right: 0; bottom: 0; z-index: 91; width: 420px; max-width: 92vw; background: var(--bg); color: var(--txt);
      border-left: 1px solid var(--linea); display: flex; flex-direction: column; transform: translateX(100%); transition: transform .26s cubic-bezier(.4,0,.2,1); }
.dr.open { transform: translateX(0); }
.dr-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px; border-bottom: 1px solid var(--linea); }
.dr-tit { font-size: 15px; font-weight: 800; }
.dr-x { background: none; border: none; padding: 4px; cursor: pointer; color: var(--txt); line-height: 0; }
.dr-x svg { width: 20px; height: 20px; display: block; }
.dr-body { flex: 1; overflow-y: auto; padding: 6px 22px; }
.dr-vacio { padding: 56px 0; text-align: center; color: var(--txt-2); font-size: 14px; }
.dr-item { display: grid; grid-template-columns: 64px 1fr; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--linea); }
.dr-img { width: 64px; height: 80px; border-radius: 10px; overflow: hidden; background: var(--lienzo); }
.dr-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dr-fila { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.dr-nom { font-size: 13.5px; font-weight: 700; line-height: 1.35; }
.dr-var { font-size: 12px; color: var(--txt-2); margin-top: 3px; }
.dr-del { background: none; border: none; padding: 0; cursor: pointer; font-size: 12px; color: var(--txt-2); text-decoration: underline; flex: none; }
.dr-del:hover { color: var(--txt); }
.dr-pie { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; gap: 10px; }
.dr-cant { display: inline-flex; align-items: center; border: 1px solid var(--linea-2); border-radius: 9px; }
.dr-cant button { background: none; border: none; width: 32px; height: 32px; padding: 0; cursor: pointer; color: var(--txt); font-size: 15px; }
.dr-cant button:disabled { opacity: .35; cursor: default; }
.dr-cant span { min-width: 26px; text-align: center; font-size: 13px; font-weight: 700; }
.dr-precio { font-size: 14px; font-weight: 800; }
.dr-precio s { font-weight: 400; color: var(--muy-tenue); margin-right: 6px; font-size: 12px; }
.dr-foot { padding: 20px 22px; border-top: 1px solid var(--linea); }
.dr-tot { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--txt-2); margin-bottom: 8px; }
.dr-tot.grande { font-size: 18px; font-weight: 800; color: var(--txt); margin-bottom: 6px; }
.dr-transf { font-size: 12.5px; color: var(--tenue); margin-bottom: 16px; }
.dr-transf b { color: var(--txt); }
.dr-cta { display: block; width: 100%; padding: 16px; border: none; border-radius: 12px; background: var(--acc); color: var(--acc-txt);
          text-align: center; cursor: pointer; font-size: 14px; font-weight: 800; letter-spacing: 0.04em; }
.dr-cta:hover { filter: brightness(1.08); }
.dr-seguir { display: block; width: 100%; margin-top: 12px; padding: 4px; background: none; border: none; cursor: pointer; color: var(--txt-2); font-size: 13px; }
.dr-seguir:hover { color: var(--txt); text-decoration: underline; }
.dr-err { font-size: 12.5px; color: var(--alerta); margin-bottom: 10px; display: none; }

@media (max-width: 900px) {
  .tv-wrap { padding: 0 18px; }
  .tv-nav { display: none; }
  .tv-cart { margin-left: auto; }
  .tv-portada .pslide { max-height: 70vh; }
  .tv-grid { grid-template-columns: repeat(2, 1fr); gap: 30px 12px; padding-top: 28px; }
  .tv-filtros { margin-top: 26px; }
  .tv-filtros-in { gap: 16px; }
  .tv-buscar input { width: 120px; }
  .tv-cabecera { padding-top: 36px; }
  .layout { grid-template-columns: 1fr; gap: 30px; }
  .gal { position: static; }
  .pers-grid { grid-template-columns: 1fr; }
  .p-nav { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
