:root {
  --bg: #eef0f4;
  --card: #ffffff;
  --ink: #0f0f10;
  --muted: #6b7079;
  --line: #e6e8ec;
  --field: #ffffff;
  --field-line: #d9dce2;
  /* Brand blues, taken from the logo */
  --accent: #1474a6;
  --accent-hover: #0f5f8a;
  --accent-ink: #ffffff;
  --accent-soft: #e2f2fa;
  --accent-soft-ink: #0b4a6e;
  --soft: #f5f2ec;
  --ok: #1f8a4c;
  --warn: #b25e09;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 28px rgba(16, 24, 40, .06);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }

/* ---------- Header ---------- */
.topbar {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  height: 64px;
}
.wordmark {
  justify-self: center;
  font-weight: 500;
  letter-spacing: .42em;
  font-size: 15px;
  text-decoration: none;
  white-space: nowrap;
  padding-left: .42em; /* balance trailing letter-spacing */
}
.wordmark { display: inline-flex; align-items: center; gap: 10px; padding-left: 0; }
.wordmark > span { margin-right: -.42em; } /* cancel trailing letter-spacing */
.brand-logo { width: 28px; height: 28px; flex: none; }
@media (max-width: 380px) {
  .wordmark { gap: 8px; font-size: 13px; }
  .brand-logo { width: 24px; height: 24px; }
}

/* ---------- Offer banner ---------- */
.promo-bar {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; background: var(--accent); color: #fff;
  font-size: 13.5px; font-weight: 500; text-align: center; text-decoration: none; line-height: 1.35;
}
.promo-bar[hidden] { display: none; }
.promo-bar:hover { background: var(--accent-hover); }
.promo-bar b { font-weight: 700; }
.promo-bar .more { text-decoration: underline; text-underline-offset: 2px; opacity: .9; white-space: nowrap; }

.icon-btn {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: 0; background: none; border-radius: 10px;
  cursor: pointer; text-decoration: none;
  position: relative;
}
.icon-btn:hover { background: rgba(0, 0, 0, .05); }
.icon-btn svg { width: 22px; height: 22px; }
.bag-count[hidden] { display: none; }
.bag-count {
  position: absolute; top: 4px; right: 3px;
  min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 9px; background: var(--ink); color: #fff;
  font-size: 10px; font-weight: 700; display: grid; place-items: center;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 52px; padding: 0 24px;
  border: 0; border-radius: 10px;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 600; font-size: 16px;
  cursor: pointer; text-decoration: none;
  transition: transform .08s ease, filter .15s ease, opacity .15s;
}
.btn:hover { background: var(--accent-hover); }
.btn.dark:hover { background: #2a2a2d; }
.btn.ghost:hover { background: rgba(0, 0, 0, .04); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: default; transform: none; }
.btn.block { width: 100%; }
.btn.dark { background: var(--ink); color: #fff; }
.btn.ghost { background: transparent; border: 1px solid var(--field-line); color: var(--ink); }
.btn.small { height: 38px; padding: 0 14px; font-size: 14px; border-radius: 8px; }

.spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Forms ---------- */
.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-size: 13px; color: #3a3d44; margin-bottom: 6px; }
.field input, .field select {
  width: 100%; height: 46px; padding: 0 14px;
  border: 1px solid var(--field-line); border-radius: 8px;
  background: var(--field); color: var(--ink);
  font: inherit; font-size: 15px;
  transition: border-color .15s, box-shadow .15s;
  appearance: none;
}
.field select {
  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 d='M1 1.5l5 5 5-5' fill='none' stroke='%23666' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px;
}
.field input:focus, .field select:focus {
  outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(15, 15, 16, .08);
}
.field input.invalid { border-color: #d14343; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hint { font-size: 12.5px; color: var(--muted); margin: -6px 0 0; }
.error-box {
  background: #fdecec; color: #9b1c1c; border-radius: 8px;
  padding: 10px 12px; font-size: 14px; margin: 0 0 16px;
}
.notice {
  background: var(--accent-soft); color: var(--accent-soft-ink); border-radius: 8px;
  padding: 10px 12px; font-size: 13.5px;
}

/* ---------- Order summary ---------- */
.summary-item { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; padding: 16px 0; }
.thumb { width: 64px; height: 64px; border-radius: 8px; background: var(--soft); overflow: hidden; display: grid; place-items: center; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.summary-item .name { font-weight: 600; font-size: 14px; line-height: 1.3; }
.summary-item .qty { font-size: 13px; color: var(--muted); margin-top: 2px; }
.summary-item .price { font-weight: 600; }
.totals { border-top: 1px solid var(--line); padding: 14px 0; font-size: 14px; }
.totals div { display: flex; justify-content: space-between; color: #3a3d44; padding: 2px 0; }
.totals .grand { color: var(--ink); font-weight: 700; font-size: 16px; padding-top: 6px; }
.free { color: var(--ok); font-weight: 600; }

.stepper-qty { display: inline-flex; align-items: center; border: 1px solid var(--field-line); border-radius: 8px; height: 30px; margin-top: 6px; }
.stepper-qty button { width: 30px; height: 28px; border: 0; background: none; cursor: pointer; font-size: 16px; line-height: 1; color: #333; }
.stepper-qty button:disabled { color: #bbb; cursor: default; }
.stepper-qty span { min-width: 22px; text-align: center; font-size: 13px; font-weight: 600; }

.divider { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ---------- Footer ---------- */
.site-footer { padding: 40px 20px 48px; text-align: center; color: var(--muted); font-size: 13px; }
.site-footer a { color: var(--ink); text-decoration: none; font-weight: 500; }
.site-footer .links { display: flex; gap: 20px; justify-content: center; margin-bottom: 10px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
