:root {
  --bakehouse-blue: #0f4f83;
  --bakehouse-blue-deep: #003060;
  --bakehouse-blue-soft: #2d4873;
  --stripe-blue: #305080;
  --tile-blue: #d0e0f0;
  --tile-blue-light: #eaf6ff;
  --apron-white: #f6f8f7;
  --paper-white: #ffffff;
  --china-blue: #89bee0;
  --china-blue-bright: #bfeaff;
  --pastry-warm: #b88755;
  --espresso: var(--bakehouse-blue);
  --espresso-deep: var(--bakehouse-blue-deep);
  --cocoa: var(--bakehouse-blue-soft);
  --pretzel: var(--china-blue);
  --honey: var(--china-blue);
  --honey-deep: var(--bakehouse-blue);
  --flour: #f7fbff;
  --cream: var(--tile-blue);
  --cream-soft: var(--tile-blue-light);
  --sage: var(--china-blue);
  --sage-dark: var(--bakehouse-blue-deep);
  --berry: #8f4042;
  --ink: #122f45;
  --ink-soft: rgba(18, 47, 69, 0.74);
  --line: rgba(15, 79, 131, 0.2);
  --dark-line: rgba(15, 79, 131, 0.16);
  --shadow: 0 24px 56px rgba(0, 48, 96, 0.17);
  --shadow-soft: 0 12px 32px rgba(0, 48, 96, 0.11);
  --max: 1240px;
  --serif: "Fredoka", "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  --sans: "Nunito", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(120% 80% at 88% -10%, rgba(234, 246, 255, 0.96), transparent 60%),
    radial-gradient(90% 70% at -12% 110%, rgba(208, 224, 240, 0.88), transparent 60%),
    var(--apron-white);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body.cart-open {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(15, 79, 131, 0.5);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: -4rem;
  left: 1rem;
  z-index: 60;
  border-radius: 999px;
  padding: 0.7rem 1rem;
  background: var(--bakehouse-blue);
  color: var(--flour);
  font-weight: 800;
}

.skip-link:focus {
  top: 1rem;
}

.order-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: minmax(13rem, 1fr) auto auto;
  align-items: center;
  gap: 1rem;
  min-height: 82px;
  padding: 0.55rem max(1rem, calc((100vw - var(--max)) / 2));
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(246, 248, 247, 0.88));
  backdrop-filter: blur(10px);
}

.order-brand {
  display: inline-grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.order-brand img {
  width: 9rem;
  height: auto;
  filter: drop-shadow(0 6px 14px rgba(0, 48, 96, 0.18));
}

.order-brand span {
  color: var(--ink-soft);
  font-size: 0.84rem;
  font-weight: 700;
}

.order-nav {
  display: flex;
  align-items: center;
  gap: clamp(0.8rem, 2vw, 1.4rem);
  color: var(--ink-soft);
  font-size: 0.88rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.order-nav a:hover,
.order-nav a:focus-visible {
  color: var(--bakehouse-blue);
}

.mini-cart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-width: 4.75rem;
  min-height: 44px;
  border: 1px solid rgba(0, 48, 96, 0.34);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--bakehouse-blue-soft), var(--bakehouse-blue-deep));
  color: var(--flour);
  font-weight: 900;
  box-shadow: 0 16px 36px rgba(0, 48, 96, 0.2);
}

.mini-cart svg,
.cart-close svg,
.dialog-head svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: currentColor;
}

.order-page {
  width: min(calc(100% - 2rem), var(--max));
  margin: 0 auto;
  padding: clamp(1.5rem, 3vw, 2.5rem) 0 5rem;
}

.order-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.74fr);
  align-items: end;
  gap: clamp(1rem, 4vw, 3rem);
  padding: clamp(2rem, 7vh, 4.4rem) 0 clamp(1.3rem, 4vh, 2.4rem);
}

.order-intro h1 {
  max-width: 11ch;
  margin: 0;
  color: var(--bakehouse-blue);
  font-family: var(--serif);
  font-size: clamp(3.5rem, 11vw, 8rem);
  font-weight: 800;
  line-height: 0.88;
  letter-spacing: 0;
}

.order-intro p {
  max-width: 46rem;
  margin: 1.3rem 0 0;
  color: var(--ink-soft);
  font-size: clamp(1.02rem, 2vw, 1.2rem);
}

.pickup-summary {
  display: grid;
  gap: 0.8rem;
  margin: 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-soft);
}

.pickup-summary div {
  display: grid;
  grid-template-columns: 8rem minmax(0, 1fr);
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
}

.pickup-summary div:last-child {
  border-bottom: 0;
}

.pickup-summary dt {
  color: rgba(15, 79, 131, 0.68);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.pickup-summary dd {
  margin: 0;
  color: var(--ink);
  font-weight: 800;
}

.ordering-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
  align-items: start;
  gap: clamp(1rem, 2.6vw, 2rem);
}

.menu-column {
  min-width: 0;
}

.menu-toolbar {
  position: sticky;
  top: 82px;
  z-index: 15;
  display: grid;
  gap: 0.9rem;
  padding: 1rem 0;
  background: linear-gradient(180deg, rgba(246, 248, 247, 0.97), rgba(246, 248, 247, 0.84));
  backdrop-filter: blur(10px);
}

.search-field {
  display: grid;
  gap: 0.35rem;
}

.search-field span,
.notes-field span,
.customer-fields span,
.pickup-card label {
  color: rgba(15, 79, 131, 0.68);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.cart-panel .notes-field span,
.cart-panel .customer-fields span,
.cart-panel .pickup-card label {
  color: rgba(15, 79, 131, 0.68);
}

.search-field input,
.notes-field textarea,
.customer-fields input,
.pickup-card select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-white);
  color: var(--ink);
}

.search-field input {
  min-height: 52px;
  padding: 0 1rem;
  font-size: 1rem;
  font-weight: 700;
}

.category-tabs {
  display: flex;
  gap: 0.55rem;
  overflow-x: auto;
  padding-bottom: 0.1rem;
  scrollbar-width: thin;
}

.category-tab {
  flex: 0 0 auto;
  min-height: 40px;
  border: 1px solid rgba(15, 79, 131, 0.22);
  border-radius: 999px;
  padding: 0.55rem 0.95rem;
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink-soft);
  font-size: 0.86rem;
  font-weight: 900;
}

.category-tab:hover,
.category-tab:focus-visible {
  color: var(--bakehouse-blue);
  border-color: rgba(15, 79, 131, 0.48);
}

.category-tab.is-active {
  border-color: transparent;
  background: linear-gradient(135deg, var(--bakehouse-blue-soft), var(--bakehouse-blue-deep));
  color: var(--flour);
}

.menu-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.8rem;
  margin: 0 0 1rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.menu-meta p {
  margin: 0;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.menu-item {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-white);
  color: var(--ink);
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.menu-item.no-photo {
  grid-template-rows: 1fr;
}

.menu-item:hover {
  transform: translateY(-2px);
  border-color: rgba(15, 79, 131, 0.38);
  box-shadow: var(--shadow);
}

.menu-item.no-photo .menu-photo {
  display: none;
}

.menu-item.no-photo .menu-item-body {
  position: relative;
  min-height: 13rem;
}

.menu-item.no-photo .menu-item-body::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 0.32rem;
  background: linear-gradient(180deg, var(--china-blue), var(--bakehouse-blue));
}

.menu-photo {
  position: relative;
  aspect-ratio: 4 / 3;
  background:
    linear-gradient(135deg, rgba(137, 190, 224, 0.28), rgba(208, 224, 240, 0.36)),
    var(--cream-soft);
  overflow: hidden;
}

.menu-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-empty {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: rgba(15, 79, 131, 0.5);
  font-family: var(--serif);
  font-size: 2.8rem;
  font-weight: 800;
}

.menu-item-body {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 0.7rem;
  padding: 1rem;
}

.item-topline {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.9rem;
}

.item-topline h2 {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1.22rem, 2vw, 1.5rem);
  line-height: 1.04;
  letter-spacing: 0;
}

.item-price {
  flex: 0 0 auto;
  color: var(--bakehouse-blue);
  font-weight: 900;
}

.item-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.item-tag {
  border-radius: 999px;
  padding: 0.22rem 0.5rem;
  background: rgba(137, 190, 224, 0.28);
  color: var(--bakehouse-blue-deep);
  font-size: 0.72rem;
  font-weight: 900;
}

.menu-item p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.item-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  padding-top: 0.2rem;
}

.qty-control {
  display: inline-grid;
  grid-template-columns: 2.2rem 2rem 2.2rem;
  align-items: center;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: var(--cream-soft);
}

.qty-control button {
  height: 100%;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 900;
}

.qty-control button:hover,
.qty-control button:focus-visible {
  background: rgba(137, 190, 224, 0.24);
}

.qty-control span {
  text-align: center;
  font-weight: 900;
}

.add-button {
  min-height: 40px;
  border: 0;
  border-radius: 999px;
  padding: 0 1rem;
  background: linear-gradient(135deg, var(--bakehouse-blue-soft), var(--bakehouse-blue-deep));
  color: var(--flour);
  font-weight: 900;
}

.cart-panel {
  position: sticky;
  top: 98px;
  display: grid;
  gap: 1rem;
  max-height: calc(100svh - 116px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  box-shadow: 0 28px 80px rgba(0, 48, 96, 0.2);
}

.cart-panel-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
}

.cart-panel h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.85rem;
  line-height: 1;
  letter-spacing: 0;
}

.cart-panel-head p {
  margin: 0.3rem 0 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.cart-close {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--cream-soft);
  color: var(--ink);
}

.pickup-card,
.notes-field,
.customer-fields {
  display: grid;
  gap: 0.45rem;
}

.pickup-card select {
  min-height: 44px;
  padding: 0 0.8rem;
  font-weight: 800;
}

.cart-items {
  display: grid;
  gap: 0.7rem;
  min-height: 4.2rem;
}

.empty-cart {
  margin: 0;
  border: 1px dashed rgba(15, 79, 131, 0.24);
  border-radius: 8px;
  padding: 1rem;
  color: var(--ink-soft);
  text-align: center;
}

.cart-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.8rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--line);
}

.cart-line h3 {
  margin: 0 0 0.18rem;
  color: var(--ink);
  font-size: 0.98rem;
  line-height: 1.2;
}

.cart-line p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.84rem;
}

.cart-line-controls {
  display: flex;
  align-items: center;
  justify-content: end;
  gap: 0.35rem;
}

.cart-line-controls button {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--cream-soft);
  color: var(--ink);
  font-weight: 900;
}

.line-price {
  margin-top: 0.3rem;
  color: var(--bakehouse-blue);
  font-weight: 900;
  text-align: right;
}

.notes-field textarea,
.customer-fields input {
  padding: 0.75rem 0.8rem;
}

.notes-field textarea {
  resize: vertical;
}

.customer-fields {
  grid-template-columns: 1fr 1fr;
}

.totals {
  display: grid;
  gap: 0.45rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--line);
}

.totals div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.totals strong {
  color: var(--ink);
}

.totals .total-row {
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 900;
}

.checkout-actions {
  display: grid;
  gap: 0.6rem;
}

.payment-routing {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.86rem;
  font-weight: 700;
}

.wallet-pay-button,
.card-checkout-button,
.gift-card-button,
.clover-checkout-button,
.button-link {
  min-height: 48px;
  border-radius: 999px;
  padding: 0 1rem;
  font-weight: 900;
  text-align: center;
}

.apple-pay-button {
  border: 0;
  background: #000;
  color: #fff;
}

.apple-pay-button span {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.apple-pay-button span::before {
  content: "";
  width: 1.08rem;
  height: 1.22rem;
  margin-top: -0.16rem;
  background: currentColor;
  clip-path: path("M13.1 4.7c-.7.8-1.7 1.4-2.7 1.3-.1-1 .4-2 1-2.7.7-.8 1.8-1.4 2.7-1.4.2 1-.3 2-1 2.8ZM14 6.2c-1.5-.1-2.7.8-3.4.8-.7 0-1.8-.8-3-.8-1.5 0-2.9.9-3.7 2.3-1.6 2.8-.4 7 1.1 9.3.8 1.1 1.7 2.4 2.9 2.3 1.2-.1 1.6-.7 3-.7s1.8.7 3 .7c1.3 0 2.1-1.1 2.9-2.3.9-1.3 1.2-2.5 1.2-2.6 0 0-2.4-.9-2.4-3.6 0-2.2 1.8-3.3 1.9-3.4-1.1-1.6-2.7-1.9-3.5-2Z");
}

.google-pay-button {
  border: 0;
  background: var(--paper-white);
  color: #3c4043;
  box-shadow: inset 0 0 0 1px var(--line);
}

.google-pay-button span::first-letter {
  color: #4285f4;
}

.checkout-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.wallet-pay-button:disabled,
.card-checkout-button:disabled,
.gift-card-button:disabled,
.clover-checkout-button:disabled {
  opacity: 0.48;
}

.card-checkout-button {
  border: 1px solid rgba(0, 48, 96, 0.34);
  background: linear-gradient(135deg, var(--bakehouse-blue-soft), var(--bakehouse-blue-deep));
  color: var(--flour);
}

.gift-card-button,
.clover-checkout-button {
  border: 1px solid var(--line);
  background: var(--cream-soft);
  color: var(--ink);
}

.checkout-status {
  min-height: 1.2rem;
  margin: 0;
  color: var(--berry);
  font-size: 0.86rem;
  font-weight: 700;
}

.call-link {
  justify-self: center;
  color: var(--bakehouse-blue);
  font-size: 0.88rem;
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 0.25rem;
}

.mobile-cart-bar,
.cart-scrim {
  display: none;
}

.checkout-dialog {
  width: min(calc(100vw - 2rem), 560px);
  border: 0;
  border-radius: 8px;
  padding: 0;
  background: var(--paper-white);
  color: var(--ink);
  box-shadow: 0 32px 90px rgba(0, 48, 96, 0.28);
}

.checkout-dialog::backdrop {
  background: rgba(0, 48, 96, 0.38);
}

.checkout-dialog form {
  display: grid;
  gap: 1rem;
  padding: 1rem;
}

.dialog-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
}

.dialog-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.8rem;
  line-height: 1;
}

.dialog-head button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--cream-soft);
  color: var(--ink);
}

.dialog-body {
  display: grid;
  gap: 0.8rem;
  color: var(--ink-soft);
}

.dialog-body strong {
  color: var(--ink);
}

.dialog-body ul {
  margin: 0;
  padding-left: 1.2rem;
}

.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: linear-gradient(135deg, var(--bakehouse-blue-soft), var(--bakehouse-blue-deep));
  color: var(--flour);
}

.button-link.secondary {
  border: 1px solid var(--line);
  background: var(--cream-soft);
  color: var(--ink);
}

@media (max-width: 1040px) {
  .ordering-workspace {
    grid-template-columns: 1fr;
  }

  .cart-panel {
    position: fixed;
    inset: auto 1rem 1rem;
    z-index: 55;
    max-height: min(80svh, 740px);
    transform: translateY(calc(100% + 2rem));
    transition: transform 0.25s ease;
  }

  body.cart-open .cart-panel {
    transform: translateY(0);
  }

  .cart-close {
    display: grid;
    place-items: center;
  }

  .cart-scrim {
    position: fixed;
    inset: 0;
    z-index: 50;
    background: rgba(0, 48, 96, 0.38);
  }

  body.cart-open .cart-scrim {
    display: block;
  }

  .mobile-cart-bar {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 45;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 54px;
    border: 1px solid rgba(0, 48, 96, 0.34);
    border-radius: 999px;
    padding: 0 1rem;
    background: linear-gradient(135deg, var(--bakehouse-blue-soft), var(--bakehouse-blue-deep));
    color: var(--flour);
    box-shadow: 0 18px 52px rgba(0, 48, 96, 0.24);
    font-weight: 900;
  }
}

@media (max-width: 820px) {
  .order-header {
    grid-template-columns: 1fr auto;
  }

  .order-brand {
    grid-template-columns: 7.5rem;
  }

  .order-brand img {
    width: 7.5rem;
  }

  .order-brand span,
  .order-nav {
    display: none;
  }

  .order-page {
    width: min(calc(100% - 1.5rem), var(--max));
    padding-bottom: 5.8rem;
  }

  .order-intro {
    grid-template-columns: 1fr;
    padding-top: 2.2rem;
  }

  .order-intro h1 {
    max-width: 8ch;
    font-size: clamp(3.4rem, 18vw, 5.6rem);
  }

  .pickup-summary div {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .menu-toolbar {
    top: 74px;
  }

  .menu-grid {
    grid-template-columns: 1fr;
  }

  .customer-fields {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 440px) {
  .order-page {
    width: calc(100% - 1rem);
  }

  .menu-item-body,
  .cart-panel {
    padding: 0.85rem;
  }

  .item-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .qty-control,
  .add-button {
    width: 100%;
  }

  .cart-panel {
    inset-inline: 0.5rem;
    bottom: 0.5rem;
  }

  .mobile-cart-bar {
    left: 0.5rem;
    right: 0.5rem;
    bottom: 0.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
