:root {
  --cream: #FBF6EE;
  --paper: #FFFFFF;
  --cocoa: #2E1B12;
  --cocoa-soft: rgba(46, 27, 18, 0.6);
  --caramel: #B06A3B;
  --caramel-dark: #96542C;
  --sage: #EDE7D8;
  --hairline: rgba(46, 27, 18, 0.14);
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--cocoa);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
}

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--caramel);
  outline-offset: 3px;
  border-radius: 2px;
}

h1, h2, h3, .brand {
  font-family: var(--display);
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.5rem, 6.5vw, 4.25rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.9rem, 4vw, 2.75rem); letter-spacing: -0.01em; }
h3 { font-size: 1.3rem; font-weight: 600; }

.overline {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--caramel);
  margin: 0 0 0.75rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 246, 238, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem 2rem;
  max-width: 74rem;
  margin: 0 auto;
  padding: 0.85rem clamp(1.25rem, 5vw, 3rem);
}

.brand { line-height: 0; text-decoration: none; }
.brand-logo { display: block; height: 3rem; width: auto; }

.site-header nav { display: flex; gap: 1.5rem; align-items: baseline; }
.site-header nav a {
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cocoa-soft);
}
.site-header nav a:hover { color: var(--cocoa); }

/* Hero */
.hero {
  position: relative;
  display: grid;
  place-items: center;
  min-height: min(78vh, 42rem);
  overflow: hidden;
  color: #FFF9F2;
  text-align: center;
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(46, 27, 18, 0.25), rgba(46, 27, 18, 0.62));
}

.hero-content {
  position: relative;
  max-width: 42rem;
  padding: clamp(2rem, 6vw, 4rem) 1.5rem;
}

.hero .overline { color: #F2D8A7; }
.hero-content p { font-size: 1.15rem; }

.btn {
  display: inline-block;
  background: var(--caramel);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 0.85rem 2rem;
  font: 500 0.95rem var(--body);
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 2px 0 var(--caramel-dark);
  transition: background 0.15s ease, transform 0.15s ease;
}

.btn:hover { background: var(--caramel-dark); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

/* Sections */
.section {
  max-width: 74rem;
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 5.5rem) clamp(1.25rem, 5vw, 3rem);
}

.section-head { max-width: 40rem; margin-bottom: 2.25rem; }
.section-head > p { color: var(--cocoa-soft); margin: 0; }

/* Product grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
  gap: 1.5rem;
}

.product-card {
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: 1.25rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.product-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.product-card:hover .main { transform: scale(1.04); }

.photo { position: relative; overflow: hidden; }

.main { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; transition: transform 0.4s ease; }

.thumbnails {
  display: flex;
  gap: 0.45rem;
  padding: 0.7rem 1rem;
  border-top: 1px solid var(--hairline);
}

.thumb {
  width: 3rem;
  height: 3rem;
  border: 2px solid transparent;
  border-radius: 0.6rem;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  background: none;
  opacity: 0.7;
}

.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.thumb:hover { opacity: 1; }
.thumb.active { border-color: var(--caramel); opacity: 1; }

.card-body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.25rem 1.25rem 1.4rem;
  flex: 1;
}

.card-body h3 { margin-bottom: 0.15em; }
.card-body p { margin: 0 0 0.9rem; color: var(--cocoa-soft); font-size: 0.95rem; }
.card-price { font-weight: 600; color: var(--caramel); margin-bottom: 0.6rem !important; }
.price { color: var(--caramel); font-weight: 600; }

.options { display: grid; gap: 0.6rem; margin-top: auto; }

.option-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0;
  border-top: 1px solid var(--hairline);
}

.option-row span { font-size: 0.95rem; }

.hint {
  font-size: 0.8rem;
  color: var(--caramel);
  font-weight: 500;
  margin: 0.25rem 0 0.15rem;
}

.checks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.suboptions {
  border: 1px solid var(--hairline);
  border-radius: 0.75rem;
  padding: 0.25rem 0.9rem;
}

.box-row { margin-top: 0.6rem; padding: 0.8rem 0.9rem; }

.box-label {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 0.5rem;
}

.box-count {
  font-weight: 500;
  color: var(--caramel);
  font-size: 0.8rem;
  margin-left: 0.4rem;
}

.check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--cream);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
}

.check input { accent-color: var(--caramel); width: 1rem; height: 1rem; }

.stepper {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 0.3rem;
}

.stepper button {
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  border-radius: 50%;
  background: var(--cream);
  color: var(--cocoa);
  font: 500 1.2rem var(--body);
  cursor: pointer;
}
.stepper button:hover { background: var(--sage); }

.qty {
  font-weight: 600;
  min-width: 2ch;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* Pickup */
.pickup {
  background: var(--sage);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  max-width: none;
}

.pickup-inner { max-width: 68rem; margin: 0 auto; }
.pickup-inner > p { max-width: 38rem; color: var(--cocoa-soft); }

.spots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.spot {
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: 1.25rem;
  padding: 1.5rem;
}

.spot-title { font-family: var(--display); font-size: 1.35rem; font-weight: 600; }
.spot-detail { color: var(--cocoa-soft); font-size: 0.95rem; margin-top: 0.3rem; }
.payment-info, .payment-note { margin-top: 1.5rem; font-size: 0.95rem; color: var(--caramel); font-weight: 500; }

/* Order */
.order-layout {
  display: grid;
  grid-template-columns: minmax(16rem, 0.8fr) minmax(20rem, 1.2fr);
  gap: 2rem;
  align-items: start;
}

.order-summary {
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: 1.25rem;
  padding: 1.5rem;
  position: sticky;
  top: 5.5rem;
}

.order-summary h3 { margin-bottom: 0.75rem; }

.order-summary ul { list-style: none; margin: 0; padding: 0; }
.order-summary li {
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--hairline);
  font-size: 0.98rem;
}
.order-summary li.empty { border: 0; color: var(--cocoa-soft); }

form {
  display: grid;
  gap: 1.25rem;
}

label { display: grid; gap: 0.4rem; font-weight: 600; font-size: 0.95rem; }

input[type="text"], input[type="date"], select, textarea {
  font: 400 1rem var(--body);
  color: var(--cocoa);
  background: var(--paper);
  border: 1px solid var(--cocoa-soft);
  border-radius: 0.75rem;
  padding: 0.7rem 0.9rem;
  width: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--caramel);
  box-shadow: 0 0 0 3px rgba(176, 106, 59, 0.15);
}

#form-status {
  min-height: 1.5rem; margin: 0; font-weight: 500;
  padding: 0.7rem 1rem; border-radius: 0.75rem;
  background: #FEE; border: 1px solid #A53E2B;
  color: #A53E2B; font-weight: 600;
  display: none; /* hidden by default */
}
#form-status.show { display: block; }
#form-status.error { color: #A53E2B; background: #FEE; border-color: #A53E2B; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}
.shake { animation: shake 0.3s ease; }
.field-error { border-color: #A53E2B !important; box-shadow: 0 0 0 2px rgba(165,62,43,0.25); }

/* Card customise button */
.btn-card { width: 100%; box-shadow: none; padding: 0.7rem 1rem; font-size: 0.95rem; }

.btn-ghost {
  background: transparent;
  color: var(--cocoa);
  box-shadow: none;
  border: 1px solid var(--hairline);
}
.btn-ghost:hover { background: var(--cream); color: var(--cocoa); transform: none; }

.config-summary {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--caramel);
  margin: 0 0 0.75rem;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  background: rgba(46, 27, 18, 0.45);
  padding: 1rem;
}

.modal[hidden] { display: none; }

.modal-card {
  position: relative;
  background: var(--paper);
  border-radius: 1.25rem;
  max-width: 27rem;
  width: 100%;
  max-height: 85vh;
  overflow: auto;
  padding: 1.75rem;
}

.modal-close {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  border-radius: 50%;
  background: var(--cream);
  color: var(--cocoa);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}

.modal-close:hover { background: var(--sage); }

.modal-body .options { margin-top: 0.75rem; }

.modal-note {
  min-height: 1.25rem;
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
  font-weight: 500;
  color: #A53E2B;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1rem;
}

/* Sticky order bar */
.order-bar {
  position: sticky;
  bottom: 1rem;
  z-index: 40;
  padding: 0 1rem;
  pointer-events: none;
}

.order-bar-inner {
  max-width: 74rem;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--cocoa);
  color: #FFF9F2;
  border-radius: 999px;
  padding: 0.6rem 0.7rem 0.6rem 1.5rem;
  box-shadow: 0 8px 24px rgba(46, 27, 18, 0.28);
  pointer-events: auto;
}

.order-bar-inner .btn { padding: 0.7rem 1.4rem; box-shadow: none; }
#order-count { font-weight: 600; }
#order-total { font-weight: 700; color: var(--caramel); margin-top: 0.4rem; }

/* Footer */
.site-footer {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--cocoa-soft);
  font-size: 0.9rem;
}
.site-footer p { margin: 0; }
.site-footer a:hover { color: var(--cocoa); }

@media (max-width: 42rem) {
  .hero { min-height: 30rem; }
  .order-layout { grid-template-columns: 1fr; }
  .order-summary { position: static; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .product-card img { transition: none; }
}