@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Work+Sans:wght@400;500;600;700&display=swap');

:root {
  --paper: #F6F2E8;
  --paper-raised: #FFFFFF;
  --ink: #22281F;
  --ink-soft: #56594F;
  --forest: #1F3B2E;
  --forest-dark: #16291F;
  --leaf: #5B8C51;
  --leaf-dark: #45703C;
  --mustard: #E0A83E;
  --brick: #B24B32;
  --line: #D8CFB8;
  --radius-s: 6px;
  --radius-m: 10px;
  --shadow-card: 0 1px 0 rgba(34,40,31,0.06);
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Work Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }

a { color: inherit; }

.icon { width: 100%; height: 100%; display: block; }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header ---------- */

.site-header {
  background: var(--forest);
  color: var(--paper);
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 24px;
}

.logo {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.5rem;
  text-decoration: none;
  color: var(--paper);
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-shrink: 0;
}

.logo span.mark {
  color: var(--mustard);
  font-style: italic;
}

.main-nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.main-nav a {
  text-decoration: none;
  color: rgba(246,242,232,0.85);
  font-size: 0.95rem;
  padding: 8px 12px;
  border-radius: var(--radius-s);
  transition: background 0.15s ease, color 0.15s ease;
}

.main-nav a:hover, .main-nav a:focus-visible {
  background: rgba(255,255,255,0.1);
  color: var(--paper);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.search-box {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 999px;
  padding: 7px 14px;
  gap: 8px;
}

.search-box input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 0.9rem;
  width: 150px;
}

.search-box input::placeholder { color: rgba(246,242,232,0.55); }
.search-box svg { width: 16px; height: 16px; color: rgba(246,242,232,0.7); flex-shrink: 0; }

.cart-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--mustard);
  color: var(--forest-dark);
  border: none;
  border-radius: 999px;
  padding: 9px 16px 9px 12px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease;
}

.cart-button:hover { background: #ecb956; }
.cart-button:active { transform: scale(0.97); }
.cart-button svg { width: 18px; height: 18px; }

.cart-count-badge {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--brick);
  color: #fff;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
}

/* ---------- Hero ---------- */

.hero {
  background: var(--forest);
  color: var(--paper);
  padding: 72px 0 88px;
  position: relative;
  overflow: hidden;
}

.hero .container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.hero-eyebrow-line {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--mustard);
  font-size: 0.95rem;
  margin-bottom: 20px;
}

.hero-eyebrow-line svg { width: 20px; height: 20px; }

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 4.6vw, 3.6rem);
  font-weight: 600;
  line-height: 1.08;
  margin: 0 0 22px;
  max-width: 14ch;
}

.hero .underline-accent {
  position: relative;
  display: inline-block;
}

.hero .underline-accent svg {
  position: absolute;
  left: 0;
  bottom: -10px;
  width: 100%;
  height: 14px;
  color: var(--mustard);
}

.hero p.lede {
  font-size: 1.1rem;
  color: rgba(246,242,232,0.82);
  max-width: 42ch;
  margin: 0 0 32px;
}

.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 13px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
}

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

.btn-primary { background: var(--mustard); color: var(--forest-dark); }
.btn-primary:hover { background: #ecb956; }

.btn-outline { background: transparent; color: var(--paper); border-color: rgba(246,242,232,0.4); }
.btn-outline:hover { border-color: var(--paper); background: rgba(255,255,255,0.06); }

.btn-dark { background: var(--forest); color: var(--paper); }
.btn-dark:hover { background: var(--forest-dark); }

.btn-block { width: 100%; }

.hero-crate {
  position: relative;
  transform: rotate(2deg);
}

.hero-crate-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  background: var(--forest-dark);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-m);
  padding: 20px;
}

.hero-crate-grid .cell {
  aspect-ratio: 1;
  border-radius: var(--radius-s);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--forest-dark);
}

.hero-crate-grid .cell svg { width: 46%; height: 46%; }

/* ---------- Sections ---------- */

section.block { padding: 64px 0; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 600;
  margin: 0;
}

.section-head p {
  margin: 4px 0 0;
  color: var(--ink-soft);
}

.section-head .see-all {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--leaf-dark);
  text-decoration: none;
  white-space: nowrap;
}

/* Category strip */

.category-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}

.category-chip {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 18px 12px;
  text-align: center;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  transition: border-color 0.15s ease, transform 0.12s ease;
}

.category-chip:hover { border-color: var(--leaf); transform: translateY(-2px); }
.category-chip.active { border-color: var(--forest); background: var(--forest); color: var(--paper); }

.category-chip .icon-wrap {
  width: 40px;
  height: 40px;
  margin: 0 auto 10px;
  border-radius: 50%;
  background: #EFEADA;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--forest);
}

.category-chip.active .icon-wrap { background: rgba(255,255,255,0.15); color: var(--mustard); }
.category-chip .icon-wrap svg { width: 22px; height: 22px; }

/* Toolbar (filter + sort on catalog) */

.catalog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.result-count { color: var(--ink-soft); font-size: 0.9rem; }

select#sort-select {
  font-family: var(--font-body);
  font-size: 0.9rem;
  padding: 8px 12px;
  border-radius: var(--radius-s);
  border: 1px solid var(--line);
  background: var(--paper-raised);
  color: var(--ink);
}

/* Product grid */

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.product-card {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-card);
}

.product-media {
  aspect-ratio: 1.3;
  border-radius: var(--radius-s);
  background: #EFEADA;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--forest);
}

.product-media svg { width: 40%; height: 40%; }

.product-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
}

.product-card .desc {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin: 0;
  flex-grow: 1;
}

.product-card .meta-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.price {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--brick);
}

.unit {
  font-size: 0.78rem;
  color: var(--ink-soft);
}

.add-btn {
  background: var(--forest);
  color: var(--paper);
  border: none;
  border-radius: var(--radius-s);
  padding: 10px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.15s ease;
}

.add-btn:hover { background: var(--forest-dark); }

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--ink-soft);
}

.empty-state svg { width: 56px; height: 56px; margin-bottom: 16px; color: var(--line); }

/* ---------- Cart drawer ---------- */

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(22,41,31,0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 50;
}

.drawer-backdrop.open { opacity: 1; pointer-events: auto; }

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px, 100%);
  background: var(--paper);
  z-index: 51;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
  box-shadow: -6px 0 24px rgba(0,0,0,0.15);
}

.cart-drawer.open { transform: translateX(0); }

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}

.drawer-head h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin: 0;
}

.drawer-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink);
  padding: 4px;
}

.drawer-close svg { width: 22px; height: 22px; }

.drawer-lines {
  flex: 1;
  overflow-y: auto;
  padding: 12px 24px;
}

.cart-line {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.cart-line .thumb {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-s);
  background: #EFEADA;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--forest);
  flex-shrink: 0;
}

.cart-line .thumb svg { width: 60%; height: 60%; }

.cart-line .info { flex: 1; min-width: 0; }
.cart-line .info h4 { margin: 0 0 2px; font-size: 0.95rem; font-family: var(--font-body); font-weight: 600; }
.cart-line .info .unit-price { font-size: 0.8rem; color: var(--ink-soft); }

.qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  margin-top: 8px;
}

.qty-stepper button {
  width: 26px;
  height: 26px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 1rem;
  color: var(--forest);
  display: flex;
  align-items: center;
  justify-content: center;
}

.qty-stepper span { min-width: 20px; text-align: center; font-size: 0.85rem; font-weight: 600; }

.line-remove {
  background: none;
  border: none;
  color: var(--ink-soft);
  font-size: 0.78rem;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
  margin-top: 6px;
}

.line-total {
  font-family: var(--font-display);
  font-weight: 600;
  white-space: nowrap;
}

.drawer-foot {
  padding: 20px 24px 24px;
  border-top: 1px solid var(--line);
}

.drawer-subtotal {
  display: flex;
  justify-content: space-between;
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 14px;
  font-family: var(--font-display);
}

.drawer-note {
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin: 10px 0 0;
  text-align: center;
}

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 12px);
  background: var(--forest-dark);
  color: var(--paper);
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 60;
}

.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast svg { width: 16px; height: 16px; color: var(--mustard); flex-shrink: 0; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--forest-dark);
  color: rgba(246,242,232,0.75);
  padding: 48px 0 28px;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.site-footer h4 {
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 0.85rem;
  text-transform: none;
  margin: 0 0 14px;
}

.site-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.site-footer a { text-decoration: none; color: inherit; font-size: 0.9rem; }
.site-footer a:hover { color: var(--paper); }

.footer-bottom {
  padding-top: 20px;
  font-size: 0.8rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

/* ---------- Checkout page ---------- */

.checkout-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: start;
  padding: 48px 0 80px;
}

.panel {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 28px;
}

.panel + .panel { margin-top: 20px; }

.panel h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin: 0 0 18px;
}

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 0.85rem; font-weight: 600; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  background: var(--paper);
  color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--leaf);
  outline-offset: 1px;
}

.fulfillment-options { display: flex; gap: 12px; margin-bottom: 18px; }
.fulfillment-options label {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  padding: 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.fulfillment-options input { margin-right: 8px; }
.fulfillment-options label.selected { border-color: var(--forest); background: #EFEADA; }
.fulfillment-options .opt-title { font-weight: 600; font-size: 0.92rem; }
.fulfillment-options .opt-sub { font-size: 0.8rem; color: var(--ink-soft); }

.summary-line { display: flex; justify-content: space-between; padding: 8px 0; font-size: 0.92rem; }
.summary-line.total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 14px; font-weight: 700; font-size: 1.1rem; font-family: var(--font-display); }
.summary-line .muted { color: var(--ink-soft); }

.checkout-item { display: flex; justify-content: space-between; font-size: 0.88rem; padding: 6px 0; color: var(--ink-soft); }

.error-text { color: var(--brick); font-size: 0.82rem; margin-top: 4px; display: none; }
.field.invalid input { border-color: var(--brick); }
.field.invalid .error-text { display: block; }

.security-note {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin-top: 14px;
}
.security-note svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ---------- Status pages (success / cancel) ---------- */

.status-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
}

.status-card {
  max-width: 480px;
  text-align: center;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 48px 36px;
}

.status-card .icon-wrap {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #EFEADA;
  color: var(--forest);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 22px;
}

.status-card .icon-wrap svg { width: 32px; height: 32px; }
.status-card h1 { font-family: var(--font-display); font-size: 1.6rem; margin: 0 0 12px; }
.status-card p { color: var(--ink-soft); margin: 0 0 24px; }
.order-ref { font-family: var(--font-body); font-weight: 600; background: #EFEADA; padding: 10px 16px; border-radius: var(--radius-s); display: inline-block; margin-bottom: 24px; }

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-crate { display: none; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .category-strip { grid-template-columns: repeat(3, 1fr); }
  .checkout-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .main-nav { display: none; }
  .search-box input { width: 100px; }
}

@media (max-width: 560px) {
  .product-grid { grid-template-columns: 1fr 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .fulfillment-options { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Product images & stock status (INR store) ---------- */

.product-media { position: relative; }

.product-photo {
  width: 100%;
  height: 100%;
  max-height: 120px;
  object-fit: cover;
  border-radius: var(--radius-s);
  display: block;
}

.cart-line .thumb .product-photo { max-height: 100%; }

.stock-flag {
  position: absolute;
  top: 6px;
  left: 6px;
  background: var(--brick);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 3px 8px;
  border-radius: 999px;
}

.product-card.out-of-stock .product-media,
.product-card.out-of-stock h3,
.product-card.out-of-stock .desc,
.product-card.out-of-stock .meta-row { opacity: 0.55; }

.product-card.out-of-stock .stock-flag { opacity: 1; }

.add-btn[disabled] {
  background: #CFC7B2;
  border-color: #CFC7B2;
  color: #6E6754;
  cursor: not-allowed;
}

.add-btn[disabled]:hover { background: #CFC7B2; }

.checkout-item .muted { font-size: 0.82rem; }
