#checkout-dialog {
  --checkout-ink: #f8f8f8;
  --checkout-muted: #b7b7b7;
  --checkout-line: #363636;
  --checkout-mat: #121212;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  color: var(--checkout-ink);
  background: #080808;
  border: 0;
  color-scheme: dark;
  overscroll-behavior: contain;
}
#checkout-dialog[open] { animation: checkout-enter .24s ease-out; }
@keyframes checkout-enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.checkout-shell { width: min(100% - 72px, 1120px); margin: 0 auto; padding-bottom: 60px; }
.checkout-header {
  position: sticky;
  top: 0;
  z-index: 3;
  min-height: 73px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--checkout-line);
  background: #080808f5;
}
.checkout-logo { width: 56px; height: 56px; object-fit: contain; }
#checkout-back-to-bag { justify-self: start; }
.checkout-close {
  justify-self: end;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--checkout-line);
  background: var(--checkout-mat);
  color: var(--checkout-ink);
  font: 26px/1 system-ui, sans-serif;
}
.checkout-close:hover { border-color: #888; }
.checkout-text-button, #checkout-summary-toggle {
  min-height: 44px;
  padding: 8px 0;
  color: var(--checkout-muted);
  background: transparent;
  font-size: .875rem;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
}
:is(.checkout-text-button,#checkout-summary-toggle):is(:hover,:focus-visible) { color: var(--checkout-ink); }
.checkout-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding: 36px 0 30px;
}
#checkout-dialog #checkout-title {
  margin: 0;
  font-family: "Chakra Petch", system-ui, sans-serif;
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 700;
  line-height: .99;
  letter-spacing: -.035em;
  text-transform: uppercase;
}
.checkout-secure {
  display: flex;
  gap: .4rem;
  align-items: center;
  white-space: nowrap;
  color: var(--checkout-muted);
  font-size: .875rem;
}
.checkout-secure svg { width: 19px; height: 19px; }
.checkout-folio { margin: 12px 0 0; color: var(--checkout-muted); font-size: .9rem; }
.checkout-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  grid-template-areas: "main summary";
  gap: clamp(20px, 3.2vw, 42px);
  align-items: start;
}
.checkout-main { grid-area: main; min-width: 0; }
#checkout-form, .checkout-main { display: grid; gap: 16px; }
.checkout-panel, .checkout-summary, .checkout-auth {
  min-width: 0;
  padding: clamp(18px, 3vw, 28px);
  background: var(--checkout-mat);
  border: 1px solid var(--checkout-line);
}
#checkout-dialog h3 {
  margin: 0 0 18px;
  font: 700 clamp(1.25rem, 2vw, 1.55rem)/1.1 "Chakra Petch", system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: .015em;
}
.checkout-auth { max-width: 610px; border-top: 2px solid #f1f1f1; }
.checkout-auth p, #checkout-email { color: var(--checkout-muted); font-size: 1rem; line-height: 1.55; margin: 0 0 15px; }
.checkout-section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.checkout-section-heading span { color: var(--checkout-muted); font-size: .9rem; }
#checkout-dialog label { gap: 7px; color: var(--checkout-muted); font-size: .9rem; line-height: 1.35; }
#checkout-dialog input:not([type=checkbox]):not([type=radio]), #checkout-dialog textarea {
  min-height: 46px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #505050;
  border-radius: 3px;
  background: #191919;
  color: var(--checkout-ink);
  font-size: 1rem;
  line-height: 1.35;
}
#checkout-dialog .checkout-panel > input { margin-top: 7px; }
#checkout-dialog input[readonly], #checkout-dialog textarea[readonly] { color: #d9d9d9; background: #101010; }
#checkout-dialog :focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
#checkout-dialog .address-fields { gap: 15px 12px; }
#checkout-dialog .delivery-estimates { margin: 20px 0 15px; padding: 14px 0; border-color: var(--checkout-line); }
#checkout-dialog .delivery-step small { font-size: .75rem; }
#checkout-dialog .delivery-step b { font-size: .9375rem; }
.checkout-date-options summary { cursor: pointer; font-size: .9rem; }
#checkout-dialog .checkout-date-options small { font-size: .8rem; color: var(--checkout-muted); }
.checkout-date-options .date-preference { margin: 12px 0; }

#checkout-dialog #checkout-methods { display: grid; min-width: 0; gap: 8px; margin: 0; padding: 0; border: 0; }
#checkout-dialog .checkout-method {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  min-height: 57px;
  padding: 10px 12px;
  border: 1px solid #494949;
  border-radius: 3px;
  background: #171717;
  cursor: pointer;
}
#checkout-dialog .checkout-method:has(input:checked) { border-color: #dedede; background: #212121; }
.checkout-method input, #checkout-dialog .commerce-check input { margin: 0; accent-color: #eee; }
.checkout-method b { display: block; font-size: 1rem; color: var(--checkout-ink); }
#checkout-dialog .checkout-method small { display: block; font-size: .8rem; color: var(--checkout-muted); }
.checkout-provider-box {
  min-width: 0;
  margin-top: 12px;
  border-radius: 3px;
  background: var(--checkout-mat);
}
.checkout-provider-box iframe { max-width: 100%; }
#checkout-card-message:empty { display: none; }
#checkout-dialog #checkout-card-message, #checkout-dialog #checkout-privacy {
  margin: 12px 0 0;
  color: var(--checkout-muted);
  font-size: .875rem;
  line-height: 1.45;
}
#checkout-dialog .commerce-check { display: flex; align-items: start; margin: 12px 0; }
#checkout-dialog .commerce-check input { margin-top: .2rem; width: 16px; height: 16px; }
.checkout-pay {
  display: block;
  width: 100%;
  min-height: 54px;
  margin-top: 16px;
  padding: 13px 15px;
  border: 1px solid #f3f3f3;
  border-radius: 3px;
  background: #f5f5f5;
  color: #090909;
  font-weight: 700;
  font-size: 1rem;
  transition: background .16s ease, transform .16s ease;
}
.checkout-pay:hover:not(:disabled) { background: #dedede; }
.checkout-pay:active:not(:disabled) { transform: translateY(1px); }
.checkout-pay:disabled { opacity: .48; cursor: not-allowed; }
#checkout-dialog .checkout-status { margin-top: 12px; padding: 14px; border: 1px solid #626262; border-left: 3px solid #eee; border-radius: 3px; background: #191919; font-size: .95rem; line-height: 1.5; }
#checkout-dialog .checkout-status[data-state="rejected"], #checkout-dialog .checkout-status[data-state="error"] { border-left-color: #f29292; }
#checkout-dialog .checkout-status[data-state="approved"] { border-left-color: #9edbb4; }
.checkout-actions { display: flex; flex-wrap: wrap; column-gap: 18px; }
.checkout-mock-card { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding-top: 3px; }
.checkout-mock-card > span { padding: 13px; border: 1px solid #505050; border-radius: 3px; background: #191919; color: var(--checkout-muted); font-size: .9rem; }
.checkout-mock-card > span:first-child, .checkout-mock-card > span:last-child { grid-column: 1 / -1; }

.checkout-summary {
  grid-area: summary;
  position: sticky;
  top: 87px;
  border-top: 2px solid #efefef;
}
.checkout-summary-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
#checkout-summary-toggle { display: none; }
.checkout-summary-items {
  max-height: min(39dvh, 360px);
  margin: 0;
  padding: 0 3px 10px 0;
  list-style: none;
  overflow-y: auto;
}
.checkout-summary-item {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--checkout-line);
  font-size: .92rem;
}
.checkout-summary-item > img, .checkout-item-placeholder {
  display: block;
  width: 46px;
  height: 53px;
  padding: 4px;
  object-fit: contain;
  background: #262626;
  border: 1px solid #3d3d3d;
  border-radius: 3px;
}
.checkout-summary-item b { display: block; overflow-wrap: anywhere; }
#checkout-dialog .checkout-summary-item small { display: block; font-size: .8rem; color: var(--checkout-muted); }
.checkout-summary-item > span:last-child, .checkout-summary-totals dd { font-variant-numeric: tabular-nums; white-space: nowrap; }
.checkout-summary-totals { display: grid; gap: 10px; margin: 12px 0 0; font-size: .9375rem; }
.checkout-summary-totals > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.checkout-summary-totals dd { margin: 0; }
.checkout-summary-totals .checkout-total { border-top: 1px solid #6a6a6a; margin: 4px 0 0; padding-top: 14px; font-size: 1.2rem; font-weight: 700; }
.checkout-summary-totals .checkout-coupon { color: #eee; }
.checkout-summary-totals .checkout-coupon code { display: block; color: var(--checkout-muted); font-size: .8rem; overflow-wrap: anywhere; }

@media (max-width: 760px) {
  .checkout-shell { width: calc(100% - 30px); padding-bottom: 28px; }
  .checkout-intro { align-items: start; flex-direction: column; gap: 10px; padding: 24px 0 20px; }
  .checkout-header { min-height: 60px; }
  .checkout-logo { height: 46px; width: 46px; grid-column: 2; }
  .checkout-close { grid-column: 3; }
  .checkout-layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "summary" "main"; gap: 14px; }
  .checkout-summary { position: static; }
  #checkout-dialog .checkout-summary h3 { margin: 0; }
  #checkout-summary-toggle { display: inline-block; }
  .checkout-summary-heading:has(#checkout-summary-toggle[aria-expanded="false"]) + .checkout-summary-items { display: none; }
  .checkout-summary-items { max-height: 245px; }
}
@media (prefers-reduced-motion: reduce) {
  #checkout-dialog[open] { animation: none; }
  .checkout-pay { transition: none; }
}

.checkout-bank-frame {
  display: block;
  width: 100%;
  min-height: 360px;
  border: 0;
}
