/* Root + Crumb — warm bakery aesthetic, mobile-first */

:root {
  --cream: #faf6f1;
  --cream-dark: #f0e6d8;
  --wheat: #e8d5b5;
  --crust: #6b4226;
  --crust-deep: #4a2c17;
  --crumb: #3c2f2f;
  --muted: #6b5e54;
  --berry: #5c2a3a;
  --leaf: #3d5c3a;
  --white: #fffefb;
  --shadow: 0 8px 24px rgba(74, 44, 23, 0.12);
  --radius: 14px;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-display: "Georgia", "Palatino Linotype", serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--crumb);
  background:
    radial-gradient(ellipse at top, #fff9f0 0%, var(--cream) 45%, var(--cream-dark) 100%);
  min-height: 100vh;
  line-height: 1.55;
}

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

a {
  color: var(--crust);
}

.container {
  width: min(1080px, calc(100% - 2rem));
  margin-inline: auto;
}

/* Progressive enhancement: show/hide by JS availability */
body.no-js .js-only {
  display: none !important;
}

body.js .no-js-only {
  display: none !important;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--crust);
  color: var(--white);
  padding: 0.6rem 1rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 0 0 8px 0;
}

.skip-link:focus {
  left: 0;
}

.noscript-banner {
  background: #fff3cd;
  color: #3c2f2f;
  border-bottom: 1px solid rgba(107, 66, 38, 0.2);
  padding: 0.85rem 1rem;
  text-align: center;
  font-size: 0.95rem;
  line-height: 1.45;
}

.noscript-banner a {
  font-weight: 700;
}

.hero-how {
  margin: 1rem 0 0;
  font-size: 0.95rem;
  color: var(--muted);
}

.hero-how a {
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.section-jump {
  margin: 0;
  font-size: 0.95rem;
}

.section-jump a {
  font-weight: 700;
  text-decoration: none;
}

.section-jump a:hover {
  text-decoration: underline;
}

.product-actions label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  display: inline;
}

.js-required-panel {
  max-width: 36rem;
  margin-inline: auto;
}

.footer-nav {
  font-size: 0.9rem;
}

.footer-nav a {
  font-weight: 600;
  text-decoration: none;
}

.footer-nav a:hover {
  text-decoration: underline;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(10px);
  background: rgba(250, 246, 241, 0.9);
  border-bottom: 1px solid rgba(107, 66, 38, 0.12);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  flex-wrap: wrap;
}

.site-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  font-size: 0.95rem;
}

.site-nav > a:not(.cart-btn) {
  color: var(--crust-deep);
  font-weight: 600;
  text-decoration: none;
  padding: 0.35rem 0.15rem;
}

.site-nav > a:not(.cart-btn):hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-nav .cart-btn {
  text-decoration: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: inherit;
}

.brand-mark {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: linear-gradient(145deg, #c48a4a, var(--crust));
  display: grid;
  place-items: center;
  color: var(--white);
  font-size: 1.2rem;
  box-shadow: var(--shadow);
}

.brand-text strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--crust-deep);
  letter-spacing: 0.02em;
}

.brand-text span {
  font-size: 0.75rem;
  color: var(--muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.cart-btn {
  appearance: none;
  border: 1px solid rgba(107, 66, 38, 0.25);
  background: var(--white);
  color: var(--crust-deep);
  border-radius: 999px;
  padding: 0.5rem 0.9rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: background 0.15s, transform 0.15s;
}

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

.cart-count {
  background: var(--crust);
  color: var(--white);
  border-radius: 999px;
  min-width: 1.35rem;
  height: 1.35rem;
  font-size: 0.75rem;
  display: inline-grid;
  place-items: center;
  padding: 0 0.35rem;
}

/* Hero */
.hero {
  padding: 2.5rem 0 1.5rem;
}

.hero-card {
  background:
    linear-gradient(135deg, rgba(255, 254, 251, 0.95), rgba(232, 213, 181, 0.55)),
    radial-gradient(circle at 90% 10%, rgba(107, 66, 38, 0.12), transparent 40%);
  border: 1px solid rgba(107, 66, 38, 0.12);
  border-radius: calc(var(--radius) + 6px);
  padding: 2rem 1.5rem;
  box-shadow: var(--shadow);
}

.hero-kicker {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--berry);
  margin-bottom: 0.5rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 5vw, 2.75rem);
  line-height: 1.15;
  color: var(--crust-deep);
  margin: 0 0 0.75rem;
}

.hero-lead {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 38rem;
  margin: 0 0 1.25rem;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.pill {
  background: var(--white);
  border: 1px solid rgba(107, 66, 38, 0.15);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  font-size: 0.85rem;
  color: var(--crumb);
}

.pill strong {
  color: var(--crust);
}

/* Status banners */
.banner {
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  margin: 1rem 0 0;
  font-weight: 600;
}

.banner-open {
  background: rgba(61, 92, 58, 0.12);
  color: var(--leaf);
  border: 1px solid rgba(61, 92, 58, 0.25);
}

.banner-closed {
  background: rgba(92, 42, 58, 0.1);
  color: var(--berry);
  border: 1px solid rgba(92, 42, 58, 0.25);
}

.banner-info {
  background: rgba(107, 66, 38, 0.08);
  color: var(--crust-deep);
  border: 1px solid rgba(107, 66, 38, 0.15);
}

/* Products */
.section {
  padding: 1.75rem 0 2.5rem;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: 1.65rem;
  color: var(--crust-deep);
  margin: 0;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
}

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

@media (min-width: 960px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.product-card {
  background: var(--white);
  border: 1px solid rgba(107, 66, 38, 0.1);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.product-visual {
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  font-size: 4rem;
  background:
    linear-gradient(160deg, var(--cream) 0%, var(--wheat) 100%);
  border-bottom: 1px solid rgba(107, 66, 38, 0.08);
}

.product-body {
  padding: 1.1rem 1.15rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  flex: 1;
}

.product-body h3 {
  margin: 0;
  font-size: 1.15rem;
  color: var(--crust-deep);
}

.product-desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  flex: 1;
}

.price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.price {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--crust);
}

.unit {
  font-size: 0.8rem;
  color: var(--muted);
}

.product-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.25rem;
}

select.qty-select {
  flex: 0 0 auto;
  border: 1px solid rgba(107, 66, 38, 0.25);
  border-radius: 10px;
  padding: 0.55rem 0.6rem;
  font: inherit;
  background: var(--cream);
  color: var(--crumb);
}

.btn {
  appearance: none;
  border: none;
  border-radius: 10px;
  padding: 0.65rem 1rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s, opacity 0.12s, background 0.12s;
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--crust);
  color: var(--white);
  flex: 1;
}

.btn-primary:hover:not(:disabled) {
  background: var(--crust-deep);
}

.btn-secondary {
  background: var(--cream-dark);
  color: var(--crust-deep);
  border: 1px solid rgba(107, 66, 38, 0.15);
}

.btn-ghost {
  background: transparent;
  color: var(--berry);
  border: 1px solid transparent;
  padding: 0.35rem 0.5rem;
  font-weight: 600;
  font-size: 0.85rem;
}

.btn-ghost:hover {
  border-color: rgba(92, 42, 58, 0.2);
}

/* Layout: order panel */
.order-layout {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 900px) {
  .order-layout {
    grid-template-columns: 1.4fr 1fr;
    align-items: start;
  }
}

.panel {
  background: var(--white);
  border: 1px solid rgba(107, 66, 38, 0.1);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.panel h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin: 0 0 0.85rem;
  color: var(--crust-deep);
}

.cart-empty {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0;
}

.cart-lines {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cart-line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px dashed rgba(107, 66, 38, 0.15);
}

.cart-line-name {
  font-weight: 600;
}

.cart-line-meta {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  padding-top: 0.75rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--crust-deep);
}

/* Forms */
.form-grid {
  display: grid;
  gap: 0.85rem;
}

label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--crumb);
}

input,
textarea,
.form-grid select {
  font: inherit;
  border: 1px solid rgba(107, 66, 38, 0.22);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  background: var(--cream);
  color: var(--crumb);
  width: 100%;
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid rgba(107, 66, 38, 0.35);
  outline-offset: 1px;
}

.field-hint {
  font-weight: 400;
  font-size: 0.8rem;
  color: var(--muted);
}

.form-actions {
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.form-error {
  color: var(--berry);
  font-size: 0.9rem;
  margin: 0;
  min-height: 1.2em;
}

.pickup-box {
  background: var(--cream);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  font-size: 0.92rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.pickup-box strong {
  color: var(--crust-deep);
}

/* Payment method radios */
.payment-methods {
  border: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.payment-methods legend {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--crumb);
  padding: 0;
}

.payment-options {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.payment-option {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid rgba(107, 66, 38, 0.22);
  border-radius: 10px;
  background: var(--cream);
  cursor: pointer;
  font-weight: 400;
}

.payment-option:has(input:checked) {
  border-color: rgba(107, 66, 38, 0.55);
  box-shadow: 0 0 0 2px rgba(107, 66, 38, 0.12);
  background: #fffdf8;
}

.payment-option input {
  width: auto;
  margin-top: 0.2rem;
  accent-color: var(--crust-deep);
  flex-shrink: 0;
}

.payment-option-body {
  display: grid;
  gap: 0.1rem;
}

.payment-option-body strong {
  color: var(--crust-deep);
  font-size: 0.95rem;
}

.payment-note {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  background: var(--cream);
  border: 1px solid rgba(107, 66, 38, 0.15);
  text-align: left;
  font-size: 0.95rem;
  color: var(--crumb);
}

.payment-note strong {
  color: var(--crust-deep);
}

/* Thank you */
.thanks-card {
  max-width: 560px;
  margin: 3rem auto;
  text-align: center;
}

.thanks-card h1 {
  font-family: var(--font-display);
  color: var(--crust-deep);
}

/* Footer */
.site-footer {
  padding: 2rem 0 2.5rem;
  color: var(--muted);
  font-size: 0.9rem;
  border-top: 1px solid rgba(107, 66, 38, 0.1);
  margin-top: 1rem;
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
}

/* Closed overlay for products */
body.orders-closed .product-actions .btn-primary,
body.orders-closed #checkout-btn {
  display: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
