/* ═══════════════════════════════════════════════
   CANOPIA — Design System
   Dark premium, green accent, Inter font
═══════════════════════════════════════════════ */

:root {
  /* Colors */
  --bg:        #0c0c0c;
  --bg-2:      #111111;
  --panel:     #161616;
  --panel-2:   #1c1c1c;
  --panel-3:   #222222;
  --border:    rgba(255,255,255,0.08);
  --border-2:  rgba(255,255,255,0.14);
  --text:      #f0f0f0;
  --muted:     #888888;
  --muted-2:   #555555;
  --green:     #22c55e;
  --green-dim: rgba(34,197,94,0.12);
  --green-glow:rgba(34,197,94,0.25);
  --lime:      #a3e635;
  --shadow:    0 4px 24px rgba(0,0,0,0.55);
  --shadow-lg: 0 12px 48px rgba(0,0,0,0.7);
  --radius:    0.75rem;
  --radius-sm: 0.45rem;
  --radius-pill: 999px;
}

/* ── Reset ──────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, system-ui, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1,h2,h3,h4 { margin: 0; line-height: 1.1; letter-spacing: -0.02em; }
p { margin: 0; }
button { font: inherit; cursor: pointer; }

/* ── Layout helpers ─────────────────────────── */
.site-wrap {
  width: min(1200px, calc(100% - 3rem));
  margin: 0 auto;
}
.section {
  width: min(1200px, calc(100% - 3rem));
  margin: 0 auto;
  padding: 4rem 0;
}
.eyebrow {
  margin: 0 0 0.6rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
}
.section-title {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 800;
}
.section-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.6rem;
  flex-wrap: wrap;
}
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--green);
  white-space: nowrap;
}
.link-arrow svg { width: 1rem; height: 1rem; }
.link-arrow:hover { text-decoration: underline; }

/* ── Buttons ────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.8rem;
  padding: 0.7rem 1.3rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: opacity 0.15s, transform 0.15s, background 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.btn svg { width: 1rem; height: 1rem; flex-shrink: 0; }
.btn:hover { transform: translateY(-1px); opacity: 0.92; }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--green);
  color: #000;
  font-weight: 800;
}
.btn-outline {
  border-color: var(--border-2);
  color: var(--text);
  background: transparent;
}
.btn-outline:hover { border-color: var(--green); color: var(--green); }

/* icon-only button */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  transition: color 0.15s, background 0.15s, border-color 0.15s;
  flex-shrink: 0;
}
.icon-btn svg { width: 1.2rem; height: 1.2rem; }
.icon-btn:hover { color: var(--text); background: var(--panel-2); border-color: var(--border); }

/* ═══════════════════════════════════════════════
   HEADER
═══════════════════════════════════════════════ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.5rem;
  padding: 0 clamp(1rem, 3vw, 2.5rem);
  height: 4rem;
  background: rgba(12,12,12,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
  text-decoration: none;
}
.brand-icon { width: 2rem; height: 2rem; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-text strong { font-size: 0.95rem; font-weight: 900; letter-spacing: 0.06em; color: var(--text); }
.brand-text small  { font-size: 0.55rem; font-weight: 600; letter-spacing: 0.1em; color: var(--muted); text-transform: uppercase; }

.main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}
.main-nav a {
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.15s, background 0.15s;
}
.main-nav a:hover { color: var(--text); background: var(--panel-2); }

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid rgba(34,197,94,0.3);
  border-radius: var(--radius-pill);
  padding: 0.3rem 0.7rem;
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}
.live-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulseLive 1.8s ease-in-out infinite;
}
@keyframes pulseLive { 0%,100%{opacity:1} 50%{opacity:0.35} }

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
}

/* Cart button */
.cart-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--panel-2);
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 600;
  transition: border-color 0.15s, background 0.15s;
}
.cart-button svg { width: 1.1rem; height: 1.1rem; color: var(--muted); }
.cart-button #cart-count {
  display: inline-grid;
  min-width: 1.3rem;
  height: 1.3rem;
  place-items: center;
  border-radius: var(--radius-pill);
  background: var(--green);
  color: #000;
  font-size: 0.7rem;
  font-weight: 900;
}
.cart-button:hover { border-color: var(--green); background: var(--green-dim); }

/* Fav button in header */
.fav-nav-button {
  position: relative;
}
.fav-nav-button .fav-count {
  position: absolute;
  top: 0.1rem;
  right: 0.1rem;
  display: inline-grid;
  min-width: 1rem;
  height: 1rem;
  place-items: center;
  border-radius: var(--radius-pill);
  background: #e11d48;
  color: #fff;
  font-size: 0.6rem;
  font-weight: 900;
  line-height: 1;
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 0.3rem;
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  padding: 0.5rem 0.55rem;
}
.nav-toggle span {
  display: block;
  height: 1.5px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

/* Search bar overlay */
.search-bar-overlay {
  position: sticky;
  top: 4rem;
  z-index: 29;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  padding: 0.6rem clamp(1rem, 3vw, 2.5rem);
}
.search-bar-inner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: min(600px, 100%);
  margin: 0 auto;
}
.search-bar-inner input {
  flex: 1;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-pill);
  padding: 0.6rem 1rem;
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  outline: none;
}
.search-bar-inner input:focus { border-color: var(--green); }

/* ═══════════════════════════════════════════════
   HERO
═══════════════════════════════════════════════ */
.hero-section {
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  padding: 0 clamp(1rem, 3vw, 2.5rem);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 3rem;
  align-items: center;
  width: min(1200px, 100%);
  margin: 0 auto;
  min-height: 52vh;
  padding: 3.5rem 0;
}
.hero-text { display: flex; flex-direction: column; gap: 0; }
.hero-text .eyebrow { margin-bottom: 0.8rem; }
.hero-text h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 900;
  line-height: 1.05;
  margin-bottom: 1.2rem;
}
.accent { color: var(--green); }
.hero-desc {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
  max-width: 440px;
  margin-bottom: 2rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.hero-visual { position: relative; }
.hero-img-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16/10;
  background: var(--panel-2);
}
.hero-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-trust {
  position: absolute;
  bottom: -1px;
  right: 0;
  display: flex;
  gap: 0;
  background: rgba(12,12,12,0.88);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius) 0 var(--radius) var(--radius);
  overflow: hidden;
}
.trust-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 0.9rem 1.2rem;
  text-align: center;
  border-right: 1px solid var(--border);
}
.trust-badge:last-child { border-right: none; }
.trust-badge svg { width: 1.3rem; height: 1.3rem; color: var(--green); }
.trust-badge span { font-size: 0.7rem; color: var(--muted); line-height: 1.3; }

/* ═══════════════════════════════════════════════
   BENEFITS BAR
═══════════════════════════════════════════════ */
.benefits-bar {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--panel);
}
.benefits-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: min(1200px, calc(100% - 3rem));
  margin: 0 auto;
  divide-color: transparent;
}
.benefit-item {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1.2rem 1.5rem;
  border-right: 1px solid var(--border);
}
.benefit-item:last-child { border-right: none; }
.benefit-item svg { width: 1.6rem; height: 1.6rem; color: var(--green); flex-shrink: 0; }
.benefit-item strong { display: block; font-size: 0.88rem; font-weight: 700; }
.benefit-item small { font-size: 0.78rem; color: var(--muted); }

/* ═══════════════════════════════════════════════
   CATEGORIES
═══════════════════════════════════════════════ */
.cats-section { padding-top: 3rem; padding-bottom: 3rem; }

.category-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
}

.category-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--panel-2);
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s;
  min-height: 9rem;
}
.category-card:hover { transform: translateY(-3px); border-color: var(--green); }

.cat-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.45;
  transition: opacity 0.2s;
}
.category-card:hover .cat-img { opacity: 0.6; }

.cat-overlay {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
  padding: 0.85rem;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 60%);
  min-height: 9rem;
}
.cat-icon {
  width: 1.8rem;
  height: 1.8rem;
  background: var(--green-dim);
  border: 1px solid rgba(34,197,94,0.3);
  border-radius: 0.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
}
.cat-icon svg { width: 1rem; height: 1rem; color: var(--green); }
.cat-overlay strong { display: block; font-size: 0.88rem; font-weight: 700; }
.cat-overlay small  { display: block; font-size: 0.72rem; color: rgba(255,255,255,0.6); margin-bottom: 0.4rem; }
.cat-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--green);
}
.cat-arrow svg { width: 0.75rem; height: 0.75rem; }

/* ═══════════════════════════════════════════════
   CATALOG
═══════════════════════════════════════════════ */
.catalog-section { padding-top: 3rem; }

.catalog-controls {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 0.5rem 1rem;
  background: var(--panel-2);
  transition: border-color 0.15s;
}
.search-box:focus-within { border-color: var(--green); }
.search-box svg { width: 1rem; height: 1rem; color: var(--muted); flex-shrink: 0; }
.search-box input {
  border: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.88rem;
  outline: none;
  min-width: 160px;
}
.search-box input::placeholder { color: var(--muted); }

.sort-box select {
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 0.5rem 2rem 0.5rem 0.9rem;
  background: var(--panel-2)
    url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")
    no-repeat right 0.6rem center / 1rem;
  color: var(--text);
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
  appearance: none;
  outline: none;
  transition: border-color 0.15s;
}
.sort-box select:focus { border-color: var(--green); }

.filters-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.filter-button {
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 0.4rem 0.85rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--panel-2);
  cursor: pointer;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.filter-button:hover { color: var(--text); border-color: var(--border-2); }
.filter-button.is-active { background: var(--green); color: #000; border-color: var(--green); }

/* ═══════════════════════════════════════════════
   PRODUCT CARDS
═══════════════════════════════════════════════ */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.product-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34,197,94,0.35);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.fav-button {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  z-index: 2;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: rgba(12,12,12,0.7);
  backdrop-filter: blur(4px);
  color: var(--muted);
  font-size: 0.9rem;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  line-height: 1;
}
.fav-button.is-fav { color: #e11d48; border-color: rgba(225,29,72,0.4); background: rgba(225,29,72,0.1); }
.fav-button:hover { color: #e11d48; border-color: rgba(225,29,72,0.4); }

.product-image {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  background: var(--panel-2);
}
.product-art {
  width: 100%;
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--panel-2);
  color: var(--green);
  font-size: 2.8rem;
  font-weight: 900;
}

.product-body { display: flex; flex-direction: column; flex: 1; padding: 0.9rem; gap: 0.4rem; }

.badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(34,197,94,0.25);
  border-radius: var(--radius-pill);
  padding: 0.2rem 0.55rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--green);
  width: fit-content;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.product-body h3 {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
}
.product-body p {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.stock-line {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--lime);
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.price {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--green);
}
.product-actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.product-actions .btn {
  min-height: auto;
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
}
.compare-button {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.65rem;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.compare-button:hover { color: #a78bfa; border-color: #a78bfa; }
.compare-button.is-comparing { color: #a78bfa; border-color: #a78bfa; background: rgba(167,139,250,0.1); }

/* ═══════════════════════════════════════════════
   COMBOS
═══════════════════════════════════════════════ */
.combo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
.combo-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
  background: var(--panel);
  transition: border-color 0.2s, transform 0.2s;
}
.combo-card:hover { border-color: var(--green); transform: translateY(-2px); }
.combo-card .badge { margin-bottom: 0.5rem; }
.combo-card h3 { font-size: 1.1rem; font-weight: 800; margin-bottom: 0.4rem; }
.combo-card p { font-size: 0.85rem; color: var(--muted); margin-bottom: 0.75rem; }
.combo-card ul { margin: 0 0 1rem; padding-left: 1.2rem; }
.combo-card li { font-size: 0.85rem; color: var(--muted); margin-bottom: 0.2rem; }
.combo-card .price { font-size: 1.3rem; font-weight: 900; color: var(--green); }

/* ═══════════════════════════════════════════════
   SPLIT SECTIONS (Grow / Smoke)
═══════════════════════════════════════════════ */
.split-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  border-top: 1px solid var(--border);
}
.split-text p { color: var(--muted); line-height: 1.7; margin-top: 0.8rem; font-size: 0.95rem; }

.stage-list, .smoke-tags {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
}
.stage-list span, .smoke-tags span {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  background: var(--panel-2);
  font-size: 0.88rem;
  font-weight: 700;
  transition: border-color 0.15s, background 0.15s;
}
.stage-list span:hover, .smoke-tags span:hover { border-color: var(--green); background: var(--green-dim); }
.stage-list span svg { width: 1rem; height: 1rem; color: var(--green); flex-shrink: 0; }

.smoke-split .split-text .eyebrow { color: #a78bfa; }
.smoke-tags span { color: #c4b5fd; }
.smoke-tags span:hover { border-color: #a78bfa; background: rgba(167,139,250,0.08); }

/* ═══════════════════════════════════════════════
   CONTACT SECTION
═══════════════════════════════════════════════ */
.contact-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  border-top: 1px solid var(--border);
}
.contact-section p { color: var(--muted); margin-top: 0.8rem; line-height: 1.7; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* ═══════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════ */
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem clamp(1rem, 3vw, 2.5rem);
  border-top: 1px solid var(--border);
  background: var(--panel);
  flex-wrap: wrap;
}
.footer-copy { font-size: 0.82rem; color: var(--muted); }

/* ═══════════════════════════════════════════════
   WHATSAPP STICKY
═══════════════════════════════════════════════ */
.wa-sticky {
  position: sticky;
  bottom: 0;
  z-index: 20;
  background: var(--panel);
  border-top: 1px solid var(--border);
}
.wa-sticky-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(1200px, calc(100% - 3rem));
  margin: 0 auto;
  padding: 0.9rem 0;
}
.wa-sticky-text {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.wa-sticky-icon { width: 2.2rem; height: 2.2rem; flex-shrink: 0; }
.wa-sticky-text strong { display: block; font-size: 0.9rem; font-weight: 700; }
.wa-sticky-text small  { font-size: 0.78rem; color: var(--muted); }
.wa-btn { border-radius: var(--radius-pill); padding: 0.65rem 1.4rem; }

/* ═══════════════════════════════════════════════
   CART & FAVS PANELS
═══════════════════════════════════════════════ */
.cart-panel, .favs-panel {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  justify-content: flex-end;
  background: rgba(0,0,0,0.6);
}
.cart-panel.is-open, .favs-panel.is-open { display: flex; }

.cart-dialog, .favs-dialog {
  width: min(460px, 100%);
  height: 100%;
  overflow: auto;
  border-left: 1px solid var(--border);
  padding: 1.2rem;
  background: var(--panel);
  box-shadow: var(--shadow-lg);
}

.cart-head, .favs-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--border);
}
.cart-head h2, .favs-head h2 { font-size: 1.1rem; font-weight: 800; }

.cart-items { display: grid; gap: 0.7rem; margin: 1rem 0; }
.cart-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.8rem;
  background: var(--panel-2);
}
.cart-line strong, .cart-line span { display: block; }
.cart-line span { color: var(--muted); font-size: 0.82rem; }

.quantity-controls { display: inline-flex; align-items: center; gap: 0.4rem; }
.quantity-controls button {
  width: 1.8rem;
  height: 1.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  background: var(--panel-3);
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.quantity-controls button:hover { border-color: var(--green); color: var(--green); }

.cart-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 0.5rem 0 1rem;
  padding: 0.9rem 0;
  font-weight: 700;
}
.cart-total strong { font-size: 1.3rem; color: var(--green); }

.checkout-form label {
  display: grid;
  gap: 0.3rem;
  margin-bottom: 0.75rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}
.checkout-form input,
.checkout-form textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.8rem;
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.15s;
}
.checkout-form input:focus,
.checkout-form textarea:focus { border-color: var(--green); }
.checkout-form textarea { min-height: 5rem; resize: vertical; }
.checkout-message { min-height: 1.2rem; color: var(--lime); font-size: 0.85rem; margin-top: 0.5rem; }

/* Favs list */
.favs-list { display: grid; gap: 0.7rem; }
.fav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  background: var(--panel-2);
}
.fav-item-art {
  flex-shrink: 0;
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--panel);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green);
  font-weight: 900;
  font-size: 0.85rem;
}
.fav-item-info { flex: 1; min-width: 0; }
.fav-item-info strong { display: block; font-size: 0.88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fav-item-info span { color: var(--green); font-weight: 800; font-size: 0.82rem; }
.fav-item-actions { display: flex; flex-direction: column; gap: 0.3rem; }
.fav-item-actions .btn { min-height: auto; padding: 0.3rem 0.6rem; font-size: 0.75rem; }

/* ═══════════════════════════════════════════════
   COMPARE BAR & MODAL
═══════════════════════════════════════════════ */
.compare-bar {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(140%);
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  border: 1px solid #a78bfa;
  border-radius: var(--radius-pill);
  padding: 0.6rem 1rem;
  background: var(--panel);
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
  white-space: nowrap;
}
.compare-bar.is-visible { transform: translateX(-50%) translateY(0); }
.compare-bar-slots { display: flex; gap: 0.4rem; }
.compare-slot {
  width: 2rem; height: 2rem;
  border: 1px dashed rgba(167,139,250,0.4);
  border-radius: var(--radius-sm);
  background: rgba(167,139,250,0.06);
  display: grid; place-items: center;
  font-size: 0.6rem; color: var(--muted);
  overflow: hidden;
}
.compare-slot.filled { border-color: #a78bfa; border-style: solid; background: rgba(167,139,250,0.15); }
.compare-slot img { width: 100%; height: 100%; object-fit: cover; }
#compare-bar-label { font-size: 0.82rem; color: var(--muted); }

.compare-modal-overlay {
  position: fixed; inset: 0; z-index: 60;
  display: none; align-items: center; justify-content: center;
  padding: 1rem;
  background: rgba(0,0,0,0.75);
}
.compare-modal-overlay.is-open { display: flex; }
.compare-modal {
  width: min(960px, 100%);
  max-height: 90vh; overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-lg);
}
.compare-modal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem 1.2rem; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--panel); z-index: 1;
}
.compare-table { width: 100%; border-collapse: collapse; }
.compare-table th, .compare-table td {
  padding: 0.85rem 1rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top;
}
.compare-table th { color: var(--muted); font-size: 0.78rem; text-transform: uppercase; width: 8rem; background: var(--panel-2); }
.compare-table td { border-left: 1px solid var(--border); }
.compare-table .compare-product-header { text-align: center; }
.compare-table .compare-product-header img,
.compare-table .compare-product-header .compare-art {
  width: 100%; max-height: 9rem; object-fit: cover; border-radius: var(--radius-sm);
  margin-bottom: 0.5rem; display: block;
}
.compare-table .compare-product-header .compare-art {
  height: 9rem; background: var(--panel-2); display: grid; place-items: center; color: var(--green); font-size: 2rem; font-weight: 900;
}
.compare-highlight { color: var(--green); font-weight: 800; }

/* ═══════════════════════════════════════════════
   SUGGESTIONS (Comprados juntos / Relacionados)
═══════════════════════════════════════════════ */
.suggestions-section {
  margin-top: 1.2rem; border-top: 1px solid var(--border); padding-top: 1rem;
}
.suggestions-title {
  margin: 0 0 0.75rem; font-size: 0.78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted);
}
.suggestions-row { display: flex; gap: 0.6rem; overflow-x: auto; padding-bottom: 0.3rem; scrollbar-width: thin; }
.suggestion-card {
  flex-shrink: 0; width: 9.5rem;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--panel-2); overflow: hidden;
  cursor: pointer; transition: border-color 0.15s, transform 0.15s;
  display: flex; flex-direction: column;
}
.suggestion-card:hover { border-color: var(--green); transform: translateY(-2px); }
.suggestion-card img, .suggestion-art {
  width: 100%; height: 5rem; object-fit: cover;
  background: var(--panel-3); display: flex; align-items: center; justify-content: center;
  color: var(--green); font-weight: 900; font-size: 1.3rem;
}
.suggestion-body { padding: 0.5rem 0.6rem; display: flex; flex-direction: column; gap: 0.2rem; flex: 1; }
.suggestion-body strong { font-size: 0.78rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.suggestion-body span { color: var(--green); font-weight: 800; font-size: 0.75rem; margin-top: auto; }
.suggestion-body .btn { margin-top: 0.4rem; min-height: auto; padding: 0.28rem 0.5rem; font-size: 0.72rem; }

/* ═══════════════════════════════════════════════
   RELATED PRODUCTS SECTION
═══════════════════════════════════════════════ */
#related-section { padding-top: 0.5rem; padding-bottom: 2rem; }
#related-section .section-title { font-size: 1.4rem; }

/* ═══════════════════════════════════════════════
   ADMIN (unchanged styles)
═══════════════════════════════════════════════ */
.admin-shell { width: min(1100px, calc(100% - 2rem)); margin: 0 auto; padding: 2rem 0 4rem; }
.admin-card, .login-card {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.2rem; background: var(--panel-2);
}
.login-card { max-width: 520px; margin: 3rem auto 0; }
.admin-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.admin-stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 0.8rem; margin-bottom: 1rem; }
.stat-card { border: 1px solid var(--border); border-radius: 0.65rem; padding: 0.9rem 1rem; background: var(--panel-2); }
.stat-card span { display: block; color: var(--muted); font-size: 0.82rem; }
.stat-card strong { font-size: 1.6rem; }
.admin-toolbar { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-bottom: 1rem; }
.admin-toolbar input, .admin-toolbar select,
.admin-form input, .admin-form textarea, .admin-form select {
  width: 100%; border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 0.75rem; color: var(--text); background: var(--panel-2); font: inherit;
}
.admin-toolbar input { flex: 1 1 220px; }
.admin-toolbar select { min-width: 180px; }
.product-table-wrap { overflow: auto; }
.product-table { width: 100%; border-collapse: collapse; }
.product-table th, .product-table td { padding: 0.75rem 0.55rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.product-table th { color: var(--muted); font-size: 0.82rem; text-transform: uppercase; }
.product-table small { display: block; color: var(--muted); }
.stock-editor { display: inline-flex; align-items: center; gap: 0.45rem; }
.stock-editor button { width: 1.8rem; height: 1.8rem; border: 1px solid var(--border); border-radius: 0.4rem; color: var(--text); background: var(--panel-2); cursor: pointer; }
.status-pill { display: inline-flex; margin-right: 0.35rem; border-radius: var(--radius-pill); padding: 0.2rem 0.5rem; font-size: 0.72rem; font-weight: 800; }
.status-pill.is-on { color: #071109; background: var(--green); }
.status-pill.is-off { color: var(--muted); background: var(--panel); }
.status-pill.is-featured { color: #c4b5fd; border: 1px solid rgba(167,139,250,0.35); background: transparent; }
.row-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.btn.danger { color: #ffd0d0; border-color: rgba(255,80,80,0.35); }
.admin-form label { display: grid; gap: 0.35rem; margin-bottom: 0.8rem; color: var(--muted); font-weight: 700; }
.admin-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.admin-form-grid .full { grid-column: 1 / -1; }
.admin-form-grid .checkbox { display: flex; align-items: center; gap: 0.5rem; }
.admin-form-grid .checkbox input { width: auto; }
.admin-dialog { width: min(720px, calc(100% - 2rem)); border: 1px solid var(--border); border-radius: var(--radius); padding: 0; color: var(--text); background: var(--panel); }
.admin-dialog::backdrop { background: rgba(0,0,0,0.65); }
.dialog-head, .dialog-actions { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.admin-dialog form { padding: 1rem; }
.form-message, .help { color: var(--muted); line-height: 1.6; }
.form-message { min-height: 1.2rem; color: var(--lime); }

/* ═══════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .category-grid { grid-template-columns: repeat(3, 1fr); }
  .benefits-inner { grid-template-columns: repeat(2, 1fr); }
  .benefit-item:nth-child(2) { border-right: none; }
}

@media (max-width: 860px) {
  /* ── Header ── */
  .site-header { grid-template-columns: auto auto; gap: 0.5rem; }
  .main-nav {
    display: none;
    position: absolute;
    top: 4rem; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    padding: 0.75rem;
    background: var(--panel);
    border-bottom: 1px solid var(--border);
    z-index: 28;
    box-shadow: var(--shadow);
  }
  .main-nav.is-open { display: flex; }
  .main-nav a { padding: 0.7rem 1rem; border-radius: var(--radius-sm); font-size: 0.95rem; }
  .nav-toggle { display: flex; }

  /* ── Hero ── */
  .hero-inner { grid-template-columns: 1fr; gap: 1.5rem; padding: 2rem 0; min-height: auto; }
  .hero-visual { order: -1; }
  .hero-trust { position: static; border-radius: var(--radius); }
  .hero-text h1 { font-size: clamp(1.9rem, 6vw, 2.8rem); }
  .hero-desc { font-size: 0.95rem; }

  /* ── Benefits ── */
  .benefits-inner { grid-template-columns: repeat(2, 1fr); }

  /* ── Grids ── */
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .combo-grid { grid-template-columns: 1fr; }

  /* ── Sections ── */
  .split-section, .contact-section { grid-template-columns: 1fr; gap: 1.5rem; }
  .stage-list, .smoke-tags { grid-template-columns: repeat(2, 1fr); }
  .section-head-row { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
  .catalog-controls { width: 100%; }
  .search-box { flex: 1; }
  .search-box input { min-width: 0; width: 100%; }

  /* ── WhatsApp sticky ── */
  .wa-sticky-inner { flex-direction: column; gap: 0.6rem; align-items: stretch; }
  .wa-btn { justify-content: center; }
}

@media (max-width: 560px) {
  /* ── Spacing general ── */
  .site-header { padding: 0 0.85rem; height: 3.6rem; }
  .hero-section { padding: 0 0.85rem; }
  .section { padding: 2.5rem 0; }
  .section,
  .hero,
  .hero-inner { width: calc(100% - 1.7rem); }

  /* ── Header — evitar overflow ── */
  .brand-text small { display: none; } /* oculta "GROW & SMOKE SHOP" en mobile muy chico */
  .brand-logo { height: 1.9rem; }
  .cart-button { padding: 0.4rem 0.7rem; font-size: 0.82rem; gap: 0.35rem; }
  .cart-button svg { width: 1rem; height: 1rem; }
  .header-actions { gap: 0.15rem; }

  /* ── Hero ── */
  .hero-inner { padding: 1.5rem 0; gap: 1.2rem; }
  .hero-text h1 { font-size: clamp(1.7rem, 8vw, 2.2rem); margin-bottom: 0.8rem; }
  .hero-desc { font-size: 0.88rem; margin-bottom: 1.2rem; }
  .hero-actions { gap: 0.5rem; }
  .hero-actions .btn { flex: 1; min-width: 0; justify-content: center; font-size: 0.88rem; padding: 0.65rem 0.75rem; }
  .hero-trust { flex-wrap: wrap; }
  .trust-badge { flex: 1; min-width: 5rem; padding: 0.7rem 0.6rem; }

  /* ── Benefits ── */
  .benefits-inner { grid-template-columns: 1fr; }
  .benefit-item { border-right: none; border-bottom: 1px solid var(--border); padding: 0.9rem 1rem; }
  .benefit-item:last-child { border-bottom: none; }
  .benefit-item svg { width: 1.3rem; height: 1.3rem; }

  /* ── Categorías — scroll horizontal en mobile ── */
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
  }
  .category-card { min-height: 7.5rem; }

  /* ── Catálogo ── */
  .section-head-row h2.section-title { font-size: 1.6rem; }
  .catalog-controls { flex-direction: column; align-items: stretch; gap: 0.5rem; }
  .sort-box select { width: 100%; }
  .filters-row { gap: 0.4rem; }
  .filter-button { padding: 0.35rem 0.7rem; font-size: 0.78rem; }

  /* ── Products ── */
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
  .product-body { padding: 0.75rem; }
  .product-body h3 { font-size: 0.88rem; }
  .product-body p { font-size: 0.78rem; -webkit-line-clamp: 1; }
  .product-footer { flex-direction: column; align-items: flex-start; gap: 0.4rem; }
  .price { font-size: 1.1rem; }
  .product-actions { width: 100%; }
  .product-actions .btn { flex: 1; padding: 0.35rem 0.4rem; font-size: 0.75rem; }
  .compare-button { width: 100%; text-align: center; padding: 0.3rem; }

  /* ── Combos / Splits ── */
  .combo-grid, .product-grid { grid-template-columns: 1fr 1fr; }
  .stage-list, .smoke-tags { grid-template-columns: 1fr 1fr; }

  /* ── Contacto ── */
  .contact-actions { flex-direction: column; }
  .contact-actions .btn { width: 100%; justify-content: center; }

  /* ── WhatsApp sticky ── */
  .wa-sticky-inner { padding: 0.7rem 0; }
  .wa-sticky-text strong { font-size: 0.82rem; }
  .wa-sticky-text small { font-size: 0.72rem; }

  /* ── Footer ── */
  .site-footer { flex-direction: column; gap: 0.5rem; padding: 1.2rem 0.85rem; }

  /* ── Compare bar ── */
  .compare-bar {
    bottom: 0; left: 0; right: 0;
    border-radius: var(--radius) var(--radius) 0 0;
    transform: translateY(100%);
    border-left: none; border-right: none; border-bottom: none;
    flex-wrap: wrap; justify-content: center;
    padding: 0.75rem;
  }
  .compare-bar.is-visible { transform: translateY(0); }

  /* ── Paneles laterales (carrito, favs, auth) ── */
  .cart-dialog, .favs-dialog, .auth-dialog { padding: 0.85rem; }

  /* ── Product modal ── */
  .product-modal-info { padding: 1rem; }
  .product-modal-name { font-size: 1.3rem; }
  .product-modal-price { font-size: 1.6rem; }
  .product-modal-actions { gap: 0.4rem; }
  .product-modal-actions .btn { font-size: 0.82rem; padding: 0.55rem 0.6rem; }
  .product-modal-reviews { padding: 1rem; }

  /* ── Admin ── */
  .admin-stats { grid-template-columns: 1fr 1fr; }
  .admin-form-grid { grid-template-columns: 1fr; }
  .admin-top { flex-direction: column; align-items: flex-start; }
}

/* Pantallas muy chicas (320px) */
@media (max-width: 360px) {
  .product-grid { grid-template-columns: 1fr; }
  .category-grid { grid-template-columns: 1fr 1fr; }
  .hero-text h1 { font-size: 1.6rem; }
  .product-actions { flex-direction: column; }
  .product-actions .btn { width: 100%; }
}

/* ═══════════════════════════════════════════════
   BACKWARD COMPAT — admin.html uses .button classes
═══════════════════════════════════════════════ */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 2.8rem; padding: 0.7rem 1.3rem; border-radius: var(--radius-sm); font-weight: 700; font-size: 0.95rem; border: 1px solid transparent; transition: opacity 0.15s, transform 0.15s; cursor: pointer; white-space: nowrap; font-family: inherit; }
.button.primary { background: var(--green); color: #000; font-weight: 800; }
.button.ghost { border-color: var(--border-2); color: var(--text); background: transparent; }
.button.ghost:hover { border-color: var(--green); color: var(--green); }
.button.danger { color: #ffd0d0; border-color: rgba(255,80,80,0.35); background: transparent; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 2.4rem; height: 2.4rem; border: 1px solid transparent; border-radius: var(--radius-sm); background: var(--panel-2); color: var(--text); cursor: pointer; font-family: inherit; }

/* Brand logo icon + text */
.brand-logo { height: 2.2rem; width: auto; object-fit: contain; display: block; flex-shrink: 0; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-text strong { font-size: 0.95rem; font-weight: 900; letter-spacing: 0.06em; color: var(--text); }
.brand-text small  { font-size: 0.55rem; font-weight: 600; letter-spacing: 0.1em; color: var(--muted); text-transform: uppercase; }

/* ═══════════════════════════════════════════════
   VALORACIONES Y RESEÑAS
═══════════════════════════════════════════════ */

/* ── Stars inline en la card ── */
.stars-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0.2rem 0 0.1rem;
}
.stars-display {
  display: inline-flex;
  gap: 0.1rem;
  line-height: 1;
}
.star-icon {
  font-size: 0.88rem;
  line-height: 1;
  color: var(--muted-2);
  transition: color 0.1s;
}
.star-icon.filled { color: #f59e0b; }
.stars-count {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 600;
}
.review-link {
  font-size: 0.73rem;
  color: var(--green);
  font-weight: 600;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  font-family: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.review-link:hover { color: var(--lime); }

/* ── Modal de reseña ── */
.review-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0,0,0,0.75);
}
.review-modal-overlay.is-open { display: flex; }

.review-modal {
  width: min(520px, 100%);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.review-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--border);
}
.review-modal-head h3 {
  font-size: 1rem;
  font-weight: 800;
}
.review-modal-product {
  padding: 0.75rem 1.2rem;
  background: var(--panel-2);
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--muted);
}
.review-modal-product strong {
  display: block;
  color: var(--text);
  font-weight: 700;
  margin-bottom: 0.15rem;
}

.review-modal-body { padding: 1.2rem; }

/* Star picker interactivo */
.star-picker {
  display: flex;
  gap: 0.3rem;
  margin-bottom: 1rem;
}
.star-pick {
  font-size: 2rem;
  cursor: pointer;
  color: var(--muted-2);
  transition: color 0.1s, transform 0.1s;
  background: none;
  border: none;
  padding: 0;
  line-height: 1;
  font-family: inherit;
}
.star-pick:hover,
.star-pick.active { color: #f59e0b; transform: scale(1.15); }

.review-form label {
  display: grid;
  gap: 0.3rem;
  margin-bottom: 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}
.review-form input,
.review-form textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.8rem;
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.15s;
}
.review-form input:focus,
.review-form textarea:focus { border-color: var(--green); }
.review-form textarea { min-height: 5rem; resize: vertical; }

.review-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1rem;
}
.review-star-required {
  font-size: 0.78rem;
  color: #f87171;
  min-height: 1.1rem;
}

/* ── Panel de reseñas (expandible dentro del panel lateral) ── */
.reviews-panel {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: none;
  justify-content: flex-end;
  background: rgba(0,0,0,0.6);
}
.reviews-panel.is-open { display: flex; }

.reviews-dialog {
  width: min(500px, 100%);
  height: 100%;
  overflow-y: auto;
  border-left: 1px solid var(--border);
  background: var(--panel);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
}

.reviews-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.2rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--panel);
  z-index: 1;
}
.reviews-dialog-head h2 { font-size: 1.05rem; font-weight: 800; }

.reviews-product-info {
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--border);
  background: var(--panel-2);
}
.reviews-product-info strong { display: block; font-weight: 700; margin-bottom: 0.3rem; }

/* Resumen global de puntuación */
.reviews-summary {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 1.1rem 1.2rem;
  border-bottom: 1px solid var(--border);
}
.reviews-avg {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  flex-shrink: 0;
}
.reviews-avg-number {
  font-size: 2.8rem;
  font-weight: 900;
  line-height: 1;
  color: var(--text);
}
.reviews-avg-stars { font-size: 1.1rem; }
.reviews-avg-total { font-size: 0.72rem; color: var(--muted); }

.reviews-bars { flex: 1; display: flex; flex-direction: column; gap: 0.3rem; }
.reviews-bar-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--muted);
}
.reviews-bar-track {
  flex: 1;
  height: 0.35rem;
  border-radius: 99px;
  background: var(--panel-3);
  overflow: hidden;
}
.reviews-bar-fill {
  height: 100%;
  border-radius: 99px;
  background: #f59e0b;
  transition: width 0.4s ease;
}
.reviews-bar-count { width: 1.2rem; text-align: right; }

/* Lista de reseñas */
.reviews-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0.5rem 0;
}
.review-item {
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--border);
}
.review-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}
.review-item-author {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.review-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--green-dim);
  border: 1px solid rgba(34,197,94,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--green);
  flex-shrink: 0;
}
.review-author-name { font-size: 0.88rem; font-weight: 700; }
.review-date { font-size: 0.72rem; color: var(--muted); }
.review-stars { font-size: 0.85rem; }
.review-text {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.6;
  margin-top: 0.35rem;
}

.reviews-empty {
  padding: 2rem 1.2rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.reviews-cta {
  padding: 1rem 1.2rem;
  border-top: 1px solid var(--border);
  position: sticky;
  bottom: 0;
  background: var(--panel);
}

/* ═══════════════════════════════════════════════
   BÚSQUEDA INTELIGENTE
═══════════════════════════════════════════════ */

/* ── Barra de búsqueda del header mejorada ── */
.search-bar-overlay {
  position: sticky;
  top: 4rem;
  z-index: 29;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  padding: 0.65rem clamp(1rem, 3vw, 2.5rem);
}
.search-bar-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: min(640px, 100%);
  margin: 0 auto;
}
.search-bar-inner input {
  flex: 1;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-pill);
  padding: 0.65rem 1rem;
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.15s;
}
.search-bar-inner input:focus { border-color: var(--green); }

/* ── Dropdown de sugerencias ── */
.search-dropdown {
  position: absolute;
  top: calc(100% + 0.4rem);
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--panel);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: none;
}
.search-dropdown.is-open { display: block; }

.search-dropdown-section {
  padding: 0.4rem 0;
}
.search-dropdown-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 1rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted-2);
}
.search-dropdown-label svg { width: 0.75rem; height: 0.75rem; }

.search-suggestion-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1rem;
  cursor: pointer;
  transition: background 0.1s;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  font: inherit;
  color: var(--text);
}
.search-suggestion-item:hover,
.search-suggestion-item.is-focused {
  background: var(--panel-2);
}

.suggestion-thumb {
  flex-shrink: 0;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--panel-3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 900;
  color: var(--green);
  overflow: hidden;
}
.suggestion-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.suggestion-info { flex: 1; min-width: 0; }
.suggestion-name {
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.suggestion-name mark {
  background: transparent;
  color: var(--green);
  font-weight: 800;
}
.suggestion-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.1rem;
}
.suggestion-price { color: var(--green); font-weight: 700; }
.suggestion-cat {
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 0.1rem 0.4rem;
  font-size: 0.65rem;
}

/* item de historial */
.search-history-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: background 0.1s;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  font: inherit;
  color: var(--muted);
  font-size: 0.88rem;
}
.search-history-item:hover { background: var(--panel-2); color: var(--text); }
.search-history-item svg { width: 0.85rem; height: 0.85rem; flex-shrink: 0; }

.search-dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 0.25rem 0;
}

/* "Ver todos los resultados" */
.search-view-all {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--green);
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  border-top: 1px solid var(--border);
  transition: background 0.1s;
  font: inherit;
}
.search-view-all:hover { background: var(--green-dim); }
.search-view-all svg { width: 0.85rem; height: 0.85rem; }

/* ── Highlight en las product cards del catálogo ── */
.product-body h3 mark {
  background: transparent;
  color: var(--green);
  font-weight: 800;
}

/* ── No results ── */
.search-no-results {
  padding: 1rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
}
.search-no-results strong { display: block; color: var(--text); margin-bottom: 0.3rem; }

@media (max-width: 560px) {
  .search-dropdown { left: -0.5rem; right: -0.5rem; }
}

/* ═══════════════════════════════════════════════
   AUTH — Login / Perfil
═══════════════════════════════════════════════ */

/* Botón de usuario en header — indicador de sesión activa */
#open-auth.is-logged {
  color: var(--green);
  border-color: rgba(34,197,94,0.3);
  background: var(--green-dim);
  border-radius: 50%;
}

/* Panel lateral */
.auth-panel {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  justify-content: flex-end;
  background: rgba(0,0,0,0.6);
}
.auth-panel.is-open { display: flex; }

.auth-dialog {
  width: min(420px, 100%);
  height: 100%;
  overflow-y: auto;
  border-left: 1px solid var(--border);
  background: var(--panel);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
}

/* Head */
.auth-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.2rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.auth-dialog-head h2 { font-size: 1.05rem; font-weight: 800; }

/* User badge en el head del perfil */
.auth-user-badge {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.auth-avatar {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: var(--green-dim);
  border: 2px solid rgba(34,197,94,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 900;
  color: var(--green);
  flex-shrink: 0;
}
.auth-user-info strong { display: block; font-size: 0.9rem; font-weight: 700; }
.auth-user-info small  { font-size: 0.75rem; color: var(--muted); }

/* Tabs login/registro */
.auth-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.auth-tab {
  flex: 1;
  padding: 0.75rem;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.auth-tab.is-active { color: var(--green); border-bottom-color: var(--green); }
.auth-tab:hover { color: var(--text); }

/* Form */
.auth-form {
  padding: 1.1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0;
}
/* Respetar hidden aunque haya display en CSS */
.auth-form[hidden],
[hidden] { display: none !important; }
.auth-form label {
  display: grid;
  gap: 0.3rem;
  margin-bottom: 0.8rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}
.auth-form input {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.8rem;
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.15s;
  width: 100%;
}
.auth-form input:focus { border-color: var(--green); }

.auth-message {
  min-height: 1.2rem;
  padding: 0 1.2rem;
  font-size: 0.82rem;
  color: #f87171;
  line-height: 1.5;
}
.auth-message.is-ok { color: var(--lime); }

.auth-skip {
  padding: 0 1.2rem 1.2rem;
  text-align: center;
  font-size: 0.8rem;
}

/* Tabs del perfil (iconos + texto) */
.auth-profile-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.auth-profile-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 0.7rem 0.4rem;
  font: inherit;
  font-size: 0.66rem;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.auth-profile-tab svg { width: 1.1rem; height: 1.1rem; }
.auth-profile-tab.is-active { color: var(--green); border-bottom-color: var(--green); }
.auth-profile-tab:hover { color: var(--text); }

/* Contenido de cada tab */
.auth-ptab-content {
  padding: 1rem 1.2rem;
  flex: 1;
  overflow-y: auto;
}

/* Lista de pedidos */
.profile-orders-list { display: flex; flex-direction: column; gap: 0.75rem; }
.order-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  overflow: hidden;
}
.order-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--border);
  gap: 0.5rem;
}
.order-card-id { font-size: 0.75rem; color: var(--muted); }
.order-card-date { font-size: 0.72rem; color: var(--muted); }
.order-status {
  display: inline-flex;
  border-radius: var(--radius-pill);
  padding: 0.15rem 0.5rem;
  font-size: 0.68rem;
  font-weight: 700;
}
.order-status.nuevo     { background: var(--green-dim); color: var(--green); }
.order-status.enviado   { background: rgba(59,130,246,0.12); color: #60a5fa; }
.order-status.entregado { background: rgba(163,230,53,0.12); color: var(--lime); }
.order-card-body { padding: 0.7rem 0.9rem; }
.order-item-row { display: flex; justify-content: space-between; font-size: 0.82rem; color: var(--muted); margin-bottom: 0.2rem; }
.order-item-row strong { color: var(--text); }
.order-total { display: flex; justify-content: space-between; padding-top: 0.5rem; border-top: 1px solid var(--border); margin-top: 0.4rem; font-weight: 700; font-size: 0.88rem; }
.order-total span { color: var(--green); }

/* Direcciones */
.profile-addresses-list { display: flex; flex-direction: column; gap: 0.65rem; }
.address-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.8rem 0.9rem;
  background: var(--panel-2);
}
.address-icon {
  width: 2rem; height: 2rem; border-radius: 50%;
  background: var(--green-dim); display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.address-icon svg { width: 1rem; height: 1rem; color: var(--green); }
.address-info { flex: 1; min-width: 0; }
.address-label { font-size: 0.78rem; font-weight: 700; color: var(--green); margin-bottom: 0.15rem; }
.address-line  { font-size: 0.85rem; font-weight: 600; }
.address-city  { font-size: 0.78rem; color: var(--muted); }
.address-notes { font-size: 0.75rem; color: var(--muted-2); margin-top: 0.1rem; }
.address-actions { display: flex; gap: 0.3rem; flex-shrink: 0; }
.address-actions button { min-height: auto; padding: 0.25rem 0.55rem; font-size: 0.72rem; }

.address-form { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.9rem; background: var(--panel-2); margin-top: 0.5rem; }

/* Empty states */
.auth-empty {
  padding: 2.5rem 1rem;
  text-align: center;
  color: var(--muted);
}
.auth-empty-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.auth-empty strong { display: block; color: var(--text); margin-bottom: 0.35rem; font-size: 0.95rem; }
.auth-empty p { font-size: 0.82rem; line-height: 1.6; }

/* ═══════════════════════════════════════════════
   MODAL DETALLE DE PRODUCTO
═══════════════════════════════════════════════ */
.product-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 65;
  display: none;
  align-items: flex-end;          /* mobile: sube desde abajo */
  justify-content: center;
  padding: 0;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.product-modal-overlay.is-open { display: flex; }

@media (min-width: 640px) {
  .product-modal-overlay {
    align-items: center;
    padding: 1.5rem;
  }
}

.product-modal {
  width: min(900px, 100%);
  max-height: 92vh;
  overflow-y: auto;
  background: var(--panel);
  border: 1px solid var(--border-2);
  border-radius: var(--radius) var(--radius) 0 0;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  transform: translateY(40px);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.34,1.4,0.64,1), opacity 0.25s ease;
}
.product-modal-overlay.is-open .product-modal {
  transform: translateY(0);
  opacity: 1;
}

@media (min-width: 640px) {
  .product-modal {
    border-radius: var(--radius);
    max-height: 88vh;
  }
}

/* Drag handle en mobile */
.product-modal-handle {
  width: 2.5rem;
  height: 0.28rem;
  border-radius: 99px;
  background: var(--border-2);
  margin: 0.7rem auto 0;
  flex-shrink: 0;
}
@media (min-width: 640px) { .product-modal-handle { display: none; } }

/* Header del modal */
.product-modal-head {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0.6rem 0.8rem 0;
  flex-shrink: 0;
}

/* Cuerpo: imagen + info */
.product-modal-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  flex: 1;
  overflow: hidden;
}
@media (min-width: 640px) {
  .product-modal-body {
    grid-template-columns: 1fr 1fr;
    overflow: auto;
  }
}

/* Columna imagen */
.product-modal-img-col {
  position: relative;
  background: var(--panel-2);
  min-height: 16rem;
  overflow: hidden;
}
.product-modal-img-col img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.product-modal-art {
  width: 100%;
  height: 100%;
  min-height: 16rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  font-weight: 900;
  color: var(--green);
  background: var(--panel-2);
}

/* Columna info */
.product-modal-info {
  padding: 1.4rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  overflow-y: auto;
}

.product-modal-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.product-modal-cat {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.product-modal-name {
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  font-weight: 900;
  line-height: 1.15;
}

.product-modal-stars-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.product-modal-desc {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.75;
}

.product-modal-stock {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--lime);
}
.product-modal-stock::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--lime);
  flex-shrink: 0;
}
.product-modal-stock.no-stock { color: var(--muted); }
.product-modal-stock.no-stock::before { background: var(--muted); }

.product-modal-price {
  font-size: 2rem;
  font-weight: 900;
  color: var(--green);
  line-height: 1;
}

.product-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding-top: 0.25rem;
}
.product-modal-actions .btn {
  flex: 1;
  min-width: 7rem;
}

/* Sección de reseñas dentro del modal */
.product-modal-reviews {
  border-top: 1px solid var(--border);
  padding: 1.2rem 1.5rem;
  flex-shrink: 0;
}

@media (min-width: 640px) {
  /* En desktop las reseñas van abajo del todo, full width */
  .product-modal-reviews {
    grid-column: 1 / -1;
  }
}

.product-modal-reviews-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.product-modal-reviews-head h3 {
  font-size: 1rem;
  font-weight: 800;
}

/* Mini summary en el modal */
.modal-reviews-summary {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.9rem 1rem;
  background: var(--panel-2);
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.modal-avg-big {
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--text);
  line-height: 1;
  flex-shrink: 0;
}
.modal-avg-right {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.modal-avg-count { font-size: 0.75rem; color: var(--muted); }

/* Lista inline de reseñas (máx 3 visible, rest collapsible) */
.modal-reviews-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.modal-review-item {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border);
}
.modal-review-item:last-child { border-bottom: none; }
.modal-review-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.3rem;
  flex-wrap: wrap;
}
.modal-review-author {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.modal-review-text {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.6;
  margin-top: 0.3rem;
}
.modal-reviews-empty {
  padding: 1.5rem 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
}
.modal-show-more {
  border: none;
  background: transparent;
  color: var(--green);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0.6rem 0;
  text-align: center;
  width: 100%;
  border-top: 1px solid var(--border);
  margin-top: 0.25rem;
}
.modal-show-more:hover { text-decoration: underline; }

/* Cursor pointer en cards (zona no-botón) */
.product-card { cursor: pointer; }

/* ── Admin: editor de múltiples imágenes ── */
.image-inputs { display: flex; flex-direction: column; gap: 0.4rem; }
.image-input-row {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}
.image-input-row input { flex: 1; }
.img-row-remove {
  flex-shrink: 0;
  width: 2rem; height: 2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.8rem;
  display: flex; align-items: center; justify-content: center;
}
.img-row-remove:hover { border-color: #f87171; color: #f87171; }
/* Primera fila: no se puede borrar (siempre hay al menos 1) */
.image-input-row:first-child .img-row-remove { opacity: 0; pointer-events: none; }

/* ── Galería de miniaturas en el modal de producto ── */
.product-modal-img-col {
  position: relative;
  display: flex;
  flex-direction: column;
}
.product-modal-thumbs {
  display: flex;
  gap: 0.4rem;
  padding: 0.5rem;
  background: var(--panel-3);
  overflow-x: auto;
  scrollbar-width: thin;
}
.modal-thumb {
  flex-shrink: 0;
  width: 3.2rem;
  height: 3.2rem;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  background-size: cover;
  background-position: center;
  background-color: var(--panel-2);
  cursor: pointer;
  transition: border-color 0.15s, opacity 0.15s;
  opacity: 0.6;
}
.modal-thumb:hover { opacity: 0.85; }
.modal-thumb.is-active { border-color: var(--green); opacity: 1; }

/* ── Admin: lista de pedidos ── */
.orders-list { display: flex; flex-direction: column; gap: 0; }

.order-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: start;
  gap: 1rem;
  padding: 1rem 0.6rem;
  border-bottom: 1px solid var(--border);
}
.order-row:last-child { border-bottom: none; }

.order-row-id {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
}

.order-row-info strong { display: block; font-size: 0.9rem; }
.order-row-info small  { font-size: 0.78rem; color: var(--muted); display: block; margin-bottom: .3rem; }

.order-row-items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: .25rem;
}
.order-item-tag {
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: .15rem .5rem;
  font-size: .72rem;
  color: var(--muted);
}

.order-row-total {
  font-size: 1rem;
  font-weight: 900;
  color: var(--green);
  white-space: nowrap;
  text-align: right;
}

.order-row-actions {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  min-width: 6rem;
}
.order-row-actions .button {
  min-height: auto;
  padding: .4rem .7rem;
  font-size: .78rem;
  text-align: center;
}

.order-status-badge {
  display: inline-flex;
  border-radius: var(--radius-pill);
  padding: .15rem .55rem;
  font-size: .72rem;
  font-weight: 800;
  margin-bottom: .3rem;
}
.order-status-badge.pendiente  { background: rgba(245,158,11,.15); color: #fbbf24; }
.order-status-badge.confirmado { background: var(--green-dim);     color: var(--green); }
.order-status-badge.rechazado  { background: rgba(239,68,68,.12);  color: #f87171; }

.orders-empty {
  padding: 2.5rem;
  text-align: center;
  color: var(--muted);
  font-size: .9rem;
}

@media (max-width: 640px) {
  .order-row {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto auto;
  }
  .order-row-id    { grid-column: 1; }
  .order-row-total { grid-column: 2; grid-row: 1; }
  .order-row-info  { grid-column: 1 / -1; }
  .order-row-actions { grid-column: 1 / -1; flex-direction: row; }
}

/* ── Recuperación de contraseña ── */
.auth-forgot-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0.3rem 0;
  text-align: center;
  width: 100%;
  margin-top: 0.25rem;
  transition: color 0.15s;
}
.auth-forgot-btn:hover { color: var(--green); }

.recovery-code-box {
  background: var(--panel-3);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  padding: 1rem;
  text-align: center;
  margin-bottom: 0.75rem;
}
.recovery-code-box .code-number {
  font-size: 2.5rem;
  font-weight: 900;
  letter-spacing: 0.3em;
  color: var(--green);
  display: block;
  margin-bottom: 0.3rem;
}
.recovery-code-box .code-user {
  font-size: 0.82rem;
  color: var(--muted);
}
.recovery-code-box .code-wa-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.6rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--green);
  text-decoration: underline;
  cursor: pointer;
}
