.nav-actions .checkout-nav {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding-inline: .65rem;
    font-weight: 600;
    font-size: .875rem;
}

[data-store-cart][hidden] {
    display: none;
}

[data-store-cart]:not([hidden]) ~ .detail-inquiry {
    border: 1px solid var(--line);
    background: transparent;
    color: var(--brown);
}

[data-store-cart]:not([hidden]) ~ .detail-inquiry:hover {
    background: var(--cream);
}

.checkout-shell {
    min-height: 55vh;
    padding-block: clamp(28px, 6vw, 72px);
    padding-bottom: var(--space-section);
}

.checkout-shell h1 {
    margin: .6rem 0 1.4rem;
    font: 500 clamp(48px, 5.5vw, 76px)/1.15 var(--serif);
}

.checkout-shell h2, .checkout-shell legend {
    font-family: var(--sans);
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: -.02em;
}

.checkout-grid, .checkout-items, .checkout-fields {
    display: grid;
    gap: 1rem;
}

.checkout-grid {
    align-items: start;
    gap: clamp(16px, 3vw, 36px);
}

.checkout-items, .checkout-lines {
    padding: 0;
    margin: 0;
    list-style: none;
}

.checkout-panel {
    padding: clamp(24px, 3vw, 40px);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    overflow-wrap: anywhere;
    box-shadow: var(--shadow);
}

.checkout-line, .checkout-totals > div {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
}

.checkout-line strong, .checkout-totals dd {
    font-variant-numeric: tabular-nums;
}

.checkout-line {
    flex-wrap: wrap;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 16px;
}

.checkout-lines li { margin-block: .5rem; }
.checkout-line p { margin-bottom: .4rem; font-size: 12px; color: var(--muted); }
.checkout-totals div { margin-bottom: .75rem; }
.checkout-totals dd { margin: 0; text-align: end; }
.checkout-total {
    border-top: 1px solid var(--line);
    padding-top: 20px;
    margin-top: 20px;
    font-size: 18px;
    color: var(--brand);
    font-weight: 600;
}

.checkout-field, .checkout-pair {
    display: grid;
    gap: .5rem;
}

.checkout-field input, .checkout-field textarea, .checkout-quantity input {
    width: 100%;
    min-height: 48px;
    padding: .5rem .75rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
}

.checkout-field label, .checkout-quantity label { font-size: 13px; font-weight: 600; }
.checkout-field input:focus, .checkout-field textarea:focus { outline: 2px solid var(--brand); outline-offset: 2px; }
.checkout-field small { color: var(--muted); font-size: 12px; }

.checkout-option {
    display: flex;
    align-items: start;
    gap: .6rem;
    padding: 16px;
    font-size: 13px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    cursor: pointer;
}

.checkout-option:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }

.checkout-option input { margin-top: .3em; accent-color: var(--brown); }
.checkout-option a, .checkout-back { text-decoration: underline; }
.checkout-back { display: inline-flex; align-items: center; min-height: 44px; }

.checkout-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 14px 22px;
    border: 1px solid var(--brand);
    border-radius: var(--radius);
    background: var(--brand);
    color: var(--cream);
    font-weight: 600;
    font-size: 13px;
}
.checkout-summary .checkout-primary { width: 100%; margin-top: 20px; }
.checkout-primary:hover { background: var(--brown); color: var(--cream); }
.checkout-primary:disabled {
    background: var(--cream);
    border-color: var(--line);
    color: var(--brown);
    cursor: not-allowed;
}

.checkout-quantity {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: end;
}
.checkout-quantity input { width: 4rem; }
.checkout-quiet {
    min-height: 44px;
    padding: .4rem;
    border: 0;
    color: var(--brown);
    background: transparent;
    text-decoration: underline;
}
.checkout-notice {
    margin-block: 24px;
    padding: 16px 20px;
    border-inline-start: 3px solid var(--gold);
    background: var(--brand-soft);
    font-size: 13px;
}
.checkout-receipt { max-width: 680px; }
.checkout-receipt-data { max-width: 520px; }
.checkout-payment-frame {
    width: 100%;
    height: max(740px, 80vh);
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--bs-white);
}
.checkout-fields .field-validation-error,
.checkout-fields .validation-summary-errors { color: var(--bs-danger-text-emphasis); }

@media (min-width: 760px) {
    .checkout-grid { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
    .checkout-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.checkout-empty { display: grid; justify-items: center; align-content: center; gap: 16px; padding: 64px 24px; background: var(--linen); text-align: center; }
.checkout-empty > .store-icon { width: 36px; height: 36px; color: var(--brand); }
.checkout-empty h2 { font: 500 36px/1.1 var(--serif); margin: 0; }
.checkout-empty p { color: var(--muted); font-size: 13px; }
@media (min-width: 1000px) {
    .checkout-summary { position: sticky; top: 112px; }
}
