/* GLOW · Fase 4 · Tienda online */

.sh-page {
  min-height: 100vh;
  padding: 0 0 90px;
  background: var(--bg);
}

.sh-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: var(--container);
  margin: 0 auto;
  padding: 22px var(--gutter);
}

.sh-top img { height: 42px; width: auto; }
.sh-top-actions { display: flex; align-items: center; gap: 12px; }

/* Con la hamburguesa a la vista, el menú sale del flujo: quedan el logo, el
   carrito y el botón del menú, y el reparto automático deja el carrito suelto
   en mitad de la barra. Todo el hueco se le da al carrito para que viaje pegado
   a la hamburguesa. Va sin apoyarse en .sh-page porque ahora el carrito sale en
   cualquier página del sitio, no solo dentro de la tienda. */
@media (max-width: 1200px) {
  .nav-inner > .sh-top-actions { margin-left: auto; margin-right: 2px; }
  /* El botón del menú trae su propio margin-left:auto y, con dos márgenes
     automáticos, el hueco se reparte entre ambos y el carrito queda en medio. */
  .nav-inner > .sh-top-actions + .nav-toggle { margin-left: 0; }
}

/* El menu del sitio dentro de la barra de la tienda. Son ocho enlaces: en
   pantallas medianas ya no caben junto al logo y al carrito, asi que bajan a
   una fila propia en vez de empujar el carrito fuera. */
/* La tienda usa la cabecera del sitio (.nav), que va fija arriba: hay que
   dejarle su sitio para que no tape el título del catálogo. */
.sh-page { padding-top: 104px; }

.sh-head {
  max-width: 760px;
  margin: 0 auto;
  padding: 34px var(--gutter) 0;
  text-align: center;
}

.sh-head h1 {
  margin: 14px 0 0;
  font-family: var(--serif);
  font-size: clamp(2rem, 5.5vw, 3rem);
  line-height: 1.1;
  color: var(--cream);
}

.sh-head p { margin: 14px 0 0; color: var(--cream-mute); line-height: 1.7; }

.sh-section {
  max-width: var(--container);
  margin: 0 auto;
  padding: 40px var(--gutter) 0;
}

/* ---------- Filtros por categoría ---------- */
.sh-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 26px 0 6px;
}

.sh-filters a {
  padding: 7px 18px;
  border: 1px solid var(--gold-line-soft);
  border-radius: 999px;
  color: var(--cream-mute);
  font-size: 0.85rem;
  text-decoration: none;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.sh-filters a:hover { border-color: var(--gold-line); color: var(--cream); }
.sh-filters a.is-on { background: var(--gold-glow); border-color: var(--gold); color: var(--cream); }

/* ---------- Catálogo ---------- */
.sh-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sh-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--gold-line-soft);
  border-radius: var(--radius-lg);
  background: var(--surface-soft);
  text-decoration: none;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.sh-card:hover { border-color: var(--gold-line); transform: translateY(-3px); }

/* Las fotos de producto son verticales (1080 x 1350): el marco lleva su misma
   proporción para que se vean enteras y no recortadas por arriba y por abajo. */
.sh-card-img {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  background: var(--surface);
}

.sh-card-img img { width: 100%; height: 100%; object-fit: cover; }

.sh-card-img-empty {
  display: grid;
  place-items: center;
  height: 100%;
  color: var(--gold-deep);
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.sh-card-body { display: flex; flex-direction: column; gap: 5px; padding: 16px 18px 20px; }

.sh-card-cat {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

.sh-card-title { font-family: var(--serif); font-size: 1.12rem; color: var(--cream); }
.sh-card-price { font-size: 1rem; color: var(--gold-soft); }

.sh-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(10, 8, 5, 0.86);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cream-mute);
}

/* ---------- Ficha de producto ---------- */
.sh-detail {
  display: grid;
  /* La foto manda en una ficha de producto: se le da mas ancho que a la
     columna de texto. */
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 40px;
  max-width: 1160px;
  margin: 0 auto;
}

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

/* Flechas FUERA de la foto: en fila con ella, para que no le tapen nada. */
.sh-gallery-stage {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sh-gal-arrow {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--gold-line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--cream);
  cursor: pointer;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}

.sh-gal-arrow:hover { background: var(--gold-glow); border-color: var(--gold); }
.sh-gal-arrow:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* Las fotos son verticales (1080 x 1350): el marco lleva su misma proporción,
   así se ven enteras en vez de recortadas arriba y abajo. */
.sh-gallery-main {
  flex: 1;
  min-width: 0;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 1px solid var(--gold-line-soft);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.sh-gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.22s var(--ease);
}

/* Zoom: con el raton basta pasar por encima (el cursor ya es una lupa); en
   tactil, un toque lo deja fijo. El origen del zoom lo pone el componente
   segun donde este el cursor. */
.sh-zoomable { position: relative; cursor: zoom-in; }
.sh-zoomable.is-zoom { cursor: zoom-out; }
.sh-zoomable.is-zoom img { transform: scale(2.3); }
.sh-zoomable:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* Pista de que la foto se puede acercar. No intercepta el cursor. */
.sh-zoom-hint {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(10, 8, 5, 0.55);
  color: #f4ead8;
  pointer-events: none;
  opacity: 0.9;
  transition: opacity 0.2s var(--ease);
}

.sh-zoomable.is-zoom .sh-zoom-hint { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  .sh-gallery-main img { transition: none; }
}

/* auto-fit + 64px para que las seis quepan en una fila y no quede una
   miniatura huérfana abajo. */
.sh-gallery-rest {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(64px, 1fr));
  gap: 10px;
}

/* Cada miniatura es un botón: se puede elegir cualquiera. */
.sh-thumb {
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--gold-line-soft);
  border-radius: var(--radius);
  background: none;
  cursor: pointer;
  transition: border-color 0.2s var(--ease);
}

.sh-thumb:hover { border-color: var(--gold-line); }
.sh-thumb.is-on { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.sh-thumb:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.sh-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.sh-gal-count {
  align-self: center;
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  color: var(--cream-dim);
}

@media (max-width: 520px) {
  .sh-gallery-stage { gap: 6px; }
  .sh-gal-arrow { width: 34px; height: 34px; }
}

.sh-detail-info h1 {
  margin: 6px 0 0;
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.12;
  color: var(--cream);
}

.sh-detail-desc {
  margin: 18px 0 0;
  color: var(--cream-mute);
  line-height: 1.75;
  white-space: pre-line;
}

/* ---------- Comprar ---------- */
.sh-buy {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 26px;
  padding: 24px;
  border: 1px solid var(--gold-line);
  border-radius: var(--radius-lg);
  background: var(--surface-strong);
}

.sh-buy-price { font-family: var(--serif); font-size: 2.2rem; color: var(--gold-soft); }

.sh-field { display: flex; flex-direction: column; gap: 6px; }

.sh-field > span {
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cream-dim);
}

.sh-field select,
.sh-field input {
  padding: 11px 13px;
  border: 1px solid var(--gold-line-soft);
  border-radius: var(--radius);
  background: var(--bg-deep);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 0.95rem;
}

.sh-field-qty input { max-width: 110px; }

.sh-soldout {
  margin: 0;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--cream-mute);
  text-align: center;
}

.sh-stock-warn { margin: 0; font-size: 0.85rem; color: var(--gold-soft); text-align: center; }

/* ---------- Carrito ---------- */
.sh-cart {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 34px;
  align-items: start;
  max-width: 1000px;
  margin: 0 auto;
}

.sh-cart-list { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 0; list-style: none; }

.sh-cart-item {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) auto auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--gold-line-soft);
  border-radius: var(--radius-lg);
  background: var(--surface-soft);
}

.sh-cart-img {
  width: 84px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--surface);
}

.sh-cart-img-empty { display: block; }

.sh-cart-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sh-cart-info a { color: var(--cream); text-decoration: none; }
.sh-cart-info a:hover { color: var(--gold-soft); }
.sh-cart-variant { font-size: 0.85rem; color: var(--cream-mute); }
.sh-cart-unit { font-size: 0.8rem; color: var(--cream-dim); }
.sh-cart-was { margin-right: 6px; opacity: 0.75; text-decoration-thickness: 1px; }

.sh-cart-qty { display: flex; flex-direction: column; gap: 6px; align-items: center; }

.sh-cart-qty input {
  width: 64px;
  padding: 7px 9px;
  border: 1px solid var(--gold-line-soft);
  border-radius: var(--radius);
  background: var(--bg-deep);
  color: var(--cream);
  font-family: var(--sans);
  text-align: center;
}

.sh-cart-line-total { color: var(--gold-soft); white-space: nowrap; }

.sh-summary {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 26px;
  border: 1px solid var(--gold-line);
  border-radius: var(--radius-lg);
  background: var(--surface-strong);
  position: sticky;
  top: 20px;
}

.sh-summary h2 { margin: 0; font-family: var(--serif); font-size: 1.4rem; color: var(--cream); }

.sh-row { display: flex; justify-content: space-between; gap: 12px; color: var(--cream-mute); }
.sh-row strong { color: var(--cream); }

.sh-row-total {
  padding-top: 12px;
  border-top: 1px solid var(--gold-line-soft);
  font-size: 1.15rem;
}

.sh-row-total strong { font-family: var(--serif); font-size: 1.5rem; color: var(--gold-soft); }

/* Lo que se ahorra va en dorado: es la unica linea del resumen que son buenas
   noticias, y se pierde si se pinta igual que el subtotal. */
.sh-row-save strong { color: var(--gold-soft); }
.sh-row-save strong span { font-weight: 500; opacity: 0.85; }

.sh-free-hint { margin: 0; font-size: 0.84rem; color: var(--gold-soft); }
.sh-secure { margin: 0; font-size: 0.78rem; color: var(--cream-dim); text-align: center; }

.sh-ship-options { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; border: 0; }

.sh-ship-options legend {
  padding: 0 0 6px;
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cream-dim);
}

.sh-ship-options label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border: 1px solid var(--gold-line-soft);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}

.sh-ship-options label.is-on { border-color: var(--gold); background: var(--gold-glow); }
.sh-ship-options label span { display: flex; flex-direction: column; gap: 2px; }
.sh-ship-options label strong { font-size: 0.92rem; color: var(--cream); font-weight: 500; }
.sh-ship-options label small { font-size: 0.78rem; color: var(--cream-dim); line-height: 1.5; }
.sh-ship-options input { margin-top: 3px; accent-color: var(--gold); }

.sh-empty {
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: center;
  padding: 60px 20px;
  text-align: center;
  color: var(--cream-mute);
}

/* Contador del carrito en la barra superior */
.sh-cart-link { position: relative; }

.sh-cart-count {
  position: absolute;
  top: -7px;
  right: -9px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--bg-deep);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 19px;
  text-align: center;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.sh-foot {
  max-width: var(--container);
  margin: 70px auto 0;
  padding: 0 var(--gutter);
  text-align: center;
  font-size: 0.78rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

@media (max-width: 860px) {
  .sh-detail { grid-template-columns: 1fr; gap: 26px; }
  .sh-cart { grid-template-columns: 1fr; }
  .sh-summary { position: static; }
}

@media (max-width: 560px) {
  .sh-cart-item { grid-template-columns: 64px minmax(0, 1fr); grid-template-areas: "img info" "qty total"; }
  .sh-cart-img { width: 64px; grid-area: img; }
  .sh-cart-info { grid-area: info; }
  .sh-cart-qty { grid-area: qty; align-items: flex-start; flex-direction: row; }
  .sh-cart-line-total { grid-area: total; text-align: right; }
}

/* ---------- Precio con descuento ---------- */
.sh-price-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
}

.sh-price-before {
  font-size: 1.05rem;
  color: var(--cream-dim);
}

.sh-price-before s { text-decoration-thickness: 1px; }

/* Fondo sólido a propósito: así el contraste del porcentaje es el mismo en la
   tienda oscura y en la del panel, que es clara (7.35:1 en las dos). */
.sh-price-off {
  align-self: center;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--gold);
  color: #1d1812;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.sh-price-unit {
  display: block;
  margin-top: 4px;
  font-size: 0.84rem;
  color: var(--cream-dim);
}

/* En la tarjeta del catálogo el tachado va delante del precio. */
.sh-card-price .sh-price-before {
  margin-right: 8px;
  font-size: 0.9rem;
}

/* ---------- Carrito como barra lateral ---------- */
.sh-drawer-wrap {
  position: fixed;
  inset: 0;
  z-index: 120;
  visibility: hidden;
  pointer-events: none;
}

.sh-drawer-wrap.is-open { visibility: visible; pointer-events: auto; }

.sh-drawer-fondo {
  position: absolute;
  inset: 0;
  background: rgba(8, 6, 4, 0.62);
  opacity: 0;
  transition: opacity 0.28s var(--ease);
}

.sh-drawer-wrap.is-open .sh-drawer-fondo { opacity: 1; }

.sh-drawer {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  width: min(440px, 100vw);
  height: 100%;
  background: var(--bg, #0a0805);
  border-left: 1px solid var(--gold-line);
  transform: translateX(100%);
  transition: transform 0.32s var(--ease);
}

.sh-drawer-wrap.is-open .sh-drawer { transform: translateX(0); }

.sh-drawer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: 0 0 auto;
  padding: 18px 20px;
  border-bottom: 1px solid var(--gold-line-soft);
}

.sh-drawer-top h2 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  font-family: var(--serif);
  font-size: 1.25rem;
  color: var(--cream);
}

.sh-drawer-count {
  display: grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--gold);
  color: #1d1812;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
}

.sh-drawer-cerrar {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--gold-line-soft);
  border-radius: 999px;
  background: none;
  color: var(--cream);
  cursor: pointer;
}

.sh-drawer-cerrar:hover { border-color: var(--gold); background: var(--gold-glow); }

.sh-drawer-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 18px 20px 28px;
}

/* Dentro del cajón el carrito es una sola columna. */
.sh-drawer-body .sh-cart { display: block; }
.sh-drawer-body .sh-summary { margin-top: 18px; }
.sh-drawer-body .sh-cart-item { grid-template-columns: 56px 1fr; }
.sh-drawer-body .sh-cart-img { width: 56px; height: 56px; }

@media (prefers-reduced-motion: reduce) {
  .sh-drawer, .sh-drawer-fondo { transition: none; }
}

/* ---------- Icono del carrito ---------- */
.sh-cart-btn,
.sh-cart-fab {
  position: relative;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--gold-line);
  border-radius: 999px;
  background: var(--gold);
  color: #1d1812;
  cursor: pointer;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}

.sh-cart-btn:hover,
.sh-cart-fab:hover { background: #d8b264; transform: translateY(-1px); }
.sh-cart-btn:focus-visible,
.sh-cart-fab:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* Botón flotante de la tienda del panel. Se aparta de la barra móvil. */
.sh-cart-fab {
  position: fixed;
  right: 18px;
  bottom: 92px;
  z-index: 90;
  width: 52px;
  height: 52px;
  box-shadow: 0 10px 26px rgba(20, 14, 6, 0.28);
}

@media (min-width: 901px) {
  .sh-cart-fab { bottom: 26px; }
}

.sh-cart-btn .sh-cart-count,
.sh-cart-fab .sh-cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: #1d1812;
  color: #f4ead8;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
}

/* ---------- Dirección de envío ---------- */
.sh-envio {
  margin: 18px 0 4px;
  padding-top: 16px;
  border-top: 1px solid var(--gold-line-soft);
}

.sh-envio h3 {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--cream);
}

.sh-envio-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.sh-envio-grid .sh-col-2 { grid-column: 1 / -1; }

.sh-envio-nota {
  margin: 10px 0 0;
  font-size: 0.8rem;
  color: var(--cream-dim);
}

/* Aviso de que el producto trae además el programa de Pilates. El kit se vende
   en la tienda y en /pilates al mismo precio: si aquí no se dice, parece que
   comprarlo aquí sale peor. */
.sh-incluye {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 0;
  padding: 7px 13px;
  border: 1px solid var(--gold-line);
  border-radius: 999px;
  background: var(--gold-glow);
  font-size: 0.85rem;
  color: var(--cream);
}

.sh-incluye svg { flex: 0 0 auto; color: var(--gold); }

/* En el panel el fondo es claro: el mismo aviso necesita otro contraste. */
.mp-shop .sh-incluye { color: var(--ink, #1d1812); }

/* Interruptor con explicación debajo, en el editor del producto. */
.check-line { display: flex; align-items: flex-start; gap: 10px; }
.check-line input { margin-top: 3px; flex: 0 0 auto; }
.check-line small {
  display: block;
  margin-top: 4px;
  font-size: 0.82rem;
  line-height: 1.55;
  opacity: 0.72;
}
.check-line small { display: block; margin-top: 2px; opacity: 0.7; }

/* ---------- Campos obligatorios del envío ---------- */
.sh-req { font-style: normal; color: var(--gold); }

/* El campo que falta se marca al pulsar "Ir al checkout", y la marca se va
   sola en cuanto se escribe algo. */
.sh-field input.is-falta {
  border-color: #d98b8b;
  box-shadow: 0 0 0 2px rgba(217, 139, 139, 0.18);
}

.sh-envio-falta {
  margin: 12px 0 0;
  font-size: 0.88rem;
  line-height: 1.6;
  color: #e2a3a3;
  text-align: center;
}

/* ---------- "¿Te lo guardamos?" (carrito sin cuenta) ---------- */
.sh-guardar {
  margin: 18px 0 4px;
  padding: 16px 18px;
  border: 1px solid var(--gold-line-soft);
  border-radius: var(--radius-lg);
  background: var(--surface-soft);
}

.sh-guardar .sh-field { margin: 0; }
.sh-guardar .sh-envio-nota { text-align: left; }
