/* ============================================================
   El Eden — Design System
   Paleta: negro cálido + dorado + crema + verde bosque
   ============================================================ */

/* ---- Variables ---- */
:root {
  --bg:          #0a0d08;
  --surface:     #111510;
  --surface-2:   #181e14;
  --surface-3:   #1f271a;
  --border:      rgba(201,162,39,.18);
  --border-dim:  rgba(255,255,255,.07);

  --gold:        #C9A227;
  --gold-dim:    #8B6F1E;
  --gold-soft:   rgba(201,162,39,.12);
  --green:       #4a7c59;
  --green-bright:#5a9c6a;
  --green-soft:  rgba(74,124,89,.12);
  --red:         #e05555;
  --red-soft:    rgba(224,85,85,.12);

  --text:        #F0EDE6;
  --text-muted:  #9a9590;
  --text-dim:    #5c5852;

  --radius-sm:   8px;
  --radius:      12px;
  --radius-lg:   18px;
  --radius-xl:   28px;

  --shadow:      0 4px 24px rgba(0,0,0,.45);
  --shadow-sm:   0 2px 10px rgba(0,0,0,.30);
  --transition:  .18s ease;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Inter', system-ui, sans-serif;

  --header-h: 68px;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: var(--gold-dim); border-radius: 3px; }

/* ---- Typography ---- */
h1,h2,h3,h4,h5 {
  font-family: var(--font-display);
  line-height: 1.25;
  font-weight: 700;
}
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }
h4 { font-size: 1.1rem; }
p  { color: var(--text-muted); line-height: 1.7; }
small { font-size: .8rem; }

/* ---- Wrap ---- */
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.wrap-sm { max-width: 800px; margin: 0 auto; padding: 0 24px; }

/* ============================================================
   HEADER
   ============================================================ */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,13,8,.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-dim);
  height: var(--header-h);
}
header .wrap { height: 100%; }
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}
.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--bg);
  flex-shrink: 0;
}
.brand span {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  display: block;
}
.brand small { color: var(--text-muted); font-size: .72rem; display: block; }

.navlinks {
  display: flex;
  align-items: center;
  gap: 4px;
}
.navlinks a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: .9rem;
  transition: color var(--transition), background var(--transition);
}
.navlinks a:hover, .navlinks a.active {
  color: var(--gold);
  background: var(--gold-soft);
}
.navlinks a i { font-size: .85rem; }

.navActions { display: flex; align-items: center; gap: 8px; }

.cartBadge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  background: var(--gold);
  color: var(--bg);
  font-size: .68rem;
  font-weight: 700;
  padding: 0 4px;
  margin-left: 2px;
}

.burger {
  display: none;
  background: none;
  border: 1px solid var(--border-dim);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 9px 11px;
  font-size: 1rem;
}

.mobileMenu {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 16px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border-dim);
}
.mobileMenu a {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: .95rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.mobileMenu a:hover { background: var(--gold-soft); color: var(--gold); }
.mobileMenu.open { display: flex; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: .9rem;
  font-weight: 600;
  border: none;
  transition: all var(--transition);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1;
}
.btn-primary {
  background: var(--gold);
  color: var(--bg);
}
.btn-primary:hover { background: #d4aa2e; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(201,162,39,.35); }
.btn-primary:active { transform: translateY(0); }

.btn-outline {
  background: transparent;
  color: var(--gold);
  border: 1.5px solid var(--gold);
}
.btn-outline:hover { background: var(--gold-soft); }

.btn-ghost {
  background: rgba(255,255,255,.06);
  color: var(--text-muted);
  border: 1px solid var(--border-dim);
}
.btn-ghost:hover { background: rgba(255,255,255,.10); color: var(--text); }

.btn-danger {
  background: var(--red-soft);
  color: var(--red);
  border: 1px solid rgba(224,85,85,.25);
}
.btn-danger:hover { background: rgba(224,85,85,.22); }

.btn-green {
  background: var(--green-soft);
  color: var(--green-bright);
  border: 1px solid rgba(74,124,89,.25);
}
.btn-green:hover { background: rgba(74,124,89,.22); }

.btn-lg { padding: 14px 28px; font-size: 1rem; border-radius: var(--radius-lg); }
.btn-sm { padding: 7px 14px; font-size: .8rem; border-radius: var(--radius-sm); }
.btn[disabled], .btn:disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--surface);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.card:hover { border-color: var(--border); box-shadow: var(--shadow-sm); }

/* ============================================================
   FORM ELEMENTS
   ============================================================ */
.input, .select, .textarea {
  width: 100%;
  background: var(--surface-2);
  border: 1.5px solid var(--border-dim);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: .9rem;
  padding: 11px 14px;
  transition: border-color var(--transition);
  outline: none;
  appearance: none;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,162,39,.12);
}
.input::placeholder, .textarea::placeholder { color: var(--text-dim); }
.textarea { resize: vertical; min-height: 100px; line-height: 1.6; }

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: .85rem; font-weight: 600; color: var(--text-muted); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 520px) { .form-row { grid-template-columns: 1fr; } }

/* ============================================================
   BADGE / TAG
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.badge-gold  { background: var(--gold-soft);  color: var(--gold);         border: 1px solid rgba(201,162,39,.3); }
.badge-green { background: var(--green-soft); color: var(--green-bright); border: 1px solid rgba(74,124,89,.3); }
.badge-red   { background: var(--red-soft);   color: var(--red);          border: 1px solid rgba(224,85,85,.3); }
.badge-dim   { background: rgba(255,255,255,.06); color: var(--text-muted); border: 1px solid var(--border-dim); }

/* ============================================================
   TOAST
   ============================================================ */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 280px;
  max-width: 380px;
  box-shadow: var(--shadow);
  animation: toastIn .22s ease;
}
.toast .icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--gold-soft);
  color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: .9rem;
}
.toast strong { display: block; font-size: .9rem; color: var(--text); }
.toast span   { display: block; font-size: .8rem; color: var(--text-muted); margin-top: 2px; }
.toast button { background: none; border: none; color: var(--text-dim); padding: 4px; border-radius: 6px; font-size: .9rem; }
.toast button:hover { color: var(--text); }
@keyframes toastIn { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:translateY(0); } }

/* ============================================================
   MODAL
   ============================================================ */
.modalOverlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  animation: fadeIn .18s ease;
}
.modal {
  background: var(--surface);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-xl);
  padding: 32px;
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow);
  animation: slideUp .2s ease;
}
.modal h3 { margin-bottom: 20px; }
.modalActions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 24px; flex-wrap: wrap; }
@keyframes fadeIn  { from { opacity:0; } to { opacity:1; } }
@keyframes slideUp { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }

/* ============================================================
   SECTION TITLES
   ============================================================ */
.sectionTitle {
  text-align: center;
  margin-bottom: 48px;
}
.sectionTitle h2 { margin-bottom: 12px; }
.sectionTitle p  { font-size: 1.05rem; max-width: 560px; margin: 0 auto; }
.goldLine {
  width: 48px;
  height: 3px;
  background: var(--gold);
  border-radius: 2px;
  margin: 14px auto 0;
}

/* ============================================================
   USER PILL (header auth)
   ============================================================ */
.userPill {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-xl);
  padding: 6px 14px 6px 8px;
  cursor: pointer;
  color: var(--text);
  font-size: .85rem;
  font-weight: 600;
  transition: background var(--transition);
}
.userPill:hover { background: rgba(255,255,255,.10); }
.avatarSm {
  width: 28px; height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--border);
  background: var(--surface-3);
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border-dim);
  padding: 48px 0 32px;
  margin-top: 80px;
}
.footerGrid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footerBrand p { font-size: .9rem; margin-top: 12px; max-width: 300px; }
.footerCol h5 {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}
.footerCol a {
  display: block;
  color: var(--text-muted);
  font-size: .9rem;
  padding: 4px 0;
  transition: color var(--transition);
}
.footerCol a:hover { color: var(--text); }
.footerBottom {
  border-top: 1px solid var(--border-dim);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .8rem;
  color: var(--text-dim);
  flex-wrap: wrap;
  gap: 8px;
}
@media (max-width: 700px) {
  .footerGrid { grid-template-columns: 1fr 1fr; }
  .footerBrand { grid-column: span 2; }
  .burger { display: flex; }
  .navlinks { display: none; }
}
@media (max-width: 480px) {
  .footerGrid { grid-template-columns: 1fr; }
  .footerBrand { grid-column: span 1; }
}

/* ============================================================
   UTILS
   ============================================================ */
.hidden { display: none !important; }
.flex   { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-8  { gap: 8px; }
.gap-16 { gap: 16px; }
.mt-8   { margin-top: 8px; }
.mt-16  { margin-top: 16px; }
.mt-24  { margin-top: 24px; }
.text-gold   { color: var(--gold); }
.text-muted  { color: var(--text-muted); }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.fw-700 { font-weight: 700; }
.font-display { font-family: var(--font-display); }

/* price */
.price     { font-size: 1.25rem; font-weight: 700; color: var(--gold); }
.price-compare { font-size: .9rem; color: var(--text-dim); text-decoration: line-through; margin-left: 6px; }
.discount-badge {
  background: var(--red-soft);
  color: var(--red);
  border: 1px solid rgba(224,85,85,.25);
  border-radius: 6px;
  font-size: .72rem;
  font-weight: 700;
  padding: 2px 7px;
  margin-left: 6px;
}

/* stock */
.stock-ok  { color: var(--green-bright); font-size: .8rem; }
.stock-low { color: var(--gold);         font-size: .8rem; }
.stock-out { color: var(--red);          font-size: .8rem; }

/* divider */
.divider { border: none; border-top: 1px solid var(--border-dim); margin: 32px 0; }

/* spinner */
.spinner {
  display: inline-block;
  width: 20px; height: 20px;
  border: 2.5px solid rgba(201,162,39,.2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* empty state */
.emptyState {
  text-align: center;
  padding: 64px 24px;
}
.emptyState .icon {
  font-size: 3rem;
  color: var(--text-dim);
  margin-bottom: 16px;
}
.emptyState h3 { color: var(--text-muted); font-family: var(--font-body); font-weight: 600; }
.emptyState p  { font-size: .9rem; margin-top: 8px; }
