:root {
  --ink: #3d2434;
  --muted: #725967;
  --teal: #0c6f69;
  --teal-dark: #07504c;
  --plum: #531c46;
  --rose: #dd4069;
  --mint: #e9f7f1;
  --cream: #fffaf0;
  --gold: #d49026;
  --line: #ead8c2;
  --white: #ffffff;
  --script: "Lobster", "Brush Script MT", cursive;
  --display: "Grand Hotel", "Brush Script MT", cursive;
  --accent: "Cooper Black", "Cooper Std Black", Georgia, serif;
  --body: "Nunito", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--body);
}

.construction-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: rgba(61, 36, 52, 0.58);
  padding: 20px;
}

.construction-modal[hidden] {
  display: none;
}

.construction-card {
  width: min(560px, 100%);
  border: 1px solid #f0c4d0;
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 24px 70px rgba(61, 36, 52, 0.28);
  padding: clamp(20px, 4vw, 30px);
}

.construction-card h2 {
  margin-bottom: 12px;
}

.construction-card p:not(.eyebrow) {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.45;
}

.construction-inline {
  display: grid;
  gap: 4px;
  margin: 0 0 16px;
  border: 2px solid #c1121f;
  border-radius: 8px;
  background: #fff2f2;
  color: #6f1118;
  padding: 14px 16px;
}

.construction-inline[hidden] {
  display: none;
}

.construction-inline strong {
  color: #6f1118;
  font-size: 18px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 250, 240, 0.94);
  padding: 12px max(18px, calc((100vw - 1180px) / 2));
  backdrop-filter: blur(12px);
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  color: var(--plum);
  font-weight: 900;
  text-decoration: none;
}

.brand img {
  width: 68px;
  height: 68px;
  object-fit: contain;
}

.brand span {
  display: grid;
  gap: 0;
  line-height: 0.86;
}

.brand strong {
  font-family: var(--script);
  font-size: 28px;
  font-weight: 400;
}

.brand em {
  color: var(--rose);
  font-family: var(--display);
  font-size: 22px;
  font-style: normal;
  font-weight: 400;
}

nav {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

nav a,
.button {
  color: var(--plum);
  font-weight: 900;
  text-decoration: none;
}

.button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  background: var(--plum);
  color: #fff;
  padding: 0 18px;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 60px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 460px);
  gap: 24px;
  align-items: center;
  padding: 28px 0 34px;
}

.hero img {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 18px 44px rgba(83, 28, 70, 0.16);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 16px;
  color: var(--plum);
  font-family: var(--script);
  font-size: clamp(44px, 8vw, 86px);
  font-weight: 400;
  line-height: 0.94;
}

h2 {
  color: var(--plum);
  font-family: var(--accent);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.05;
}

.brand-note {
  margin-bottom: 12px;
  color: var(--rose);
  font-family: var(--display);
  font-size: clamp(30px, 4vw, 46px);
  line-height: 0.95;
}

.section {
  margin-top: 24px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
}

.section-head {
  max-width: 720px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}

.specials-banner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 0 0 16px;
}

.special-card {
  display: grid;
  gap: 6px;
  border: 1px solid #f0c4d0;
  border-radius: 8px;
  background: #fff2f6;
  padding: 14px;
  box-shadow: 0 10px 28px rgba(221, 64, 105, 0.08);
}

.special-card strong {
  color: var(--plum);
  font-size: 20px;
}

.special-card span {
  color: var(--rose);
  font-weight: 1000;
}

.special-card p {
  margin: 0;
  color: var(--muted);
}

.product-card {
  position: relative;
  display: grid;
  overflow: hidden;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  padding: 12px;
}

.sale-ribbon {
  position: absolute;
  top: 14px;
  right: -38px;
  z-index: 2;
  display: flex;
  width: 136px;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  transform: rotate(45deg);
  background: #c1121f;
  color: var(--white) !important;
  box-shadow: 0 8px 18px rgba(193, 18, 31, 0.24);
  font-size: 12px;
  font-weight: 1000;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
}

.product-card.is-selected {
  border-color: var(--rose);
  box-shadow: 0 0 0 2px rgba(221, 64, 105, 0.15);
}

.product-card img {
  width: 100%;
  aspect-ratio: 1.25;
  border-radius: 8px;
  object-fit: cover;
}

.product-card div {
  display: grid;
  gap: 4px;
}

.product-card strong,
.product-card b {
  color: var(--plum);
  font-size: 20px;
}

.product-card button {
  width: 100%;
}

.product-card span,
.product-card em,
.flavor-list span,
.flavor-list em {
  color: var(--muted);
}

.availability-badge {
  display: inline-flex;
  width: fit-content;
  min-height: 24px;
  align-items: center;
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 13px;
  font-weight: 900;
}

.availability-badge.is-orderable {
  background: var(--mint);
  color: var(--teal-dark);
}

.availability-badge.is-blocked {
  background: #fff3d6;
  color: #9a5b06;
}

button:disabled,
.product-card button:disabled,
#add-bag:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(320px, 1.2fr);
  gap: 18px;
  align-items: start;
}

.checkout-flow {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
  gap: 18px;
  align-items: start;
}

.checkout-main,
.checkout-review {
  display: grid;
  gap: 14px;
  min-height: 0;
}

.checkout-review {
  position: sticky;
  top: 96px;
}

.step-card {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  padding: 16px;
}

.step-card h3 {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 0;
  color: var(--plum);
  font-size: 22px;
}

.step-card h3 span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--plum);
  color: var(--white);
  font-size: 16px;
}

.selected-bag {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.selected-bag img {
  width: 104px;
  aspect-ratio: 1;
  border-radius: 8px;
  object-fit: cover;
}

.selected-bag div {
  display: grid;
  gap: 4px;
}

.selected-bag strong,
.order-line strong {
  color: var(--plum);
}

.helper {
  margin: 0;
  color: var(--muted);
}

.segmented {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.segmented label {
  display: block;
}

.segmented input {
  position: absolute;
  width: 1px;
  min-height: 1px;
  opacity: 0;
  pointer-events: none;
}

.segmented span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--plum);
  font-weight: 900;
}

.segmented input:checked + span {
  border-color: var(--rose);
  background: var(--mint);
  color: var(--plum);
}

.segmented input:disabled + span {
  cursor: not-allowed;
  opacity: 0.45;
}

.flavor-list,
.total-box {
  display: grid;
  gap: 10px;
}

.flavor-list-head {
  display: grid;
  gap: 4px;
}

.flavor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}

.total-box .discount-line {
  color: var(--rose);
  font-weight: 1000;
}

.flavor-card {
  display: grid;
  min-height: 0;
  gap: 8px;
  border: 2px solid transparent;
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  padding: 6px;
  text-align: left;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.flavor-card img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  object-fit: cover;
  background: var(--cream);
  box-shadow: inset 0 0 0 1px rgba(83, 28, 70, 0.08);
}

.flavor-card strong {
  color: var(--plum);
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.flavor-card.is-selected {
  border-color: var(--rose);
  background: var(--mint);
  box-shadow: 0 0 0 3px rgba(221, 64, 105, 0.14);
}

.flavor-card:not(:disabled):hover {
  border-color: rgba(221, 64, 105, 0.5);
  box-shadow: 0 8px 20px rgba(83, 28, 70, 0.12);
  transform: translateY(-1px);
}

.flavor-card:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.bag-actions,
.shipping-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.shipping-fields[hidden] {
  display: none;
}

.order-items {
  display: grid;
  gap: 10px;
}

.empty-cart {
  margin: 0;
  color: var(--muted);
}

.order-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.order-line:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.order-line div {
  display: grid;
  gap: 4px;
}

.order-line span,
.order-line em {
  color: var(--muted);
}

.order-line button {
  min-height: 36px;
  background: var(--mint);
  color: var(--teal-dark);
  padding: 0 12px;
}

.wide {
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: 6px;
  font-weight: 900;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 2px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
  font: inherit;
}

textarea {
  resize: vertical;
}

.total-box {
  background: var(--mint);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.total-box strong {
  color: var(--plum);
  font-size: 22px;
}

.payment-notice {
  grid-column: 1 / -1;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--mint);
  padding: 12px 14px;
  color: var(--teal-dark);
  font-weight: 900;
}

.status {
  grid-column: 1 / -1;
  min-height: 22px;
  color: var(--teal-dark);
  font-weight: 900;
}

.order-status-shell {
  max-width: 940px;
}

.order-status-root {
  margin-top: 18px;
}

.status-panel {
  display: grid;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  padding: 18px;
  box-shadow: 0 16px 36px rgba(83, 28, 70, 0.08);
}

.status-panel h2,
.status-panel h3,
.status-panel p {
  margin: 0;
}

.status-header {
  display: flex;
  gap: 14px;
  align-items: start;
  justify-content: space-between;
}

.status-grid,
.status-totals {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.status-grid div,
.status-totals span {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--cream);
  padding: 12px;
}

.status-grid span,
.status-totals span,
.status-lines span {
  color: var(--muted);
  font-weight: 800;
}

.status-grid strong {
  color: var(--plum);
  font-size: 20px;
}

.status-section {
  display: grid;
  gap: 10px;
}

.status-lines {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.status-lines li {
  display: grid;
  gap: 4px;
  border-left: 4px solid var(--rose);
  background: var(--cream);
  padding: 10px 12px;
}

.message-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--mint);
  padding: 14px;
}

.payment-message-box {
  background: #fff3d6;
}

@media (min-width: 821px) {
  #order {
    scroll-margin-top: 94px;
  }

  .checkout-flow {
    height: calc(100vh - 118px);
    min-height: 560px;
    max-height: 820px;
    align-items: stretch;
    overflow: hidden;
  }

  .checkout-main,
  .checkout-review {
    align-content: start;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 6px;
    scrollbar-color: rgba(83, 28, 70, 0.32) transparent;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
  }

  .checkout-main::-webkit-scrollbar,
  .checkout-review::-webkit-scrollbar {
    width: 10px;
  }

  .checkout-main::-webkit-scrollbar-thumb,
  .checkout-review::-webkit-scrollbar-thumb {
    border: 3px solid transparent;
    border-radius: 999px;
    background: rgba(83, 28, 70, 0.34);
    background-clip: content-box;
  }

  .checkout-review {
    position: static;
    top: auto;
  }
}

@media (max-width: 820px) {
  .site-header,
  .hero,
  .split,
  .checkout-flow,
  .bag-actions,
  .shipping-fields {
    grid-template-columns: 1fr;
  }

  .checkout-review {
    position: static;
    overflow: visible;
  }

  .site-header {
    display: grid;
    justify-items: start;
  }

  .status-header {
    display: grid;
  }

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