/* ─── Checkout ───────────────────────────────────────── */
.checkout-page {
  max-width: 980px;
  margin: 0 auto;
  padding: 2rem 2.5rem 2.5rem;
  border: 1px solid var(--storefront-border-soft);
  border-radius: var(--radius-lg);
  background: var(--storefront-surface);
  box-shadow: var(--shadow-sm);
}

.checkout-page .page-title {
  margin-bottom: 0;
}

.checkout-page .page-body {
  color: var(--storefront-text-strong);
  font-size: calc(15px + var(--font-bump));
  line-height: 1.55;
  text-align: left;
}

/* ─── Checkout (one page) ───── */
.checkout-header {
  background: var(--storefront-surface);
  border-bottom: 1px solid var(--storefront-border);
}

.checkout-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1160px;
  height: 68px;
  margin: 0 auto;
  padding: 0 16px;
}

.checkout-header-cart {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  font-size: 22px;
  color: var(--storefront-heading);
}

.master-wrapper-content.is-checkout {
  width: 100%;
  max-width: none;
}

.master-wrapper-content.is-checkout main {
  padding: 0;
  min-height: 0;
}

/* Height, background and border stay outside the breakpoint; the desktop rule below hides the
   element entirely, so only the mobile layout properties need to live in that media query. */
.checkout-summary-toggle {
  min-height: 56px;
  border: 0;
  border-bottom: 1px solid var(--storefront-border);
  background: var(--storefront-background-subtle);
}

.checkout-summary-toggle .fa-chevron-down {
  transition: transform var(--dur) var(--ease);
}

/* 69px = the slim header's 68px row plus its 1px border; the header lines up with the two columns. */
@media (min-width: 1000px) {
  .checkout,
  .checkout-header-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .checkout {
    grid-template-areas: "main aside";
    min-height: calc(100vh - 69px);
  }

  .checkout-header-inner {
    max-width: none;
    padding: 0;
  }

  .checkout-header-inner > .header-logo {
    justify-self: end;
    width: min(100%, 640px);
    padding: 0 48px;
  }

  .checkout-header-actions {
    width: min(100%, 460px);
    padding: 0 48px;
    text-align: right;
  }

  .checkout-main {
    grid-area: main;
    justify-self: end;
    width: min(100%, 640px);
    padding: 40px 48px 56px;
  }

  .checkout-aside {
    grid-area: aside;
    background: var(--storefront-background-subtle);
    border-left: 1px solid var(--storefront-border);
  }

  .checkout-aside-inner {
    position: sticky;
    top: 24px;
    width: min(100%, 460px);
    max-height: calc(100vh - 48px);
    padding: 40px 48px;
    overflow: auto;
  }

  .checkout-summary-toggle,
  .checkout-summary-panel,
  .checkout-totals-bottom {
    display: none !important;
  }
}

@media (max-width: 999.98px) {
  .checkout-aside {
    display: none;
  }

  .checkout-header-inner {
    max-width: 600px;
  }

  .checkout-main {
    max-width: 600px;
    margin: 0 auto;
    padding: 16px 16px 40px;
  }

  .checkout-summary-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 0 16px;
    color: var(--storefront-primary);
  }

  .checkout-summary-toggle-total {
    margin-left: auto;
    color: var(--storefront-heading);
    font-size: calc(17px + var(--font-bump));
  }

  .checkout-summary-toggle[aria-expanded="true"] .fa-chevron-down {
    transform: rotate(180deg);
  }

  .checkout-summary-panel {
    padding: 16px;
    background: var(--storefront-background-subtle);
    border-bottom: 1px solid var(--storefront-border);
  }

  .checkout-totals-bottom {
    margin: 24px 0 12px;
  }
}

html:not([data-javascript]) [data-checkout-form],
html:not([data-javascript]) .checkout-summary-toggle,
html:not([data-javascript]) .checkout-express {
  display: none;
}

/* Buttons do not inherit the page font; :where keeps this below every component rule. */
:where(.checkout, .checkout-complete) button {
  font: inherit;
}

.checkout-section {
  margin-top: 32px;
}

.checkout-section h2 {
  margin: 0 0 12px;
  color: var(--storefront-heading);
  font-size: 20px;
  font-weight: 700;
}

.checkout-section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.checkout-section-sub {
  color: var(--storefront-text-muted);
  font-size: calc(14px + var(--font-bump));
}

/* Strip browser fieldset chrome. */
.checkout-fieldset,
.checkout-methods,
.checkout-providers,
.checkout-billing,
.checkout-check {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.checkout-field {
  margin-bottom: 12px;
}

.checkout-field label,
.checkout-label {
  display: block;
  margin-bottom: 6px;
  font-size: calc(14px + var(--font-bump));
  font-weight: 600;
}

/* Scoped under .checkout to outrank the storefront's later input[type] form rules. */
.checkout .checkout-field input,
.checkout .checkout-field select {
  width: 100%;
  height: 48px;
  font-size: calc(16px + var(--font-bump));
}

.checkout-required {
  color: var(--storefront-danger);
}

.checkout-hint {
  margin: 4px 0 0;
  color: var(--storefront-text-muted);
  font-size: calc(13px + var(--font-bump));
}

.checkout-row-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

/* Subgrid rows keep the two card inputs level when only one label wraps. */
@supports (grid-template-rows: subgrid) {
  .checkout-row-2 {
    grid-template-rows: repeat(4, auto);
    row-gap: 0;
  }

  .checkout-row-2 > .checkout-field {
    display: grid;
    grid-row: span 4;
    grid-template-rows: subgrid;
  }
}

.checkout-row-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 560px) {
  .checkout-row-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .checkout-row-3 > :first-child {
    grid-column: 1 / -1;
  }
}

.checkout-field-error {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 6px 0 0;
  color: var(--storefront-danger);
  font-size: calc(13px + var(--font-bump));
}

.checkout [aria-invalid="true"] {
  border-color: var(--storefront-danger);
}

.checkout-field input:focus-visible,
.checkout-field select:focus-visible,
.checkout-code-entry input:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
}

/* Borderless controls need an opaque ring; the translucent focus shadow alone is too faint. */
.checkout-summary-toggle:focus-visible,
.checkout-link-button:focus-visible,
.checkout-code-apply:focus-visible,
.checkout-code-remove:focus-visible {
  outline: 2px solid var(--storefront-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.checkout-summary-toggle:focus-visible {
  outline-offset: -3px;
}

.checkout-check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
}

.checkout-check input {
  width: 20px;
  height: 20px;
}

.checkout-link-button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--storefront-primary);
  cursor: pointer;
}

.checkout-link-button:hover {
  text-decoration: underline;
}

.checkout-options {
  border: 1px solid var(--storefront-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.checkout-option + .checkout-option {
  border-top: 1px solid var(--storefront-border);
}

.checkout-option-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 12px 16px;
  cursor: pointer;
}

/* The global input:focus shadow draws a square halo on a round radio, even on click. */
.checkout-option-row input[type="radio"] {
  border-radius: 50%;
}

.checkout-option-row input[type="radio"]:focus {
  box-shadow: none;
}

.checkout-option-row input[type="radio"]:focus-visible {
  outline: 2px solid var(--storefront-primary);
  outline-offset: 2px;
}

.checkout-option:has(> .checkout-option-row input:checked) {
  background: var(--storefront-primary-subtle);
}

.checkout-option-price {
  margin-left: auto;
  font-weight: 600;
}

.checkout-option-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.checkout-option-detail {
  font-size: calc(13px + var(--font-bump));
  color: var(--storefront-text-muted);
}

.checkout-option-delivery {
  font-size: calc(13px + var(--font-bump));
  color: var(--storefront-text);
}

.checkout-option-panel {
  padding: 16px;
  background: var(--storefront-background-subtle);
  border-top: 1px solid var(--storefront-border);
}

.checkout-option.is-unavailable .checkout-option-row {
  opacity: .55;
  cursor: not-allowed;
}

.checkout-option-unavailable {
  padding: 0 16px 12px 48px;
  color: var(--storefront-text-muted);
  font-size: calc(13px + var(--font-bump));
}

.checkout-methods.is-loading,
.checkout-summary-totals.is-loading {
  opacity: .6;
  transition: opacity var(--dur) var(--ease);
}

.checkout-methods-message {
  padding: 16px;
  border-radius: var(--radius-sm);
  background: var(--storefront-background-subtle);
  color: var(--storefront-text-muted);
}

.checkout-card-lock {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  color: var(--storefront-text-muted);
}

.checkout-billing {
  margin-top: 16px;
}

.checkout-pay {
  margin-top: 16px;
}

.checkout-pay-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 54px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--storefront-primary);
  color: var(--storefront-on-color);
  font-size: calc(17px + var(--font-bump));
  font-weight: 700;
  cursor: pointer;
}

.checkout-pay-button:hover {
  background: var(--storefront-primary-hover);
}

.checkout-pay-button:disabled {
  opacity: .7;
  cursor: not-allowed;
}

.checkout-pay-button:focus-visible {
  box-shadow: var(--shadow-focus);
}

.checkout-paypal-button {
  width: 100%;
  min-height: 48px;
}

.checkout-help {
  margin-top: 16px;
  text-align: center;
  font-size: calc(14px + var(--font-bump));
}

.checkout-sign-in,
.checkout-summary-edit,
.checkout-help a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--storefront-primary);
  text-decoration: underline;
}

.checkout-banner a {
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
}

.checkout-express {
  text-align: center;
}

.checkout-express-heading {
  color: var(--storefront-text-muted);
  font-size: calc(14px + var(--font-bump));
  font-weight: 600;
}

.checkout-express-buttons {
  min-height: 48px;
}

.checkout-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 10px;
  color: var(--storefront-text-muted);
  font-size: calc(12px + var(--font-bump));
  text-transform: uppercase;
}

.checkout-divider::before,
.checkout-divider::after {
  flex: 1;
  height: 1px;
  background: var(--storefront-border-soft);
  content: "";
}

.checkout-banner,
.checkout-payment-message,
.checkout-error-summary {
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
}

.checkout-banner.is-error,
.checkout-payment-message.is-error,
.checkout-error-summary {
  border: 1px solid var(--storefront-danger-border);
  background: var(--storefront-danger-subtle);
  color: var(--storefront-danger-strong);
}

.checkout-payment-message.is-info {
  border: 1px solid var(--storefront-info-border);
  background: var(--storefront-info-subtle);
  color: var(--storefront-text-strong);
}

.checkout-error-summary h2 {
  margin: 0 0 8px;
  color: inherit;
  font-size: calc(16px + var(--font-bump));
}

.checkout-error-summary a {
  color: var(--storefront-danger);
  text-decoration: underline;
}

.checkout-covered,
.checkout-approved {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
  padding: 18px;
  border: 1px solid var(--storefront-info-border);
  border-radius: var(--radius-sm);
  background: var(--storefront-info-subtle);
  color: var(--storefront-text-strong);
}

.checkout-approved {
  flex-direction: column;
}

.checkout-approved p {
  margin: 0;
}

.checkout-methods-footnote {
  margin: 8px 0 0;
  color: var(--storefront-text-muted);
  font-size: calc(12px + var(--font-bump));
}

.checkout-inline-note {
  margin: 8px 0 0;
  font-size: calc(14px + var(--font-bump));
}

.checkout-inline-note.is-error {
  color: var(--storefront-danger);
}

/* Carrier answer for the address above it: a suggestion, an unknown address or a unit question. */
.checkout-address-review {
  margin: 4px 0 16px;
  padding: 16px 18px;
  border: 1px solid var(--storefront-info-border);
  border-radius: var(--radius-sm);
  background: var(--storefront-info-subtle);
  color: var(--storefront-text-strong);
}

.checkout-address-review:focus {
  outline: none;
}

.checkout-address-review:focus-visible {
  outline: 2px solid var(--storefront-primary);
  outline-offset: 2px;
}

.checkout-address-review.is-warning {
  border-color: var(--storefront-warning);
  background: var(--storefront-warning-subtle);
}

.checkout-address-review.is-verified {
  margin: 0 0 12px;
  padding: 0;
  border: 0;
  background: none;
}

.checkout-address-review-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  font-size: calc(16px + var(--font-bump));
  color: var(--storefront-heading);
}

.checkout-address-review-title i {
  color: var(--storefront-primary);
}

.checkout-address-review.is-warning .checkout-address-review-title i {
  color: var(--storefront-warning);
}

.checkout-address-review-text,
.checkout-address-review-hint {
  margin: 0 0 10px;
  font-size: calc(14px + var(--font-bump));
}

.checkout-address-review-address {
  margin: 0 0 10px;
  padding: 12px 14px;
  border: 1px solid var(--storefront-border-soft);
  border-radius: var(--radius-sm);
  background: var(--storefront-surface);
  font-size: calc(16px + var(--font-bump));
  font-weight: 600;
  line-height: 1.5;
}

.checkout-address-review-address mark {
  padding: 0 3px;
  border-radius: 3px;
  background: #fff1a8;
  color: inherit;
}

.checkout-address-review-entered {
  margin: 0 0 10px;
  color: var(--storefront-text-muted);
  font-size: calc(13px + var(--font-bump));
}

.checkout-address-review-entered span {
  font-weight: 600;
}

.checkout-address-review-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
}

.checkout .checkout-address-review-apply {
  min-width: 0;
  padding: 10px 18px;
  font-size: calc(14px + var(--font-bump));
  font-weight: 600;
  text-transform: none;
}

.checkout-address-review-verified {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--storefront-success-strong);
  font-size: calc(13px + var(--font-bump));
}

.checkout-signed-in {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.checkout-summary-head {
  display: flex;
  justify-content: space-between;
}

.checkout-summary-head h2 {
  font-size: calc(18px + var(--font-bump));
}

.checkout-summary-lines {
  display: grid;
  gap: 14px;
  margin: 16px 0;
  list-style: none;
}

.checkout-summary-line {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  align-items: center;
  gap: 12px;
}

.checkout-summary-thumb {
  position: relative;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 1px solid var(--storefront-border);
  border-radius: var(--radius-sm);
  background: var(--storefront-surface);
  color: var(--storefront-text-muted);
  font-size: 22px;
}

.checkout-summary-thumb img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: contain;
}

.checkout-summary-qty {
  position: absolute;
  top: -8px;
  right: -8px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--storefront-text-strong);
  color: var(--storefront-on-color);
  font-size: calc(12px + var(--font-bump));
}

.checkout-summary-name {
  font-weight: 600;
}

.checkout-summary-options {
  display: block;
  color: var(--storefront-text-muted);
  font-size: calc(13px + var(--font-bump));
}

.checkout-summary-price {
  font-weight: 600;
  white-space: nowrap;
}

.checkout-code {
  margin: 16px 0;
  padding: 16px 0;
  border-top: 1px solid var(--storefront-border);
  border-bottom: 1px solid var(--storefront-border);
}

.checkout-code-entry {
  display: flex;
  gap: 8px;
}

/* Not wrapped in .checkout-field (it sits in the summary, not the form), so it needs its own
   input treatment to hit the 48px / 16px accessibility targets. */
.checkout .checkout-code-entry input,
.cart-summary .checkout-code-entry input,
.cart-summary .checkout-code-entry select {
  flex: 1 1 auto;
  min-width: 0;
  height: 48px;
  padding: 0 12px;
  border: 1px solid var(--storefront-border);
  border-radius: var(--radius-sm);
  font-size: calc(16px + var(--font-bump));
}

.checkout-code-apply {
  flex: 0 0 auto;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid var(--storefront-primary);
  border-radius: var(--radius-sm);
  background: var(--storefront-surface);
  color: var(--storefront-primary);
  font-size: calc(14px + var(--font-bump));
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.checkout-code-apply:hover {
  background: var(--storefront-primary-subtle);
}

.checkout-code-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
}

.checkout-code-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  background: var(--storefront-primary-muted);
  font-size: calc(13px + var(--font-bump));
}

.checkout-code-chip.is-rejected {
  background: var(--storefront-background-subtle);
  color: var(--storefront-text-muted);
}

/* A 44px target; the negative margins keep the chip as compact as a 28px button would. */
.checkout-code-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: -8px -10px -8px -6px;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}

.checkout-summary-totals {
  margin: 0;
}

.checkout-summary-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
}

.checkout-summary-row dd {
  margin: 0;
}

.checkout-summary-row.is-total {
  padding-top: 10px;
  font-size: calc(18px + var(--font-bump));
  font-weight: 700;
}

.checkout-summary-currency {
  color: var(--storefront-text-muted);
  font-size: calc(12px + var(--font-bump));
  font-weight: 400;
}

.checkout-summary-row.is-discount dd {
  color: var(--storefront-primary);
}

.checkout-summary-row.is-changed {
  animation: checkout-flash 2s;
}

.checkout-skeleton,
.checkout-summary-totals:empty,
.checkout-express-buttons:empty,
.braintree-hosted-field.is-loading {
  background: linear-gradient(90deg, var(--storefront-border-soft) 25%, var(--storefront-background-subtle) 50%, var(--storefront-border-soft) 75%);
  background-size: 200% 100%;
  animation: checkout-shimmer 1.5s ease-in-out infinite;
}

.checkout-skeleton {
  height: 64px;
  border-radius: var(--radius-sm);
}

.checkout-summary-totals:empty {
  min-height: 140px;
  border-radius: var(--radius-sm);
}

.checkout-express-buttons:empty {
  border-radius: var(--radius-sm);
}

.checkout-complete {
  max-width: 560px;
  margin: 64px auto;
  padding: 32px;
  border: 1px solid var(--storefront-border);
  border-radius: var(--radius-lg);
  background: var(--storefront-surface);
  text-align: center;
}

.checkout-complete .fa-spinner {
  color: var(--storefront-primary);
  font-size: 32px;
}

.checkout-complete-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}

@keyframes checkout-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes checkout-flash {
  from { background: var(--storefront-primary-subtle); }
  to { background: transparent; }
}

@media (prefers-reduced-motion: reduce) {
  .checkout-summary-row.is-changed,
  .checkout-skeleton,
  .checkout-summary-totals:empty,
  .checkout-express-buttons:empty,
  .braintree-hosted-field.is-loading,
  .checkout-summary-toggle .fa-chevron-down,
  .checkout-pay-button .fa-spin {
    animation: none;
    transition: none;
  }
}

.checkout-payment-brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  align-self: center;
  justify-content: flex-end;
  gap: 7px;
  margin: 0 0 0 auto;
  color: #52606d;
  font-size: 25px;
}

.checkout-option .checkout-payment-brand img {
  display: block;
  width: 30px;
  height: 30px;
  margin: 0;
  object-fit: contain;
}

.checkout-payment-brand-card,
.checkout-payment-brand-cards {
  font-size: 28px;
}

.checkout-option .checkout-payment-brand-sezzle img {
  width: 88px;
  height: 30px;
}

.checkout-payment-brand-generic {
  width: 34px;
  justify-content: center;
  color: var(--storefront-text-muted);
}

.checkout-payment-brand-afterpay {
  padding: 5px 9px;
  border-radius: 6px;
  background: #b2fce4;
  color: #111820;
  font-size: calc(15px + var(--font-bump));
  font-weight: 800;
  letter-spacing: -0.04em;
}

@media (max-width: 520px) {
  .checkout-payment-brand-card i:nth-of-type(n + 3) {
    display: none;
  }

  .checkout-option .checkout-payment-brand-sezzle img {
    width: 80px;
  }
}

.checkout-notice {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
  padding: 18px;
  border: 1px solid var(--storefront-info-border);
  border-radius: var(--radius-sm);
  background: var(--storefront-info-subtle);
  color: var(--storefront-text-strong);
}

.checkout-notice > i {
  margin-top: 3px;
  color: var(--storefront-accent-hover);
  font-size: 20px;
}

.checkout-notice strong {
  color: var(--storefront-heading);
}

.checkout-notice p {
  margin: 4px 0 0;
}

/* The shipping notice sits under the methods as a quiet footnote. */
[data-checkout-section="shipping"] .checkout-notice {
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--storefront-text-muted);
  font-size: calc(13px + var(--font-bump));
}

[data-checkout-section="shipping"] .checkout-notice > i {
  margin-top: 2px;
  color: var(--storefront-text-muted);
  font-size: calc(13px + var(--font-bump));
}

[data-checkout-section="shipping"] .checkout-notice p {
  margin: 0;
}

[data-checkout-section="shipping"]:has([data-checkout-methods-list][hidden]) .checkout-notice {
  display: none;
}

/* Order summaries are shared by confirmation, account history, and guest lookup. */
.order-summary-section {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--storefront-border);
}

.order-summary-section h2 {
  margin: 0 0 14px;
  color: var(--storefront-heading);
  font-size: calc(18px + var(--font-bump));
}

.order-summary-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--storefront-border-soft);
}

.order-summary-line-child {
  margin-left: 20px;
}

.order-summary-line-copy {
  min-width: 0;
}

.order-summary-line-name {
  margin: 0 0 6px;
  color: var(--storefront-heading);
}

.order-summary-line-options {
  display: block;
  margin-top: 2px;
  color: var(--storefront-text-muted);
  font-size: calc(13px + var(--font-bump));
  font-weight: 400;
}

.order-summary-line-extra {
  color: var(--storefront-text-muted);
  font-size: calc(12px + var(--font-bump));
}

.order-summary-line-details {
  margin: 0 0 8px;
  color: var(--storefront-text-muted);
  font-size: calc(13px + var(--font-bump));
}

.order-summary-line-details > div {
  display: flex;
  gap: 6px;
}

.order-summary-line-details dt,
.order-summary-line-component dd {
  font-weight: 600;
}

.order-summary-line-details dd {
  margin: 0;
}

.order-summary-line-component {
  justify-content: space-between;
  max-width: 360px;
}

.order-summary-line-meta {
  color: var(--storefront-text-muted);
  font-size: calc(13px + var(--font-bump));
}

.order-summary-line-total {
  flex: 0 0 auto;
  color: var(--storefront-heading);
}

.order-summary-totals table {
  width: 100%;
  max-width: 360px;
  border-collapse: collapse;
}

.order-summary-events {
  margin: 0;
  padding: 0;
  list-style: none;
}

.order-summary-address-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.order-summary-address {
  line-height: 1.5;
}

.order-summary-same-address {
  color: var(--storefront-text-muted);
}

.order-summary-same-address i {
  margin-right: 5px;
  color: var(--storefront-primary);
}

.order-confirmation-hero {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 26px;
  border: 1px solid rgba(0, 169, 165, 0.28);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(175, 228, 227, 0.36), rgba(255, 255, 255, 0.9));
}

.order-confirmation-icon {
  display: inline-flex;
  flex: 0 0 52px;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--storefront-primary);
  color: var(--storefront-on-color);
  font-size: 23px;
  box-shadow: var(--shadow-sm);
}

.order-confirmation-copy {
  min-width: 0;
}

.order-confirmation-copy h1 {
  margin: 2px 0 8px;
  color: var(--storefront-heading);
  font-size: clamp(23px, 3vw, 30px);
  line-height: 1.2;
}

.checkout-page .order-confirmation-copy p {
  margin: 0;
}

.order-confirmation-eyebrow {
  color: var(--storefront-primary-strong);
  font-size: calc(13px + var(--font-bump));
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.checkout-page .order-confirmation-copy .order-confirmation-email {
  margin-top: 10px;
  color: var(--storefront-text-muted);
  font-size: calc(13px + var(--font-bump));
}

.order-confirmation-email i {
  margin-right: 5px;
  color: var(--storefront-primary);
}

.order-confirmation-rewards {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 13px 16px;
  border: 1px solid #f1d989;
  border-radius: var(--radius);
  background: #fff9e8;
  color: var(--storefront-text-strong);
}

.order-confirmation-rewards > i {
  color: #d39a00;
}

.order-confirmation-account {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  align-items: start;
  gap: 28px;
  margin-top: 18px;
  padding: 22px 24px;
  border: 1px solid var(--storefront-border);
  border-radius: var(--radius);
  background: var(--storefront-surface);
  box-shadow: var(--shadow-sm);
}

.order-confirmation-account.is-sent {
  display: block;
  border-color: var(--storefront-success-border);
  background: var(--storefront-success-subtle);
}

.order-confirmation-account-pitch,
.order-confirmation-account-sent {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.order-confirmation-account-icon {
  display: inline-flex;
  flex: 0 0 44px;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--storefront-primary-subtle);
  color: var(--storefront-primary-strong);
  font-size: calc(18px + var(--font-bump));
}

.order-confirmation-account h2 {
  margin: 6px 0;
  color: var(--storefront-heading);
  font-size: calc(19px + var(--font-bump));
  line-height: 1.3;
}

.checkout-page .order-confirmation-account p {
  margin: 0;
}

.page-body .order-confirmation-account-benefits {
  display: grid;
  gap: 9px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.order-confirmation-account-benefits li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--storefront-text-strong);
}

.order-confirmation-account-benefits i {
  width: 18px;
  color: var(--storefront-primary);
  text-align: center;
}

.order-confirmation-account-form {
  display: grid;
  gap: 14px;
}

.order-confirmation-account-form .message-error {
  margin: 0;
}

.order-confirmation-account-form label {
  display: block;
  margin-bottom: 6px;
  color: var(--storefront-heading);
  font-size: calc(14px + var(--font-bump));
  font-weight: 700;
}

.order-confirmation-account-form input {
  width: 100%;
  height: 44px;
}

.order-confirmation-account-form input[readonly] {
  background: var(--storefront-background-subtle);
  color: var(--storefront-text-muted);
}

.order-confirmation-password {
  position: relative;
}

.order-confirmation-password input {
  padding-right: 46px;
}

.order-confirmation-password-toggle {
  position: absolute;
  top: 0;
  right: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--storefront-text-muted);
  cursor: pointer;
}

.order-confirmation-password-toggle:hover {
  color: var(--storefront-primary);
}

.order-confirmation-password-toggle:focus-visible {
  outline: 2px solid var(--storefront-primary);
  outline-offset: -6px;
  color: var(--storefront-primary);
}

.checkout-page .order-confirmation-account .order-confirmation-account-note {
  margin-top: 8px;
  color: var(--storefront-text-muted);
  font-size: calc(13px + var(--font-bump));
}

.checkout-page .order-confirmation-account-form .order-confirmation-account-note {
  margin-top: 6px;
}

.order-confirmation-account-note a {
  color: var(--storefront-primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.order-confirmation-account-note a:hover {
  color: var(--storefront-primary-hover);
}

.order-confirmation-account-form .button-1 {
  width: 100%;
}

.order-confirmation-summary .order-summary {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.75fr);
  align-items: start;
  gap: 18px;
  margin-top: 18px;
}

.order-confirmation-summary .order-summary-section {
  margin: 0;
  padding: 20px;
  border: 1px solid var(--storefront-border);
  border-radius: var(--radius);
  background: var(--storefront-surface);
  box-shadow: var(--shadow-sm);
}

.order-confirmation-summary .order-summary-items {
  grid-row: span 2;
}

.order-confirmation-summary .order-summary-totals table {
  max-width: none;
}

.order-confirmation-summary .order-summary-totals tr:last-child td {
  color: var(--storefront-heading);
  font-size: calc(17px + var(--font-bump));
}

.order-confirmation-summary .order-summary-totals tr:last-child td:last-child {
  color: var(--storefront-primary);
  font-size: 20px;
}

.order-confirmation-summary .order-summary-shipments,
.order-confirmation-summary .order-summary-refunds,
.order-confirmation-summary .order-summary-addresses {
  grid-column: 1 / -1;
}

.order-confirmation-summary .order-summary-address-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.checkout-page .order-confirmation-summary .order-summary-address-grid p {
  margin-bottom: 0;
  line-height: 1.55;
}

.order-confirmation-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.order-confirmation-actions .button-1,
.order-confirmation-actions .button-2 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

/* Braintree Hosted Fields: each container hosts one Braintree iframe; the SDK toggles the
   -focused / -invalid classes itself. */
.braintree-hosted-field {
  position: relative;
  height: 48px;
  padding: 0 12px;
  border: 1px solid var(--storefront-border);
  border-radius: var(--radius-sm);
  background: var(--storefront-surface);
}

.braintree-hosted-field.braintree-hosted-fields-focused {
  border-color: var(--storefront-primary);
}

.braintree-hosted-field.braintree-hosted-fields-invalid,
.braintree-hosted-field.braintree-hosted-field-invalid {
  border-color: var(--storefront-danger);
  box-shadow: 0 0 0 1px var(--storefront-danger);
}

.checkout-card-note {
  margin: 12px 0 0;
  color: var(--storefront-text-muted);
  font-size: calc(12px + var(--font-bump));
}

.checkout-card-note i {
  margin-right: 4px;
  color: var(--storefront-primary);
}

@media (max-width: 760px) {
  .checkout-page {
    padding: 1.5rem;
  }

  .order-confirmation-summary .order-summary {
    grid-template-columns: 1fr;
  }

  .order-confirmation-account {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .order-confirmation-summary .order-summary-items,
  .order-confirmation-summary .order-summary-shipments,
  .order-confirmation-summary .order-summary-refunds,
  .order-confirmation-summary .order-summary-addresses {
    grid-column: auto;
    grid-row: auto;
  }

  .order-confirmation-summary .order-summary-address-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .checkout-page {
    padding: 1.25rem 1rem 1.5rem;
    border-radius: var(--radius);
  }

  .order-confirmation-hero,
  .order-confirmation-account {
    padding: 20px 16px;
  }

  .order-confirmation-icon {
    flex-basis: 42px;
    width: 42px;
    height: 42px;
    font-size: calc(18px + var(--font-bump));
  }

  .order-confirmation-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .order-confirmation-actions .button-1,
  .order-confirmation-actions .button-2 {
    width: 100%;
  }

  .order-confirmation-summary .order-summary-address-grid {
    grid-template-columns: 1fr;
  }
}
