/* ============================================================
   checkout.css — same look as the products page:
   photo background, navy overlay, cream square cards, pill buttons,
   Bodoni Moda headings + Inter text.
   Load after styles.css and cart.css (cart.css defines the --mz-* tokens
   and the .mz-btn buttons).
   ============================================================ */

.checkout-page [hidden] { display: none !important; }

/* ---------- PAGE SHELL ---------- */
.checkout-page {
  position: relative;
  width: 100%;
  min-height: 100svh;
  background: url('/images/mzuri7.webp') center center / cover no-repeat;
  padding: calc(72px + clamp(48px, 6vw, 84px)) 5vw clamp(60px, 8vw, 100px);
  z-index: 2;
  isolation: isolate;
  font-family: 'Inter', sans-serif;
  color: var(--mz-ink);
}
.checkout-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(16, 35, 63, 0.35) 0%, rgba(16, 35, 63, 0.55) 100%),
    linear-gradient(90deg, rgba(16, 35, 63, 0.55) 0%, rgba(16, 35, 63, 0.35) 55%, rgba(16, 35, 63, 0.15) 100%);
  z-index: 0;
  pointer-events: none;
}
.checkout-page__inner { position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; }

/* ---------- HEADER + PROGRESS ---------- */
.checkout-page__head {
  border-bottom: 1px solid rgba(247, 244, 237, 0.2);
  padding-bottom: clamp(24px, 4vw, 40px);
  margin-bottom: clamp(28px, 4vw, 48px);
}
.checkout-page__head .label { color: var(--mz-gold); }
.checkout-page__title {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: clamp(32px, 4.6vw, 58px);
  line-height: 1.06;
  color: #f7f4ed;
  letter-spacing: 0.005em;
  margin-top: 14px;
  text-shadow: 0 1px 24px rgba(16, 35, 63, 0.35);
}

.steps { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 26px; margin: 26px 0 0; padding: 0; }
.steps__item { display: flex; align-items: center; gap: 10px; color: rgba(247, 244, 237, 0.6); }
.steps__dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(247, 244, 237, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.steps__label { font-size: 10px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; }
.steps__item.is-active { color: #f7f4ed; }
.steps__item.is-active .steps__dot { background: var(--mz-gold); border-color: var(--mz-gold); color: var(--mz-ink); }
.steps__item.is-done { color: #f7f4ed; }
.steps__item.is-done .steps__dot { background: #f7f4ed; border-color: #f7f4ed; color: var(--mz-ink); }

/* ---------- GRID ---------- */
.checkout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: clamp(20px, 2.5vw, 32px);
  align-items: start;
}
.checkout-main { min-width: 0; }

/* ---------- STEP CARD ---------- */
.step-card {
  background: white;
  border: 1px solid rgba(247, 244, 237, 0.28);
  padding: clamp(22px, 3vw, 40px);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.step-card__eyebrow {
  display: block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--mz-rust);
  margin-bottom: 10px;
}
.step-card__title {
  font-family: 'inter',  sans-serif;
  font-weight: 500;
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.15;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 10px;
}
.step-card__lede { font-size: 13.5px; line-height: 1.65; color: var(--rust); max-width: 520px; margin-bottom: 28px; }
.checkout-empty { grid-column: 1 / -1; text-align: center; }
.checkout-empty .step-card__lede { margin-left: auto; margin-right: auto; }

/* ---------- FORM ---------- */
.form { display: flex; flex-direction: column; gap: 20px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field label,
.order-text label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--mz-ink);
  display: flex;
  align-items: center;
  gap: 8px;
}
.optional {
  font-size: 8.5px;
  letter-spacing: 0.14em;
  color: var(--mz-ink-72);
  padding: 2px 8px;
  border-radius: 100px;
  background: var(--mz-paper);
  font-weight: 600;
}
.input {
  width: 100%;
  padding: 13px 14px;
  background: var(--mz-paper);
  border: 1px solid var(--mz-hair);
  border-radius: 0;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--mz-ink);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.input::placeholder { color: rgba(16, 35, 63, 0.38); }
.input:focus { border-color: var(--mz-ink); box-shadow: 0 0 0 3px rgba(201, 162, 74, 0.3); }
.input.is-invalid { border-color: var(--mz-rust); background: rgba(180, 83, 42, 0.05); }
textarea.input { resize: vertical; min-height: 76px; line-height: 1.55; }
select.input {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 38px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2310233f' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.field__hint { font-size: 11.5px; color: var(--mz-ink-72); }
.field__error { font-size: 11.5px; font-weight: 600; color: var(--mz-rust); }

.phone { display: flex; }
.phone__prefix {
  display: flex;
  align-items: center;
  padding: 0 14px;
  background: var(--mz-paper-dark);
  border: 1px solid var(--mz-hair);
  border-right: none;
  font-size: 13px;
  font-weight: 700;
  color: var(--mz-ink);
}
.phone .input { border-radius: 0; }

.form__actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  padding-top: 24px;
  border-top: 1px solid var(--mz-hair);
  flex-wrap: wrap;
}
.step-card > .form__actions { margin-top: 28px; }

/* ---------- LOCATION ---------- */
.locate {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 18px;
  margin-bottom: 24px;
  background: var(--mz-paper);
  border-left: 3px solid var(--mz-gold);
}
.locate__text { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--mz-ink-72); min-width: 0; flex: 1; }
.locate__text strong { font-size: 13px; color: var(--mz-ink); display: flex; align-items: center; gap: 8px; }
.locate__text a { color: var(--mz-rust); }

/* ---------- PAY ---------- */
.pay { background:rgba(16, 136, 68, 0.856) ; color: var(--mz-paper); padding: 22px 26px; margin-bottom: 26px; }
.pay__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(247, 244, 237, 0.16);
  flex-wrap: wrap;
}
.pay__row:last-child { border-bottom: none; }
.pay__label { font-size: 9px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: white; }
.pay__till { display: flex; align-items: center; gap: 12px; }
.pay__till code { font-family: 'Courier New', monospace; font-size: clamp(24px, 3vw, 32px); font-weight: 800; letter-spacing: 4px; color: white; }
.pay__copy {
  padding: 8px 14px;
  border-radius: 100px;
  border: 1px solid rgba(201, 162, 74, 0.55);
  background: transparent;
  color: white;
  font-family: 'Inter', sans-serif;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.pay__copy:hover { background: var(--mz-gold); color: var(--mz-ink); }
.pay__amount { font-family: 'Inter', sans-serif; font-weight: 500; font-size: clamp(28px, 3.4vw, 38px); color: white; line-height: 1; }

.how { list-style: none; display: flex; flex-direction: column; gap: 16px; margin: 0 0 28px; padding: 0; }
.how li { display: flex; gap: 14px; align-items: flex-start; }
.how__num {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--mz-ink);
  color: var(--mz-paper);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}
.how strong { display: block; font-size: 13.5px; margin-bottom: 3px; }
.how p { font-size: 13px; line-height: 1.55; color: var(--mz-ink-72); }

.order-text { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.order-text .input { font-family: 'Courier New', monospace; font-size: 12px; line-height: 1.55; min-height: 220px; }

.send { display: grid; grid-template-columns: 1.4fr 1fr; gap: 12px; }
.send .mz-btn { padding: 16px 18px; }

.sent {
  margin-top: 20px;
  padding: 18px 20px;
  background: var(--mz-paper);
  border-left: 3px solid var(--mz-gold);
  font-size: 13px;
  line-height: 1.6;
  color: var(--mz-ink-72);
}
.sent strong { color: var(--mz-ink); display: block; margin-bottom: 4px; }
.sent .mz-btn { margin-top: 14px; }

/* ---------- SUMMARY ---------- */
.summary {
  position: sticky;
  top: 100px;
  background:white;
  border: 1px solid rgba(247, 244, 237, 0.28);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.summary__toggle {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  list-style: none;
}
.summary__toggle::-webkit-details-marker { display: none; }
.summary__chev { transition: transform 0.25s ease; }
.summary__details[open] .summary__chev { transform: rotate(180deg); }
.summary__body { padding: 26px; }
.summary__heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--mz-hair); margin-bottom: 16px; flex-wrap: wrap; }
.summary__heading h3 { font-family: 'Inter', sans-serif; font-weight: 500; font-size: 20px; text-transform: uppercase; }
.summary__code { font-family: 'Courier New', monospace; font-size: 11px; font-weight: 700; padding: 5px 10px; border-radius: 100px; background: var(--mz-paper); }

.summary__list { list-style: none; margin: 0 0 16px; padding: 0 0 16px; border-bottom: 1px solid var(--mz-hair); display: flex; flex-direction: column; gap: 14px; max-height: 320px; overflow-y: auto; }
.summary__line { display: flex; align-items: center; gap: 12px; }
.summary__thumb { width: 48px; height: 48px; object-fit: cover; flex-shrink: 0; background: var(--mz-paper); }
.summary__info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.summary__name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.summary__meta { font-size: 11.5px; color: var(--mz-ink-72); }
.summary__linetotal { font-size: 13px; font-weight: 700; flex-shrink: 0; }

.summary__totals { display: flex; flex-direction: column; gap: 8px; }
.summary__row { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 13px; color: var(--mz-ink-72); }
.summary__pill { font-size: 9px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; padding: 6px 10px; border-radius: 100px; background: var(--mz-paper); color: var(--mz-ink); }
.summary__pill.is-free { background: var(--mz-ink); color: var(--mz-paper); }
.summary__row--total { margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--mz-hair); align-items: baseline; }
.summary__row--total span { font-size: 9px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; }
.summary__row--total strong { font-family: 'Inter',  sans-serif; font-weight: 500; font-size: 28px; color: var(--mz-ink); line-height: 1; }
.summary__note { margin-top: 14px; font-size: 12px; color: var(--mz-ink-72); }
.summary__edit {
  margin-top: 14px;
  padding: 0;
  border: none;
  background: none;
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mz-rust);
  cursor: pointer;
}
.summary__edit:hover { color: var(--mz-ink); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
  .checkout-grid { grid-template-columns: 1fr; }
  .summary { position: static; order: -1; }
  .summary__toggle { display: flex; }
  .summary__details[open] .summary__toggle { border-bottom: 1px solid var(--mz-hair); }
}

@media (max-width: 620px) {
  .form__row { grid-template-columns: 1fr; }
  .send { grid-template-columns: 1fr; }
  .steps__label { display: none; }
  .steps__item.is-active .steps__label { display: inline; }
  .form__actions { flex-direction: column-reverse; align-items: stretch; }
  .form__actions .mz-btn { width: 100%; }
  .form__actions > span { display: none; }
  .locate .mz-btn { width: 100%; }
  .pay { padding: 18px; }
  .summary__body { padding: 20px; }
}

/* iOS zooms into inputs under 16px */
@media (hover: none) and (pointer: coarse) {
  .input { font-size: 16px; }
}