/* ============================================
   DESIGN TOKENS
   ============================================ */
:root {
  --walnut-950: #1B140F;
  --walnut-900: #241B14;
  --walnut-800: #392C22;
  --walnut-700: #4A3A2C;
  --walnut-600: #5E4A38;

  --honey-500: #C98A3E;
  --honey-400: #E0A55C;
  --honey-300: #F0C48A;

  --cream-100: #F3E9D8;
  --cream-200: #E4D6BE;
  --cream-300: #C9BBA4;
  --cream-400: #A6977E;

  --sage-500: #8B9678;
  --sage-400: #A7B292;

  --error: #C0604A;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Public Sans', -apple-system, sans-serif;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;

  --max-width: 1180px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--walnut-950);
  color: var(--cream-100);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

button {
  font-family: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--honey-400);
  outline-offset: 2px;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--cream-100);
  margin: 0;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.4rem, 5vw, 4rem); line-height: 1.05; font-weight: 500; }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); line-height: 1.15; }
h3 { font-size: 1.3rem; }

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--honey-400);
  font-weight: 600;
}

p { color: var(--cream-300); }

/* ============================================
   RING DIVIDER (Signature Element)
   Concentric growth-ring motif used as section
   separator — echoes both "wood grain" and
   "rings" as the product itself.
   ============================================ */
.ring-divider {
  display: flex;
  justify-content: center;
  padding: 64px 0;
}

.ring-divider svg { width: 72px; height: 72px; }
.ring-divider circle {
  fill: none;
  stroke: var(--walnut-600);
}

/* ============================================
   HEADER
   ============================================ */
header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(27, 20, 15, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--walnut-700);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--cream-100);
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo svg { width: 28px; height: 28px; }

nav.main-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.main-nav a {
  text-decoration: none;
  color: var(--cream-300);
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.main-nav a:hover { color: var(--honey-400); }

.cart-toggle {
  background: none;
  border: 1px solid var(--walnut-600);
  border-radius: var(--radius-md);
  color: var(--cream-100);
  padding: 9px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  transition: border-color 0.2s ease;
}
.cart-toggle:hover { border-color: var(--honey-400); }
.cart-toggle svg { width: 18px; height: 18px; }

#cart-count {
  background: var(--honey-500);
  color: var(--walnut-950);
  font-weight: 700;
  font-size: 0.75rem;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* ============================================
   HERO
   ============================================ */
.hero {
  padding: 88px 0 40px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}

.hero-copy p { font-size: 1.1rem; max-width: 42ch; margin-top: 20px; }

.hero-actions { margin-top: 36px; display: flex; gap: 16px; align-items: center; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: var(--radius-md);
  padding: 13px 26px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--honey-500);
  color: var(--walnut-950);
}
.btn-primary:hover { background: var(--honey-400); }

.btn-ghost {
  background: transparent;
  border-color: var(--walnut-600);
  color: var(--cream-100);
}
.btn-ghost:hover { border-color: var(--honey-400); color: var(--honey-400); }

.hero-visual {
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 35% 30%, var(--honey-300) 0%, transparent 45%),
    linear-gradient(160deg, var(--walnut-800), var(--walnut-900));
  position: relative;
  overflow: hidden;
  border: 1px solid var(--walnut-700);
}

.hero-visual .ring-mark {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-visual .ring-mark svg { width: 55%; height: 55%; opacity: 0.9; }

/* ============================================
   SHOP GRID
   ============================================ */
.section-head {
  text-align: center;
  margin-bottom: 48px;
}
.section-head h2 { margin-top: 10px; }
.section-head p { max-width: 50ch; margin: 14px auto 0; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 28px;
}

.product-card {
  background: var(--walnut-900);
  border: 1px solid var(--walnut-700);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.25s ease, transform 0.25s ease;
  position: relative;
}

.product-card:hover {
  border-color: var(--honey-500);
  transform: translateY(-3px);
}

.product-photo {
  aspect-ratio: 4 / 3;
  background: linear-gradient(150deg, var(--walnut-700), var(--walnut-800));
  position: relative;
  overflow: hidden;
}

.product-photo img { width: 100%; height: 100%; object-fit: cover; }

.product-photo .ring-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.35;
}
.product-photo .ring-fallback svg { width: 40%; height: 40%; }

.product-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.product-material {
  font-size: 0.82rem;
  color: var(--honey-400);
}

.product-desc {
  font-size: 0.9rem;
  color: var(--cream-300);
  flex: 1;
  margin: 4px 0 14px;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.price {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--cream-100);
}

.add-btn {
  background: var(--walnut-700);
  border: none;
  color: var(--cream-100);
  border-radius: var(--radius-md);
  padding: 9px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: background 0.2s ease;
}
.add-btn:hover { background: var(--honey-500); color: var(--walnut-950); }

.stock-low {
  font-size: 0.75rem;
  color: var(--sage-400);
  margin-top: 4px;
}

/* ============================================
   ABOUT
   ============================================ */
.about {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 56px;
  align-items: center;
}

.about-visual {
  aspect-ratio: 3/4;
  border-radius: var(--radius-lg);
  background: linear-gradient(200deg, var(--walnut-800), var(--walnut-950));
  border: 1px solid var(--walnut-700);
}

.about-copy p { font-size: 1.02rem; margin-top: 18px; }

/* ============================================
   FOOTER
   ============================================ */
footer {
  border-top: 1px solid var(--walnut-700);
  padding: 48px 0 32px;
  margin-top: 40px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-inner .logo { font-size: 1.1rem; }

.footer-meta {
  color: var(--cream-400);
  font-size: 0.85rem;
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-meta a { text-decoration: none; }
.footer-meta a:hover { color: var(--honey-400); }

/* ============================================
   CART DRAWER
   ============================================ */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 11, 8, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 50;
}
.overlay.open { opacity: 1; pointer-events: auto; }

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: min(420px, 100%);
  background: var(--walnut-900);
  border-left: 1px solid var(--walnut-700);
  z-index: 60;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}
.cart-drawer.open { transform: translateX(0); }

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px;
  border-bottom: 1px solid var(--walnut-700);
}

.cart-close {
  background: none;
  border: none;
  color: var(--cream-300);
  font-size: 1.4rem;
  line-height: 1;
  padding: 4px;
}
.cart-close:hover { color: var(--honey-400); }

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 8px 24px;
}

.cart-empty {
  color: var(--cream-400);
  text-align: center;
  padding: 60px 0;
  font-size: 0.95rem;
}

.cart-item {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--walnut-800);
}

.cart-item-thumb {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  background: var(--walnut-700);
  flex-shrink: 0;
  overflow: hidden;
}
.cart-item-thumb img { width: 100%; height: 100%; object-fit: cover; }

.cart-item-info { flex: 1; }
.cart-item-info h4 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.92rem;
  margin: 0 0 4px;
  color: var(--cream-100);
}

.qty-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}
.qty-btn {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--walnut-600);
  background: none;
  color: var(--cream-100);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.qty-btn:hover { border-color: var(--honey-400); }

.remove-item {
  background: none;
  border: none;
  color: var(--cream-400);
  font-size: 0.78rem;
  text-decoration: underline;
  padding: 0;
  margin-top: 8px;
}
.remove-item:hover { color: var(--error); }

.cart-item-price {
  font-family: var(--font-display);
  font-size: 0.95rem;
  white-space: nowrap;
}

.cart-footer {
  padding: 20px 24px 26px;
  border-top: 1px solid var(--walnut-700);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 16px;
}
.cart-total .label { color: var(--cream-300); font-size: 0.9rem; }
.cart-total .value { font-family: var(--font-display); font-size: 1.4rem; }

.checkout-btn {
  width: 100%;
  justify-content: center;
  padding: 14px;
  font-size: 1rem;
}

.checkout-note {
  font-size: 0.78rem;
  color: var(--cream-400);
  text-align: center;
  margin-top: 12px;
}

.payment-badges {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 10px;
}
.payment-badges span {
  font-size: 0.72rem;
  border: 1px solid var(--walnut-600);
  border-radius: 999px;
  padding: 3px 10px;
  color: var(--cream-300);
}

#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--cream-100);
  color: var(--walnut-950);
  padding: 12px 22px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 80;
}
#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 48px; }
  .about { grid-template-columns: 1fr; }
  .main-nav { display: none; }
  .header-inner { padding: 16px 20px; }
}
