/* ══════════════════════════════════════════════════════════════════
   FECA HOME — Public Store
   Warm minimalism · Manrope · Mobile-first
   ══════════════════════════════════════════════════════════════════ */

/* ── TOKENS ─────────────────────────────────────────────────────── */
:root {
  --brown:        #5C3D2E;
  --brown-dark:   #3D2818;
  --brown-soft:   #7A5A47;
  --cream:        #F5ECD7;

  --gold:         #C8933A;
  --gold-dark:    #A8731A;
  --gold-light:   #F5E8D0;
  --gold-bg:      #FBF3E8;
  --gold-border:  #E8C87A;

  --bg:           #FAF6EF;
  --bg-soft:      #F2EAE0;
  --surface:      #FFFFFF;

  --text:         #2C2416;
  --muted:        #8B7560;
  --light:        #B8A898;

  --success:      #5A9E6F;
  --success-soft: #EEF6EB;
  --danger:       #C0392B;
  --danger-soft:  #FDEEEC;
  --warning-soft: #FBF3E8;

  --border:       #E8DCC8;
  --border-soft:  #F0E8D8;

  --shadow-sm: 0 1px 3px rgba(44,36,22,.07), 0 2px 8px rgba(44,36,22,.05);
  --shadow:    0 2px 8px rgba(44,36,22,.09), 0 8px 28px rgba(44,36,22,.07);
  --shadow-lg: 0 8px 24px rgba(44,36,22,.14), 0 24px 60px rgba(44,36,22,.11);

  --r-xs: 8px;
  --r-sm: 12px;
  --r:    18px;
  --r-lg: 24px;
  --pill: 999px;

  --font: 'Manrope', 'Inter', system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);

  --header-h: 62px;
}

/* ── RESET ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: var(--font); }
img { display: block; max-width: 100%; }

/* ── HEADER ─────────────────────────────────────────────────────── */
.st-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--brown);
  box-shadow: 0 1px 0 var(--brown-dark), 0 2px 16px rgba(44,36,22,.18);
  height: var(--header-h);
}
.st-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.st-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
/* Botón hamburguesa del header — oculto: el trigger pasó al section nav */
.st-menu-btn { display: none; }
/* Botón favoritos en header (hereda estilos de .st-account-btn) */
.st-favorites-header-btn { position: relative; }
/* activo: corazón marrón/dorado FECA, sin rojo ni blanco */
.st-favorites-header-btn.is-active i { color: #b17818; }
.st-favorites-count {
  position: absolute; top: -5px; right: -5px;
  min-width: 17px; height: 17px; border-radius: var(--pill);
  background: #8a6a43; color: #fffaf2;
  font-size: 10px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 4px; box-shadow: 0 2px 6px rgba(80,43,32,.25);
}
.st-favorites-count[hidden] { display: none !important; }
/* Botones unificados del modal Mi cuenta */
.st-account-actions {
  width: min(100%, 260px); margin: 18px auto 0;
  display: flex; flex-direction: column; gap: 10px;
}
.st-account-action-btn {
  width: 100%; height: 44px; border-radius: var(--pill);
  border: 1px solid rgba(198,145,54,.35);
  background: rgba(255,252,244,.86);
  color: var(--brown);
  font-family: var(--font); font-size: 14px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  cursor: pointer; transition: border-color .14s, background .14s;
}
.st-account-action-btn:hover { border-color: rgba(198,145,54,.7); background: rgba(255,248,233,.96); }
.st-account-signout-btn {
  border-color: rgba(185,71,63,.32); color: #9f3f38;
  background: rgba(255,247,244,.68);
}
.st-account-signout-btn:hover { border-color: rgba(185,71,63,.55); background: rgba(255,238,235,.88); }
/* Legacy — no borrar para no romper si algún render viejo los usa */
.st-account-favorites-btn, .st-account-profile-btn { display: none; }
/* ── Formulario de perfil de cliente ─────────────────────────────────────────── */
.st-profile-form { padding: 0 0 8px; }
.st-profile-intro { font-size: 12.5px; color: var(--muted); margin-bottom: 16px; line-height: 1.5; }
.st-profile-opt   { font-weight: 400; color: var(--light); font-size: .9em; }
.st-profile-field { margin-bottom: 12px; }
.st-profile-field label {
  display: block; font-size: 11px; font-weight: 700; color: var(--muted);
  margin-bottom: 4px; text-transform: uppercase; letter-spacing: .05em;
}
.st-profile-input {
  width: 100%; border: 1.5px solid var(--border); border-radius: var(--r-sm);
  padding: 9px 12px; font-size: 13.5px; font-family: var(--font);
  background: var(--surface); color: var(--text); resize: none;
  transition: border-color .14s, box-shadow .14s;
}
.st-profile-input:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(200,147,58,.14);
}
.st-profile-actions { display: flex; gap: 10px; margin-top: 18px; }
.st-profile-save-btn {
  flex: 1; background: var(--brown); color: var(--cream);
  border: none; border-radius: var(--r-sm); padding: 11px;
  font-family: var(--font); font-size: 13.5px; font-weight: 700;
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: background .14s;
}
.st-profile-save-btn:hover { background: var(--brown-dark); }
.st-profile-back-btn {
  background: none; border: 1.5px solid var(--border-soft); border-radius: var(--r-sm);
  color: var(--muted); font-family: var(--font); font-size: 13px; font-weight: 700;
  padding: 11px 16px; cursor: pointer;
  display: flex; align-items: center; gap: 5px; transition: border-color .14s, color .14s;
}
.st-profile-back-btn:hover { border-color: var(--border); color: var(--text); }

/* ── Autocomplete de ubicaciones ─────────────────────────────────────────────── */
.st-autocomplete-list {
  position: fixed;
  z-index: 9999;
  background: var(--surface, #fffaf2);
  border: 1px solid rgba(198,145,54,.35);
  border-radius: 14px;
  box-shadow: 0 14px 36px rgba(44,36,22,.15), 0 2px 8px rgba(44,36,22,.08);
  max-height: 220px;
  overflow-y: auto;
  padding: 5px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.st-autocomplete-list[hidden] { display: none !important; }
.st-autocomplete-option {
  display: block; width: 100%;
  border: 0; background: transparent; text-align: left;
  padding: 9px 12px; border-radius: 10px;
  color: var(--brown); font-family: var(--font);
  font-size: 13px; font-weight: 700; cursor: pointer;
  transition: background .12s;
}
.st-autocomplete-option small {
  display: block; margin-top: 1px;
  color: var(--muted); font-size: 11px; font-weight: 600;
}
.st-autocomplete-option:hover,
.st-autocomplete-option.is-active { background: rgba(198,145,54,.10); }

/* Botón Mi cuenta en header */
.st-account-btn {
  position: relative;
  background: transparent;
  border: 1.5px solid rgba(245,236,215,.3);
  border-radius: var(--r-sm);
  color: var(--cream);
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.st-account-btn:hover { background: rgba(245,236,215,.12); border-color: rgba(245,236,215,.6); }

/* ── Modal de cuenta ─────────────────────────────────────────────────────────── */
.st-account-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(10,6,2,.52); z-index: 1070;
  transition: opacity .22s ease;
}
.st-account-overlay.open { display: block; }

/* Modal cuenta: oculto por defecto */
.st-account-modal {
  display: none;            /* cerrado hasta que JS agregue .open */
  position: fixed; z-index: 1075;
  bottom: 0; left: 0; right: 0;
  background: var(--bg);
  border-radius: 22px 22px 0 0;
  max-height: 90vh; overflow-y: auto; -webkit-overflow-scrolling: touch;
  transform: translateY(4px);
  transition: transform .28s cubic-bezier(.2,.7,.2,1);
  flex-direction: column;
}
.st-account-modal.open {
  display: flex;            /* visible y animado */
  transform: translateY(0);
}

/* Desktop: modal centrado */
@media (min-width: 600px) {
  .st-account-modal {
    top: 50%; left: 50%; right: auto; bottom: auto;
    width: min(420px, calc(100vw - 32px));
    border-radius: 20px;
    max-height: 80vh;
    transform: translate(-50%, -48%) scale(.96);
  }
  .st-account-modal.open { transform: translate(-50%, -50%) scale(1); }
}

.st-account-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--border-soft);
}
.st-account-title {
  font-family: Georgia, serif;
  font-size: 18px; font-weight: 400; color: var(--brown); letter-spacing: .01em;
}
.st-account-close {
  width: 34px; height: 34px; border-radius: 50%;
  border: none; background: var(--border-soft);
  color: var(--muted); font-size: 13px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .14s;
}
.st-account-close:hover { background: var(--border); color: var(--text); }
.st-account-body { padding: 22px; }

/* Form elements */
.st-acct-intro  { font-size: 13px; color: var(--muted); line-height: 1.6; margin-bottom: 20px; }
.st-acct-msg    { font-size: 12.5px; padding: 10px 14px; border-radius: 10px; margin-bottom: 16px; }
.st-acct-msg.success { background: var(--success-soft); color: var(--success); }
.st-acct-msg.error   { background: var(--danger-soft);  color: var(--danger);  }
.st-acct-continue-link {
  display: inline-block; margin-top: 8px;
  background: none; border: none; padding: 0;
  font-family: var(--font); font-size: 12px; font-weight: 700;
  color: var(--brown); cursor: pointer; text-decoration: underline;
  text-underline-offset: 2px;
}
.st-acct-field  { margin-bottom: 14px; }
.st-acct-field label {
  display: block; font-size: 11px; font-weight: 700; color: var(--muted);
  margin-bottom: 5px; text-transform: uppercase; letter-spacing: .06em;
}
.st-acct-field input {
  width: 100%; border: 1.5px solid var(--border); border-radius: var(--r-sm);
  padding: 10px 14px; font-size: 14px; font-family: var(--font);
  background: var(--surface); color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.st-acct-field input:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(200,147,58,.16);
}
.st-acct-actions { display: flex; gap: 10px; margin-top: 6px; }
.st-acct-btn-primary {
  flex: 1; background: var(--brown); color: var(--cream);
  border: none; border-radius: var(--r-sm); padding: 12px;
  font-family: var(--font); font-size: 13.5px; font-weight: 700; cursor: pointer;
  transition: background .14s;
}
.st-acct-btn-primary:hover { background: var(--brown-dark); }
.st-acct-btn-secondary {
  flex: 1; background: transparent; color: var(--brown);
  border: 1.5px solid var(--brown); border-radius: var(--r-sm); padding: 12px;
  font-family: var(--font); font-size: 13.5px; font-weight: 700; cursor: pointer;
  transition: background .14s, color .14s;
}
.st-acct-btn-secondary:hover { background: var(--gold-bg); border-color: var(--gold-border); }
.st-acct-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 18px 0 14px; color: var(--muted); font-size: 12px;
}
.st-acct-divider::before,
.st-acct-divider::after { content: ''; flex: 1; height: 1px; background: var(--border-soft); }
.st-acct-btn-ghost {
  width: 100%; background: none; border: none; color: var(--muted);
  font-family: var(--font); font-size: 13px; font-weight: 600; cursor: pointer;
  padding: 8px; text-decoration: underline; text-underline-offset: 2px;
  transition: color .14s;
}
.st-acct-btn-ghost:hover { color: var(--brown); }
/* Logged in */
.st-acct-loggedin { text-align: center; padding: 8px 0; }
.st-acct-avatar   { font-size: 54px; color: var(--gold); margin-bottom: 12px; }
.st-acct-email    { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.st-acct-welcome  { font-size: 12px; color: var(--muted); margin-bottom: 24px; }
.st-acct-btn-signout {
  display: inline-flex; align-items: center; gap: 8px;
  background: none; border: 1.5px solid var(--border);
  color: var(--muted); border-radius: var(--r-sm);
  padding: 10px 20px; font-family: var(--font);
  font-size: 13px; font-weight: 700; cursor: pointer;
  transition: border-color .14s, color .14s;
}
.st-acct-btn-signout:hover { border-color: var(--danger); color: var(--danger); }

/* ── Productos relacionados en modal de producto ─────────────────── */
.st-related-section {
  border-top: 1px solid var(--border-soft);
  padding-top: 14px; margin-top: 4px;
  overflow: hidden; /* evitar que la lista ensanche el modal */
}
.st-related-head {
  font-size: 10px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .08em; color: var(--muted); margin-bottom: 10px;
}
.st-related-list {
  display: flex; gap: 10px;
  overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none;
  padding-bottom: 2px;
  overscroll-behavior-x: contain; /* no propagar scroll horizontal a la página */
}
.st-related-list::-webkit-scrollbar { display: none; }
.st-related-card {
  flex-shrink: 0; width: 116px; border: none; padding: 0; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border-soft);
  border-radius: var(--r-sm); text-align: left;
  display: flex; flex-direction: column; overflow: hidden;
  transition: box-shadow .15s, border-color .15s;
}
.st-related-card:hover { box-shadow: var(--shadow-sm); border-color: var(--border); }
.st-related-img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.st-related-img-ph {
  width: 100%; aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-soft); color: var(--light); font-size: 1.5rem;
}
.st-related-name {
  font-size: 11px; font-weight: 700; color: var(--text);
  line-height: 1.3; padding: 6px 7px 2px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.st-related-price {
  font-size: 11.5px; font-weight: 800; color: var(--gold-dark);
  padding: 2px 7px 7px; display: block;
}
/* Mobile: incluir en el flujo de orden flex del modal */
@media (max-width: 599px) {
  .st-related-section { order: 9; }
}
.st-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.st-logo {
  width: 36px; height: 36px;
  border-radius: var(--r-sm);
  object-fit: contain;
  background: var(--cream);
  box-shadow: 0 1px 4px rgba(44,36,22,.2);
  flex-shrink: 0;
}
.st-logo-fallback {
  width: 36px; height: 36px;
  border-radius: var(--r-sm);
  background: var(--brown-dark);
  color: var(--cream);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800;
  flex-shrink: 0;
}
.st-brand-text { display: flex; flex-direction: column; gap: 1px; }
.st-brand-name {
  font-family: Georgia, serif;
  font-size: 15px; font-weight: 700;
  color: var(--cream);
  letter-spacing: .06em; line-height: 1;
}
.st-brand-sub {
  font-size: 10px;
  color: rgba(245,236,215,.65);
  letter-spacing: .05em; font-weight: 600;
  text-transform: uppercase;
}
.st-cart-btn {
  position: relative;
  background: transparent;
  border: 1.5px solid rgba(245,236,215,.3);
  border-radius: var(--r-sm);
  color: var(--cream);
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem;
  transition: background .15s, border-color .15s;
}
.st-cart-btn:hover { background: rgba(245,236,215,.12); border-color: rgba(245,236,215,.6); }
.st-cart-badge {
  position: absolute;
  top: -6px; right: -6px;
  background: var(--gold);
  color: #fff;
  font-size: 10px; font-weight: 800;
  min-width: 18px; height: 18px;
  border-radius: var(--pill);
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px; line-height: 1;
  box-shadow: 0 1px 4px rgba(44,36,22,.25);
}

/* ── HERO ────────────────────────────────────────────────────────── */
.st-hero {
  background: linear-gradient(170deg, var(--bg-soft) 0%, var(--bg) 48%, var(--gold-bg) 100%);
  padding: 60px 20px 44px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.st-hero::before {
  content: '';
  position: absolute; top: -60px; right: -60px;
  width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(200,147,58,.08) 0%, transparent 70%);
  pointer-events: none;
}
.st-hero::after {
  content: '';
  position: absolute; bottom: -40px; left: -40px;
  width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(92,61,46,.06) 0%, transparent 70%);
  pointer-events: none;
}
.st-hero-inner {
  position: relative; z-index: 1;
  max-width: 540px; margin: 0 auto;
}
.st-hero-eyebrow {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .12em;
  color: var(--gold); margin-bottom: 14px;
}
.st-hero-title {
  font-family: Georgia, serif;
  font-size: clamp(32px, 6vw, 52px);
  font-weight: 400; color: var(--brown);
  line-height: 1.18; letter-spacing: -.01em;
  margin-bottom: 16px;
}
.st-hero-sub {
  font-size: 15px; color: var(--muted);
  font-weight: 500; line-height: 1.6;
  margin-bottom: 28px;
}
.st-hero-cta {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--brown); color: var(--cream);
  font-size: 14px; font-weight: 700; letter-spacing: .03em;
  padding: 14px 34px; border-radius: var(--pill);
  transition: background .18s, transform .16s, box-shadow .18s;
  box-shadow: var(--shadow);
}
.st-hero-cta .bi { transition: transform .18s var(--ease); }
.st-hero-cta:hover {
  background: var(--brown-dark); color: var(--cream);
  transform: translateY(-2px); box-shadow: var(--shadow-lg);
}
.st-hero-cta:hover .bi { transform: translateY(3px); }
/* ── HERO BENEFITS MARQUEE ───────────────────────────────────────── */
.st-hero-benefits {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 16px auto 0;
  overflow: hidden;
  position: relative;
  padding: 9px 0;
  border-top: 1px solid rgba(198,145,54,.18);
  border-bottom: 1px solid rgba(198,145,54,.18);
  background: linear-gradient(
    180deg,
    rgba(250,246,237,0) 0%,
    rgba(255,248,233,.58) 28%,
    rgba(255,248,233,.58) 72%,
    rgba(250,246,237,0) 100%
  );
  box-shadow: inset 0 1px 0 rgba(255,255,255,.42), inset 0 -1px 0 rgba(255,255,255,.28);
}
/* Fades laterales que se funden con el fondo crema del hero */
.st-hero-benefits::before,
.st-hero-benefits::after {
  content: '';
  position: absolute; top: 0; height: 100%; width: 48px; z-index: 2; pointer-events: none;
}
.st-hero-benefits::before { left: 0;  background: linear-gradient(90deg,  rgba(250,246,237,1), rgba(250,246,237,0)); }
.st-hero-benefits::after  { right: 0; background: linear-gradient(270deg, rgba(250,246,237,1), rgba(250,246,237,0)); }

/* Track: dos grupos idénticos para loop continuo */
.st-hero-marquee-track {
  display: flex;
  width: max-content;
  animation: fecaHeroBenefitsMarquee 26s linear infinite;
  will-change: transform;
}
.st-hero-marquee-group {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-right: 12px;
  flex-shrink: 0;
}

/* Chip individual — limpio, sin shimmer animado */
.st-hero-ben-chip {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 34px; padding: 7px 15px;
  border: 1px solid rgba(198,145,54,.42);
  border-radius: var(--pill);
  background: rgba(255,252,244,.82);
  color: var(--brown);
  font-size: 12px; font-weight: 800; letter-spacing: .02em;
  white-space: nowrap;
  box-shadow: 0 3px 10px rgba(92,61,38,.06);
}
.st-hero-ben-chip i {
  color: #b37a25; font-size: 13px; flex-shrink: 0;
}
@keyframes fecaHeroBenefitsMarquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* Desktop: 2×3 grilla centrada — sin marquesina, sin scroll */
@media (min-width: 768px) {
  .st-hero-benefits {
    width: min(760px, calc(100% - 48px));
    margin: 24px auto 0;
    padding: 0;
    overflow: visible;
    border: 0; border-radius: 0;
    background: transparent; box-shadow: none;
  }
  .st-hero-benefits::before,
  .st-hero-benefits::after { display: none; }
  .st-hero-marquee-track {
    animation: none; transform: none;
    width: 100%; display: block;
  }
  .st-hero-marquee-group {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px 12px;
    padding-right: 0; width: 100%;
  }
  .st-hero-marquee-group[aria-hidden="true"] { display: none; }
  .st-hero-ben-chip {
    width: 100%; min-height: 38px;
    justify-content: center;
    padding: 8px 14px; font-size: 12.5px;
    border-radius: var(--pill);
    background: linear-gradient(180deg, rgba(255,255,255,.82), rgba(255,248,233,.72));
    border: 1px solid rgba(198,145,54,.42);
    box-shadow: 0 5px 16px rgba(92,61,38,.07), inset 0 0 0 1px rgba(255,236,185,.26);
  }
  .st-hero-ben-chip i { font-size: 13px; }
  /* Sin botón CTA, padding ajustado */
  .st-hero { padding-bottom: 32px; }
  .st-hero-sub { margin-bottom: 0; }
  /* Centrar inner y beneficios horizontalmente */
  .st-hero-inner { display: flex; flex-direction: column; align-items: center; }
  .st-hero-benefits { margin-left: auto; margin-right: auto; }
}
/* Tablet/desktop chico */
@media (min-width: 768px) and (max-width: 980px) {
  .st-hero-benefits { width: min(680px, calc(100% - 36px)); }
  .st-hero-ben-chip { font-size: 12px; padding-inline: 11px; }
}

/* Mobile: sin fondo propio — chips flotan sobre el hero */
@media (max-width: 767px) {
  .st-hero { padding: 44px 20px 28px; }
  .st-hero-sub { font-size: 14px; margin-bottom: 0; }
  .st-hero-benefits {
    width: 100%; margin-top: 14px; padding: 6px 0;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: hidden;
  }
  .st-hero-benefits::before,
  .st-hero-benefits::after { display: none !important; }
  .st-hero-marquee-track { animation: fecaHeroBenefitsMarquee 22s linear infinite; }
  .st-hero-marquee-group { gap: 9px; padding-right: 9px; }
  .st-hero-ben-chip {
    min-height: 32px; padding: 6px 13px; font-size: 11.5px;
    background: rgba(255,252,244,.76);
    box-shadow: 0 2px 8px rgba(92,61,38,.045);
  }
}

/* Accesibilidad: sin movimiento → scroll manual */
@media (prefers-reduced-motion: reduce) {
  .st-hero-marquee-track { animation: none; }
  .st-hero-benefits { overflow-x: auto; scrollbar-width: none; }
  .st-hero-benefits::-webkit-scrollbar { display: none; }
}

/* ── MAIN ────────────────────────────────────────────────────────── */
.st-main { max-width: 1200px; margin: 0 auto; padding: 36px 20px 80px; }

/* ── SECTION NAV (editorial) ─────────────────────────────────────── */
.st-section-nav {
  position: sticky;
  top: var(--header-h);
  z-index: 90;
  background: var(--bg);
  border-bottom: 1px solid var(--border-soft);
}
/* Contenedor centrado (desktop). En mobile actúa como fila: scroll + menú */
.st-snav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  overflow: hidden;
}
/* Área scrolleable real — contiene ítems + "Ver todo" */
.st-snav-scroll {
  display: flex;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: none; -ms-overflow-style: none;
}
.st-snav-scroll::-webkit-scrollbar { display: none; }
/* Mobile: inner sin padding, scroll ocupa el espacio libre */
@media (max-width: 767px) {
  .st-snav-inner {
    padding: 0;
    justify-content: flex-start;
    max-width: 100%;
    min-height: 48px; /* nav más compacta en mobile */
  }
  .st-snav-scroll { flex: 1; min-width: 0; padding: 0 6px 0 16px; }
  /* Reducir espacio entre hero/beneficios y nav editorial */
  .st-hero { padding-bottom: 10px !important; }
  .st-hero-benefits { margin-top: 10px !important; margin-bottom: 0; }
}
/* Desktop: más alta y con más presencia */
@media (min-width: 768px) {
  .st-section-nav { min-height: 72px; }
  .st-snav-inner  { height: 72px; }
  .st-snav-scroll { padding: 0 24px; justify-content: center; }
  .st-snav-item {
    font-size: 15px; font-weight: 800;
    letter-spacing: .08em;
    padding: 0 12px; height: 72px;
  }
  .st-snav-sep  { font-size: 15px; }
  .st-snav-item--all { gap: 7px; }
  .st-snav-item--all i { font-size: 15px; }
}
.st-snav-item {
  flex-shrink: 0;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-family: var(--font);
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 0 14px; height: 42px;
  white-space: nowrap; cursor: pointer;
  transition: color .15s, border-bottom-color .15s;
}
.st-snav-item:hover { color: var(--brown); border-bottom-color: var(--gold); }
.st-snav-sep {
  color: #9b6f3b;
  font-size: 13px; line-height: 1; font-weight: 700;
  flex-shrink: 0; user-select: none; pointer-events: none;
  display: flex; align-items: center; padding: 0 3px;
  transform: translateY(-1px);
}
.st-snav-item--all {
  color: var(--brown);
  display: inline-flex; align-items: center; gap: 6px;
}
.st-snav-item--all:hover { border-bottom-color: var(--gold-border); }
/* Botón "Menú" en nav editorial */
.st-snav-item--menu {
  color: var(--brown);
  display: inline-flex; align-items: center; gap: 5px;
}
.st-snav-item--menu:hover { color: var(--brown-dark); border-bottom-color: var(--gold-border); }
/* "Ver todo": visible en desktop, oculto en mobile */
.st-snav-ver-todo  { display: inline-flex; }
/* "Menú": oculto en desktop; en mobile está fuera del scroll → siempre visible */
.st-snav-open-menu { display: none; }
@media (max-width: 767px) {
  .st-snav-ver-todo     { display: none; }
  .st-snav-ver-todo-sep { display: none; }
  /* Alinear items del scroll verticalmente */
  .st-snav-scroll .st-snav-item,
  .st-snav-scroll .st-snav-sep {
    display: inline-flex;
    align-items: center;
    line-height: 1;
  }
  /* Botón Menú: misma altura que los items para alineación exacta */
  .st-snav-open-menu {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    align-self: center;
    height: 42px;
    padding: 0 16px;
    border-left: 1px solid var(--border-soft);
    background: var(--bg);
    gap: 5px;
    line-height: 1;
  }
  .st-snav-open-menu i { line-height: 1; }
}

/* ── HOME SECTIONS ───────────────────────────────────────────────── */
.st-home-sections { max-width: 1200px; margin: 0 auto; padding: 40px 20px 0; }
/* scroll-margin-top compensa header (62px) + nav (~52px) para que la sección
   no quede tapada al navegar con scrollToHomeSection(). */
.st-section { margin-bottom: 52px; scroll-margin-top: calc(var(--header-h) + 46px); }
#catalogo    { scroll-margin-top: calc(var(--header-h) + 46px); }
.st-section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 12px; margin-bottom: 18px;
}
.st-section-head-left { display: flex; flex-direction: column; gap: 3px; }
.st-section-title {
  font-family: Georgia, serif;
  font-size: clamp(17px, 2.5vw, 22px);
  font-weight: 400; color: var(--brown); margin: 0;
}
.st-section-sub { font-size: 11px; color: var(--muted); font-weight: 600; letter-spacing: .02em; }
.st-section-more {
  flex-shrink: 0;
  border: 1.5px solid var(--border); color: var(--brown); background: transparent;
  border-radius: var(--pill); font-family: var(--font); font-size: 12px; font-weight: 700;
  padding: 7px 16px;
  display: inline-flex; align-items: center; gap: 6px;
  transition: border-color .15s, background .15s, color .15s; white-space: nowrap;
}
.st-section-more:hover { border-color: var(--gold-border); background: var(--gold-bg); color: var(--gold-dark); }
.st-section-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
}
@media (min-width: 640px) { .st-section-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
@media (min-width: 900px) { .st-section-grid { grid-template-columns: repeat(4, 1fr); gap: 20px; } }
.st-home-end { display: flex; justify-content: center; padding: 8px 0 16px; }
.st-home-end-btn {
  border: 1.5px solid var(--border); color: var(--muted); background: transparent;
  border-radius: var(--pill); font-family: var(--font); font-size: 13px; font-weight: 700;
  padding: 11px 28px;
  display: inline-flex; align-items: center; gap: 8px;
  transition: border-color .15s, color .15s, background .15s;
}
.st-home-end-btn:hover { border-color: var(--gold-border); color: var(--gold-dark); background: var(--gold-bg); }

/* ── CATEGORY PILLS ──────────────────────────────────────────────── */
/* Contenedor scroll de filtros: fade lateral para indicar overflow */
.st-cats-wrap {
  overflow-x: auto;
  overflow-y: visible;
  margin: 0 -20px 24px; padding: 0 20px;
  scrollbar-width: none; -ms-overflow-style: none;
  /* Fade sutil: negro=visible, transparente=fade — solo el borde derecho */
  -webkit-mask-image: linear-gradient(to right, black calc(100% - 40px), transparent 100%);
  mask-image: linear-gradient(to right, black calc(100% - 40px), transparent 100%);
  scroll-behavior: smooth;
}
.st-cats-wrap::-webkit-scrollbar { display: none; }
/* padding-right en el INNER flex — el único que los browsers respetan en ejes scrolleables */
.st-cats { display: flex; gap: 8px; width: max-content; padding-bottom: 2px; padding-right: 32px; }
.st-cat-pill {
  background: var(--surface);
  border: 1.5px solid var(--border);
  color: var(--muted);
  font-size: 13px; font-weight: 700;
  padding: 8px 18px; border-radius: var(--pill);
  white-space: nowrap;
  transition: all .18s var(--ease);
}
.st-cat-pill:hover { border-color: var(--gold-border); background: var(--gold-bg); color: var(--gold-dark); }
.st-cat-pill.active { background: var(--brown); color: var(--cream); border-color: var(--brown); }

/* ── SEARCH ──────────────────────────────────────────────────────── */
.st-search-wrap { margin-bottom: 28px; }
.st-search { position: relative; max-width: 480px; }
.st-search-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--light); font-size: 15px; pointer-events: none;
}
.st-search-input {
  width: 100%; padding: 11px 42px 11px 40px;
  border: 1.5px solid var(--border); border-radius: var(--pill);
  font-family: var(--font); font-size: 14px; font-weight: 500;
  background: var(--surface); color: var(--text);
  transition: border-color .18s, box-shadow .18s;
}
.st-search-input::placeholder { color: var(--light); }
.st-search-input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(200,147,58,.16); }
.st-search-clear {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--light);
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; font-size: 13px;
  transition: background .15s, color .15s;
}
.st-search-clear:hover { background: var(--border-soft); color: var(--text); }

/* ── STATES ──────────────────────────────────────────────────────── */
.st-state-wrap {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 12px; padding: 80px 20px;
  color: var(--muted); font-weight: 600; font-size: 14px; text-align: center;
}
.st-state-icon { font-size: 44px; opacity: .35; }
.st-spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border); border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin .75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Skeleton cards (loading inicial) ───────────────────────────────── */
.st-skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  padding: 0 0 40px;
}
.st-skeleton-card {
  background: var(--surface);
  border-radius: var(--r-sm);
  border: 1px solid var(--border-soft);
  overflow: hidden;
}
.st-skeleton-img {
  width: 100%; aspect-ratio: 1/1;
  background: linear-gradient(90deg, var(--bg-soft) 25%, var(--bg) 50%, var(--bg-soft) 75%);
  background-size: 400% 100%;
  animation: st-shimmer 1.4s ease-in-out infinite;
}
.st-skeleton-body { padding: 10px 12px 14px; display: flex; flex-direction: column; gap: 7px; }
.st-skeleton-line {
  height: 11px; border-radius: 6px;
  background: linear-gradient(90deg, var(--bg-soft) 25%, var(--bg) 50%, var(--bg-soft) 75%);
  background-size: 400% 100%;
  animation: st-shimmer 1.4s ease-in-out infinite;
}
.st-skeleton-line--title  { width: 80%; }
.st-skeleton-line--short  { width: 45%; }
.st-skeleton-line--btn    { height: 34px; width: 100%; border-radius: var(--r-sm); margin-top: 4px; }
@keyframes st-shimmer {
  0%   { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
.st-btn-outline {
  background: var(--surface); border: 1.5px solid var(--border);
  color: var(--text); border-radius: var(--pill);
  padding: 10px 22px; font-size: 13px; font-weight: 700; font-family: var(--font);
  transition: border-color .15s, background .15s, color .15s;
}
.st-btn-outline:hover { border-color: var(--gold-border); background: var(--gold-bg); color: var(--gold-dark); }

/* ── PRODUCT GRID ────────────────────────────────────────────────── */
.st-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (min-width: 640px)  { .st-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
@media (min-width: 900px)  { .st-grid { grid-template-columns: repeat(4, 1fr); gap: 20px; } }
@media (min-width: 1100px) { .st-grid { grid-template-columns: repeat(5, 1fr); } }

/* ── PRODUCT CARD ────────────────────────────────────────────────── */
.st-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .18s;
  display: flex; flex-direction: column;
}
.st-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--border); }
.st-card.out-of-stock { opacity: .72; }

.st-card-photo-wrap {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--bg-soft); overflow: hidden;
}
.st-card-photo {
  position: relative; z-index: 0;
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .55s ease, opacity .20s ease, filter .20s ease;
  will-change: transform, opacity, filter;
}
.st-card:hover .st-card-photo { transform: scale(1.04); }
/* Fundición suave: fade out + blur antes de cambiar src (flechitas) */
.st-card-photo.is-fading-photo { opacity: 0; filter: blur(1.5px); }
@media (hover: none) {
  .st-card.is-in-view .st-card-photo.is-fading-photo { opacity: 0; filter: blur(1.5px); }
}
/* Imagen fantasma que aparece durante swipe interactivo */
.st-card-photo-next {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0; pointer-events: none;
  z-index: 1;
  transform: scale(1.02);
  transition: opacity .18s ease, transform .18s ease;
}
/* Durante el dedo: sin transición (responde en tiempo real) */
.st-card-photo-wrap.is-swiping .st-card-photo,
.st-card-photo-wrap.is-swiping .st-card-photo-next { transition: none; }
/* Al soltar: animación suave de vuelta o confirmación */
.st-card-photo-wrap.snap-photo .st-card-photo,
.st-card-photo-wrap.snap-photo .st-card-photo-next {
  transition: opacity .22s ease, transform .22s ease;
}
.st-card-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem; color: var(--light); background: var(--bg-soft);
}

.st-stock-badge {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  font-size: 10px; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; padding: 4px 10px; border-radius: var(--pill);
  white-space: nowrap; pointer-events: none;
  backdrop-filter: blur(4px);
}
.st-stock-badge.out  { background: var(--danger-soft); color: var(--danger); }
.st-stock-badge.low  { background: var(--warning-soft); color: var(--gold-dark); border: 1px solid var(--gold-border); }
.st-stock-badge.ok   { background: var(--success-soft); color: var(--success); }
/* Última unidad — levemente más destacado, mismo tono FECA sin alarmar */
.st-stock-badge.last {
  background: #FBF3E8;
  color: var(--brown-soft);
  border: 1.5px solid var(--gold-border);
  font-weight: 800;
  letter-spacing: .06em;
}

.st-card-body { padding: 12px 14px 8px; flex: 1; }
.st-card-cat {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--muted); margin-bottom: 4px;
}
.st-card-name {
  font-size: 13px; font-weight: 700; color: var(--text);
  line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  margin-bottom: 6px;
}
.st-card-price { font-size: 16px; font-weight: 800; color: var(--gold-dark); }
.st-card-price-cash {
  font-size: 11px; font-weight: 700;
  color: var(--success); margin-top: 2px;
}
.st-card-install { font-size: 10.5px; color: var(--success); font-weight: 700; margin-top: 1px; }
.st-card-footer { padding: 0 10px 12px; }

/* ── CARD PHOTO NAV (multi-photo cycling) ────────────────────────── */
.st-card-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.85); backdrop-filter: blur(3px);
  border: none; border-radius: 50%;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: var(--brown); cursor: pointer;
  box-shadow: 0 1px 5px rgba(44,36,22,.22);
  opacity: 0; transition: opacity .2s, background .15s;
  z-index: 3;
}
.st-card-nav-prev { left: 6px; }
.st-card-nav-next { right: 6px; }
.st-card-nav:hover { background: #fff; }
.st-card:hover .st-card-nav { opacity: 1; }
/* ── Mobile táctil: foco progresivo basado en distancia al centro ── */
@media (hover: none) {
  /* Flechas: chevron semitransparente, sin globito */
  .st-card-nav {
    background: transparent; backdrop-filter: none; box-shadow: none;
    color: rgba(255,255,255,.9); font-size: 15px;
    opacity: 0; pointer-events: none;
  }
  .st-card-nav i { filter: drop-shadow(0 1px 3px rgba(0,0,0,.45)); }
  /* Dots base */
  .st-card-dot        { background: rgba(255,255,255,.32); }
  .st-card-dot.active { background: rgba(255,255,255,.82); }
  /* Transición rápida para acompañar el scroll */
  .st-card       { transition: transform .14s ease-out, box-shadow .14s ease-out; }
  .st-card-photo { transition: transform .14s ease-out; }

  /* Foco progresivo — 30% más suave */
  .st-card.is-in-view {
    transform: translateY(var(--card-lift, -3px)) scale(calc(1 + var(--card-focus, 0) * .004));
    box-shadow: 0 7px 18px rgba(44,36,22,var(--card-shadow-alpha, .11));
  }
  .st-card.is-in-view .st-card-photo {
    transform: scale(var(--photo-scale, 1.038));
  }
  .st-card.is-in-view .st-card-nav {
    opacity: calc(.28 + var(--card-focus, .5) * .28);
    pointer-events: auto;
  }
  .st-card.is-in-view .st-card-dot        { background: rgba(255,255,255,.55); }
  .st-card.is-in-view .st-card-dot.active { background: rgba(255,255,255,1); }

  /* Swipe o tap explícito: flechas al máximo */
  .st-card.show-controls .st-card-nav { opacity: .9; pointer-events: auto; }
}

/* Dot indicators */
.st-card-dots {
  position: absolute; bottom: 7px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 4px; z-index: 3; pointer-events: none;
}
.st-card-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: rgba(255,255,255,.5);
  transition: background .18s;
}
.st-card-dot.active { background: rgba(255,255,255,.95); }
.st-btn-add-card {
  width: 100%; background: var(--brown); color: var(--cream);
  border: none; border-radius: var(--r-sm);
  padding: 9px 12px; font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: background .15s; min-height: 36px;
}
.st-btn-add-card:hover:not(.disabled) { background: var(--brown-dark); }
.st-btn-add-card.in-cart { background: var(--success); }
.st-btn-add-card.disabled { background: var(--bg-soft); color: var(--light); cursor: default; }

/* ── CARD "AGREGADO" — estado transitorio ────────────────────────── */
.st-card-added {
  width: 100%; min-height: 36px;
  background: var(--success-soft); color: var(--success);
  border: 1.5px solid #b6dfbf;
  border-radius: var(--r-sm);
  font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  cursor: default;
  animation: stAddedPop .32s var(--ease) both;
}
@keyframes stAddedPop {
  0%   { opacity: 0; transform: scale(.88); }
  62%  { opacity: 1; transform: scale(1.04); }
  100% { opacity: 1; transform: scale(1.00); }
}

/* ── CARD QTY CONTROL ────────────────────────────────────────────── */
.st-card-qty-ctrl {
  display: flex; align-items: stretch;
  width: 100%; min-height: 36px;
  border: 1.5px solid var(--gold-border);
  border-radius: var(--r-sm);
  background: var(--cream);
  overflow: hidden;
  animation: stQtyIn .26s var(--ease) both;
}
@keyframes stQtyIn {
  from { opacity: 0; transform: scale(.94); }
  to   { opacity: 1; transform: scale(1.00); }
}
.st-card-qty-btn {
  flex: 0 0 38px;
  background: none; border: none;
  color: var(--brown); font-size: 20px;
  font-weight: 300; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; touch-action: manipulation;
  transition: background .12s;
  padding: 0;
}
.st-card-qty-btn:hover  { background: rgba(200,147,58,.10); }
.st-card-qty-btn:active { background: rgba(200,147,58,.22); }
.st-card-qty-btn:disabled { color: var(--light); cursor: default; }
.st-card-qty-btn:disabled:hover { background: none; }
/* Hint de tope de stock en la card */
.st-card-stock-hint {
  font-size: 11px; font-weight: 600; color: var(--brown-soft);
  text-align: center; margin-top: 4px; opacity: .85;
}
.st-card-qty-val {
  flex: 1; text-align: center;
  font-size: 13px; font-weight: 800; color: var(--brown);
  border-left: 1px solid var(--gold-border);
  border-right: 1px solid var(--gold-border);
  display: flex; align-items: center; justify-content: center;
  user-select: none;
}

/* ── CLOSE BUTTON ────────────────────────────────────────────────── */
.st-close-btn {
  background: none; border: none; color: var(--muted);
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-xs); font-size: 15px;
  transition: background .15s, color .15s; flex-shrink: 0;
}
.st-close-btn:hover { background: var(--bg-soft); color: var(--text); }

/* ── QTY CONTROL ─────────────────────────────────────────────────── */
.st-qty-ctrl {
  display: flex; align-items: center;
  border: 1.5px solid var(--border); border-radius: var(--r-sm); overflow: hidden; flex-shrink: 0;
}
.st-qty-btn {
  background: var(--bg-soft); border: none;
  width: 36px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: var(--text); transition: background .15s;
}
.st-qty-btn:hover { background: var(--gold-bg); color: var(--gold-dark); }
.st-qty-val {
  width: 36px; text-align: center;
  font-size: 15px; font-weight: 800; color: var(--text);
  border-left: 1.5px solid var(--border); border-right: 1.5px solid var(--border);
  height: 40px; display: flex; align-items: center; justify-content: center;
}

/* ── PRODUCT MODAL ───────────────────────────────────────────────── */
.st-prod-dialog { max-width: min(1120px, calc(100vw - 48px)); margin: 12px auto; }
.st-modal-content {
  border: none; border-radius: var(--r-lg);
  overflow: hidden; box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; /* columna: main arriba, relacionados abajo */
}
.st-modal-content .st-close-btn {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  background: rgba(255,255,255,.85); backdrop-filter: blur(4px);
}

/* st-modal-main: contiene las dos columnas (imagen + info) */
.st-modal-main { display: flex; flex-direction: column; }
@media (min-width: 600px) {
  /* stretch: ambas columnas igualan la altura de la más alta.
     El JS (_syncGalleryHeight) iguala gallery al body → foto llena la columna. */
  .st-modal-main { flex-direction: row; align-items: stretch; }
  .st-modal-gallery { width: 340px; position: relative; overflow: hidden; }
  .st-modal-photo-wrap {
    position: absolute; inset: 0;
    aspect-ratio: unset; min-height: 0; max-height: none;
  }
}
@media (min-width: 780px) { .st-modal-gallery { width: 460px; } }

/* Gallery: ancho fijo en tablet */
.st-modal-gallery {
  flex-shrink: 0;
  display: flex; flex-direction: column;
  background: var(--bg-soft);
}

/* Photo-wrap base (mobile usa su propio bloque con !important) */
.st-modal-photo-wrap {
  position: relative; background: var(--bg-soft);
  width: 100%; aspect-ratio: 4/3; overflow: hidden;
}

/* ── DESKTOP ≥960px: modal más ancho, grid proporcional, foto protagonista ── */
@media (min-width: 960px) {
  /* Modal más ancho: aprovechar la pantalla horizontalmente */
  .st-prod-dialog { max-width: min(1280px, calc(100vw - 64px)); }

  /* Flex-row: más predecible que grid para que el JS pueda establecer
     un height DEFINITIVO en la gallery (sin conflicto con align-items:stretch
     del grid que ignora el height explícito). */
  .st-modal-main {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    min-height: 440px;
  }

  /* Gallery: 55 % del modal, height lo establece _syncGalleryHeight() via JS.
     Con height explícito JS el photo-wrap con inset:0 resuelve bottom:0 ✓ */
  .st-modal-gallery {
    flex: 0 0 55%;
    min-width: 0;
    position: relative;
    overflow: hidden;
  }

  /* Photo-wrap: absolute dentro de gallery (position:relative).
     Funciona cuando la gallery tiene height DEFINITIVO (establecido por JS). */
  .st-modal-photo-wrap {
    position: absolute;
    inset: 0;
    aspect-ratio: unset;
    min-height: 0;
    max-height: none;
  }

  /* Body: ocupa el 45 % restante */
  .st-modal-body {
    flex: 1;
    min-width: 0;
    padding-bottom: 0;
  }

}

.st-modal-photo {
  width: 100%; height: 100%;
  object-fit: contain; object-position: center center;
  transition: opacity .18s ease;
}
.st-modal-photo.is-loading { opacity: 0; }
/* Mobile: modal compacto y premium — no pantalla completa */
@media (max-width: 599px) {
  /* Evitar que el contenedor Bootstrap compita con el scroll interno.
     iOS Safari scrollea el elemento MÁS EXTERNO cuando hay nested scroll;
     bloqueando el scroll del #product-modal, el scroll pasa al content. */
  #product-modal { overflow: hidden !important; }

  .st-prod-dialog {
    width: calc(100% - 24px) !important;
    margin: 10px auto !important;
    /* dvh = dynamic viewport height: descuenta el chrome del browser en iOS Safari,
       evita que el max-height se calcule sobre un viewport que no incluye la barra inferior */
    max-height: 94dvh;
    overflow: hidden;
  }
  .st-modal-content {
    max-height: 94dvh;
    overflow-y: auto !important;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    /* padding extra: iOS necesita espacio físico al final para que el scrollHeight
       cuente el contenido del carrusel y permita llegar hasta las cards */
    padding-bottom: max(28px, env(safe-area-inset-bottom, 16px));
    border-radius: var(--r-lg) !important;
  }
  /* Forzar que ningún contenedor intermedio corte el scroll vertical */
  .st-modal-main,
  .st-modal-body {
    overflow: visible !important;
    max-height: none !important;
    height: auto !important;
  }
  /* Close button: circular y del mismo estilo visual que fav/compartir */
  .st-modal-content .st-close-btn {
    z-index: 20 !important;
    top: 10px; right: 10px;
    width: 36px; height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(120,90,60,.18);
    box-shadow: 0 2px 10px rgba(44,36,22,.12);
    color: rgba(91,65,48,.62);
  }
  /* Imagen cuadrada acotada — no gigante */
  .st-modal-photo-wrap {
    aspect-ratio: 1 / 1 !important;
    max-height: 340px !important;
    height: auto !important;
    overflow: hidden;
  }
  .st-modal-photo {
    width: 100%; height: 100%;
    object-fit: cover; object-position: center;
    transform: scale(1.18);
    transform-origin: center center;
  }
}
.st-modal-photo-zoom { cursor: zoom-in; }
.st-modal-photo-ph {
  width: 100%; height: 100%; min-height: 200px;
  display: flex; align-items: center; justify-content: center;
  font-size: 4rem; color: var(--light);
}

/* Thumbnails: permanentemente ocultas — la navegación ahora es con flechas overlay */
.st-modal-thumbs { display: none !important; }

/* ── Flechas de navegación overlay en el modal ───────────────────── */
.st-modal-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.76); backdrop-filter: blur(6px);
  border: 1px solid rgba(120,90,60,.18);
  border-radius: 50%;
  color: var(--brown-soft); font-size: 16px;
  cursor: pointer;
  transition: background .15s, color .15s, transform .12s;
  box-shadow: 0 2px 10px rgba(44,36,22,.12);
}
.st-modal-nav:hover { background: rgba(255,255,255,.96); color: var(--brown); }
.st-modal-nav:active { transform: translateY(-50%) scale(.93); }
.st-modal-nav-prev { left: 14px; }
.st-modal-nav-next { right: 14px; }

/* Dots indicadores overlay — mínimos y elegantes */
.st-modal-nav-dots {
  position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%);
  z-index: 5; display: flex; gap: 5px; pointer-events: none;
}
.st-modal-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255,255,255,.5);
  transition: background .2s, transform .2s;
}
.st-modal-dot.active {
  background: rgba(255,255,255,.96);
  transform: scale(1.3);
}

.st-modal-body { padding: 24px 22px; flex: 1; min-width: 0; overflow-x: hidden; display: flex; flex-direction: column; gap: 10px; }
/* Desktop: sin scroll propio (relacionados ya no están en el body) */
@media (min-width: 600px) {
  .st-modal-body { overflow-y: visible; }
}

@media (min-width: 900px) {
  #product-modal .st-modal-main {
    position: relative;
    background: var(--surface);
  }

  #product-modal .st-modal-gallery,
  #product-modal .st-modal-photo-wrap,
  #product-modal .st-modal-photo {
    border: 0;
    outline: 0;
    box-shadow: none;
  }

  #product-modal .st-modal-gallery {
    border-bottom: 0;
  }

  #product-modal .st-modal-photo-wrap {
    inset: 0;
  }

  #product-modal .st-modal-body {
    position: relative;
    z-index: 1;
    margin-left: 0;
    overflow-x: hidden;
    background: var(--surface);
    border-left: 0;
    outline: 0;
    box-shadow: none;
  }
}

/* ── Relacionados: carrusel full-width bajo las dos columnas ──── */
#product-modal .st-modal-stock-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

#product-modal .st-modal-stock-wrap .st-stock-badge {
  position: static;
  top: auto;
  left: auto;
  display: inline-flex;
  align-items: center;
}

#st-related-section.st-related-section {
  border-top: 0;
  padding: 8px 24px 22px;
  background: var(--surface);
}
.st-related-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.st-related-head { font-size: 13.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--brown-soft); margin: 0; }
.st-related-arrows { display: flex; gap: 6px; }
.st-related-arrow {
  width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--surface); color: var(--brown-soft); font-size: 13px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .14s, color .14s;
}
.st-related-arrow:hover { border-color: var(--gold-border); color: var(--brown); }

/* Carrusel scrolleable, sin scrollbar visible */
.st-related-carousel {
  display: flex; gap: 12px;
  overflow-x: auto; scroll-behavior: smooth;
  scrollbar-width: none; -ms-overflow-style: none;
  padding-bottom: 4px;
}
.st-related-carousel::-webkit-scrollbar { display: none; }

/* Ordenar por mobile en el flujo de columna */
@media (max-width: 599px) {
  #st-related-section.st-related-section { order: 9; padding: 14px 16px 18px; }
}
.st-modal-cat { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.st-modal-name { font-size: 20px; font-weight: 800; color: var(--text); line-height: 1.25; }
.st-modal-price { font-size: 26px; font-weight: 800; color: var(--gold-dark); }
/* Bloque de pago: transferencia + cuotas — mismo look que las cards, adaptado al modal */
.st-modal-pay-info {
  display: flex; flex-direction: column; gap: 2px;
  margin-top: -4px; /* pegado al precio, sin separación extra */
}
.st-modal-pay-transfer {
  font-size: 13px; font-weight: 700; color: var(--success);
}
.st-modal-pay-install {
  font-size: 12px; font-weight: 700; color: var(--success);
}
.st-modal-stock-wrap { display: flex; gap: 8px; }
/* Descripción del producto en el modal */
.st-modal-desc {
  border-top: 1px solid var(--border-soft);
  padding-top: 10px;
  margin-top: 2px;
}
.st-modal-desc-text {
  font-size: 13px; color: var(--muted);
  line-height: 1.65; font-weight: 500; margin: 0;
}
/* En mobile: colapsar a 2 líneas cuando tiene clase is-collapsed */
@media (max-width: 599px) {
  .st-modal-desc-text.is-collapsed {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}
/* Botón toggle "Ver descripción completa / Ver menos" */
.st-desc-toggle {
  display: inline-block;
  background: none; border: none;
  color: var(--brown-soft);
  font-size: 11.5px; font-weight: 700;
  letter-spacing: .02em;
  padding: 5px 0 0;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  transition: color .14s;
}
.st-desc-toggle:hover { color: var(--gold-dark); }
/* En tablet (600-960px): ocultar toggle, descripción completa */
@media (min-width: 600px) {
  .st-desc-toggle { display: none !important; }
}
/* En desktop (≥960px): descripción completa, sin clamp, sin toggle.
   El espacio disponible en el panel derecho se usa para mostrar el texto. */
.st-modal-actions { display: flex; align-items: center; gap: 12px; margin-top: auto; padding-top: 8px; flex-wrap: wrap; }
/* Aviso de tope de stock — aparece inline debajo del carrito */
.st-modal-stock-hint {
  font-size: 12px; font-weight: 600;
  color: var(--brown-soft);
  opacity: .85;
  margin: 0; padding: 0;
  line-height: 1.4;
  width: 100%; /* ocupa fila completa en el flex wrap */
}
/* Desktop ≥960px: material+acciones juntos al fondo — el espacio vacío queda
   entre la descripción y el bloque inferior, no entre material y carrito */
@media (min-width: 960px) {
  .st-modal-actions { margin-top: 0; padding-top: 0; }
}
.st-btn-add-full {
  flex: 1; min-width: 160px;
  background: var(--brown); color: var(--cream); border: none;
  border-radius: var(--r-sm); padding: 12px 20px;
  font-size: 14px; font-weight: 700; font-family: var(--font);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: background .15s;
}
.st-btn-add-full:hover:not(:disabled) { background: var(--brown-dark); }
.st-btn-add-full:disabled { background: var(--bg-soft); color: var(--light); cursor: default; }

/* ── FAVORITOS — corazón en card (sin círculo de fondo) ──────────── */
.st-card-fav-btn {
  position: absolute; top: 10px; right: 10px; z-index: 4;
  width: 36px; height: 36px;           /* área táctil amplia */
  display: flex; align-items: center; justify-content: center;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0;
  box-shadow: none !important;
  backdrop-filter: none;
  color: rgba(91,65,48,.62); font-size: 20px; cursor: pointer;
  transition: color .15s, transform .12s;
}
.st-card-fav-btn i {
  filter: drop-shadow(0 1px 4px rgba(255,252,244,.9));
  line-height: 1;
}
.st-card-fav-btn:hover    { color: #8a6a43; }
/* activo: solo cambia el color del ícono, sin ningún fondo */
.st-card-fav-btn.is-fav   { color: #8a6a43; }
.st-card-fav-btn.is-fav i {
  filter: drop-shadow(0 1px 4px rgba(255,252,244,.9));
  animation: favPop .28s var(--ease) both;
}
@keyframes favPop { 0% { transform: scale(.7); } 60% { transform: scale(1.22); } 100% { transform: scale(1); } }

/* ── FAVORITOS — corazón en modal ────────────────────────────────── */
.st-modal-fav-btn {
  width: 38px; height: 38px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: none; border: 1.5px solid var(--border-soft);
  border-radius: 50%; color: var(--muted); font-size: 16px; cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}
/* hover: acento suave */
.st-modal-fav-btn:hover  { color: rgba(91,65,48,.85); border-color: rgba(198,145,54,.28); }
/* activo: mismo botón claro, corazón marrón/dorado */
.st-modal-fav-btn.is-fav { color: #8a6a43; border-color: rgba(198,145,54,.38); background: rgba(255,252,244,.92); }

/* ── FAVORITOS — panel lateral ───────────────────────────────────── */
.st-favs-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(10,6,2,.45); z-index: 1044;
}
.st-favs-overlay.open { display: block; }
.st-favs-panel {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(400px, 96vw); z-index: 1045;
  background: var(--bg); border-left: 1px solid var(--border-soft);
  box-shadow: -4px 0 28px rgba(10,6,2,.14);
  display: flex; flex-direction: column;
  transform: translateX(105%);
  transition: transform .28s cubic-bezier(.2,.7,.2,1);
}
.st-favs-panel.open { transform: translateX(0); }
.st-favs-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; border-bottom: 1px solid var(--border-soft); flex-shrink: 0;
  background: var(--surface);
}
.st-favs-title { font-size: 15px; font-weight: 800; color: #8a6a43; display: flex; align-items: center; gap: 8px; }
.st-favs-body  { flex: 1; overflow-y: auto; padding: 12px 16px; }
.st-favs-foot  { padding: 14px 16px; border-top: 1px solid var(--border-soft); flex-shrink: 0; background: var(--surface); }
/* Empty state */
.st-favs-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 60px 20px; color: var(--muted); text-align: center; }
.st-favs-empty-icon { font-size: 48px; opacity: .2; display: block; margin-bottom: 4px; }
.st-favs-empty p { font-size: 14px; font-weight: 700; margin: 0; }
.st-favs-empty-sub { font-size: 12px; color: var(--light); }
/* Item */
.st-favs-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--border-soft);
  border-radius: var(--r-sm); padding: 10px; margin-bottom: 8px;
  box-shadow: var(--shadow-sm);
}
.st-favs-item-photo {
  width: 54px; height: 54px; object-fit: cover;
  border-radius: var(--r-xs); flex-shrink: 0; cursor: pointer;
}
.st-favs-nophoto {
  width: 54px; height: 54px; border-radius: var(--r-xs); flex-shrink: 0;
  background: var(--bg-soft); display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; color: var(--light); cursor: pointer;
}
.st-favs-item-info  { flex: 1; min-width: 0; }
.st-favs-item-name  { font-size: 13px; font-weight: 700; color: var(--text); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; }
.st-favs-item-price { font-size: 13px; font-weight: 800; color: var(--gold-dark); margin-top: 3px; cursor: pointer; }
/* Acciones dentro del ítem de favorito */
.st-fav-item-actions { display: flex; align-items: center; gap: 8px; margin-top: 7px; }
.st-fav-cart-btn {
  border: 0; border-radius: var(--pill);
  background: var(--brown); color: var(--cream);
  height: 30px; padding: 0 12px;
  font-family: var(--font); font-size: 11.5px; font-weight: 800;
  display: inline-flex; align-items: center; gap: 5px;
  cursor: pointer; white-space: nowrap;
  transition: background .14s, color .14s, border-color .14s;
  min-width: 0;
}
.st-fav-cart-btn:hover:not(:disabled) { background: var(--brown-dark); }
.st-fav-cart-btn.is-in-cart {
  background: rgba(198,145,54,.13); color: var(--brown);
  border: 1px solid rgba(198,145,54,.38);
}
.st-fav-cart-btn.is-in-cart:hover { background: rgba(198,145,54,.22); }
.st-fav-cart-btn:disabled { opacity: .45; cursor: not-allowed; background: var(--bg-soft); color: var(--muted); }
/* Control de cantidad en panel Mis favoritos */
.st-fav-qty-control {
  display: inline-flex; align-items: center;
  height: 34px; border-radius: var(--pill); overflow: hidden;
  border: 1px solid rgba(198,145,54,.28);
  background: var(--gold-bg);
  box-shadow: 0 4px 10px rgba(44,36,22,.07);
}
.st-fav-qty-control button {
  width: 34px; height: 34px; border: 0; flex-shrink: 0;
  background: rgba(198,145,54,.15); color: var(--brown);
  font-size: 16px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background .12s;
}
.st-fav-qty-control button:hover { background: rgba(198,145,54,.28); }
.st-fav-qty-control button:active { transform: scale(.93); }
.st-fav-qty-control span {
  min-width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--brown); font-weight: 900; font-size: 14px;
  background: var(--gold-bg);
}
.st-favs-item-remove {
  flex-shrink: 0; width: 32px; height: 32px;
  border: none; background: transparent; color: #8a6a43;
  font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: color .14s, transform .12s;
}
.st-favs-item-remove:hover { color: var(--brown); transform: scale(1.12); }
/* Badge contador en drawer */
.st-mmenu-fav-count {
  margin-left: auto; background: var(--danger); color: #fff;
  font-size: 10px; font-weight: 800; min-width: 18px; height: 18px;
  border-radius: var(--pill); display: inline-flex; align-items: center; justify-content: center;
  padding: 0 4px;
}

/* ── Favorito + Compartir: overlay sobre la foto del modal ──────── */
.st-modal-photo-actions {
  position: absolute; top: 14px; right: 14px; z-index: 4;
  display: flex; gap: 8px; align-items: center;
}
/* Estilo compartido para ambos botones */
.st-modal-photo-actions .st-modal-fav-btn,
.st-modal-photo-actions .st-photo-share-btn {
  width: 40px; height: 40px; min-width: 40px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.82); backdrop-filter: blur(6px);
  border: 1px solid rgba(120,90,60,.18);
  box-shadow: 0 2px 10px rgba(44,36,22,.12);
  font-size: 16px; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
/* Colores base: favorito */
.st-modal-photo-actions .st-modal-fav-btn { color: rgba(91,65,48,.62); }
.st-modal-photo-actions .st-modal-fav-btn:hover { background: rgba(255,252,244,.96); color: #8a6a43; }
.st-modal-photo-actions .st-modal-fav-btn.is-fav { color: #8a6a43; border-color: rgba(198,145,54,.38); background: rgba(255,252,244,.92); }
/* Colores base: compartir */
.st-modal-photo-actions .st-photo-share-btn { color: rgba(91,65,48,.62); font-size: 14px; }
.st-modal-photo-actions .st-photo-share-btn:hover { background: rgba(255,252,244,.96); color: var(--brown-soft); }
/* Mobile: botones más chicos y desplazados a la izquierda de la X.
   X ocupa right: 10px..46px → fav/compartir empiezan en right: 56px */
@media (max-width: 599px) {
  .st-modal-photo-actions .st-modal-fav-btn,
  .st-modal-photo-actions .st-photo-share-btn { width: 36px; height: 36px; min-width: 36px; font-size: 14px; }
  .st-modal-photo-actions { top: 10px; right: 56px; }
}

/* Bloque share del panel derecho — vacío, mantener compatibilidad */
.st-modal-share { display: none; }
.st-share-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: none;
  border: 1.5px solid var(--border-soft);
  border-radius: var(--pill);
  color: var(--muted);
  font-size: 11.5px; font-weight: 700;
  letter-spacing: .02em;
  padding: 6px 16px;
  transition: border-color .15s, color .15s, background .15s;
  white-space: nowrap;
}
.st-share-btn:hover {
  border-color: var(--gold-border);
  color: var(--brown);
  background: var(--gold-bg);
}
.st-share-btn:disabled { opacity: .7; cursor: default; }
.st-share-btn .bi { font-size: 13px; }

/* ── CART OFFCANVAS ──────────────────────────────────────────────── */
.st-cart-canvas { width: min(400px, 96vw) !important; background: var(--bg); border-left: 1px solid var(--border-soft); }
.st-cart-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; border-bottom: 1px solid var(--border-soft); background: var(--surface); flex-shrink: 0;
}
.st-cart-title { font-size: 15px; font-weight: 800; color: var(--text); display: flex; align-items: center; gap: 8px; }
.st-cart-body { flex: 1; overflow-y: auto; padding: 16px; }
.st-cart-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; padding: 60px 20px; color: var(--muted); text-align: center;
}
.st-cart-empty-icon { font-size: 48px; opacity: .25; display: block; margin-bottom: 4px; }
.st-cart-empty p { font-size: 14px; font-weight: 700; margin: 0; }
.st-cart-empty-sub { font-size: 12px; color: var(--light); }
.st-cart-item {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--r-sm);
  padding: 12px; margin-bottom: 10px; box-shadow: var(--shadow-sm);
}
.st-ci-photo { width: 56px; height: 56px; object-fit: cover; border-radius: var(--r-xs); flex-shrink: 0; }
.st-ci-photo-placeholder {
  width: 56px; height: 56px; border-radius: var(--r-xs);
  background: var(--bg-soft); display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; color: var(--light); flex-shrink: 0;
}
.st-ci-info { flex: 1; min-width: 0; }
.st-ci-name { font-size: 12px; font-weight: 700; color: var(--text); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 3px; }
.st-ci-price { font-size: 11px; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.st-ci-controls { display: flex; align-items: center; }
.st-qty-btn-sm {
  background: var(--bg-soft); border: 1px solid var(--border);
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center; font-size: 14px; color: var(--text);
  transition: background .12s; border-radius: 0;
}
.st-qty-btn-sm:first-child { border-radius: var(--r-xs) 0 0 var(--r-xs); }
.st-qty-btn-sm:last-child  { border-radius: 0 var(--r-xs) var(--r-xs) 0; }
.st-qty-btn-sm:hover { background: var(--gold-bg); color: var(--gold-dark); }
.st-qty-btn-sm:disabled { background: var(--bg-soft); color: var(--light); cursor: default; }
.st-qty-btn-sm:disabled:hover { background: var(--bg-soft); color: var(--light); }
/* Hint de tope de stock en el carrito */
.st-ci-stock-hint {
  font-size: 11px; font-weight: 600; color: var(--brown-soft);
  opacity: .85; margin-top: 3px;
}
.st-ci-qty {
  width: 28px; text-align: center; font-size: 13px; font-weight: 800;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  height: 26px; display: flex; align-items: center; justify-content: center; background: var(--surface);
}
.st-ci-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.st-ci-subtotal { font-size: 13px; font-weight: 800; color: var(--brown); }
.st-ci-remove { background: none; border: none; color: var(--light); font-size: 13px; padding: 3px; display: flex; transition: color .12s; }
.st-ci-remove:hover { color: var(--danger); }
.st-cart-foot { padding: 16px 20px; border-top: 1px solid var(--border-soft); background: var(--surface); flex-shrink: 0; }
.st-cart-total-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.st-cart-total-label { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.st-cart-total-val { font-size: 22px; font-weight: 800; color: var(--brown); }
.st-btn-checkout {
  width: 100%; background: #25D366; color: #fff; border: none;
  border-radius: var(--r-sm); padding: 14px; font-size: 14px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--font);
  transition: background .15s, transform .12s; box-shadow: 0 2px 8px rgba(37,211,102,.3); margin-bottom: 8px;
}
.st-btn-checkout:hover { background: #20b858; transform: translateY(-1px); }
.st-btn-clear {
  width: 100%; background: none; border: 1.5px solid var(--border); color: var(--muted);
  border-radius: var(--r-sm); padding: 9px; font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; gap: 6px; font-family: var(--font);
  transition: border-color .15s, color .15s, background .15s;
}
.st-btn-clear:hover { border-color: var(--danger); color: var(--danger); background: var(--danger-soft); }

/* ── CHECKOUT MODAL ──────────────────────────────────────────────── */
.st-co-content { border: none; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-lg); }
.st-co-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 20px 24px 14px; border-bottom: 1px solid var(--border-soft);
}
.st-co-head-left { display: flex; flex-direction: column; gap: 7px; }
.st-co-title { font-size: 16px; font-weight: 800; color: var(--text); letter-spacing: -.01em; }

/* ── STEP INDICATOR ──────────────────────────────────────────────── */
.st-co-stepper { display: flex; align-items: center; gap: 5px; }
.st-co-step-pip {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--border); color: var(--muted);
  font-size: 10px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .2s, color .2s; flex-shrink: 0;
}
.st-co-step-pip.active { background: var(--brown); color: var(--cream); }
.st-co-step-pip-lbl {
  font-size: 11px; font-weight: 600;
  color: var(--light); letter-spacing: .02em;
  transition: color .2s;
}
.st-co-step-pip-lbl.active { color: var(--brown); font-weight: 700; }
.st-co-step-arr { color: var(--border); font-size: 14px; line-height: 1; }

.st-co-body { padding: 20px 24px; max-height: 60vh; overflow-y: auto; }
.st-co-summary {
  background: var(--gold-bg); border: 1px solid var(--gold-border);
  border-radius: var(--r-sm); padding: 14px 16px; margin-bottom: 20px;
}
.st-co-item { display: flex; align-items: baseline; gap: 8px; font-size: 13px; font-weight: 500; color: var(--text); padding: 3px 0; }
.st-co-num { font-weight: 800; color: var(--gold-dark); flex-shrink: 0; width: 18px; }
.st-co-name { flex: 1; }
.st-co-qty { color: var(--muted); font-size: 12px; font-weight: 700; flex-shrink: 0; }
.st-co-sub { font-weight: 700; color: var(--brown); flex-shrink: 0; }
.st-co-total {
  display: flex; justify-content: space-between;
  font-size: 14px; font-weight: 800; color: var(--brown);
  border-top: 1px solid var(--gold-border); margin-top: 8px; padding-top: 8px;
}
.st-co-form { display: flex; flex-direction: column; gap: 18px; }
.st-field { display: flex; flex-direction: column; gap: 5px; }
.st-label { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .02em; }
.st-input {
  padding: 10px 14px; border: 1.5px solid var(--border); border-radius: var(--r-sm);
  font-family: var(--font); font-size: 14px; font-weight: 500;
  background: var(--surface); color: var(--text);
  transition: border-color .18s, box-shadow .18s; resize: none;
}
.st-input::placeholder { color: var(--light); }
.st-input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(200,147,58,.16); }
.st-radios { display: flex; gap: 20px; }
.st-radio { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--text); cursor: pointer; }
.st-radio input { accent-color: var(--gold); width: 16px; height: 16px; cursor: pointer; }
.st-co-foot { padding: 16px 24px 22px; border-top: 1px solid var(--border-soft); }

/* ── FOOT STEP SECTIONS ──────────────────────────────────────────── */
.st-co-foot-section { display: flex; flex-direction: column; gap: 10px; }
.st-co-foot-section .st-co-disclaimer { margin-top: 0; }
.st-co-foot-section .st-co-divider { margin: 0; }

/* ── CHECKOUT CONTINUE BUTTON ────────────────────────────────────── */
.st-btn-continue {
  width: 100%; background: var(--brown); color: var(--cream); border: none;
  border-radius: var(--r-sm); padding: 15px 20px;
  font-size: 15px; font-weight: 800; font-family: var(--font);
  display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: background .15s, transform .12s; box-shadow: var(--shadow);
  letter-spacing: .01em;
}
.st-btn-continue:hover { background: var(--brown-dark); transform: translateY(-1px); }
.st-btn-continue .bi { font-size: 15px; }

/* ── CHECKOUT BACK STEP BUTTON ───────────────────────────────────── */
.st-btn-back-step {
  width: 100%; background: none; color: var(--muted); border: none;
  font-family: var(--font); font-size: 13px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 6px; transition: color .15s; border-radius: var(--r-xs);
}
.st-btn-back-step:hover { color: var(--brown); }

.st-btn-wa {
  width: 100%; background: #25D366; color: #fff; border: none;
  border-radius: var(--r-sm); padding: 15px; font-size: 15px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; gap: 10px; font-family: var(--font);
  transition: background .15s, transform .12s; box-shadow: 0 2px 8px rgba(37,211,102,.3); letter-spacing: .01em;
}
.st-btn-wa:hover { background: #20b858; transform: translateY(-1px); }
.st-co-disclaimer { font-size: 11px; color: var(--light); text-align: center; line-height: 1.5; margin-top: 10px; margin-bottom: 0; }

/* ── FOOTER ──────────────────────────────────────────────────────── */
.st-footer {
  background: linear-gradient(160deg, var(--brown-dark) 0%, var(--brown) 100%);
  color: var(--cream); padding: 48px 20px 24px;
}
.st-footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr; gap: 32px; margin-bottom: 32px;
}
@media (min-width: 640px)  { .st-footer-inner { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px)  { .st-footer-inner { grid-template-columns: 1fr 1fr 1fr; } }
@media (min-width: 1100px) { .st-footer-inner { grid-template-columns: 1fr 1fr 1fr 1fr; } }

.st-footer-col { display: flex; flex-direction: column; gap: 14px; }
.st-footer-col-title {
  font-size: 10px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .1em; color: rgba(245,236,215,.55); margin: 0;
}
.st-footer-links { display: flex; flex-direction: column; gap: 12px; }
.st-footer-info { font-size: 12px; color: rgba(245,236,215,.55); line-height: 1.6; margin: 0; }
.st-footer-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 9px;
}
.st-footer-list li {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: rgba(245,236,215,.8); font-weight: 600; line-height: 1.4;
}
.st-footer-list .bi { font-size: 14px; color: var(--gold); flex-shrink: 0; }
.st-footer-list strong { color: var(--cream); }

.st-footer-brand { display: flex; align-items: center; gap: 14px; }
.st-footer-logo { width: 48px; height: 48px; border-radius: var(--r-sm); object-fit: contain; background: var(--cream); flex-shrink: 0; }
.st-footer-name { font-family: Georgia, serif; font-size: 17px; font-weight: 700; color: var(--cream); letter-spacing: .04em; }
.st-footer-tagline { font-size: 11px; color: rgba(245,236,215,.55); margin-top: 3px; }
.st-footer-wa-link { display: flex; align-items: center; gap: 12px; color: var(--cream); transition: opacity .15s; }
.st-footer-wa-link:hover { opacity: .8; color: var(--cream); }
.st-footer-wa-link .bi { font-size: 20px; color: #6ee49a; flex-shrink: 0; }
.st-footer-wa-label { font-size: 10px; color: rgba(245,236,215,.55); text-transform: uppercase; letter-spacing: .07em; font-weight: 700; }
.st-footer-wa-num { font-size: 14px; font-weight: 700; }
.st-footer-copy { max-width: 1200px; margin: 0 auto; font-size: 11px; color: rgba(245,236,215,.35); border-top: 1px solid rgba(245,236,215,.1); padding-top: 20px; text-align: center; }

/* ── MERCADO PAGO BUTTON ─────────────────────────────────────────── */
.st-btn-mp {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  width: 100%; padding: 14px 20px;
  background: #009ee3; color: #fff;
  border: none; border-radius: var(--r-sm);
  font-family: var(--font); font-size: 15px; font-weight: 700;
  cursor: pointer; transition: background .15s, opacity .15s;
}
.st-btn-mp:hover:not(:disabled) { background: #007bbf; }
.st-btn-mp:disabled { opacity: .65; cursor: not-allowed; }
.st-btn-mp .bi { font-size: 17px; }

/* ── CHECKOUT DIVIDER ────────────────────────────────────────────── */
.st-co-divider {
  display: flex; align-items: center; gap: 10px;
  color: var(--muted); font-size: 12px; font-weight: 600;
  margin: 2px 0;
}
.st-co-divider::before,
.st-co-divider::after {
  content: ''; flex: 1;
  height: 1px; background: var(--gold-border);
}

/* ── MP LOADING SPINNER (inline) ─────────────────────────────────── */
.st-spinner-sm {
  display: inline-block;
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  vertical-align: middle;
}

/* ── PAYMENT RESULT BANNER ───────────────────────────────────────── */
.st-payment-banner {
  position: fixed; top: 70px; left: 50%; transform: translateX(-50%);
  z-index: 1090;
  display: flex; align-items: center; gap: 12px;
  max-width: 520px; width: calc(100% - 32px);
  padding: 14px 18px;
  border-radius: var(--r-sm);
  font-size: 14px; font-weight: 600;
  box-shadow: 0 4px 20px rgba(0,0,0,.15);
  animation: slideDown .3s ease;
}
.st-payment-banner .bi { font-size: 20px; flex-shrink: 0; }
.st-payment-banner span { flex: 1; }
.st-payment-close {
  background: none; border: none; cursor: pointer;
  opacity: .6; transition: opacity .15s; padding: 0; line-height: 1;
  flex-shrink: 0;
}
.st-payment-close:hover { opacity: 1; }
.st-payment-banner.success { background: var(--success-soft); color: var(--success); border: 1px solid #b6dfbf; }
.st-payment-banner.pending { background: #fff8e6; color: #8a6200; border: 1px solid #f0d07a; }
.st-payment-banner.failure { background: var(--danger-soft); color: var(--danger); border: 1px solid #f1c0bb; }

@keyframes slideDown {
  from { opacity: 0; transform: translateX(-50%) translateY(-12px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ── CART HINTS ──────────────────────────────────────────────────── */
.st-cart-hints {
  display: flex; flex-direction: column; gap: 6px;
  margin: 8px 0 4px;
}
.st-hint-row {
  display: flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 600; color: var(--muted);
  padding: 6px 10px;
  background: var(--gold-bg);
  border: 1px solid var(--gold-border);
  border-radius: var(--r-sm);
}
.st-hint-row.good { color: var(--success); background: var(--success-soft); border-color: #b6dfbf; }
.st-hint-row .bi  { font-size: 14px; flex-shrink: 0; }

/* ── CHECKOUT PRICING TABLE ──────────────────────────────────────── */
.st-co-pricing {
  background: var(--gold-bg);
  border: 1px solid var(--gold-border);
  border-radius: var(--r-sm);
  overflow: hidden;
  margin-bottom: 14px;
}
.st-pr-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 14px;
  font-size: 13px; color: var(--text);
  border-bottom: 1px solid var(--gold-border);
}
.st-pr-row:last-child { border-bottom: none; }
.st-pr-row em { font-style: normal; font-size: 11px; color: var(--muted); margin-left: 4px; }
.st-pr-row .bi { font-size: 13px; color: var(--muted); }
.st-pr-discount { color: var(--muted); font-size: 12px; }
.st-pr-minus    { color: var(--success); font-weight: 700; }
.st-pr-cash     { font-weight: 700; background: rgba(200,147,58,.08); }
.st-pr-shipping { font-size: 12px; color: var(--muted); }
.st-pr-free     { color: var(--success); font-weight: 700; }

/* ── CHECKOUT RECAP (products + pricing, bottom of foot) ─────────── */
.st-co-recap { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.st-recap-products {
  background: var(--gold-bg);
  border: 1px solid var(--gold-border);
  border-radius: var(--r-sm); overflow: hidden;
}
.st-recap-toggle {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; gap: 8px;
  font-size: 13px; font-weight: 700; color: var(--brown);
  cursor: pointer; list-style: none; user-select: none;
}
.st-recap-toggle::-webkit-details-marker { display: none; }
.st-recap-toggle .bi-bag { color: var(--gold); margin-right: 2px; }
.st-recap-chevron { color: var(--muted); font-size: 12px; transition: transform .2s; flex-shrink: 0; }
details[open] .st-recap-chevron { transform: rotate(180deg); }
.st-recap-items { padding: 2px 14px 12px; display: flex; flex-direction: column; gap: 4px; }

/* ── CHECKOUT FORM — SECTIONS & GRID ────────────────────────────── */
.st-form-section-title {
  font-size: 11px; font-weight: 800; letter-spacing: .07em;
  text-transform: uppercase; color: var(--muted);
  border-bottom: 1px solid var(--gold-border);
  padding-bottom: 6px; margin: 8px 0 -4px;
}
.st-form-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.st-form-row--street {
  grid-template-columns: 3fr 1fr;
}
.st-form-row > .st-field { min-width: 0; }
.st-optional {
  font-weight: 400; color: var(--light); font-size: 11px;
}
.st-field--half {
  max-width: calc(50% - 6px);
}
@media (max-width: 400px) {
  .st-form-row, .st-form-row--street { grid-template-columns: 1fr; }
  .st-field--half { max-width: 100%; }
}
.st-select { appearance: auto; cursor: pointer; }
.st-billing-fields {
  display: flex; flex-direction: column; gap: 14px;
  padding: 14px 16px;
  background: var(--gold-bg);
  border: 1px solid var(--gold-border);
  border-radius: var(--r-sm);
}

/* ── TOAST ────────────────────────────────────────────────────────── */
.st-toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(8px);
  background: var(--brown-dark); color: var(--cream);
  padding: 12px 22px; border-radius: var(--pill);
  font-size: 13px; font-weight: 700; z-index: 9999;
  opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .25s;
  white-space: nowrap; box-shadow: var(--shadow-lg);
}
.st-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── PHOTO ZOOM LIGHTBOX ─────────────────────────────────────────── */
.st-zoom-overlay {
  position: fixed; inset: 0;
  background: rgba(18, 12, 6, .93);
  z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity .22s var(--ease);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  outline: none;
}
.st-zoom-overlay.open { opacity: 1; pointer-events: auto; }
.st-zoom-inner {
  position: relative;
  max-width: min(92vw, 1100px);
  max-height: calc(100vh - 80px);
  display: flex; align-items: center; justify-content: center;
}
.st-zoom-img {
  max-width: 100%;
  max-height: calc(100vh - 80px);
  object-fit: contain;
  border-radius: var(--r-sm);
  box-shadow: 0 20px 80px rgba(0,0,0,.55);
  display: block;
  user-select: none;
}
/* El overlay es position:fixed inset:0 — los hijos con position:absolute
   se posicionan relativo a él, que equivale a la pantalla completa.
   Evitamos position:fixed en hijos porque backdrop-filter en el padre
   crea un containing block que rompe fixed de forma inconsistente. */
.st-zoom-close {
  position: absolute; top: 14px; right: 14px;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.28);
  color: #fff; border-radius: 50%;
  width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; cursor: pointer;
  transition: background .15s, transform .12s;
  z-index: 3;
}
.st-zoom-close:hover { background: rgba(255,255,255,.32); transform: scale(1.08); }
.st-zoom-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.18);
  border: 1.5px solid rgba(255,255,255,.3);
  color: #fff; border-radius: 50%;
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; cursor: pointer;
  transition: background .15s, transform .12s;
  z-index: 3;
  box-shadow: 0 2px 12px rgba(0,0,0,.4);
}
.st-zoom-nav:hover { background: rgba(255,255,255,.32); transform: translateY(-50%) scale(1.08); }
.st-zoom-prev { left: 16px; }
.st-zoom-next { right: 16px; }
.st-zoom-counter {
  position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,.65); font-size: 13px; font-weight: 700;
  pointer-events: none; letter-spacing: .06em;
  background: rgba(0,0,0,.3); padding: 4px 12px; border-radius: var(--pill);
}
@media (max-width: 480px) {
  .st-zoom-nav { width: 44px; height: 44px; font-size: 17px; }
  .st-zoom-prev { left: 8px; }
  .st-zoom-next { right: 8px; }
  .st-zoom-close { width: 42px; height: 42px; font-size: 15px; top: 10px; right: 10px; }
}

/* ── MOBILE ───────────────────────────────────────────────────────── */
@media (max-width: 400px) {
  .st-hero { padding: 40px 16px 36px; }
  .st-main { padding: 24px 14px 60px; }
  .st-card-price { font-size: 14px; }
  .st-btn-add-card { font-size: 11px; padding: 8px; }
  .st-toast { left: 12px; right: 12px; transform: translateY(8px); white-space: normal; text-align: center; }
  .st-toast.show { transform: translateY(0); }
  .st-co-body { padding: 16px 18px; }
  .st-co-head, .st-co-foot { padding-left: 18px; padding-right: 18px; }
}

/* ── Material section in product modal ───────────────────────────────────────── */
.st-modal-material { margin-top: 2px; }
/* Desktop: material sube al fondo del body junto al carrito */
@media (min-width: 960px) { .st-modal-material { margin-top: auto; } }

/* Mini-card compacta horizontal */
.st-material-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  background: var(--gold-bg);
  border: 1px solid var(--gold-border);
  border-radius: 12px;
  transition: border-color .18s;
}
.st-material-card:hover { border-color: var(--gold); }

/* Eyebrow + nombre del material (columna, lado izquierdo) */
.st-material-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.st-material-label {
  font-size: 9px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .1em;
  line-height: 1;
}
.st-material-value {
  font-size: 12px;
  font-weight: 800;
  color: var(--brown);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Botón compacto (lado derecho), claramente tocable */
.st-material-care {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255,255,255,.75);
  border: 1.5px solid var(--gold-border);
  border-radius: 8px;
  padding: 5px 10px;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 700;
  color: var(--brown-soft);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .15s, color .15s, background .15s, transform .12s;
  min-height: 30px;
}
.st-material-care:hover {
  border-color: var(--gold);
  color: var(--brown);
  background: rgba(255,255,255,.96);
}
.st-material-care:active { transform: scale(.97); }
.st-material-care-arrow {
  font-size: 12px;
  color: var(--gold-dark);
  transition: transform .14s;
  display: inline-block;
}
.st-material-care:hover .st-material-care-arrow { transform: translateX(2px); }

/* ── Multi-material layout ──────────────────────────────────────────────────── */
/* Variante vertical: label arriba, pills abajo */
.st-material-card--multi {
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.st-material-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
/* Cada pill individual de material */
.st-material-pill {
  display: inline-flex; align-items: center; gap: 4px;
  border: 1px solid rgba(198,145,54,.38);
  background: rgba(255,252,244,.82);
  color: var(--brown);
  border-radius: var(--pill);
  padding: 6px 12px;
  font-family: var(--font);
  font-size: 12px; font-weight: 700;
  cursor: pointer;
  transition: border-color .14s, background .14s;
  min-height: 32px;
}
.st-material-pill::after { content: '›'; font-size: 13px; opacity: .6; margin-left: 2px; }
.st-material-pill:hover { border-color: rgba(198,145,54,.7); background: rgba(255,248,233,.96); }
.st-material-pill:active { transform: scale(.97); }

/* ── Material info modal ─────────────────────────────────────────────────────── */
/*
 * z-index stack:
 *   Bootstrap product modal  → 1055
 *   Bootstrap backdrop       → 1050
 *   Payment banner           → 1090
 *   Material modal overlay   → 1500  ← safely above all
 *   Photo zoom               → 2000
 */
.st-mat-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,6,2,.6);
  z-index: 1500;
  display: flex;
  align-items: center;       /* centrado siempre — no más bottom sheet */
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.st-mat-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* Panel centrado — misma forma en mobile y desktop */
.st-mat-panel {
  background: var(--surface, #fff);
  width: min(440px, calc(100vw - 32px));
  border-radius: 22px;
  padding: 24px 22px 28px;
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  position: relative;
  transform: scale(.95) translateY(10px);
  transition: transform .25s ease;
  box-shadow: 0 8px 40px rgba(10,6,2,.22), 0 2px 8px rgba(10,6,2,.12);
}
.st-mat-overlay.open .st-mat-panel {
  transform: scale(1) translateY(0);
}

/* Desktop: más padding */
@media (min-width: 600px) {
  .st-mat-overlay { padding: 24px; }
  .st-mat-panel {
    padding: 32px 32px 36px;
    max-height: min(80vh, calc(100dvh - 80px));
  }
}

.st-mat-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: var(--border-soft, #ede8e0);
  color: var(--muted, #888);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
  flex-shrink: 0;
}
.st-mat-close:hover { background: var(--border, #d5cec4); color: var(--text); }
.st-mat-eyebrow {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted, #999);
  margin: 0 0 6px;
}
.st-mat-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  margin: 0 40px 16px 0;
  line-height: 1.15;
}
.mat-modal-desc {
  font-size: 13.5px;
  color: var(--text-secondary, #555);
  line-height: 1.7;
  margin: 0 0 20px;
}
.mat-modal-section {
  margin-top: 18px;
}
.mat-modal-section-title {
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted, #999);
  margin: 0 0 10px;
}
.mat-modal-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.mat-modal-list li {
  font-size: 13.5px;
  color: var(--text);
  line-height: 1.55;
  margin-bottom: 7px;
  padding-left: 20px;
  position: relative;
}
.mat-modal-list li::before {
  content: '·';
  position: absolute;
  left: 6px;
  color: var(--brown, #7a5230);
  font-weight: 900;
  font-size: 16px;
  line-height: 1.2;
}
.st-mat-footer {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border-soft, #ede8e0);
}
.st-mat-btn-close {
  display: block;
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: none;
  background: var(--brown, #7a5230);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  transition: background .15s;
}
.st-mat-btn-close:hover { background: var(--brown-dark, #5c3d2e); }

/* ── MOBILE: product modal compact ──────────────────────────────────────────── */
@media (max-width: 599px) {
  /* Contenedor con altura fija y centrado: todas las fotos quedan prolijas */
  .st-modal-photo-wrap {
    aspect-ratio: unset;
    height: clamp(220px, 34vh, 320px);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-soft);
  }
  /* Imagen contained: sin recortes, centrada, fondo crema donde no llega */
  .st-modal-photo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
  }

  /* Tighter thumbnails */
  .st-modal-thumbs { padding: 4px 10px; gap: 3px; }
  .st-thumb        { width: 38px; height: 38px; }

  /* Compact body */
  .st-modal-body  { padding: 10px 16px; gap: 5px; }
  .st-modal-name  { font-size: 17px; }
  .st-modal-price { font-size: 21px; }

  /* Orden explícito: cantidad+agregar aparece antes que desc y material */
  .st-modal-cat        { order: 1; }
  .st-modal-name       { order: 2; }
  .st-modal-price      { order: 3; }
  .st-modal-stock-wrap { order: 4; }
  .st-modal-actions    { order: 5; margin-top: 0; }
  .st-modal-share      { order: 6; }
  .st-modal-desc       { order: 7; padding-top: 6px; }
  .st-modal-material   { order: 8; border-top: none; padding-top: 0; margin-top: 0; }

  /* Material multi-pill: más compacto en mobile.
     Con 3 pills ("Madera de bamboo", "Vidrio", "Cerámica") ocupa demasiado alto. */
  .st-material-card--multi { gap: 5px; }
  .st-material-pills        { gap: 4px; }
  .st-material-pill {
    font-size: 11px;
    padding: 4px 9px;
    min-height: 26px;
  }
  /* Descripción expandida: sin scroll propio, sin overflow interno.
     iOS Safari: display: block fuerza salida del -webkit-box para que
     la descripción crezca normalmente dentro del scroll general del modal. */
  .st-modal-desc { overflow: visible; }
  .st-modal-body { overflow: visible; }
  .st-modal-desc-text:not(.is-collapsed) {
    display: block;
    overflow: visible;
    max-height: none;
    -webkit-line-clamp: unset;
    -webkit-box-orient: initial;
  }

  /* Related section: padding-bottom generoso para que iOS cuente el contenido
     del carrusel en el scrollHeight y permita scrollear hasta las cards */
  #st-related-section.st-related-section {
    padding: 10px 14px 20px;
    overflow: visible !important;
    max-height: none !important;
    display: block;
  }
  /* Carrusel: overflow-x para scroll horizontal de cards,
     overflow-y visible para que no corte la altura del contenedor padre */
  .st-related-carousel {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* ── MOBILE HAMBURGER MENU ───────────────────────────────────────────────────── */
/*
 * z-index stack:
 *   Header                  → 1000
 *   Bootstrap offcanvas     → 1045
 *   Bootstrap modal         → 1055
 *   Mobile menu overlay     → 1060  ← sobre offcanvas, bajo modal
 *   Mobile menu panel       → 1065
 *   Material modal          → 1500
 *   Photo zoom              → 2000
 */

/* Overlay: oculto en desktop, gestionado por JS en mobile */
.st-mmenu-overlay { display: none; }
.st-mmenu         { display: none; }

@media (max-width: 767px) {
  /* Backdrop oscuro */
  .st-mmenu-overlay {
    display: block;
    position: fixed; inset: 0;
    background: rgba(10,6,2,.5);
    z-index: 1060;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
  }
  .st-mmenu-overlay.open { opacity: 1; pointer-events: auto; }

  /* Drawer lateral desde la derecha */
  .st-mmenu {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: min(300px, 85vw);
    z-index: 1065;
    background: var(--bg);
    border-left: 1px solid var(--border-soft);
    box-shadow: -4px 0 32px rgba(10,6,2,.18);
    transform: translateX(105%);
    transition: transform .28s cubic-bezier(.2,.7,.2,1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .st-mmenu.open { transform: translateX(0); }

  /* Header del menú */
  .st-mmenu-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    background: var(--brown);
    flex-shrink: 0;
  }
  .st-mmenu-brand {
    font-family: Georgia, serif;
    font-size: 14px; font-weight: 700;
    color: var(--cream);
    letter-spacing: .06em;
  }
  .st-mmenu-close {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(245,236,215,.15);
    border: 1.5px solid rgba(245,236,215,.3);
    border-radius: var(--r-sm);
    color: var(--cream);
    font-size: 14px;
    cursor: pointer;
    transition: background .15s;
    flex-shrink: 0;
  }
  .st-mmenu-close:hover { background: rgba(245,236,215,.28); }

  /* Cuerpo del menú */
  .st-mmenu-body {
    flex: 1;
    padding: 8px 0;
    display: flex;
    flex-direction: column;
  }

  /* Ítem de menú */
  .st-mmenu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 13px 20px;
    background: none;
    border: none;
    font-family: var(--font);
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    cursor: pointer;
    text-align: left;
    transition: background .12s, color .12s;
    -webkit-tap-highlight-color: transparent;
  }
  .st-mmenu-item:hover,
  .st-mmenu-item:active { background: var(--bg-soft); color: var(--brown); }
  .st-mmenu-item .bi { font-size: 16px; color: var(--muted); flex-shrink: 0; }
  .st-mmenu-item:hover .bi { color: var(--gold); }

  /* Sub-ítem (categorías) */
  .st-mmenu-item--sub {
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    padding: 10px 20px 10px 28px;
  }
  .st-mmenu-item--sub .bi { font-size: 12px; }

  /* Badge del carrito dentro del menú */
  .st-mmenu-badge {
    margin-left: auto;
    background: var(--gold);
    color: #fff;
    font-size: 10px; font-weight: 800;
    min-width: 18px; height: 18px;
    border-radius: var(--pill);
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0 4px;
  }

  /* Separador */
  .st-mmenu-divider {
    height: 1px;
    background: var(--border-soft);
    margin: 4px 0;
  }

  /* Label de sección */
  .st-mmenu-sec-label {
    padding: 8px 20px 4px;
    font-size: 9px; font-weight: 800;
    text-transform: uppercase; letter-spacing: .1em;
    color: var(--muted);
  }
}
