/* ============================================================
   WOUDYA — Unified Design System
   Premium artisanal oud oil e-commerce

   This file consolidates all CSS custom properties and shared
   styles previously scattered as inline CSS across 20+ pages.
   ============================================================ */

/* === DESIGN TOKENS === */
:root {
  /* Colors — Gold palette */
  --gold: #B8860B;
  --gold-light: #D4A843;
  --gold-pale: #E8D5A3;

  /* Colors — Backgrounds */
  --bg: #0d0d0d;
  --bg-surface: #1a1a1a;
  --bg-elevated: #201f1f;
  --bg-card: #151210;

  /* Colors — Text */
  --text: #e8e0d4;
  --text-muted: #9a9084;
  --text-gold: var(--gold-light);

  /* Colors — Borders & Accents */
  --border: #2a2520;
  --border-hover: var(--gold);
  --success: #27ae60;
  --error: #e74c3c;

  /* Typography */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;

  /* Spacing */
  --section-pad: 5rem;
  --container-max: 1100px;
  --container-narrow: 800px;

  /* Transitions */
  --transition: 0.3s ease;
}

/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.7;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--gold-light); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold-pale); }

img { max-width: 100%; height: auto; display: block; }

/* === TYPOGRAPHY === */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--gold-light);
  line-height: 1.2;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); letter-spacing: 0.08em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); letter-spacing: 0.05em; }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.1rem; }

.brand-title {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 8vw, 7rem);
  letter-spacing: 0.25em;
  color: var(--gold-light);
  font-weight: 300;
}

.section-label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* === LAYOUT === */
.container { max-width: var(--container-max); margin: 0 auto; padding: 0 2rem; }
.container-narrow { max-width: var(--container-narrow); margin: 0 auto; padding: 0 2rem; }
.section { padding: var(--section-pad) 0; }

/* === NAVIGATION === */
.nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  background: rgba(13, 13, 13, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(42, 37, 32, 0.4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 4.5rem;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: 0.2em;
  color: var(--gold-light);
  text-decoration: none;
  font-weight: 300;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color var(--transition);
}

.nav-links a:hover { color: var(--gold-light); }

.nav-cart {
  position: relative;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.2rem;
  transition: color var(--transition);
}

.nav-cart:hover { color: var(--gold-light); }

.cart-badge {
  position: absolute;
  top: -6px;
  right: -8px;
  width: 16px;
  height: 16px;
  background: var(--gold);
  color: var(--bg);
  border-radius: 50%;
  font-size: 0.6rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Hamburger menu (mobile) */
.nav-hamburger {
  display: none;
  cursor: pointer;
  color: var(--gold-light);
  font-size: 1.5rem;
}

/* === BUTTONS === */
.btn {
  display: inline-block;
  padding: 0.9rem 2.2rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
}

.btn-primary {
  background: var(--gold);
  color: var(--bg);
}

.btn-primary:hover {
  background: var(--gold-light);
  color: var(--bg);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold-light);
}

.btn-outline:hover {
  background: rgba(184, 134, 11, 0.1);
  border-color: var(--gold-light);
}

.btn-full { width: 100%; text-align: center; }

/* === CARDS === */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  padding: 2rem;
  transition: border-color var(--transition);
}

.card:hover { border-color: var(--border-hover); }

/* === PRODUCT COMPONENTS === */

/* Grade selector pills */
.grade-pills {
  display: flex;
  gap: 0.5rem;
}

.grade-pill {
  padding: 0.5rem 1.2rem;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}

.grade-pill.active,
.grade-pill:hover {
  border-color: var(--gold);
  background: rgba(184, 134, 11, 0.15);
  color: var(--gold-light);
}

/* Volume selector tiles */
.vol-tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.vol-tile {
  padding: 0.45rem 1rem;
  font-size: 0.78rem;
  font-weight: 400;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}

.vol-tile.active,
.vol-tile:hover {
  border-color: var(--gold);
  background: rgba(184, 134, 11, 0.15);
  color: var(--gold-light);
}

/* Price display */
.price-total {
  font-size: 1.8rem;
  font-weight: 500;
  color: var(--gold-light);
}

.price-unit {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.price-saving {
  font-size: 0.75rem;
  color: var(--success);
}

/* Quantity stepper */
.step-controls {
  display: flex;
  align-items: center;
  gap: 0;
}

.step-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}

.step-btn:hover {
  border-color: var(--gold);
  color: var(--gold-light);
}

.step-value {
  width: 48px;
  text-align: center;
  font-size: 0.9rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  height: 36px;
  line-height: 36px;
}

/* Trust bar */
.trust-bar {
  display: flex;
  justify-content: center;
  gap: 2rem;
  padding: 1.2rem 2rem;
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.trust-item {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.trust-item svg, .trust-item .icon {
  color: var(--gold);
  font-size: 1rem;
}

/* Divider */
.divider {
  width: 60px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
  margin: 0 auto;
}

/* === PRODUCT GRID (SHOP) === */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.product-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  transition: border-color var(--transition);
  overflow: hidden;
}

.product-card:hover { border-color: var(--gold); }

.product-card-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  filter: brightness(0.95);
}

.product-card-body {
  padding: 1.5rem;
}

.product-card-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--gold-light);
  margin-bottom: 0.3rem;
}

.product-card-price {
  font-size: 1rem;
  color: var(--gold);
  font-weight: 500;
}

.product-card-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* === FILTER TABS === */
.filter-tabs {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 3rem;
}

.filter-tab {
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
}

.filter-tab.active,
.filter-tab:hover {
  color: var(--gold-light);
  border-bottom-color: var(--gold);
}

/* === NEWSLETTER === */
.newsletter {
  max-width: 650px;
  margin: 0 auto;
  border: 1px solid var(--border);
  padding: 3rem;
  text-align: center;
}

.newsletter-form {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.newsletter-input {
  flex: 1;
  padding: 0.8rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.85rem;
}

.newsletter-input::placeholder { color: var(--text-muted); }
.newsletter-input:focus { outline: none; border-color: var(--gold); }

/* === FOOTER === */
.footer {
  padding: 4rem 2rem 2rem;
  text-align: center;
  border-top: 1px solid var(--border);
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: 0.2em;
  color: var(--gold-light);
  font-weight: 300;
}

.footer-tagline {
  font-style: italic;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 2rem;
  list-style: none;
}

.footer-links a {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.footer-links a:hover { color: var(--gold-light); }

.footer-copy {
  margin-top: 2rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  :root {
    --section-pad: 3rem;
  }

  .nav-links { display: none; }
  .nav-hamburger { display: block; }

  .trust-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    text-align: center;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .newsletter-form {
    flex-direction: column;
  }

  .footer-links {
    flex-direction: column;
    gap: 1rem;
  }

  /* Sticky bottom CTA */
  .sticky-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 90;
    background: rgba(13, 13, 13, 0.95);
    backdrop-filter: blur(12px);
    padding: 0.8rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--border);
  }

  .sticky-cta .price-total { font-size: 1.2rem; }
}

/* === MOBILE NAV DRAWER === */
.nav-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(13, 13, 13, 0.98);
  z-index: 200;
  display: none;
  flex-direction: column;
  padding: 5rem 2rem 2rem;
}

.nav-drawer.open { display: flex; }

.nav-drawer a {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--text);
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  letter-spacing: 0.05em;
}

.nav-drawer a:hover { color: var(--gold-light); }

.nav-drawer-close {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

/* === UTILITY === */
.text-center { text-align: center; }
.text-gold { color: var(--gold-light); }
.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-4 { margin-top: 2rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 2rem; }
.pt-nav { padding-top: 5rem; }
