@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=Inter:wght@400;500;600;700;800&display=swap');

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

:root {
  --navy:    #0B1D3A;
  --coral:   #FF6B7A;
  --cream:   #FFF7EF;
  --white:   #ffffff;
  --muted:   #6a7a8a;
  --line:    #e8ddd4;
  --green:   #22c55e;
  --radius:  14px;
}

body {
  font-family: Inter, system-ui, sans-serif;
  background: var(--cream);
  color: var(--navy);
  min-height: 100vh;
  padding-bottom: 56px;
}

img  { display: block; max-width: 100%; }
a    { text-decoration: none; color: inherit; }

/* ── HEADER ── */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 48px;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
}

.logo { display: flex; align-items: center; gap: 6px; }
.logo-img { height: 56px; width: auto; display: block; }
.logo-text {
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 17px; line-height: 1.25;
  color: var(--navy); font-weight: 400;
}

.header-back {
  font-size: 13px; font-weight: 600;
  color: var(--muted);
  display: inline-flex; align-items: center; gap: 4px;
  line-height: 1;
  transition: color .15s;
}
.header-back:hover { color: var(--navy); }

/* ── PROGRESS BAR ── */
.progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 24px 0 8px;
}

.prog-step {
  display: flex;
  align-items: center;
  gap: 8px;
}

.prog-dot {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: var(--white);
  color: var(--muted);
  font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
  flex-shrink: 0;
}
.prog-dot.active { border-color: var(--coral); background: var(--coral); color: #fff; }
.prog-dot.done   { border-color: var(--green);  background: var(--green);  color: #fff; }
.prog-dot.done::after { content: '✓'; }
.prog-dot.done span   { display: none; }

.prog-label {
  font-size: 12px; font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}
.prog-step:has(.prog-dot.active) .prog-label { color: var(--navy); }

.prog-line {
  width: 60px; height: 2px;
  background: var(--line);
  margin: 0 8px;
  flex-shrink: 0;
}

/* ── PAGE SHELL ── */
.page {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 16px 60px;
}

.step-panel { animation: fadeIn .2s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ── CARD ── */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 16px;
}

.card-title {
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 20px; font-weight: 400;
  margin-bottom: 20px; color: var(--navy);
}

/* ── FORM FIELDS ── */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.field input,
.field select,
.field textarea {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px; font-size: 14px; font-family: inherit;
  color: var(--navy); background: var(--white);
  transition: border-color .15s;
  outline: none;
}
.field input:focus,
.field select:focus,
.field textarea:focus { border-color: var(--coral); }
.field textarea { resize: vertical; min-height: 80px; }
.field input.invalid { border-color: #ef4444; }
.field-err { font-size: 12px; color: #ef4444; margin-top: 4px; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.delivery-note {
  margin: 0 0 12px;
  color: var(--coral);
  font-size: 12px;
  font-weight: 700;
}

/* Radio group */
.radio-group { display: flex; gap: 12px; flex-wrap: wrap; }
.radio-pill {
  label { display: flex; align-items: center; gap: 6px; }
  input[type=radio] { accent-color: var(--coral); }
}
.radio-pill { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; cursor: pointer; }
.radio-pill input { accent-color: var(--coral); }

/* ── SIZE CARDS ── */
.size-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 20px; }
.size-card {
  border: 2px solid var(--line); border-radius: 12px;
  padding: 14px 10px; text-align: center;
  background: var(--white); cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
  display: flex; flex-direction: column; gap: 4px;
}
.size-card:hover  { border-color: #f9a8b8; }
.size-card.selected { border-color: var(--coral); box-shadow: 0 0 0 3px rgba(255,107,122,.12); }
.size-name  { font-size: 13px; font-weight: 700; color: var(--navy); }
.size-oz    { font-size: 11px; color: var(--muted); }
.size-price { font-size: 18px; font-weight: 800; color: var(--coral); }

/* ── FLAVOUR CARDS ── */
.flavour-cards {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 20px;
}
.flavour-card {
  border: 2px solid var(--line); border-radius: 10px;
  overflow: hidden; background: var(--white);
  cursor: pointer; transition: border-color .15s;
  display: flex; flex-direction: column;
  text-align: center;
}
.flavour-card img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.flavour-card span { font-size: 11px; font-weight: 700; padding: 6px 4px; color: var(--navy); line-height: 1.3; }
.flavour-card:hover  { border-color: #f9a8b8; }
.flavour-card.selected { border-color: var(--coral); box-shadow: 0 0 0 3px rgba(255,107,122,.12); }

/* ── TOPPINGS ── */
.toppings-note { font-size: 11px; color: var(--coral); font-weight: 600; margin-bottom: 10px; }
.topping-grid  { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 20px; }
.topping-label {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px; border: 1.5px solid var(--line); border-radius: 8px;
  font-size: 13px; font-weight: 500; cursor: pointer;
  transition: border-color .15s;
}
.topping-label:hover { border-color: var(--coral); }
.topping-label input { accent-color: var(--coral); }
.topping-label.disabled { opacity: .45; cursor: default; }

/* ── DRIZZLE ── */
.drizzle-group { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.drizzle-label {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 14px; border: 1.5px solid var(--line); border-radius: 999px;
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.drizzle-label:has(input:checked) { border-color: var(--coral); background: rgba(255,107,122,.07); }
.drizzle-label input { display: none; }

/* ── QTY + PRICE ── */
.builder-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 16px; border-top: 1px solid var(--line);
  flex-wrap: wrap; gap: 12px;
}
.qty-stepper { display: flex; align-items: center; gap: 10px; }
.qty-btn {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1.5px solid var(--line); background: var(--white);
  font-size: 18px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--navy); transition: border-color .15s;
}
.qty-btn:hover { border-color: var(--coral); color: var(--coral); }
.qty-input { width: 44px; text-align: center; font-size: 16px; font-weight: 700; border: 1.5px solid var(--line); border-radius: 8px; padding: 4px; }
.builder-price { text-align: right; }
.unit-price { font-size: 12px; color: var(--muted); }
.line-price { font-size: 22px; font-weight: 800; color: var(--navy); }

/* ── CART ── */
.cart-empty { font-size: 14px; color: var(--muted); padding: 12px 0; }
.cart-row {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 14px 0; border-bottom: 1px solid var(--line); gap: 12px;
}
.cart-row:last-child { border-bottom: 0; }
.cart-row-info { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.cart-row-info strong { font-size: 14px; }
.cart-flavour { color: var(--navy); }
.cart-toppings, .cart-drizzle, .cart-notes { color: var(--muted); font-size: 12px; }
.cart-row-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.cart-qty { font-size: 13px; color: var(--muted); }
.cart-price { font-size: 15px; font-weight: 700; }
.cart-remove {
  width: 24px; height: 24px; border-radius: 50%;
  border: 1px solid var(--line); background: none; cursor: pointer;
  font-size: 11px; color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  transition: border-color .15s, color .15s;
}
.cart-remove:hover { border-color: #ef4444; color: #ef4444; }
.cart-subtotal {
  text-align: right; font-size: 14px; font-weight: 700;
  padding-top: 10px; color: var(--navy);
}

/* ── REVIEW ── */
.review-row {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 12px 0; border-bottom: 1px solid var(--line); gap: 12px;
  font-size: 13px; line-height: 1.55;
}
.review-row:last-child { border-bottom: 0; }
.review-row-right { flex-shrink: 0; text-align: right; white-space: nowrap; }
.review-fulfillment { font-size: 13px; line-height: 1.6; color: var(--navy); }

.review-totals { border-top: 2px solid var(--navy); margin-top: 4px; padding-top: 12px; }
.total-row { display: flex; justify-content: space-between; font-size: 14px; padding: 3px 0; }
.total-row.grand { font-size: 18px; font-weight: 800; margin-top: 6px; }

/* Payment pills */
.pay-pills { display: flex; gap: 10px; flex-wrap: wrap; }
.pay-pill {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 18px; border: 2px solid var(--line); border-radius: 999px;
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: border-color .15s;
}
.pay-pill input { display: none; }
.pay-pill.selected { border-color: var(--coral); background: rgba(255,107,122,.07); color: var(--coral); }

/* Allergy */
.allergy-row {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 14px; border: 1.5px solid var(--line); border-radius: 10px;
  font-size: 13px; line-height: 1.55; cursor: pointer;
}
.allergy-row input { accent-color: var(--coral); margin-top: 2px; flex-shrink: 0; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; padding: 13px 28px; border-radius: 999px;
  font-size: 14px; font-weight: 700; cursor: pointer; border: none;
  transition: background .15s, transform .15s, opacity .15s;
}
.btn:hover:not(:disabled) { transform: translateY(-2px); }
.btn:disabled { opacity: .55; cursor: default; }

.btn-coral  { background: var(--coral); color: #fff; box-shadow: 0 6px 20px rgba(255,77,109,.3); }
.btn-coral:hover:not(:disabled)  { background: #e03358; }
.btn-navy   { background: var(--navy); color: #fff; }
.btn-navy:hover:not(:disabled)   { background: #1a2e7a; }
.btn-outline {
  background: transparent; color: var(--navy);
  border: 1.5px solid rgba(11,29,58,.2);
}
.btn-outline:hover { border-color: var(--navy); }
.btn-full { width: 100%; }

.btn-row { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }

/* Error / info */
.form-err {
  font-size: 13px; color: #ef4444;
  padding: 10px 14px; background: #fef2f2; border-radius: 8px;
  border: 1px solid #fca5a5; margin-bottom: 12px;
}
.section-label {
  font-size: 11px; font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 10px;
}

/* ── CONFIRMATION ── */
.conf-wrap { text-align: center; padding: 40px 20px; }
.conf-icon { font-size: 56px; margin-bottom: 16px; }
.conf-title {
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 28px; color: var(--navy); margin-bottom: 8px;
}
.conf-ref { font-size: 22px; font-weight: 800; color: var(--coral); margin-bottom: 24px; }
.conf-box {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px;
  text-align: left; margin-bottom: 24px;
}
.conf-box h3 { font-size: 15px; font-weight: 700; margin-bottom: 12px; color: var(--navy); }
.conf-box p  { font-size: 14px; line-height: 1.65; color: #4a4a6a; }
.conf-email  { font-weight: 700; color: var(--coral); }
.conf-total  { font-size: 20px; font-weight: 800; }

/* ── TABLET (iPad) ── */
@media (max-width: 900px) {
  .header { padding: 14px 24px; }
  .logo-img { height: 46px; }
  .logo-text { font-size: 15px; }
  .page { max-width: 100%; padding: 20px 24px 60px; }
  .flavour-cards { grid-template-columns: repeat(3, 1fr); }
  .prog-line { width: 40px; }
}

/* ── MOBILE ── */
@media (max-width: 600px) {
  .header { padding: 12px 16px; }
  .logo-img { height: 38px; }
  .logo-text { font-size: 13px; }
  .header-back { font-size: 12px; }

  .progress { padding: 16px 0 4px; gap: 0; }
  .prog-label { display: none; }
  .prog-line { width: 28px; }

  .page { padding: 14px 12px 48px; }
  .card { padding: 16px; }
  .card-title { font-size: 17px; margin-bottom: 14px; }

  .field-row { grid-template-columns: 1fr; }
  .size-cards { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .size-name { font-size: 11px; }
  .size-price { font-size: 15px; }

  .flavour-cards { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .flavour-card span { font-size: 10px; }

  .topping-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .topping-label { font-size: 12px; padding: 8px 10px; }

  .drizzle-group { gap: 6px; }
  .drizzle-label { font-size: 12px; padding: 7px 12px; }

  .builder-footer { flex-direction: column; align-items: stretch; gap: 10px; }
  .builder-price { text-align: left; }
  .btn-row { flex-direction: column; }
  .btn-row .btn { width: 100%; }

  .pay-pills { flex-direction: column; }
  .pay-pill { justify-content: center; }

  .total-row.grand { font-size: 16px; }
  .conf-wrap { padding: 24px 10px; }
  .conf-icon { font-size: 40px; }
  .conf-title { font-size: 22px; }
}

/* ── FOOTER ── */
.footer {
  position: sticky;
  bottom: 0;
  z-index: 90;
  background: rgba(11,29,58,.98);
  backdrop-filter: blur(10px);
  padding: 14px 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 24px;
  border-top: 1px solid rgba(255,247,239,.06);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-logo {
  height: 28px;
  width: auto;
}

.footer-name {
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 14px;
  line-height: 1.2;
  color: #FFF7EF;
}

.footer-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11.5px;
  color: rgba(255,247,239,.4);
  flex-wrap: wrap;
}

.footer-info a {
  color: rgba(255,247,239,.6);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color .15s;
}
.footer-info a:hover { color: #FF6B7A; }

.footer-sep { opacity: .3; }

@media (max-width: 600px) {
  .footer {
    padding: 12px 16px;
    gap: 6px 16px;
    justify-content: center;
    text-align: center;
  }
  .footer-info { font-size: 11px; }
}
