:root {
  --cream: #FBF3E6;
  --paper: #FEFBF5;
  --maroon: #712B13;
  --maroon-deep: #2D1B0B;
  --gold: #C79A44;
  --gold-light: #E8C77A;
  --ink: #2B1C13;
  --ink-soft: #6B5A4B;
  --line: #E6D8BE;
  --radius: 14px;
  --max-width: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "Work Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

h1, h2 {
  font-family: "Fraunces", Georgia, serif;
  color: var(--maroon-deep);
  margin: 0 0 0.4em;
  font-weight: 500;
  letter-spacing: -0.01em;
}

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

a { color: inherit; }

.demo-banner {
  background: var(--maroon-deep);
  color: var(--gold-light);
  text-align: center;
  font-size: 13.5px;
  padding: 8px 16px;
  letter-spacing: 0.01em;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(251, 243, 230, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-logo {
  height: 46px;
  width: auto;
  display: block;
  border-radius: 6px;
}

.brand-word {
  font-family: "Fraunces", Georgia, serif;
  font-size: 22px;
  font-weight: 500;
  color: var(--maroon-deep);
}

.site-nav {
  display: flex;
  gap: 28px;
}

.site-nav a {
  text-decoration: none;
  color: var(--ink);
  font-size: 15px;
}

.site-nav a:hover { color: var(--maroon); }

.cart-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--maroon);
  color: var(--gold-light);
  border: none;
  border-radius: 999px;
  padding: 8px 14px;
  font-family: "Work Sans", sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.cart-btn:hover { background: var(--maroon-deep); }

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

.hero { padding: 64px 0 40px; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.hero-kicker {
  color: var(--maroon);
  font-size: 14px;
  margin: 0 0 14px;
  font-weight: 600;
}

.hero h1 {
  font-size: 46px;
  line-height: 1.12;
}

.hero-sub {
  color: var(--ink-soft);
  font-size: 17px;
  max-width: 46ch;
  margin: 18px 0 28px;
}

.btn {
  display: inline-block;
  border-radius: 999px;
  padding: 13px 26px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-family: "Work Sans", sans-serif;
}

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

.btn-primary:hover { background: var(--maroon-deep); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

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

/* Hero visual: an open sweets box, six compartments */
.hero-box {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 10px;
  aspect-ratio: 3 / 2;
  padding: 14px;
  background: var(--maroon-deep);
  border-radius: 20px;
}

.hero-box-cell {
  border-radius: 10px;
  background: linear-gradient(155deg, var(--gold-light), var(--gold) 70%);
}

.hero-box-cell.c1 { background: linear-gradient(155deg, #F3D9A0, var(--gold)); }
.hero-box-cell.c2 { background: linear-gradient(155deg, #E4B472, #C2833A); }
.hero-box-cell.c3 { background: linear-gradient(155deg, var(--gold-light), #B9863C); }
.hero-box-cell.c4 { background: linear-gradient(155deg, #EAC98A, #A9702E); }
.hero-box-cell.c5 { background: linear-gradient(155deg, #F0D6A2, var(--gold)); }
.hero-box-cell.c6 { background: linear-gradient(155deg, #E2B26D, #B77E36); }

/* ---------- Menu ---------- */

.menu-section { padding: 56px 0 64px; }

.section-title { font-size: 30px; }

.section-sub {
  color: var(--ink-soft);
  margin: 0 0 28px;
}

.menu-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 28px;
}

.tab {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  padding: 9px 20px;
  border-radius: 999px;
  font-family: "Work Sans", sans-serif;
  font-size: 14.5px;
  font-weight: 500;
  cursor: pointer;
}

.tab.active {
  background: var(--maroon);
  border-color: var(--maroon);
  color: var(--gold-light);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.loading-note { color: var(--ink-soft); padding: 20px; grid-column: 1 / -1; }

.product-card {
  background: var(--paper);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.product-name {
  font-family: "Fraunces", Georgia, serif;
  font-size: 19px;
  color: var(--maroon-deep);
  font-weight: 500;
}

.product-desc {
  color: var(--ink-soft);
  font-size: 14px;
  flex-grow: 1;
}

.product-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 4px;
}

.product-price {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
}

.product-unit {
  font-size: 12.5px;
  color: var(--ink-soft);
}

.qty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 6px;
}

.stepper {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.stepper button {
  background: none;
  border: none;
  width: 32px;
  height: 32px;
  font-size: 16px;
  cursor: pointer;
  color: var(--maroon);
}

.stepper span {
  min-width: 24px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
}

.add-btn {
  background: var(--maroon);
  color: var(--gold-light);
  border: none;
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: "Work Sans", sans-serif;
}

.add-btn:hover { background: var(--maroon-deep); }

/* ---------- About / delivery ---------- */

.about-section, .delivery-section { padding: 40px 0; }

.about-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 48px;
  align-items: center;
}

.about-photo {
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--gold-light), var(--maroon) 120%);
}

.about-copy p { color: var(--ink-soft); }

.delivery-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 40px;
  align-items: start;
  border-top: 1px solid var(--line);
  padding-top: 40px;
}

.delivery-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}

.delivery-card-label {
  font-size: 13px;
  color: var(--ink-soft);
  margin: 0 0 6px;
}

.delivery-card-value {
  margin: 0;
  font-weight: 500;
}

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

.site-footer {
  border-top: 1px solid var(--line);
  padding: 26px 0;
  color: var(--ink-soft);
  font-size: 13.5px;
}

.footer-row {
  display: flex;
  justify-content: space-between;
}

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

.scrim {
  position: fixed;
  inset: 0;
  background: rgba(43, 28, 19, 0.45);
  z-index: 30;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(400px, 100vw);
  background: var(--paper);
  z-index: 40;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.28s ease;
  box-shadow: -8px 0 24px rgba(43,28,19,0.12);
}

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

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

.cart-drawer-head h2 { font-size: 20px; margin: 0; }

#close-cart, .modal-close {
  background: none;
  border: none;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  color: var(--ink-soft);
}

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

.cart-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.cart-line-name { font-size: 14.5px; font-weight: 500; }
.cart-line-sub { font-size: 12.5px; color: var(--ink-soft); }

.cart-empty {
  color: var(--ink-soft);
  padding: 40px 0;
  text-align: center;
  font-size: 14.5px;
}

.cart-summary {
  padding: 18px 22px 22px;
  border-top: 1px solid var(--line);
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 14px;
}

/* ---------- Modal ---------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(43, 28, 19, 0.5);
  padding: 20px;
}

.modal-card {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 32px;
  width: 100%;
  max-width: 420px;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-card h2 { font-size: 22px; margin-bottom: 18px; }

.modal-close { position: absolute; top: 18px; right: 18px; }

#checkout-form { display: flex; flex-direction: column; gap: 14px; }

#checkout-form label {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-soft);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#checkout-form input, #checkout-form textarea {
  font-family: "Work Sans", sans-serif;
  font-size: 15px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--cream);
  color: var(--ink);
  resize: vertical;
}

#checkout-form input:focus, #checkout-form textarea:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}

.form-error {
  color: #A02617;
  font-size: 13.5px;
  margin: 0;
}

.confirm-card { text-align: center; }

.confirm-mark {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--maroon);
  color: var(--gold-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin: 0 auto 16px;
}

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

@media (max-width: 860px) {
  .hero-grid, .about-grid, .delivery-grid { grid-template-columns: 1fr; }
  .about-photo { order: -1; aspect-ratio: 16/9; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .site-nav { display: none; }
  .hero h1 { font-size: 34px; }
}

@media (max-width: 520px) {
  .product-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cart-drawer { transition: none; }
}
