/* Checkout-only presentation. Shared storefront components remain unchanged. */
.payment-page {
  color: var(--ink, #27241f);
  background: var(--paper, #faf8f3);
}

.payment-page *,
.payment-page *::before,
.payment-page *::after {
  box-sizing: border-box;
}

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

.payment-shell {
  width: min(100% - 80px, 1200px);
  margin-inline: auto;
}

.payment-header {
  border-bottom: 1px solid var(--line, #ded9cf);
  background: var(--paper, #faf8f3);
}

.payment-header-inner {
  display: grid;
  min-height: 100px;
  align-items: center;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 20px;
}

.payment-header-inner .brand { justify-self: start; }

.payment-header-title {
  color: var(--ink-muted, #6d685f);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.payment-cart-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-self: end;
  gap: 9px;
  font-size: 13px;
}

.payment-cart-count {
  display: grid;
  min-width: 24px;
  min-height: 24px;
  padding: 2px 6px;
  border: 1px solid var(--line, #ded9cf);
  border-radius: 50%;
  font-size: 11px;
  place-items: center;
}

.payment-main { min-height: calc(100vh - 210px); padding-block: 54px 84px; }
.payment-heading { max-width: 720px; margin-bottom: 42px; }
.payment-heading h1 { margin-block: 10px 15px; font-family: var(--display, Georgia, serif); font-size: clamp(36px, 4vw, 56px); font-weight: 400; line-height: 1.12; }
.payment-heading > p:last-child { color: var(--ink-muted, #6d685f); font-size: 14px; line-height: 1.7; }
.payment-layout { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); align-items: start; gap: clamp(40px, 5vw, 76px); }
.payment-form,
.payment-summary,
.payment-field { min-width: 0; }
.payment-section { padding-bottom: 32px; }
.payment-section + .payment-section { padding-top: 30px; border-top: 1px solid var(--line, #ded9cf); }
.payment-section-heading { display: flex; align-items: baseline; gap: 14px; margin-bottom: 12px; }
.payment-section-heading > span { color: var(--wood, #806249); font-size: 11px; letter-spacing: .08em; }
.payment-page h2 { font-family: var(--display, Georgia, serif); font-size: 25px; font-weight: 400; line-height: 1.3; }
.payment-section-intro { margin-bottom: 23px; color: var(--ink-muted, #6d685f); font-size: 12px; line-height: 1.6; }
.payment-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 19px 16px; }
.payment-field-wide { grid-column: 1 / -1; }
.payment-field label { display: block; margin-bottom: 8px; font-size: 12px; line-height: 1.5; }
.payment-optional { color: var(--ink-muted, #6d685f); font-size: 11px; }
.payment-field input,
.payment-field select { display: block; width: 100%; min-width: 0; min-height: 50px; padding: 12px; border: 1px solid var(--line, #ded9cf); border-radius: 0; color: var(--ink, #27241f); background: #fffefa; font: inherit; font-size: 14px; }
.payment-field select { padding-right: 30px; }
.payment-field input:hover,
.payment-field select:hover { border-color: #a49b8d; }
.payment-privacy-note { margin-top: 17px; color: var(--ink-muted, #6d685f); font-size: 11px; line-height: 1.75; }
.payment-methods { min-width: 0; margin: 20px 0 0; padding: 0; border: 0; }
.payment-method { display: flex; min-height: 84px; align-items: center; gap: 13px; padding: 17px; border: 1px solid var(--line, #ded9cf); background: #fffefa; cursor: pointer; }
.payment-method + .payment-method { margin-top: 10px; }
.payment-method:has(input:checked) { border-color: var(--wood, #806249); box-shadow: inset 3px 0 var(--wood, #806249); background: #f4f0e8; }
.payment-method input,
.payment-terms input { flex: 0 0 auto; width: 18px; height: 18px; margin: 0; accent-color: var(--wood, #806249); }
.payment-method-copy { display: flex; min-width: 0; flex: 1 1 auto; flex-direction: column; gap: 6px; }
.payment-method-copy strong { font-size: 13px; font-weight: 600; }
.payment-method-copy > span { color: var(--ink-muted, #6d685f); font-size: 11px; line-height: 1.5; }
.payment-method svg { width: 26px; height: 26px; flex: 0 0 26px; fill: none; stroke: currentColor; stroke-width: 1.25; stroke-linecap: round; stroke-linejoin: round; }
.payment-complete { padding-top: 24px; border-top: 1px solid var(--line, #ded9cf); }
.payment-terms { display: flex; min-height: 44px; align-items: center; gap: 12px; margin-bottom: 16px; cursor: pointer; }
.payment-terms span { font-size: 12px; line-height: 1.65; }
.payment-submit { width: 100%; min-height: 54px; font-size: 13px; cursor: pointer; }
.payment-submit:disabled { cursor: not-allowed; opacity: .52; }
.payment-status { min-height: 20px; margin-top: 12px; color: var(--ink-muted, #6d685f); font-size: 12px; line-height: 1.65; }
.payment-validation { margin-bottom: 16px; padding: 13px; color: #843b2d; background: #f8eee8; font-size: 12px; line-height: 1.6; }
.payment-error { margin-block: 8px 20px; padding: 21px; border: 1px solid #d7ba9c; background: #f4eee4; scroll-margin-top: 24px; }
.payment-error h3 { margin-bottom: 10px; font-family: var(--display, Georgia, serif); font-size: 23px; font-weight: 400; }
.payment-error p { margin-top: 8px; color: #5e4b38; font-size: 13px; line-height: 1.75; }
.payment-error-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin-top: 16px; }
.payment-error-actions > a { display: inline-flex; min-height: 44px; align-items: center; gap: 7px; font-size: 12px; }
.payment-return-link { display: inline-flex; min-height: 44px; align-items: center; gap: 8px; color: var(--wood, #806249); font-size: 12px; }
.payment-summary { position: sticky; top: 24px; padding: 28px; border: 1px solid var(--line, #ded9cf); background: #f2eee6; }
.payment-summary-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 15px; padding-bottom: 24px; border-bottom: 1px solid var(--line, #ded9cf); }
.payment-summary-heading a { flex: 0 0 auto; color: var(--wood, #806249); font-size: 11px; text-decoration: underline; text-underline-offset: 4px; }
.payment-summary-items { max-height: 510px; margin-block: 22px; overflow-y: auto; overscroll-behavior: contain; }
.payment-summary-item { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 13px; }
.payment-summary-item + .payment-summary-item { margin-top: 20px; }
.payment-item-image { display: block; width: 64px; height: 80px; object-fit: cover; background: #e5dfd4; }
.payment-item-copy { min-width: 0; overflow-wrap: anywhere; }
.payment-item-copy h3 { font-family: var(--display, Georgia, serif); font-size: 17px; font-weight: 400; line-height: 1.35; }
.payment-item-copy p { margin-top: 7px; color: var(--ink-muted, #6d685f); font-size: 11px; line-height: 1.5; }
.payment-item-price { font-size: 12px; white-space: nowrap; }
.payment-totals { border-top: 1px solid var(--line, #ded9cf); }
.payment-totals > div { display: flex; justify-content: space-between; align-items: baseline; gap: 15px; padding-block: 21px; font-size: 13px; }
.payment-totals dd { margin: 0; text-align: right; white-space: nowrap; }
.payment-totals .payment-total-row { border-top: 1px solid var(--line, #ded9cf); font-size: 17px; }
.payment-total-row dd { font-family: var(--display, Georgia, serif); font-size: 26px; }
.payment-summary-note { color: var(--ink-muted, #6d685f); font-size: 11px; line-height: 1.75; }
.payment-help { display: flex; align-items: start; gap: 13px; margin-top: 23px; padding-top: 23px; border-top: 1px solid var(--line, #ded9cf); }
.payment-help > span { color: var(--wood, #806249); font-size: 24px; }
.payment-help p { font-size: 12px; line-height: 1.8; }
.payment-help a { color: var(--wood, #806249); text-decoration: underline; text-underline-offset: 4px; }
.payment-state { max-width: 720px; padding: 38px; border: 1px solid var(--line, #ded9cf); background: #f2eee6; }
.payment-state h2 { margin-bottom: 14px; }
.payment-state > p { color: var(--ink-muted, #6d685f); font-size: 14px; line-height: 1.7; }
.payment-state .button,
.payment-state .text-link { display: inline-flex; min-height: 48px; align-items: center; margin-top: 24px; }
.payment-footer { display: flex; justify-content: space-between; gap: 20px; padding-block: 25px; border-top: 1px solid var(--line, #ded9cf); color: var(--ink-muted, #6d685f); font-size: 11px; }
.payment-footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.payment-footer a { display: inline-flex; min-height: 44px; align-items: center; }
.payment-footer > p { padding-top: 14px; }
.payment-page :is(a, button, input, select):focus-visible { outline: 2px solid var(--wood, #806249); outline-offset: 4px; }
.payment-field :is(input, select):focus-visible { outline-offset: 2px; border-color: var(--wood, #806249); }
.payment-error:focus { outline: 2px solid var(--wood, #806249); outline-offset: 4px; }
.payment-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }

@media (max-width: 900px) {
  .payment-shell { width: calc(100% - 48px); }
  .payment-layout { grid-template-columns: minmax(0, 1fr); gap: 35px; }
  .payment-summary { position: static; }
  .payment-summary-items { max-height: none; }
}

@media (max-width: 520px) {
  .payment-shell { width: calc(100% - 36px); }
  .payment-header-inner { min-height: 82px; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
  .payment-header-title { display: none; }
  .payment-main { padding-block: 35px 50px; }
  .payment-heading { margin-bottom: 30px; }
  .payment-heading > p:last-child { font-size: 13px; }
  .payment-field-grid { gap: 17px 12px; }
  .payment-field label { font-size: 11px; }
  .payment-field input,
  .payment-field select { font-size: 16px; }
  .payment-method { padding: 14px 12px; }
  .payment-summary { padding: 21px 18px; }
  .payment-summary-heading { gap: 10px; }
  .payment-summary-heading h2 { font-size: 23px; }
  .payment-summary-item { grid-template-columns: 54px minmax(0, 1fr) auto; gap: 10px; }
  .payment-item-image { width: 54px; height: 68px; }
  .payment-item-copy h3 { font-size: 16px; }
  .payment-item-price { font-size: 11px; }
  .payment-state { padding: 26px 21px; }
  .payment-footer { align-items: start; }
  .payment-footer nav { justify-content: end; gap: 4px 15px; }
}

@media (max-width: 360px) {
  .payment-shell { width: calc(100% - 28px); }
  .payment-field-grid { grid-template-columns: minmax(0, 1fr); }
  .payment-field-wide { grid-column: auto; }
  .payment-summary-item { grid-template-columns: 48px minmax(0, 1fr); }
  .payment-item-image { width: 48px; height: 60px; grid-row: span 2; }
  .payment-item-price { grid-column: 2; }
  .payment-error { padding: 18px 15px; }
}

@media (prefers-reduced-motion: reduce) {
  .payment-page *,
  .payment-page *::before,
  .payment-page *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
