:root {
  --green: #0e5b3f;
  --green-dark: #0a3929;
  --red: #b8322b;
  --red-dark: #87231f;
  --cream: #fff8ee;
  --paper: #fffdf8;
  --ink: #1f1b17;
  --muted: #6e6256;
  --line: #e9dfd3;
  --shadow: 0 18px 45px rgba(31, 27, 23, 0.12);
  --bottom-bar-safe-area: 0px;
  --bottom-bar-reserve: 68px;
}

@supports (padding: max(0px)) {
  :root {
    --bottom-bar-safe-area: min(env(safe-area-inset-bottom, 0px), 24px);
    --bottom-bar-reserve: calc(68px + var(--bottom-bar-safe-area));
  }
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background:
    linear-gradient(90deg, rgba(14, 91, 63, 0.08), transparent 24%, transparent 76%, rgba(184, 50, 43, 0.08)),
    var(--cream);
}

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

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px clamp(16px, 4vw, 42px);
  border-bottom: 1px solid rgba(233, 223, 211, 0.9);
  background: rgba(255, 248, 238, 0.92);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--green-dark);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  font-weight: 850;
}

.brand img {
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  object-fit: contain;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
}

.top-nav a {
  border-radius: 8px;
  padding: 10px 12px;
}

.top-nav a:hover,
.top-nav a:focus-visible {
  color: var(--green-dark);
  background: rgba(14, 91, 63, 0.08);
  outline: none;
}

.intro-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px;
  min-height: 250px;
  padding: clamp(30px, 7vw, 78px) clamp(16px, 4vw, 42px);
  color: #fffdf8;
  background:
    linear-gradient(90deg, rgba(10, 57, 41, 0.92), rgba(10, 57, 41, 0.72), rgba(135, 35, 31, 0.52)),
    url("https://images.unsplash.com/photo-1513104890138-7c749659a591?auto=format&fit=crop&w=1800&q=80")
      center / cover;
}

.intro-copy {
  max-width: 720px;
}

.kicker {
  margin: 0 0 8px;
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.intro-band .kicker,
.intro-band p {
  color: rgba(255, 253, 248, 0.86);
}

.intro-band h1 {
  margin: 0;
  max-width: 680px;
  font-size: clamp(2.1rem, 6vw, 4.9rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.intro-band p {
  max-width: 610px;
  font-size: 1.05rem;
  line-height: 1.7;
}

.intro-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: max-content;
  padding: 10px 13px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  color: #fffdf8;
  background: rgba(31, 27, 23, 0.28);
  font-weight: 800;
}

.business-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border-bottom: 1px solid var(--line);
  background: var(--line);
}

.business-strip div,
.business-strip a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 62px;
  padding: 12px clamp(14px, 3vw, 26px);
  color: var(--green-dark);
  background: rgba(255, 253, 248, 0.94);
  font-size: 0.94rem;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
}

.business-strip svg {
  flex: 0 0 auto;
  color: var(--red);
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #45d483;
  box-shadow: 0 0 0 5px rgba(69, 212, 131, 0.17);
}

.intro-status.is-closed .status-dot {
  background: var(--red);
  box-shadow: 0 0 0 5px rgba(184, 50, 43, 0.18);
}

.intro-status.is-open .status-dot {
  background: #45d483;
  box-shadow: 0 0 0 5px rgba(69, 212, 131, 0.17);
}

.order-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 410px);
  gap: clamp(18px, 3vw, 34px);
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: clamp(20px, 4vw, 42px);
}

.section-heading {
  margin-bottom: 18px;
}

.section-heading h2,
.import-panel h2 {
  margin: 0;
  color: var(--green-dark);
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  line-height: 1.06;
  letter-spacing: 0;
}

.section-heading.compact h2 {
  font-size: 1.55rem;
}

.cart-count-badge {
  display: inline-flex;
  width: max-content;
  margin: 8px 0 0;
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--red-dark);
  background: rgba(184, 50, 43, 0.09);
  font-size: 0.84rem;
  font-weight: 850;
}

.section-note {
  max-width: 820px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.menu-grid {
  display: grid;
  gap: 20px;
}

.menu-category {
  display: grid;
  gap: 12px;
}

.menu-category-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 8px 14px;
  border-bottom: 2px solid rgba(184, 50, 43, 0.22);
  padding-bottom: 8px;
}

.menu-category-heading h3 {
  margin: 0;
  color: var(--red-dark);
  font-size: clamp(1.28rem, 3vw, 1.85rem);
  font-style: italic;
  letter-spacing: 0;
}

.menu-category-heading span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
}

.pizza-card {
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 12px 28px rgba(31, 27, 23, 0.08);
}

.menu-column {
  min-width: 0;
}

.pizza-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #e6ded2;
}

.pizza-card-body {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  padding: 12px;
}

.pizza-card-body p,
.pizza-card-body h3 {
  overflow-wrap: anywhere;
}

.pizza-card-title {
  display: flex;
  flex-wrap: wrap;
  align-items: start;
  justify-content: space-between;
  gap: 8px;
}

.pizza-card h3 {
  flex: 1 1 90px;
  min-width: 0;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  margin: 0;
  color: var(--green-dark);
  font-size: 1.02rem;
  line-height: 1.12;
  letter-spacing: 0;
}

.price-pill {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 5px 7px;
  color: var(--red-dark);
  background: rgba(184, 50, 43, 0.09);
  font-size: 0.78rem;
  font-weight: 850;
  white-space: nowrap;
}

.pizza-card p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  margin: 0;
  min-height: 39px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.pizza-actions {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 9px;
}

.pizza-actions.single-action {
  grid-template-columns: 1fr;
}

.pizza-card .primary-action {
  min-height: 38px;
  font-size: 0.86rem;
}

.icon-button,
.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border-radius: 8px;
  border: 0;
  font-weight: 850;
  line-height: 1;
}

.icon-button {
  width: 46px;
  color: var(--green-dark);
  background: rgba(14, 91, 63, 0.09);
}

.icon-button:hover,
.icon-button:focus-visible {
  background: rgba(14, 91, 63, 0.16);
  outline: none;
}

.primary-action {
  min-width: 0;
  padding: 0 14px;
  color: #fffdf8;
  background: var(--green);
  box-shadow: 0 10px 24px rgba(14, 91, 63, 0.18);
}

.primary-action:hover,
.primary-action:focus-visible {
  background: var(--green-dark);
  outline: none;
}

.secondary-action {
  min-width: 0;
  padding: 0 14px;
  border: 1px solid var(--line);
  color: var(--green-dark);
  background: #fff;
}

.secondary-action:hover,
.secondary-action:focus-visible {
  border-color: rgba(14, 91, 63, 0.28);
  background: rgba(14, 91, 63, 0.07);
  outline: none;
}

.cart-panel {
  align-self: start;
  display: grid;
  gap: 16px;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.96);
  box-shadow: var(--shadow);
}

.cart-item p strong {
  color: var(--ink);
}

.empty-cart {
  display: grid;
  place-items: center;
  gap: 9px;
  min-height: 128px;
  border: 1px dashed rgba(110, 98, 86, 0.36);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
  background: rgba(255, 248, 238, 0.62);
}

.empty-cart svg {
  color: var(--red);
}

.cart-items {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.cart-item {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.cart-item-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  min-width: 0;
}

.cart-item h3 {
  margin: 0;
  min-width: 0;
  color: var(--green-dark);
  font-size: 0.98rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.cart-item strong {
  flex: 0 0 auto;
  white-space: nowrap;
}

.cart-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.cart-item-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.cart-stepper {
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(14, 91, 63, 0.05);
}

.cart-stepper button {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  color: var(--green-dark);
  background: transparent;
}

.cart-stepper button:hover,
.cart-stepper button:focus-visible {
  background: rgba(14, 91, 63, 0.12);
  outline: none;
}

.cart-stepper strong {
  min-width: 28px;
  text-align: center;
  font-size: 1rem;
  color: var(--green-dark);
}

.cart-item-icons {
  display: flex;
  gap: 4px;
}

.cart-item-icons .icon-button {
  min-height: 36px;
  width: 36px;
}

.cart-subtotals {
  display: grid;
  gap: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.cart-subtotal-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.92rem;
}

.cart-subtotal-row strong {
  color: var(--ink);
  font-weight: 850;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 1.15rem;
}

.cart-total strong {
  color: var(--red-dark);
}

.customer-form,
.message-preview,
.dialog-content {
  display: grid;
  gap: 12px;
}

label,
fieldset legend,
.quantity-row span,
.message-preview label {
  color: var(--green-dark);
  font-size: 0.88rem;
  font-weight: 850;
}

label {
  display: grid;
  gap: 7px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  font-size: 16px;
  color: var(--ink);
  background: #fff;
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(14, 91, 63, 0.55);
  box-shadow: 0 0 0 3px rgba(14, 91, 63, 0.12);
}

.message-preview textarea {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.form-note {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.option-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.35;
}

.confirm-dialog {
  width: min(440px, calc(100vw - 26px));
  border: 0;
  border-radius: 12px;
  padding: 0;
  background: transparent;
}

.confirm-dialog::backdrop {
  background: rgba(31, 27, 23, 0.55);
  backdrop-filter: blur(3px);
}

.confirm-card {
  display: grid;
  gap: 12px;
  padding: 24px 22px 18px;
  border-radius: 12px;
  background: var(--paper);
  box-shadow: var(--shadow);
  text-align: center;
}

.confirm-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 4px;
  border-radius: 999px;
  color: var(--green-dark);
  background: rgba(14, 91, 63, 0.12);
}

.confirm-card h2 {
  margin: 0;
  color: var(--green-dark);
  font-size: 1.3rem;
}

.confirm-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.confirm-card p strong {
  color: var(--red-dark);
}

.confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 10px;
  margin-top: 8px;
}

.bottom-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 18;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 10px 12px calc(10px + var(--bottom-bar-safe-area));
  background: rgba(255, 248, 238, 0.96);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 24px rgba(31, 27, 23, 0.08);
}

.bottom-bar-cart,
.bottom-bar-order {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  border-radius: 8px;
  border: 0;
  font-size: 0.95rem;
  font-weight: 850;
  cursor: pointer;
}

.bottom-bar-cart {
  color: var(--green-dark);
  background: rgba(14, 91, 63, 0.1);
}

.bottom-bar-cart:hover,
.bottom-bar-cart:focus-visible {
  background: rgba(14, 91, 63, 0.18);
  outline: none;
}

.bottom-bar-order {
  color: #fffdf8;
  background: var(--green);
  box-shadow: 0 6px 16px rgba(14, 91, 63, 0.22);
}

.bottom-bar-order:hover:not([disabled]),
.bottom-bar-order:focus-visible:not([disabled]) {
  background: var(--green-dark);
  outline: none;
}

.bottom-bar-order[disabled] {
  color: var(--muted);
  background: rgba(110, 98, 86, 0.12);
  box-shadow: none;
  cursor: not-allowed;
}

.bottom-bar-count {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--red);
  color: #fffdf8;
  font-size: 0.78rem;
  font-weight: 850;
}

.bottom-bar-count.is-empty {
  display: none;
}

.bottom-bar-total {
  margin-left: 2px;
}

.pizza-dialog {
  width: min(880px, calc(100vw - 26px));
  max-height: calc(100vh - 26px);
  border: 0;
  border-radius: 8px;
  padding: 0;
  background: transparent;
}

.pizza-dialog::backdrop {
  background: rgba(31, 27, 23, 0.48);
  backdrop-filter: blur(3px);
}

body:has(.pizza-dialog[open]) .bottom-bar,
body:has(.confirm-dialog[open]) .bottom-bar {
  visibility: hidden;
}

.dialog-card {
  position: relative;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  overflow: hidden;
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.dialog-media img {
  width: 100%;
  height: 100%;
  min-height: 100%;
  object-fit: cover;
}

.close-dialog {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  background: rgba(255, 253, 248, 0.92);
}

.dialog-content {
  max-height: calc(100vh - 26px);
  overflow: auto;
  padding: clamp(18px, 4vw, 30px);
}

.dialog-content h2 {
  margin: 0;
  color: var(--green-dark);
  font-size: clamp(1.65rem, 4vw, 2.35rem);
  line-height: 1.08;
}

.dialog-content p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

fieldset {
  display: grid;
  gap: 10px;
  min-width: 0;
  margin: 0;
  border: 0;
  padding: 0;
}

.segmented-control {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.segmented-control button,
.filter-button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--green-dark);
  background: #fff;
  font-weight: 850;
}

.segmented-control button.active,
.filter-button.active {
  border-color: var(--green);
  color: #fffdf8;
  background: var(--green);
}

.extras-details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.extras-details > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 12px 14px;
  color: var(--green-dark);
  font-weight: 850;
  list-style: none;
}

.extras-details > summary::-webkit-details-marker {
  display: none;
}

.extras-toggle-label {
  flex: 1 1 auto;
}

.extras-toggle-count {
  color: var(--red-dark);
  background: rgba(184, 50, 43, 0.09);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.82rem;
  font-weight: 850;
}

.extras-chevron {
  transition: transform 0.2s ease;
}

.extras-details[open] > summary .extras-chevron {
  transform: rotate(180deg);
}

.extras-details > .extras-grid,
.extras-details > .option-note {
  margin: 0 14px;
}

.extras-details > .extras-grid {
  margin-top: 4px;
}

.extras-details > .option-note {
  margin-top: 8px;
  margin-bottom: 14px;
}

.extras-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}

.extra-option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  color: var(--ink);
  background: #fff;
  font-size: 0.92rem;
  font-weight: 750;
}

.extra-option input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}

.extra-option.is-disabled {
  opacity: 0.52;
}

.quantity-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.stepper {
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.stepper button {
  display: inline-grid;
  place-items: center;
  width: 42px;
  min-height: 42px;
  border: 0;
  color: var(--green-dark);
  background: transparent;
}

.stepper strong {
  min-width: 42px;
  text-align: center;
}

.full-width {
  width: 100%;
}

@media (max-width: 980px) {
  .intro-band,
  .order-layout,
  .business-strip {
    grid-template-columns: minmax(0, 1fr);
  }

  .dialog-card {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    max-height: calc(100vh - 26px);
  }

  .intro-status {
    justify-self: start;
  }

  .dialog-media img {
    max-height: 200px;
    min-height: 140px;
  }

  .dialog-content {
    max-height: none;
    padding: 18px;
  }
}

@media (max-width: 720px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .brand img {
    width: 52px;
    height: 52px;
  }

  .top-nav {
    width: 100%;
    gap: 4px;
  }

  .top-nav a {
    flex: 0 0 auto;
    padding: 8px 10px;
  }

  .intro-band {
    min-height: 340px;
    align-content: end;
    padding: 30px 16px;
  }

  .intro-band h1 {
    font-size: clamp(1.8rem, 8vw, 2.4rem);
  }

  .intro-band p {
    font-size: 0.95rem;
  }

  .intro-status {
    width: 100%;
    max-width: 100%;
    white-space: normal;
    font-size: 0.85rem;
    line-height: 1.35;
  }

  .business-strip {
    grid-template-columns: minmax(0, 1fr);
  }

  .business-strip div,
  .business-strip a {
    min-height: 52px;
    padding: 10px 16px;
    font-size: 0.88rem;
    text-align: left;
  }

  .order-layout {
    padding-inline: 14px;
  }

  .extras-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .pizza-card-body {
    padding: 10px;
  }

  .pizza-card p {
    min-height: 36px;
  }
}

@media (max-width: 360px) {
  .category-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

body {
  padding-bottom: var(--bottom-bar-reserve);
}

#order-button {
  display: none;
}

@media (min-width: 981px) {
  .bottom-bar {
    display: none;
  }

  #order-button {
    display: inline-flex;
  }

  body {
    padding-bottom: 0;
  }
}
