/* ═══════════════════════════════════════════════════════════════════
   NeuGlow Design System — Shared Stylesheet
   Fonts: Cormorant Garamond (display) + DM Sans (body)
   Palette: Cream #F8F4EE | Orange #E8520A | Dark #1A1208
   ═══════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;0,700;1,300;1,400&family=DM+Sans:wght@300;400;500;600&display=swap');

/* ── Reset & Variables ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --cream:      #F8F4EE;
  --cream-dark: #EDE7DC;
  --orange:     #E8520A;
  --orange-dk:  #C44208;
  --dark:       #1A1208;
  --dark-mid:   #2C1F10;
  --warm-gray:  #8B7355;
  --text:       #3D2B1A;
  --border:     rgba(139,115,85,0.25);

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;

  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 20px;

  --shadow-sm: 0 2px 8px rgba(26,18,8,0.08);
  --shadow-md: 0 8px 32px rgba(26,18,8,0.12);
  --shadow-lg: 0 20px 60px rgba(26,18,8,0.18);

  --transition: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: var(--font-body); cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: var(--font-body); }

/* ── Grain texture overlay ───────────────────────────────────────── */
body::after {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none; z-index: 9999; opacity: 0.5;
}

/* ── Typography ─────────────────────────────────────────────────── */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  color: var(--dark);
}
h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 3rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.9rem); }
h4 { font-size: 1.2rem; }

p { color: var(--warm-gray); line-height: 1.75; }

/* ── Utility classes ────────────────────────────────────────────── */
.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ── Buttons ─────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 28px;
  font-size: 13px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
  border-radius: var(--r-sm);
  transition: var(--transition);
  cursor: pointer;
}
.btn-primary {
  background: var(--orange); color: white;
  box-shadow: 0 4px 14px rgba(232,82,10,0.35);
}
.btn-primary:hover { background: var(--orange-dk); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(232,82,10,0.45); }
.btn-secondary {
  background: transparent; color: var(--dark);
  border: 1.5px solid var(--border);
}
.btn-secondary:hover { border-color: var(--orange); color: var(--orange); }
.btn-dark {
  background: var(--dark); color: var(--cream);
}
.btn-dark:hover { background: var(--dark-mid); }
.btn-ghost {
  background: rgba(255,255,255,0.1); color: white;
  border: 1px solid rgba(255,255,255,0.2);
}
.btn-ghost:hover { background: rgba(255,255,255,0.18); }
.btn-sm { padding: 9px 18px; font-size: 12px; }
.btn-lg { padding: 16px 36px; font-size: 14px; }
.btn-full { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ── Forms ───────────────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block; margin-bottom: 6px;
  font-size: 12px; font-weight: 500; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--warm-gray);
}
.form-control {
  width: 100%; padding: 11px 14px;
  background: white; border: 1.5px solid var(--border);
  border-radius: var(--r-sm); font-size: 14px; color: var(--dark);
  transition: var(--transition);
}
.form-control:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(232,82,10,0.1); }
.form-control::placeholder { color: #BCA98A; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ── Navbar ──────────────────────────────────────────────────────── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 900;
  padding: 0 24px; height: 68px;
  display: flex; align-items: center;
  transition: var(--transition);
}
.navbar.scrolled {
  background: rgba(248,244,238,0.95);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
}
.navbar-inner {
  max-width: 1180px; width: 100%; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 1.6rem; font-weight: 700;
  color: var(--dark); letter-spacing: -0.02em;
}
.nav-logo span { color: var(--orange); }
.nav-links { display: flex; align-items: center; gap: 32px; list-style: none; }
.nav-links a {
  font-size: 13px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--warm-gray); transition: var(--transition);
}
.nav-links a:hover, .nav-links a.active { color: var(--orange); }
.nav-actions { display: flex; align-items: center; gap: 16px; }
.nav-icon-btn {
  position: relative; background: none; border: none; cursor: pointer;
  width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; transition: var(--transition); color: var(--dark);
  font-size: 18px;
}
.nav-icon-btn:hover { background: var(--cream-dark); }
.cart-badge {
  position: absolute; top: 4px; right: 4px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--orange); color: white;
  font-size: 10px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.hamburger { display: none; flex-direction: column; gap: 4px; }
.hamburger span { width: 22px; height: 2px; background: var(--dark); border-radius: 2px; transition: var(--transition); }

/* ── Toast ───────────────────────────────────────────────────────── */
#toast-container {
  position: fixed; bottom: 24px; right: 24px; z-index: 9000;
  display: flex; flex-direction: column; gap: 10px;
}
.toast {
  padding: 14px 20px; border-radius: var(--r-sm);
  background: var(--dark); color: var(--cream);
  font-size: 13px; font-weight: 500;
  box-shadow: var(--shadow-md);
  animation: slideUp 0.3s ease, fadeOut 0.3s ease 2.7s forwards;
  max-width: 320px;
}
.toast.success { background: #2D6A4F; }
.toast.error   { background: #C44208; }
@keyframes slideUp   { from { transform: translateY(20px); opacity: 0; } }
@keyframes fadeOut   { to   { opacity: 0; transform: translateY(-8px); } }

/* ── Page header (for inner pages) ──────────────────────────────── */
.page-header {
  padding: 120px 24px 60px;
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-mid) 100%);
  text-align: center;
  position: relative; overflow: hidden;
}
.page-header::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 80% at 50% 0%, rgba(232,82,10,0.25) 0%, transparent 70%);
}
.page-header h1 { color: var(--cream); position: relative; }
.page-header p  { color: rgba(248,244,238,0.65); position: relative; margin-top: 12px; }

/* ── Product card ────────────────────────────────────────────────── */
.product-card {
  background: white; border-radius: var(--r-lg);
  overflow: hidden; border: 1px solid var(--border);
  transition: var(--transition);
  position: relative;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.product-image {
  aspect-ratio: 1;
  background: linear-gradient(135deg, var(--cream-dark), var(--cream));
  display: flex; align-items: center; justify-content: center;
  font-size: 5rem; position: relative;
}
.product-badge {
  position: absolute; top: 16px; left: 16px;
  padding: 4px 12px; border-radius: 20px;
  background: var(--orange); color: white;
  font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
}
.product-info { padding: 20px; }
.product-name {
  font-family: var(--font-display);
  font-size: 1.25rem; font-weight: 600;
  color: var(--dark); margin-bottom: 6px;
}
.product-rating { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; color: #D4882A; font-size: 13px; }
.product-price { font-size: 1.4rem; font-weight: 600; color: var(--dark); }
.product-price .compare { font-size: 0.95rem; color: #BCA98A; text-decoration: line-through; margin-left: 8px; }
.product-desc { font-size: 13px; color: var(--warm-gray); margin: 8px 0 16px; }
.stock-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 500; }
.stock-badge.in-stock { color: #2D6A4F; }
.stock-badge.low-stock { color: #D4882A; }
.stock-badge.out-of-stock { color: #C44208; }

/* ── Modal ───────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 800;
  background: rgba(26,18,8,0.65);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0; pointer-events: none; transition: var(--transition);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: white; border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto;
  transform: scale(0.95) translateY(10px);
  transition: var(--transition);
}
.modal-overlay.open .modal { transform: scale(1) translateY(0); }
.modal-header {
  padding: 24px 28px 20px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-header h3 { font-family: var(--font-display); font-size: 1.6rem; }
.modal-close {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; cursor: pointer; transition: var(--transition); color: var(--warm-gray);
}
.modal-close:hover { border-color: var(--orange); color: var(--orange); }
.modal-body { padding: 24px 28px; }
.modal-footer { padding: 20px 28px; border-top: 1px solid var(--border); }

/* ── Footer ──────────────────────────────────────────────────────── */
.footer {
  background: var(--dark); color: var(--cream);
  padding: 60px 24px 30px;
}
.footer-grid {
  max-width: 1180px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px;
  padding-bottom: 48px; border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-logo {
  font-family: var(--font-display);
  font-size: 1.8rem; font-weight: 700; margin-bottom: 14px;
}
.footer-logo span { color: var(--orange); }
.footer p { color: rgba(248,244,238,0.55); font-size: 13px; }
.footer-links h4 { color: var(--cream); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 16px; }
.footer-links ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-links a { color: rgba(248,244,238,0.55); font-size: 13px; transition: var(--transition); }
.footer-links a:hover { color: var(--orange); }
.footer-bottom {
  max-width: 1180px; margin: 0 auto;
  padding-top: 24px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: rgba(248,244,238,0.35);
}

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}
