/* ===== Tokens ===== */
:root {
  --bg: #f8f3ea;
  --bg-alt: #efe6d3;
  --ink: #2b2822;
  --ink-soft: #6b6455;
  --ink-faint: #9a9282;
  --accent: #4b5d3a;
  --accent-dark: #37452a;
  --accent-soft: #dde5d2;
  --clay: #c17a4d;
  --clay-dark: #a35f37;
  --line: rgba(43, 40, 34, 0.12);
  --white: #fffdf9;
  --shadow: 0 24px 50px -28px rgba(43, 40, 34, 0.35);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --serif: "Lora", "Times New Roman", serif;
  --sans: "Karla", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
svg { display: block; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

.section-kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--clay-dark); font-weight: 700; margin-bottom: 14px;
}
.section-kicker::before { content: ""; width: 26px; height: 1px; background: var(--clay); }
.section-lead { max-width: 56ch; color: var(--ink-soft); font-size: 1.05rem; margin-top: 14px; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px; border-radius: 999px;
  font-size: 0.95rem; font-weight: 700;
  transition: transform 0.35s var(--ease), background 0.3s ease, box-shadow 0.3s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: var(--white); box-shadow: 0 14px 30px -14px rgba(75, 93, 58, 0.55); }
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-outline:hover { border-color: var(--ink); transform: translateY(-2px); }

/* ===== Header ===== */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 18px 0; background: rgba(248, 243, 234, 0);
  transition: background 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}
.site-header.scrolled {
  background: rgba(248, 243, 234, 0.97);
  box-shadow: 0 1px 0 var(--line);
  padding: 12px 0;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.logo { font-family: var(--serif); font-size: 1.5rem; font-weight: 700; letter-spacing: 0.02em; }
.main-nav { display: flex; align-items: center; gap: 30px; }
.main-nav a { font-size: 0.9rem; font-weight: 600; padding-bottom: 4px; border-bottom: 1px solid transparent; transition: border-color 0.3s ease, color 0.3s ease; }
.main-nav a:hover { border-color: var(--clay); color: var(--clay-dark); }

.header-actions { display: flex; align-items: center; gap: 14px; }
.cart-btn { position: relative; width: 42px; height: 42px; border-radius: 50%; background: var(--accent-soft); display: flex; align-items: center; justify-content: center; }
.cart-btn svg { width: 20px; height: 20px; color: var(--accent-dark); }
.cart-badge {
  position: absolute; top: -4px; right: -4px;
  background: var(--clay); color: var(--white);
  font-size: 0.68rem; font-weight: 700; min-width: 18px; height: 18px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
}
.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: 6px; }
.nav-toggle span { width: 22px; height: 2px; background: var(--ink); transition: transform 0.3s ease, opacity 0.3s ease; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 780px) {
  .main-nav {
    position: fixed; inset: 0 0 0 26%;
    background: var(--white);
    flex-direction: column; justify-content: center; align-items: flex-start;
    gap: 26px; padding: 40px;
    transform: translateX(100%);
    transition: transform 0.45s var(--ease);
    box-shadow: -20px 0 50px -30px rgba(0,0,0,0.4);
  }
  .main-nav.open { transform: translateX(0); }
  .main-nav a { font-size: 1.4rem; }
  .nav-toggle { display: flex; z-index: 101; }
}
.nav-scrim { position: fixed; inset: 0; background: rgba(0,0,0,0.4); opacity: 0; pointer-events: none; transition: opacity 0.4s ease; z-index: 99; }
.nav-scrim.open { opacity: 1; pointer-events: auto; }

/* ===== Hero ===== */
.hero { position: relative; min-height: 92svh; display: flex; align-items: center; padding: 150px 0 80px; overflow: hidden; }
.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(43,40,34,0.68) 0%, rgba(43,40,34,0.32) 55%, rgba(43,40,34,0.15) 100%); }
.hero-inner { position: relative; z-index: 1; max-width: 640px; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 0.8rem; letter-spacing: 0.18em; text-transform: uppercase; color: #e9dfc8; font-weight: 700; margin-bottom: 22px; }
.hero-eyebrow::before { content: ""; width: 30px; height: 1px; background: #e9dfc8; }
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.2rem); color: var(--white); }
.hero-lead { color: rgba(255,255,255,0.88); max-width: 46ch; margin-top: 22px; font-size: 1.08rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 34px; }
.hero-actions .btn-outline { color: var(--white); border-color: rgba(255,255,255,0.4); }
.hero-actions .btn-outline:hover { border-color: var(--white); }

.reveal-words .word-mask { display: inline-block; overflow: hidden; vertical-align: top; }
.reveal-words .word { display: inline-block; transform: translateY(110%); will-change: transform; }
.reveal-fade { opacity: 0; transform: translateY(16px); }
.reveal-up { opacity: 0; transform: translateY(28px); }

section { padding: 100px 0; }
.section-tight { padding: 76px 0; }
.section-alt { background: var(--bg-alt); }

/* ===== Filter tabs ===== */
.filter-tabs { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }
.filter-tab { padding: 10px 20px; border-radius: 999px; border: 1px solid var(--line); font-size: 0.86rem; font-weight: 700; transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease; }
.filter-tab.active, .filter-tab:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }

/* ===== Product grid ===== */
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin-top: 44px; }
.product-card { background: var(--white); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; transition: transform 0.4s var(--ease), box-shadow 0.4s ease; }
.product-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.product-media { aspect-ratio: 4/3.2; overflow: hidden; }
.product-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.product-card:hover .product-media img { transform: scale(1.05); }
.product-body { padding: 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-body h3 { font-size: 1.08rem; }
.product-body p { color: var(--ink-soft); font-size: 0.86rem; flex: 1; }
.product-price { font-family: var(--serif); font-size: 1.2rem; color: var(--accent-dark); font-weight: 700; margin-top: 6px; }
.product-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.qty-stepper { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 999px; padding: 4px 6px; }
.qty-stepper button { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.qty-stepper button:hover { background: var(--accent-soft); }
.qty-stepper span { min-width: 18px; text-align: center; font-weight: 700; font-size: 0.92rem; }
.btn-add { background: var(--accent); color: var(--white); padding: 10px 18px; border-radius: 999px; font-size: 0.84rem; font-weight: 700; transition: background 0.3s ease, transform 0.3s var(--ease); }
.btn-add:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn-add.added { background: var(--clay); }
.btn-add:disabled, .qty-stepper button:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-add:disabled:hover { background: var(--accent); }

.product-card.out-of-stock .product-media img { filter: grayscale(0.6); opacity: 0.6; }
.product-media { position: relative; }
.stock-tag {
  position: absolute; top: 12px; left: 12px;
  background: var(--ink); color: var(--white);
  font-size: 0.68rem; letter-spacing: 0.05em; text-transform: uppercase; font-weight: 700;
  padding: 5px 10px; border-radius: 999px;
}

@media (max-width: 900px) { .product-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .product-grid { grid-template-columns: 1fr; } }

/* ===== Shipping / info cards ===== */
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin-top: 46px; }
.info-card { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 30px; }
.info-icon { width: 42px; height: 42px; border-radius: 10px; background: var(--accent-soft); display: flex; align-items: center; justify-content: center; color: var(--accent-dark); margin-bottom: 18px; }
.info-icon svg { width: 22px; height: 22px; }
.info-card h3 { font-size: 1.05rem; margin-bottom: 10px; }
.info-card p { color: var(--ink-soft); font-size: 0.9rem; }
@media (max-width: 860px) { .info-grid { grid-template-columns: 1fr; } }

/* ===== Cart drawer ===== */
.cart-scrim { position: fixed; inset: 0; background: rgba(43,40,34,0.4); opacity: 0; pointer-events: none; transition: opacity 0.4s ease; z-index: 199; }
.cart-scrim.open { opacity: 1; pointer-events: auto; }
.cart-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 92vw);
  background: var(--white); z-index: 200;
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.45s var(--ease);
  box-shadow: -20px 0 50px -20px rgba(0,0,0,0.35);
}
.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(--line); }
.cart-header h2 { font-size: 1.2rem; }
.cart-close { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 50%; }
.cart-close:hover { background: var(--bg-alt); }
.cart-items { flex: 1; overflow-y: auto; padding: 10px 24px; }
.cart-empty { color: var(--ink-faint); text-align: center; padding: 60px 20px; font-size: 0.92rem; }
.cart-item { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.cart-item img { width: 60px; height: 60px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.cart-item-info { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.cart-item-info h4 { font-size: 0.92rem; }
.cart-item-row { display: flex; align-items: center; justify-content: space-between; }
.cart-item-price { font-size: 0.86rem; color: var(--ink-soft); }
.cart-item-remove { font-size: 0.78rem; color: var(--clay-dark); font-weight: 700; }
.cart-footer { padding: 20px 24px; border-top: 1px solid var(--line); }
.cart-subtotal { display: flex; justify-content: space-between; font-family: var(--serif); font-size: 1.15rem; font-weight: 700; margin-bottom: 16px; }
.cart-shipping-row { font-family: var(--sans); font-size: 0.92rem; font-weight: 600; color: var(--ink-soft); margin-bottom: 8px; }
.cart-total-row { font-size: 1.3rem; padding-top: 12px; border-top: 1px solid var(--line); }
.cart-note { font-size: 0.78rem; color: var(--ink-faint); margin-top: 12px; }

.shipping-calc { margin-bottom: 20px; }
.shipping-calc label { display: block; font-size: 0.8rem; font-weight: 700; margin-bottom: 8px; }
.shipping-row { display: flex; gap: 8px; }
.shipping-row input {
  flex: 1; font: inherit; padding: 10px 14px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--bg); color: var(--ink); min-width: 0;
}
.shipping-row input:focus { outline: none; border-color: var(--accent); }
.shipping-row .btn-outline { padding: 10px 16px; font-size: 0.82rem; }
.shipping-result { font-size: 0.82rem; color: var(--ink-soft); margin-top: 10px; }

/* Floating cart button */
.cart-float {
  position: fixed; bottom: 24px; right: 24px; z-index: 90;
  min-width: 58px; height: 58px; padding: 0 18px; border-radius: 999px;
  background: var(--accent); color: var(--white);
  display: flex; align-items: center; gap: 10px; justify-content: center;
  box-shadow: 0 16px 30px -12px rgba(75,93,58,0.65);
  transition: transform 0.3s var(--ease);
  font-weight: 700; font-size: 0.9rem;
}
.cart-float:hover { transform: scale(1.05); }
.cart-float svg { width: 20px; height: 20px; }
.cart-float[hidden] { display: none; }

/* ===== Footer ===== */
.site-footer { padding: 60px 0 30px; border-top: 1px solid var(--line); }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 40px; padding-bottom: 30px; }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { font-size: 0.9rem; }
.footer-links a:hover { color: var(--clay-dark); }
.footer-note { font-size: 0.78rem; color: var(--ink-faint); max-width: 60ch; }

@media (max-width: 700px) {
  section { padding: 70px 0; }
}
