/* Flat commerce surfaces: the basket list scrolls while totals stay visible. */
.cart-dialog,
.checkout-dialog {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--surface, #fff);
  color: var(--ink, #171717);
  font: inherit;
  overscroll-behavior: contain;
}

.cart-dialog::backdrop,
.checkout-dialog::backdrop { background: rgb(0 0 0 / .34); }

.cart-dialog {
  position: fixed;
  inset: 0 0 0 auto;
  margin: 0;
  width: min(600px, 100vw);
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
}

.cart-dialog[open] { display: flex; flex-direction: column; }

.cart-head,
.checkout-head {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 84px;
  padding: 18px 28px;
  border-bottom: 1px solid var(--line, #e5e5e5);
}

.cart-heading { display: flex; min-width: 0; flex-wrap: wrap; align-items: baseline; gap: 4px 13px; }
.cart-head h2,
.checkout-head h2 { margin: 0; font-size: 1.4rem; line-height: 1.2; font-weight: 600; letter-spacing: -.035em; }
.cart-count { color: var(--muted, #666); font-size: .8125rem; white-space: nowrap; }

.cart-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  color: var(--ink, #171717);
  background: transparent;
  cursor: pointer;
}
.cart-icon-button .ph { font-size: 23px; }
.cart-icon-button:hover { background: var(--bg, #f6f6f6); }

.cart-scroll {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 28px;
  scrollbar-width: thin;
  scrollbar-color: #c4c4c4 transparent;
}
.cart-list { padding: 8px 0 12px; }
.cart-line { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 20px; padding: 24px 0 20px; }
.cart-line + .cart-line { border-top: 1px solid var(--line, #e5e5e5); }
.cart-line__photo { display: block; width: 104px; height: 132px; background: #f6f6f6; border-radius: 8px; overflow: hidden; }
.cart-line__photo img { display: block; width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.cart-line__info { min-width: 0; }
.cart-line__brand { display: block; margin: 0 0 5px; color: var(--muted, #666); font-size: .75rem; line-height: 1.3; }
.cart-line__name { display: inline-block; margin: 0 0 16px; color: inherit; font-size: .875rem; line-height: 1.45; font-weight: 500; text-decoration: none; text-underline-offset: 3px; }
.cart-line__name:hover { text-decoration: underline; }
.cart-line__amount { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.cart-quantity { display: inline-grid; flex-shrink: 0; grid-template-columns: 44px 24px 44px; height: 46px; border: 1px solid var(--line, #e5e5e5); border-radius: 8px; align-items: center; }
.cart-quantity button { display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; border: 0; border-radius: 8px; padding: 0; background: transparent; color: var(--ink, #171717); cursor: pointer; }
.cart-quantity button .ph { font-size: 14px; }
.cart-quantity button:hover:not(:disabled) { background: var(--bg, #f6f6f6); }
.cart-quantity button:disabled { color: #aaa; cursor: default; }
.cart-quantity__value { text-align: center; font-size: .8125rem; font-variant-numeric: tabular-nums; }
.cart-line__prices { flex-shrink: 0; text-align: right; white-space: nowrap; }
.cart-line__prices strong { display: block; font-size: .9375rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.cart-line__prices span { display: block; margin-top: 4px; font-size: .6875rem; color: var(--muted, #666); }
.cart-line__bottom { display: flex; align-items: center; justify-content: space-between; min-height: 44px; gap: 8px; }
.cart-remove { border: 0; min-height: 44px; padding: 8px 0; background: transparent; color: var(--muted, #666); font-size: .75rem; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.cart-remove:hover { color: var(--ink, #171717); }
.cart-line__stock { font-size: .6875rem; color: var(--muted, #666); text-align: right; line-height: 1.35; }
.cart-line__stock--error,
.cart-stock-warning { color: #a92222; }
.cart-stock-warning { font-size: .8125rem; line-height: 1.45; }

.cart-undo { display: flex; flex: 0 0 auto; align-items: center; gap: 12px; min-height: 54px; padding: 5px 18px 5px 28px; background: var(--bg, #f6f6f6); font-size: .8125rem; }
.cart-undo[hidden] { display: none; }
.cart-undo > span { flex: 1; min-width: 0; }
.cart-undo__restore { min-height: 44px; padding: 0; color: var(--ink, #171717); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; border: 0; background: transparent; cursor: pointer; }
.cart-undo__dismiss { flex-basis: 44px; width: 44px; }
.cart-undo__dismiss .ph { font-size: 17px; }

.cart-summary { flex: 0 0 auto; padding: 22px 28px max(14px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line, #e5e5e5); background: var(--surface, #fff); }
.cart-summary[hidden] { display: none; }
.cart-summary__total { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; font-size: .9375rem; font-weight: 500; }
.cart-summary__total strong { flex-shrink: 0; white-space: nowrap; font-size: 1.45rem; font-weight: 600; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.cart-summary__delivery { margin: 10px 0 21px; color: var(--muted, #666); font-size: .75rem; line-height: 1.4; }
.cart-primary-button { display: flex; width: 100%; min-height: 54px; align-items: center; justify-content: center; gap: 14px; padding: 14px 20px; border: 1px solid var(--accent, #191919); border-radius: var(--radius-control, 14px); color: var(--on-accent, #fff); background: var(--accent, #191919); font: inherit; font-size: .875rem; font-weight: 500; line-height: 1.3; cursor: pointer; transition: background-color .18s, opacity .18s, transform .18s; }
.cart-primary-button > span { min-width: 0; overflow-wrap: anywhere; }
.cart-primary-button .ph { flex-shrink: 0; font-size: 19px; }
.cart-primary-button:hover:not(:disabled) { opacity: .84; }
.cart-primary-button:active:not(:disabled) { opacity: .9; transform: scale(.985); }
.cart-primary-button:disabled { opacity: .4; cursor: default; }
.cart-continue { display: block; width: 100%; min-height: 44px; margin-top: 3px; padding: 10px; border: 0; background: transparent; color: var(--muted, #666); font-size: .8125rem; cursor: pointer; }
.cart-continue:hover { color: var(--ink, #171717); text-decoration: underline; text-underline-offset: 3px; }

.cart-empty { display: flex; min-height: 100%; flex-direction: column; justify-content: center; align-items: center; padding: 48px 0 64px; text-align: center; }
.cart-empty > .ph { font-size: 36px; margin-bottom: 22px; }
.cart-empty h3 { margin: 0 0 12px; font-size: 1.25rem; font-weight: 500; letter-spacing: -.03em; }
.cart-empty p { max-width: 270px; margin: 0 0 28px; color: var(--muted, #666); font-size: .875rem; line-height: 1.55; }
.cart-empty .cart-primary-button { max-width: 270px; }

.checkout-dialog { width: min(890px, calc(100vw - 64px)); max-width: 100%; max-height: calc(100dvh - 64px); margin: auto; border-radius: 8px; overflow: hidden; }
.checkout-dialog[open] { display: flex; flex-direction: column; }
.checkout-head { position: relative; display: grid; grid-template-columns: minmax(100px, 1fr) minmax(0, auto) minmax(100px, 1fr); min-height: 78px; padding: 16px 26px; }
.checkout-head > .cart-icon-button { grid-column: 3; grid-row: 1; justify-self: end; }
.checkout-head h2 { min-width: 0; grid-column: 2; grid-row: 1; text-align: center; font-size: 1.25rem; overflow-wrap: anywhere; }
.checkout-back { grid-column: 1; grid-row: 1; justify-self: start; display: flex; align-items: center; gap: 5px; min-height: 44px; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--ink, #171717); font-size: .8125rem; cursor: pointer; }
.checkout-back .ph { font-size: 17px; }
.checkout-back:hover span { text-decoration: underline; text-underline-offset: 3px; }
.checkout-scroll { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; min-height: 0; padding: 24px 30px 30px; scrollbar-width: thin; scrollbar-color: #c4c4c4 transparent; }
.checkout-preview-note { margin: 0 0 28px; font-size: .8125rem; line-height: 1.5; color: var(--muted, #666); }
.checkout-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.checkout-form { min-width: 0; }
.checkout-form fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.checkout-form legend { padding: 0; margin: 0 0 20px; font-size: 1rem; font-weight: 500; letter-spacing: -.025em; }
.checkout-field { margin-bottom: 20px; }
.checkout-field label { display: block; margin-bottom: 8px; font-size: .8125rem; font-weight: 500; }
.checkout-field :is(input, textarea) { display: block; width: 100%; min-height: 48px; padding: 11px 13px; border: 1px solid var(--line, #d8d8d8); border-radius: 8px; background: var(--surface, #fff); color: var(--ink, #171717); font: inherit; font-size: .9375rem; line-height: 1.5; }
.checkout-field :is(input, textarea)::placeholder { color: var(--muted, #666); opacity: 1; }
.checkout-field input[aria-invalid="true"] { border-color: #a92222; }
.checkout-field-error { margin: 7px 0 0; color: #a92222; font-size: .75rem; line-height: 1.45; }
.checkout-field-error[hidden] { display: none; }
.checkout-delivery { padding-top: 18px !important; }
.checkout-delivery-options { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.checkout-delivery-choice { min-width: 0; position: relative; display: block; cursor: pointer; }
.checkout-delivery-choice input { position: absolute; top: 17px; right: 13px; width: 15px; height: 15px; accent-color: var(--accent, #191919); margin: 0; }
.checkout-delivery-choice > span { min-width: 0; overflow-wrap: anywhere; display: flex; height: 100%; min-height: 128px; flex-direction: column; align-items: flex-start; padding: 16px 14px; gap: 6px; border: 1px solid var(--line, #d8d8d8); border-radius: 8px; }
.checkout-delivery-choice input:checked + span { border-color: var(--ink, #171717); }
.checkout-delivery-choice input:focus-visible + span { outline: 2px solid var(--ink, #171717); outline-offset: 3px; }
.checkout-delivery-choice .ph { font-size: 22px; margin-bottom: 4px; }
.checkout-delivery-choice strong { font-size: .8125rem; font-weight: 500; }
.checkout-delivery-choice small { font-size: .6875rem; line-height: 1.4; color: var(--muted, #666); }
.checkout-delivery-detail { margin: 12px 0 0; font-size: .75rem; color: var(--muted, #666); line-height: 1.5; }
.checkout-order { padding-left: 28px; border-left: 1px solid var(--line, #e5e5e5); min-width: 0; }
.checkout-order__heading { display: flex; gap: 16px; align-items: baseline; justify-content: space-between; margin-bottom: 20px; }
.checkout-order__heading h3 { margin: 0; font-size: 1rem; font-weight: 500; letter-spacing: -.025em; }
.checkout-order__heading > span { color: var(--muted, #666); font-size: .6875rem; white-space: nowrap; }
.checkout-order__items { list-style: none; padding: 0; margin: 0; }
.checkout-order__items li { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 12px; margin-bottom: 22px; }
.checkout-order__items img { display: block; width: 48px; height: 60px; object-fit: contain; background: #f6f6f6; border-radius: 4px; grid-row: span 2; }
.checkout-order__items li > div { min-width: 0; }
.checkout-order__items li span { display: block; font-size: .75rem; line-height: 1.45; }
.checkout-order__items li small { display: block; margin-top: 7px; color: var(--muted, #666); font-size: .6875rem; line-height: 1.4; }
.checkout-order__items li > strong { display: block; margin-top: -5px; font-weight: 500; font-size: .8125rem; font-variant-numeric: tabular-nums; }
.checkout-order__total { display: flex; justify-content: space-between; gap: 15px; border-top: 1px solid var(--line, #e5e5e5); padding-top: 18px; font-size: .8125rem; }
.checkout-order__total strong { font-weight: 600; font-variant-numeric: tabular-nums; }
.checkout-order__shipping { font-size: .6875rem; color: var(--muted, #666); margin: 8px 0 0; line-height: 1.45; }
.checkout-order__empty { font-size: .8125rem; color: var(--muted, #666); line-height: 1.5; }
.checkout-footer { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 32px; padding: 20px 30px max(20px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line, #e5e5e5); background: var(--surface, #fff); }
.checkout-footer > div { min-width: 0; flex-shrink: 0; }
.checkout-footer > div span { display: block; font-size: .75rem; color: var(--muted, #666); margin-bottom: 5px; }
.checkout-footer > div strong { white-space: nowrap; font-size: 1.25rem; font-weight: 600; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.checkout-footer .cart-primary-button { width: auto; min-width: 0; max-width: 100%; flex: 0 1 260px; }
.checkout-result { margin: 28px 0 0; padding: 18px 20px; border: 1px solid var(--line, #e5e5e5); background: var(--bg, #f6f6f6); color: var(--ink, #171717); font-size: .875rem; line-height: 1.55; }
.checkout-result[hidden] { display: none; }

.cart-dialog :is(button, a):focus-visible,
.checkout-dialog :is(button, a, input, textarea):focus-visible { outline: 2px solid var(--ink, #171717); outline-offset: 3px; }

/* Checkout progresses from editable data to a review and a local confirmation. */
.checkout-intro { margin-bottom: 30px; }
.checkout-intro .checkout-preview-note { margin-bottom: 22px; max-width: 620px; }
.checkout-steps { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); list-style: none; margin: 0; padding: 0; gap: 20px; }
.checkout-steps li { min-width: 0; display: flex; align-items: center; gap: 10px; padding-bottom: 13px; border-bottom: 2px solid var(--line); color: var(--muted); font-size: .8125rem; }
.checkout-steps li > span { display: inline-flex; flex: 0 0 27px; align-items: center; justify-content: center; height: 27px; border: 1px solid var(--line); border-radius: 6px; font-size: .6875rem; font-variant-numeric: tabular-nums; }
.checkout-steps li[aria-current="step"] { border-bottom-color: var(--accent); color: var(--ink); font-weight: 500; }
.checkout-steps li[aria-current="step"] > span { border-color: var(--accent); color: var(--on-accent); background: var(--accent); }
.checkout-steps li.is-done { color: var(--ink); }
.checkout-layout[hidden], .checkout-intro[hidden], .checkout-form[hidden], .checkout-review[hidden], .checkout-back[hidden], .checkout-footer > div[hidden], .checkout-address-fields[hidden] { display: none; }
.checkout-main { min-width: 0; }
.checkout-field label > span { margin-left: 5px; font-weight: 400; color: var(--muted); font-size: .75rem; }
.checkout-field textarea { min-height: 90px; resize: vertical; }
.checkout-address-fields { padding-top: 22px; }
.checkout-comment { margin-top: 24px; margin-bottom: 0; }
.checkout-delivery-choice > span { transition: border-color .18s, background-color .18s; }
.checkout-delivery-choice input:checked + span { border-color: var(--accent); background: var(--bg); }
.checkout-review__heading { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; }
.checkout-review h3 { margin: 0; font-size: 1.25rem; font-weight: 500; line-height: 1.3; letter-spacing: -.035em; }
.checkout-review__heading > button { min-height: 44px; padding: 0; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: .8125rem; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.checkout-review__heading > button:hover { color: var(--ink); }
.checkout-review__details { display: grid; gap: 24px; margin: 23px 0 28px; }
.checkout-review__details > div { min-width: 0; }
.checkout-review__details dt { margin-bottom: 8px; font-size: .75rem; color: var(--muted); }
.checkout-review__details dd { margin: 0; font-size: .9375rem; line-height: 1.55; overflow-wrap: anywhere; }
.checkout-review__details dd > span { display: block; font-size: .8125rem; }
.checkout-review__note { margin: 0 0 14px; font-size: .8125rem; line-height: 1.55; }
.checkout-review__demo { margin: 0; padding-top: 17px; border-top: 1px solid var(--line); color: var(--muted); font-size: .75rem; line-height: 1.55; }
.checkout-result--complete { display: flex; flex-direction: column; align-items: center; margin: 0; padding: 15px 25px 25px; border: 0; background: transparent; text-align: center; }
.checkout-complete-mark { display: flex; align-items: center; justify-content: center; width: 60px; height: 60px; margin: 0 0 24px; color: var(--accent); background: var(--bg); border-radius: 12px; }
.checkout-complete-mark .ph { font-size: 29px; }
.checkout-result--complete h3 { max-width: 420px; margin: 0 0 16px; font-size: 1.55rem; font-weight: 500; line-height: 1.25; letter-spacing: -.035em; }
.checkout-result--complete > p { max-width: 420px; margin: 0; font-size: .875rem; line-height: 1.55; }
.checkout-complete-total { width: min(100%, 360px); display: grid; gap: 12px; margin: 28px 0 24px; padding: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.checkout-complete-total > div { display: flex; justify-content: space-between; gap: 20px; text-align: left; }
.checkout-complete-total dt { color: var(--muted); font-size: .8125rem; }
.checkout-complete-total dd { white-space: nowrap; margin: 0; font-size: .875rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.checkout-result--complete .checkout-complete-note { font-size: .75rem; color: var(--muted); }
.checkout-result--complete .cart-continue { width: auto; margin: 18px 0 0; }
.checkout-dialog:has(.checkout-result--complete:not([hidden])) .checkout-footer { justify-content: center; }
.checkout-dialog:has(.checkout-result--complete:not([hidden])) .checkout-footer .cart-primary-button { width: min(100%, 360px); }
.cart-quantity button { transition: background-color .15s; }
.cart-quantity button:active:not(:disabled) { background: var(--bg, #f6f6f6); transform: none; }
.cart-line__photo img { transition: transform .24s ease; }
@media (hover: hover) { .cart-line__photo:hover img { transform: scale(1.035); } }

@media (max-width: 767px) {
  .cart-dialog { inset: 0; }
  .cart-head { min-height: 76px; padding: max(14px, env(safe-area-inset-top)) 18px 14px; }
  .cart-head h2 { font-size: 1.3rem; }
  .cart-heading { gap: 10px; }
  .cart-count { font-size: .75rem; }
  .cart-scroll { padding: 0 18px; }
  .cart-line { grid-template-columns: 88px minmax(0, 1fr); gap: 14px; padding-top: 22px; padding-bottom: 18px; }
  .cart-line__photo { width: 88px; height: 112px; }
  .cart-line__name { font-size: .8125rem; margin-bottom: 13px; }
  .cart-line__amount { gap: 8px; }
  .cart-line__prices strong { font-size: .875rem; }
  .cart-quantity { grid-template-columns: 44px 22px 44px; height: 46px; }
  .cart-quantity button { width: 44px; height: 44px; }
  .cart-summary { padding: 18px 18px max(10px, env(safe-area-inset-bottom)); }
  .cart-summary__total strong { font-size: 1.35rem; }
  .cart-summary__delivery { margin-bottom: 16px; }
  .cart-primary-button { min-height: 52px; }
  .cart-undo { padding-left: 18px; padding-right: 8px; gap: 9px; font-size: .75rem; }
  .cart-empty { padding-bottom: 90px; }
  .checkout-dialog { inset: 0; margin: 0; width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; }
  .checkout-head { grid-template-columns: 44px minmax(0, 1fr) 44px; min-height: 76px; padding: max(14px, env(safe-area-inset-top)) 16px 14px; gap: 8px; }
  .checkout-back { justify-content: center; width: 44px; min-height: 44px; }
  .checkout-back > span { display: none; }
  .checkout-head h2 { font-size: 1.125rem; }
  .checkout-scroll { padding: 21px 20px 26px; }
  .checkout-preview-note { font-size: .75rem; }
  .checkout-intro { margin-bottom: 27px; }
  .checkout-steps { gap: 14px; }
  .checkout-steps li { gap: 8px; font-size: .75rem; line-height: 1.4; }
  .checkout-review__details { margin-top: 21px; }
  .checkout-result--complete { padding: 25px 0 15px; }
  .checkout-result--complete h3 { font-size: 1.4rem; }
  .checkout-layout { grid-template-columns: 1fr; gap: 32px; }
  .checkout-field :is(input, textarea) { font-size: 1rem; }
  .checkout-order { padding: 26px 0 0; border-left: 0; border-top: 1px solid var(--line, #e5e5e5); }
  .checkout-order__items li { grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; }
  .checkout-order__items img { grid-row: auto; }
  .checkout-order__items li > strong { margin-top: 0; white-space: nowrap; }
  .checkout-footer { padding: 16px 20px max(16px, env(safe-area-inset-bottom)); gap: 16px; }
  .checkout-footer > div { min-width: 0; }
  .checkout-footer > div strong { font-size: 1.125rem; }
  .checkout-footer .cart-primary-button { min-width: 0; flex: 1; font-size: .8125rem; padding: 13px 12px; gap: 8px; }
}

@media (max-width: 480px) {
  .checkout-footer { flex-direction: column; align-items: stretch; gap: 13px; }
  .checkout-footer > div { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
  .checkout-footer > div span { min-width: 0; margin-bottom: 0; }
  .checkout-footer .cart-primary-button { width: 100%; flex-basis: auto; }
}

@media (max-width: 360px) {
  .cart-line { grid-template-columns: 72px minmax(0, 1fr); gap: 12px; }
  .cart-line__photo { width: 72px; height: 98px; }
  .cart-line__amount { align-items: flex-start; }
  .cart-line__prices { padding-top: 6px; }
  .cart-line__prices span { font-size: .625rem; }
  .cart-line__prices strong { font-size: .8125rem; }
  .cart-line__bottom { align-items: flex-start; }
  .cart-line__stock { padding-top: 14px; font-size: .625rem; }
  .checkout-head h2 { padding-right: 0; }
  .checkout-order__items li { grid-template-columns: 42px minmax(0, 1fr); }
  .checkout-order__items img { width: 42px; height: 54px; grid-row: span 2; }
  .checkout-order__items li > strong { margin-top: -5px; }
}

@media (max-height: 600px) {
  .cart-head { min-height: 65px; padding-top: 10px; padding-bottom: 10px; }
  .cart-summary { padding-top: 14px; padding-bottom: 10px; }
  .cart-summary__delivery { margin: 7px 0 12px; }
  .cart-primary-button { min-height: 46px; }
  .cart-continue { min-height: 44px; }
  .checkout-head { min-height: 64px; padding-block: 10px; }
  .checkout-footer { padding-block: 10px; }
  .checkout-intro { margin-bottom: 18px; }
  .checkout-intro .checkout-preview-note { margin-bottom: 14px; }
  .checkout-dialog { max-height: calc(100dvh - 24px); }

}

@media (max-height: 600px) and (max-width: 767px) { .checkout-dialog { max-height: 100dvh; } }

@media (max-height: 480px) {
  .cart-summary { padding-top: 10px; }
  .cart-summary__delivery { margin: 5px 0 10px; }
  .cart-summary .cart-continue { display: none; }
  .cart-empty { padding-block: 24px; }
}

:root[data-theme='dark'] :is(.checkout-field-error, .cart-line__stock--error, .cart-stock-warning) { color: var(--error, #ff8aa0); }
:root[data-theme='dark'] .checkout-field input[aria-invalid="true"] { border-color: var(--error, #ff8aa0); }

@media (prefers-reduced-motion: reduce) {
  .cart-primary-button:active:not(:disabled) { transform: none; }
  .cart-primary-button, .cart-quantity button, .cart-line__photo img, .checkout-delivery-choice > span { transition: none; }
}

.checkout-saved-address select{display:block;width:100%;min-height:48px;padding:11px 35px 11px 13px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--ink);font:inherit;font-size:16px;text-overflow:ellipsis;}
.checkout-saved-address[hidden]{display:none;}
