/* Mobile-first website checkout flow — share site surface/width with other pages */
.checkout-page,
.cms-online_order,
.cms-online-order {
  min-height: 50vh;
  padding-top: max(92px, calc(var(--header-height, 80px) + 20px)) !important;
  padding-bottom: 40px;
  background: transparent;
  color: var(--ink, #111);
}
.checkout-page-inner {
  max-width: var(--container, 1180px);
}
.cms-online-order .checkout-flow,
.cms-online_order .checkout-flow {
  color: var(--ink, #111);
}
.checkout-flow {
  color: var(--ink, #111);
}
.checkout-progress {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 4px 0 20px 0 !important;
  padding: 0;
}
.checkout-progress li {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink, #111) 6%, #fff);
  color: color-mix(in srgb, var(--ink, #111) 55%, transparent);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.checkout-progress li span {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid color-mix(in srgb, var(--ink, #111) 16%, transparent);
  font-size: .75rem;
}
.checkout-progress li.is-active {
  background: var(--ink, #111);
  color: #fff;
}
.checkout-progress li.is-active span {
  background: var(--brand-primary, #e95c2c);
  border-color: transparent;
  color: #fff;
}
.checkout-progress li.is-done {
  color: var(--ink, #111);
}
.checkout-progress li.is-done span {
  background: color-mix(in srgb, var(--brand-primary, #e95c2c) 18%, #fff);
  border-color: var(--brand-primary, #e95c2c);
  color: var(--brand-primary, #e95c2c);
}

.checkout-panel-head {
  margin-bottom: 16px;
}
.checkout-panel-head h2 {
  margin: 0 0 6px;
  font-size: clamp(1.6rem, 5vw, 2.2rem);
  letter-spacing: -.02em;
}
.checkout-panel-head p {
  margin: 0;
  color: color-mix(in srgb, var(--ink, #111) 62%, transparent);
  font-size: .95rem;
}
.checkout-back {
  border: 0;
  background: transparent;
  color: var(--brand-primary, #e95c2c);
  font: inherit;
  font-weight: 700;
  padding: 0;
  margin-bottom: 10px;
  cursor: pointer;
}

/* Category Filter Pills */
.checkout-category-nav-wrapper {
  margin: 12px 0 16px 0;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 4px;
}
.checkout-category-nav-wrapper::-webkit-scrollbar {
  display: none;
}
.checkout-category-pills {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 4px 2px !important;
  width: max-content !important;
  min-width: max-content !important;
}
.checkout-category-pills button.category-pill,
.checkout-category-pills .category-pill,
.category-pill {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 7px 18px !important;
  border-radius: 9999px !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  word-break: keep-all !important;
  flex-shrink: 0 !important;
  border: 1px solid rgba(0, 0, 0, 0.12) !important;
  background-color: #f3f4f6 !important;
  color: #374151 !important;
  cursor: pointer !important;
  transition: all 0.15s ease-in-out !important;
  outline: none !important;
  box-shadow: none !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  margin: 0 !important;
  font-family: inherit !important;
  text-decoration: none !important;
}
.checkout-category-pills button.category-pill:hover,
.checkout-category-pills .category-pill:hover,
.category-pill:hover {
  background-color: #e5e7eb !important;
  color: #111827 !important;
}
.checkout-category-pills button.category-pill.is-active,
.checkout-category-pills .category-pill.is-active,
.category-pill.is-active {
  background-color: #111827 !important;
  color: #ffffff !important;
  border-color: #111827 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15) !important;
}

.checkout-cat {
  margin-bottom: 18px;
}
.checkout-cat h3 {
  margin: 0 0 8px;
  font-size: .8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--ink, #111) 55%, transparent);
}
.checkout-menu-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--ink, #111) 10%, transparent);
}
.checkout-menu-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}
.checkout-menu-copy strong {
  font-size: .98rem;
}
.checkout-menu-copy span {
  font-size: .82rem;
  color: color-mix(in srgb, var(--ink, #111) 58%, transparent);
}
.checkout-menu-buy {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.checkout-menu-buy em {
  font-style: normal;
  font-weight: 700;
  white-space: nowrap;
  color: var(--brand-primary, #e95c2c);
}
.checkout-menu-buy .btn-sm {
  border-radius: 999px;
  min-width: 64px;
}

.checkout-compact-cart {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
  padding: 12px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid color-mix(in srgb, var(--ink, #111) 10%, transparent);
}
.compact-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px dashed color-mix(in srgb, var(--ink, #111) 12%, transparent);
}
.compact-line:last-child { border-bottom: 0; }
.compact-line-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.compact-line-main strong {
  font-size: .92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.compact-line-main span {
  font-size: .8rem;
  color: color-mix(in srgb, var(--ink, #111) 58%, transparent);
}
.compact-line-qty {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.qty-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--ink, #111) 18%, transparent);
  background: #fff;
  color: var(--ink, #111);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}
.checkout-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0;
  font-size: 1rem;
}
.checkout-totals-box {
  display: grid;
  gap: 6px;
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid color-mix(in srgb, var(--ink, #111) 10%, transparent);
}
.checkout-total-row {
  display: flex;
  justify-content: space-between;
  margin: 0;
  font-size: .9rem;
  color: color-mix(in srgb, var(--ink, #111) 72%, transparent);
}
.checkout-totals-box .checkout-total {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px dashed color-mix(in srgb, var(--ink, #111) 14%, transparent);
}
.checkout-total strong {
  font-size: 1.15rem;
  color: var(--brand-primary, #e95c2c);
}
.checkout-invoice {
  margin: 18px 0 8px;
  text-align: left;
}
.invoice-card {
  padding: 14px;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--ink, #111) 12%, transparent);
  background: color-mix(in srgb, var(--brand-surface, #f5f1e8) 55%, #fff);
}
.invoice-title {
  margin: 0 0 8px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-size: .72rem;
  color: var(--brand-primary, #e95c2c);
}
.invoice-meta {
  margin: 0 0 6px;
  font-size: .85rem;
  color: color-mix(in srgb, var(--ink, #111) 65%, transparent);
}
.invoice-lines {
  margin: 10px 0;
  display: grid;
  gap: 6px;
}
.invoice-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: .9rem;
}
.invoice-total {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid color-mix(in srgb, var(--ink, #111) 12%, transparent);
  font-weight: 700;
}

.checkout-form {
  display: grid;
  gap: 4px;
  padding: 14px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid color-mix(in srgb, var(--ink, #111) 10%, transparent);
}
.checkout-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 8px 0;
  font-size: .9rem;
  font-weight: 600;
  color: var(--ink, #111);
}
.checkout-field input,
.checkout-field select,
.checkout-field textarea {
  width: 100%;
  border: 1px solid color-mix(in srgb, var(--ink, #111) 16%, transparent);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  font-weight: 500;
  color: var(--ink, #111);
  background: #fff;
  box-sizing: border-box;
}
.checkout-flow .payment-methods {
  border: 0;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.checkout-flow .payment-methods legend {
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--ink, #111);
}
.pay-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--ink, #111) 12%, transparent);
  font-weight: 600;
  color: var(--ink, #111);
}
.pay-option:has(input:checked) {
  border-color: var(--brand-primary, #e95c2c);
  background: color-mix(in srgb, var(--brand-primary, #e95c2c) 8%, #fff);
}
.checkout-flow .fonepay-qr-box {
  margin-top: 12px;
  text-align: center;
  color: var(--ink, #111);
}
.checkout-flow .fonepay-qr-box img {
  margin-top: 8px;
  border-radius: 12px;
}
.checkout-flow .order-status {
  margin-top: 12px;
  font-size: .92rem;
  color: color-mix(in srgb, var(--ink, #111) 70%, transparent);
  min-height: 1.2em;
}
.checkout-flow .order-status.is-error { color: #b42318; font-weight: 600; }
.checkout-flow .order-status.is-ok { color: #027a48; font-weight: 600; }
.checkout-flow .hidden { display: none !important; }
/* Some themes give .btn its own display value, which would beat the [hidden]
   attribute and show the retry button before it is needed. */
.checkout-flow [hidden] { display: none !important; }

.checkout-bar {
  position: sticky;
  bottom: 12px;
  z-index: 5;
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 18px;
  background: var(--ink, #111);
  color: #fff;
  box-shadow: 0 14px 36px rgba(0,0,0,.18);
}
.checkout-bar > div {
  display: grid;
  gap: 2px;
}
.checkout-bar span {
  opacity: .75;
  font-size: .85rem;
}
.checkout-bar .btn {
  border-radius: 999px;
  background: var(--brand-primary, #e95c2c);
  border-color: var(--brand-primary, #e95c2c);
  color: #fff;
  min-width: 118px;
}
.checkout-bar .btn:disabled {
  opacity: .45;
}
.checkout-bar-sticky .btn {
  width: 100%;
}

.checkout-done {
  text-align: center;
  padding: 48px 16px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid color-mix(in srgb, var(--ink, #111) 10%, transparent);
}
.checkout-done-kicker {
  color: var(--brand-primary, #e95c2c);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.checkout-done h2 {
  margin: 8px 0;
  font-size: 2rem;
}
.checkout-done-ref {
  font-weight: 700;
  margin: 12px 0 22px;
}
.checkout-done .btn + .btn {
  margin-left: .5rem;
}
.checkout-empty {
  margin: 0;
  color: color-mix(in srgb, var(--ink, #111) 58%, transparent);
}

/* The checkout owns the bottom of the screen: a theme's floating "Order online"
   pill would cover the sticky cart bar and its Continue button. */
body:has(#website-order-app) :is(
  .hv-mobile-order,
  .bk-mobile-order,
  .tt-mobile-order,
  .mk-mobile-order,
  .ch-mobile-order,
  .ledger-mobile-order,
  .maison-mobile-order,
  .mobile-order
) {
  display: none !important;
}

@media (min-width: 900px) {
  .checkout-page { padding-top: clamp(2.5rem, 6vw, 5rem); }
  .checkout-page-inner { max-width: var(--container, 1180px); }
}
