/* =========================================================================
   EDESEG Creaciones — Tienda en línea
   Extiende styles.css. Fondo blanco deliberado (--paper-3) y composición
   austera: la prenda es la protagonista, la interfaz se retira.
   ========================================================================= */

body.store-page {
  background: var(--paper-3);
}

.store-page .hidden {
  display: none !important;
}

/* ---------- Banner de la tienda (editable desde el panel, independiente
   del banner de la página de inicio: contenido y endpoints propios) ---------- */
.store-banner {
  position: relative;
  width: 100%;
  min-height: clamp(440px, 60vw, 620px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background-color: var(--ink);
  color: var(--text-light);
}
.store-banner-media {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.store-banner-media.is-active { opacity: 1; }
.store-banner-media { pointer-events: none; }
.store-banner-media.is-active.is-linked {
  pointer-events: auto;
  cursor: pointer;
}
.store-banner-media.is-active.is-linked:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: -4px;
}
@media (prefers-reduced-motion: reduce) {
  .store-banner-media { transition: none; }
}
.store-banner-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none; /* deja pasar el clic al banner enlazado */
  background: linear-gradient(0deg, rgba(15, 28, 51, 0.85) 0%, rgba(15, 28, 51, 0.4) 45%, rgba(15, 28, 51, 0.05) 78%);
}
.store-banner-watermark {
  position: absolute;
  top: clamp(1.25rem, 3vw, 2rem);
  right: clamp(1.25rem, 3vw, 2rem);
  z-index: 2;
  opacity: 0.85;
  pointer-events: none;
}
.store-banner-watermark img { width: clamp(30px, 3.6vw, 44px); height: auto; }
.store-banner-wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  padding-block: clamp(2.5rem, 6vw, 4rem);
  pointer-events: none; /* el texto no bloquea el clic; el CTA sí es clicable */
}
.store-banner-wrap a,
.store-banner-wrap button { pointer-events: auto; }
.store-banner-content { max-width: 620px; }
.store-banner-content .hero-eyebrow {
  color: var(--gold-light);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55), 0 2px 12px rgba(0, 0, 0, 0.35);
}
.store-banner-content h2 {
  font-size: clamp(1.9rem, 4.6vw, 3.4rem);
  line-height: 1.02;
  color: var(--text-light);
  text-wrap: balance;
  margin-bottom: 0.9rem;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55), 0 2px 12px rgba(0, 0, 0, 0.35);
}
.store-banner-content p {
  color: var(--text-muted-light);
  font-size: 1.05rem;
  max-width: 48ch;
  margin-bottom: 1.5rem;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55), 0 2px 12px rgba(0, 0, 0, 0.35);
}
.store-banner-features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
  margin: 0 0 1.75rem;
  padding: 0;
  list-style: none;
}
.store-banner-features:empty { display: none; margin-bottom: 0; }
.store-banner-features li {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
}
.store-banner-features li::before {
  content: "";
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  background: var(--gold);
}
.store-banner-cta { display: inline-flex; }
.store-banner-nav {
  position: absolute;
  right: clamp(1.25rem, 3vw, 2rem);
  bottom: clamp(1.25rem, 3vw, 2rem);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.9rem;
}
.store-banner-arrow {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line-on-dark);
  background: rgba(15, 28, 51, 0.35);
  color: var(--text-light);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.store-banner-arrow:hover { border-color: var(--gold); background: rgba(15, 28, 51, 0.55); }
.store-banner-counter {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--text-muted-light);
}
@media (max-width: 620px) {
  .store-banner { align-items: center; min-height: clamp(480px, 130vw, 620px); }
  .store-banner-nav { left: 0; right: 0; justify-content: center; bottom: 1.25rem; }
}

.store-header {
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(1.5rem, 3vw, 2.5rem);
  border-bottom: 1px solid var(--line);
}
.store-header .hero-eyebrow { color: var(--steel-dark); margin-bottom: 0.5rem; }
.store-header h1 { font-size: clamp(2rem, 4vw, 3rem); }
.store-header p.lede { color: var(--text-muted-dark); margin-top: 0.75rem; }

/* ---------- Catálogo ---------- */
.store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: clamp(1.5rem, 3vw, 2.75rem) clamp(1.25rem, 2vw, 2rem);
  padding-block: clamp(2.5rem, 5vw, 4rem);
}
.store-card {
  text-decoration: none;
  color: inherit;
  display: block;
}
.store-card-media {
  aspect-ratio: 4/5;
  background: var(--paper);
  overflow: hidden;
  margin-bottom: 0.9rem;
}
.store-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.store-card:hover .store-card-media img { transform: scale(1.035); }
.store-card-name {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-dark);
}
.store-card-price {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-muted-dark);
  margin-top: 0.2rem;
}

.store-empty {
  padding: clamp(3rem, 8vw, 5rem) 0;
  text-align: center;
  color: var(--text-muted-dark);
}
.store-empty h2 { color: var(--text-dark); margin-bottom: 0.75rem; }

/* ---------- Detalle de producto ---------- */
.product-view {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  padding-block: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
}
@media (max-width: 860px) {
  .product-view { grid-template-columns: 1fr; }
}
.product-gallery-main {
  aspect-ratio: 4/5;
  background: var(--paper);
  overflow: hidden;
  margin-bottom: 0.75rem;
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(15, 28, 51, 0.16);
  cursor: pointer;
}
.product-gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.product-gallery-thumbs { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.product-gallery-thumbs button {
  width: 68px; height: 68px; padding: 0; border: 1px solid transparent; background: var(--paper);
  cursor: pointer; overflow: hidden;
}
.product-gallery-thumbs button.active { border-color: var(--gold); }
.product-gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }

.product-info .hero-eyebrow { color: var(--steel-dark); margin-bottom: 0.5rem; }
.product-info h1 { font-size: clamp(1.8rem, 3vw, 2.4rem); margin-bottom: 0.6rem; }
.product-price { font-family: var(--font-mono); font-size: 1.3rem; color: var(--text-dark); margin-bottom: 1.5rem; }
.product-description { color: var(--text-muted-dark); }

.option-group { margin: 1.5rem 0; }
.option-group label.group-label {
  display: block; font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text-muted-dark); margin-bottom: 0.6rem;
}
.option-pills { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.option-pill {
  padding: 0.55rem 1.1rem; border: 1px solid var(--line-strong); background: var(--paper-3);
  font-family: var(--font-body); font-size: 0.9rem; cursor: pointer; color: var(--text-dark);
}
.option-pill:hover { border-color: var(--gold); }
.option-pill.selected { border-color: var(--gold); background: var(--gold); color: var(--ink); }
.option-pill:disabled, .option-pill.unavailable { opacity: 0.35; cursor: not-allowed; text-decoration: line-through; }

.qty-row { display: flex; align-items: center; gap: 0.9rem; margin: 1.5rem 0; }
.qty-stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); }
.qty-stepper button { width: 38px; height: 38px; border: none; background: none; font-size: 1.1rem; cursor: pointer; color: var(--text-dark); }
.qty-stepper span { width: 2.5rem; text-align: center; font-family: var(--font-mono); }

.product-view .btn-primary { width: 100%; justify-content: center; padding: 1rem; font-size: 1rem; }
.form-note { font-size: 0.82rem; color: var(--text-muted-dark); margin-top: 0.75rem; }

/* ---------- Carrito ---------- */
.cart-view { padding-block: clamp(2rem, 5vw, 3.5rem); }
.cart-line {
  display: grid;
  grid-template-columns: 90px 1fr auto auto;
  gap: 1.25rem;
  align-items: center;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
}
@media (max-width: 620px) {
  .cart-line { grid-template-columns: 64px 1fr; grid-template-rows: auto auto; row-gap: 0.6rem; }
  .cart-line-qty, .cart-line-price { grid-column: 2; }
}
.cart-line-media { width: 90px; aspect-ratio: 4/5; background: var(--paper); overflow: hidden; }
.cart-line-media img { width: 100%; height: 100%; object-fit: cover; }
.cart-line-info strong { display: block; font-size: 1rem; }
.cart-line-info span { display: block; color: var(--text-muted-dark); font-size: 0.85rem; margin-top: 0.15rem; }
.cart-line-remove { background: none; border: none; color: var(--text-muted-dark); font-size: 0.8rem; text-decoration: underline; cursor: pointer; padding: 0; margin-top: 0.4rem; }
.cart-line-price { font-family: var(--font-mono); font-size: 0.95rem; white-space: nowrap; }

.cart-summary {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 2px solid var(--ink);
  display: flex;
  justify-content: flex-end;
}
.cart-summary-box { width: 100%; max-width: 320px; text-align: right; }
.cart-summary-row { display: flex; justify-content: space-between; font-family: var(--font-mono); margin-bottom: 0.5rem; }
.cart-summary-total { font-size: 1.3rem; font-weight: 700; color: var(--text-dark); }
.cart-summary .btn-primary { margin-top: 1.25rem; width: 100%; justify-content: center; }

/* ---------- Checkout ---------- */
.checkout-view { padding-block: clamp(2rem, 5vw, 3.5rem); display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(2rem, 4vw, 3.5rem); align-items: start; }
@media (max-width: 860px) { .checkout-view { grid-template-columns: 1fr; } }
.checkout-form .field { margin-bottom: 1.1rem; }
.checkout-form label { display: block; font-size: 0.85rem; color: var(--text-muted-dark); margin-bottom: 0.35rem; }
.checkout-form input {
  width: 100%; padding: 0.7rem 0.85rem; border: 1px solid var(--line-strong); background: var(--paper-3);
  font-family: var(--font-body); font-size: 0.95rem;
}
.checkout-form input:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 480px) { .field-row { grid-template-columns: 1fr; } }

.shipping-rates { margin-top: 1.5rem; }
.shipping-rate {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 0.9rem 1rem; border: 1px solid var(--line-strong); margin-bottom: 0.6rem; cursor: pointer;
}
.shipping-rate.selected { border-color: var(--gold); background: rgba(200, 155, 92, 0.08); }
.shipping-rate strong { display: block; font-size: 0.92rem; }
.shipping-rate span { color: var(--text-muted-dark); font-size: 0.82rem; }
.shipping-rate .price { font-family: var(--font-mono); font-weight: 600; white-space: nowrap; }

.checkout-summary { background: var(--paper); padding: clamp(1.5rem, 3vw, 2rem); }
.checkout-summary h3 { margin-bottom: 1rem; }
.checkout-summary-line { display: flex; justify-content: space-between; font-size: 0.9rem; margin-bottom: 0.6rem; color: var(--text-muted-dark); }
.checkout-summary-total { display: flex; justify-content: space-between; font-weight: 700; font-size: 1.15rem; color: var(--text-dark); border-top: 1px solid var(--line-strong); padding-top: 0.9rem; margin-top: 0.9rem; }

.cart-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  background: var(--gold);
  color: var(--ink);
  border-radius: 50%;
  padding: 0.05rem 0.4rem;
  margin-left: 0.35rem;
}

/* ---------- Confirmación ---------- */
.confirm-view { padding-block: clamp(3rem, 8vw, 5rem); text-align: center; max-width: 620px; margin-inline: auto; }
.confirm-view h1 { font-size: clamp(1.8rem, 3vw, 2.4rem); margin-bottom: 0.75rem; }
.confirm-view p { color: var(--text-muted-dark); }
.confirm-order-box { margin: 2rem 0; padding: 1.5rem; border: 1px solid var(--line); text-align: left; }

/* ---------- Modo tienda (dominio edeseg.shop) ----------
   shop-mode.js agrega .shop-mode a <html> solo en edeseg.shop: encabezado
   rojo y menú reducido a la tienda. El menú original se oculta hasta que el
   script lo reemplaza (data-shop-nav) para que no parpadee. */
.shop-mode {
  --shop-red: #df0d0d;
  --shop-red-dark: #b00a0a;
}
.shop-mode .site-header {
  background: var(--shop-red);
  border-bottom-color: rgba(255, 255, 255, 0.18);
}
.shop-mode .nav-desktop:not([data-shop-nav]),
.shop-mode .nav-mobile:not([data-shop-nav]) { visibility: hidden; }
.shop-mode .nav-desktop a { color: rgba(255, 255, 255, 0.82); }
.shop-mode .nav-desktop a:hover,
.shop-mode .nav-desktop a[aria-current="page"] {
  color: #fff;
  border-color: #fff;
}
.shop-mode .site-header .btn-outline,
.shop-mode .nav-toggle {
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff;
}
.shop-mode .site-header .btn-outline:hover { border-color: #fff; color: #fff; }
.shop-mode .site-header .cart-badge { background: #fff; color: var(--shop-red); }
.shop-mode .nav-mobile {
  background: var(--shop-red-dark);
  border-top-color: rgba(255, 255, 255, 0.18);
}
.shop-mode .nav-mobile a { border-bottom-color: rgba(255, 255, 255, 0.14); }
.shop-mode .nav-mobile a[aria-current="page"] { font-weight: 600; }
.shop-mode .nav-desktop a { white-space: nowrap; }
/* Con productos en el menú se necesita más ancho: el menú ☰ entra antes. */
@media (max-width: 1180px) {
  .shop-mode .nav-desktop { display: none; }
  .shop-mode .nav-toggle { display: inline-flex; }
}
