/* Shop frontend — presentation only. Scoped to .shop-* classes. */

.shop-page {
    padding-top: 1rem;
    padding-bottom: 2rem;
}

.shop-page__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.shop-page__title {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
}

.shop-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    padding: .45rem .9rem;
    border-radius: .5rem;
    border: 1px solid transparent;
    font-size: .88rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    line-height: 1.2;
}

.shop-btn--primary {
    background: #4f46e5;
    border-color: #4f46e5;
    color: #fff;
}

.shop-btn--primary:hover { background: #4338ca; color: #fff; }

.shop-btn--ghost {
    background: #fff;
    border-color: #cbd5e1;
    color: #0f172a;
}

.shop-btn--danger {
    background: #fee2e2;
    border-color: #fecaca;
    color: #b91c1c;
}

.shop-qty {
    width: 4.5rem;
    padding: .3rem .5rem;
    border: 1px solid #cbd5e1;
    border-radius: .4rem;
    text-align: center;
}

/* Buy box on a content detail page */
.shop-buybox {
    margin: 1.5rem 0;
    padding: 1rem 1.25rem;
    border: 1px solid #e2e8f0;
    border-radius: .75rem;
    background: #f8fafc;
}

.shop-buybox__prices { margin-bottom: .75rem; }
.shop-buybox__old { color: #94a3b8; margin-inline-end: .5rem; }
.shop-buybox__now { font-size: 1.25rem; font-weight: 800; color: #0f172a; }
.shop-buybox__form { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.shop-buybox__out { color: #b91c1c; font-weight: 700; }

/* Shop listing grid */
.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.shop-card {
    border: 1px solid #e2e8f0;
    border-radius: .75rem;
    background: #fff;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: .6rem;
}

.shop-card__title {
    font-weight: 700;
    color: #0f172a;
    text-decoration: none;
}

.shop-card__prices { display: flex; align-items: baseline; gap: .5rem; }
.shop-card__old { color: #94a3b8; }
.shop-card__now { font-weight: 800; color: #0f172a; }
.shop-card__form { margin-top: auto; }

/* Cart / order tables */
.shop-table { background: #fff; }

.shop-actions {
    display: flex;
    gap: .5rem;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-top: 1rem;
}

/* Checkout — order summary card (presentation only) */
.shop-summary {
    background: #fff;
    border: 1px solid #e9edf2;
    border-radius: 1rem;
    box-shadow: 0 6px 18px rgba(15, 23, 42, .06);
    padding: 1.25rem 1.25rem 1rem;
}

.shop-summary__title {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin: 0 0 1rem;
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
}

.shop-summary__title::before {
    content: "";
    flex: 0 0 auto;
    width: .28rem;
    height: 1.05rem;
    border-radius: 999px;
    background: #4f46e5;
}

.shop-summary__items {
    list-style: none;
    margin: 0;
    padding: 0;
}

.shop-summary__item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
    padding: .7rem 0;
    border-bottom: 1px solid #eef2f7;
}

.shop-summary__item:first-child { padding-top: 0; }
.shop-summary__item:last-child { border-bottom: 0; }

.shop-summary__item-info {
    display: flex;
    flex-direction: column;
    gap: .2rem;
    min-width: 0;
}

.shop-summary__item-name {
    font-size: .92rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.shop-summary__item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    font-size: .78rem;
    color: #64748b;
}

.shop-summary__qty,
.shop-summary__unit { white-space: nowrap; }

.shop-summary__item-total {
    flex: 0 0 auto;
    font-size: .92rem;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
}

.shop-summary__total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-top: 1rem;
    padding: .85rem 1rem;
    border: 1px solid #e6e9ff;
    border-radius: .75rem;
    background: #f5f7ff;
}

.shop-summary__total-label {
    font-size: .95rem;
    font-weight: 700;
    color: #3730a3;
}

.shop-summary__total-value {
    font-size: 1.25rem;
    font-weight: 800;
    color: #3730a3;
    white-space: nowrap;
}

@media (max-width: 575.98px) {
    .shop-summary { padding: 1rem; }
    .shop-summary__total-value { font-size: 1.15rem; }
}

.shop-order-meta { margin-bottom: 1rem; }

/* Buy box: title / badge / stock / qty */
.shop-buybox__head {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: .4rem;
}

.shop-buybox__title { margin: 0; font-size: 1.05rem; font-weight: 800; }

.shop-buybox__badge {
    font-size: .72rem;
    font-weight: 600;
    background: #eef2ff;
    color: #3730a3;
    border-radius: .4rem;
    padding: .1rem .5rem;
}

.shop-buybox__stock { margin: .4rem 0 .75rem; }

.shop-stock { font-size: .85rem; font-weight: 600; }
.shop-stock--in { color: #15803d; }
.shop-stock--out { color: #b91c1c; }
.shop-stock--backorder { color: #b45309; }

.shop-qty-wrap { display: flex; align-items: center; gap: .4rem; }
.shop-qty-label { margin: 0; font-size: .85rem; color: #475569; }

.shop-btn--sm { padding: .3rem .65rem; font-size: .8rem; }

.shop-btn:disabled,
.shop-btn[disabled] {
    opacity: .6;
    cursor: not-allowed;
    pointer-events: none;
}

/* Add-to-cart flash with actions */
.shop-flash__actions {
    display: flex;
    gap: .5rem;
    margin-top: .5rem;
    flex-wrap: wrap;
}

/* Order success summary */
.shop-success {
    border: 1px solid #e2e8f0;
    border-radius: .75rem;
    background: #fff;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
}

.shop-success__row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: .35rem 0;
    border-bottom: 1px dashed #eef2f7;
}

.shop-success__row:last-child { border-bottom: 0; }

/* Mobile: keep primary actions on-screen */
@media (max-width: 575.98px) {
    .shop-buybox__form {
        flex-direction: column;
        align-items: stretch;
    }

    .shop-buybox__form .shop-btn { width: 100%; }
    .shop-qty-wrap { justify-content: space-between; }

    .shop-actions { flex-direction: column; }
    .shop-actions .shop-btn { width: 100%; }

    .shop-page__header { gap: .5rem; }

    .shop-card__cover { height: 180px; }
}

/* ---- Product card: cover + book info ----------------------------------- */
.shop-card {
    padding: 0;
    overflow: hidden;
    gap: 0;
}

.shop-card__cover {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 220px;
    padding: .5rem;
    background: #f1f5f9;
    text-decoration: none;
    overflow: hidden;
}

.shop-card__cover img {
    display: block;
    width: auto;
    height: auto;
    max-width: 80%;
    max-height: 100%;
    object-fit: contain;
}

.shop-card__placeholder { color: #94a3b8; font-size: 2rem; }

.shop-card__body {
    display: flex;
    flex-direction: column;
    gap: .4rem;
    padding: .75rem .9rem 1rem;
}

.shop-card__title {
    margin: 0;
    font-size: .95rem;
    font-weight: 700;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.shop-card__title a { color: #0f172a; text-decoration: none; }
.shop-card__title a:hover { text-decoration: underline; }

.shop-card__author { margin: 0; font-size: .8rem; color: #64748b; }

.shop-card__specs {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: .3rem .5rem;
}

.shop-card__specs li {
    font-size: .72rem;
    color: #475569;
    background: #f1f5f9;
    border-radius: .4rem;
    padding: .1rem .45rem;
}

.shop-card__prices { margin-top: .1rem; }
.shop-card__stock { font-size: .78rem; }

.shop-card__actions {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    flex-wrap: wrap;
    padding-top: .35rem;
}

/* Two-state cart control (shared by Shop cards and the Book purchase section) */
.shop-purchase { width: 100%; }

.shop-purchase[data-state="add"] .shop-purchase__stepper-form { display: none; }
.shop-purchase[data-state="selected"] .shop-purchase__add-form { display: none; }

.shop-purchase__add-form { margin: 0; width: 100%; }
.shop-purchase__add-form .shop-btn { width: 100%; }

.shop-purchase__stepper-form { margin: 0; width: 100%; }
.shop-purchase__stepper-form .shop-qty-stepper {
    display: flex;
    align-items: stretch;
    width: 100%;
}
.shop-purchase__stepper-form .shop-qty-stepper .shop-qty {
    flex: 1 1 auto;
    width: auto;
}

/* Hide the native number spinner on the shop quantity input. Scoped to the
   shared purchase control so unrelated site inputs keep their default look. */
.shop-purchase__stepper-form .shop-qty {
    -moz-appearance: textfield;
    appearance: textfield;
}

.shop-purchase__stepper-form .shop-qty::-webkit-outer-spin-button,
.shop-purchase__stepper-form .shop-qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Cart row quantity input lives in form.shop-cart-qty-form (NOT the purchase
   control), so it needs its own scoped spinner removal. */
.shop-cart-qty-form .shop-qty {
    -webkit-appearance: none;
    -moz-appearance: textfield;
    appearance: textfield;
}

.shop-cart-qty-form .shop-qty::-webkit-inner-spin-button,
.shop-cart-qty-form .shop-qty::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.shop-card__actions .shop-btn { flex: 0 0 auto; }

/* ---- Book detail purchase control (variant only; Shop cards unaffected) ---- */
.shop-purchase--section .shop-purchase__add-form .shop-btn {
    width: 100%;
    padding: .625rem 1rem;
    font-size: .95rem;
    border-radius: .65rem;
}

.shop-purchase--section .shop-purchase__stepper-form .shop-qty-stepper {
    height: 2.75rem;
    border: 1px solid #cbd5e1;
    border-radius: .65rem;
    background: #fff;
    overflow: hidden;
}

.shop-purchase--section .shop-purchase__stepper-form .shop-qty-btn {
    width: 2.75rem;
    min-width: 2.75rem;
    background: #f1f5f9;
    color: #0f172a;
    font-size: 1.15rem;
}

.shop-purchase--section .shop-purchase__stepper-form .shop-qty-btn:hover { background: #e2e8f0; }
.shop-purchase--section .shop-purchase__stepper-form .shop-qty-btn:active { background: #cbd5e1; }

.shop-purchase--section .shop-purchase__stepper-form .shop-qty {
    flex: 1 1 auto;
    width: auto;
    border: 0;
    border-radius: 0;
    text-align: center;
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    /* Remove the native number spinner */
    -moz-appearance: textfield;
    appearance: textfield;
}

.shop-purchase--section .shop-purchase__stepper-form .shop-qty::-webkit-outer-spin-button,
.shop-purchase--section .shop-purchase__stepper-form .shop-qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Book detail: direct scope on the input itself (independent of the intermediate
   wrapper), so the spinner is reliably removed in Chrome/Edge/Safari + Firefox. */
.shop-purchase--section .shop-qty {
    -webkit-appearance: none;
    -moz-appearance: textfield;
    appearance: textfield;
}

.shop-purchase--section .shop-qty::-webkit-inner-spin-button,
.shop-purchase--section .shop-qty::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* ---- AJAX cart: busy state -------------------------------------------- */
form.is-loading {
    opacity: .6;
    pointer-events: none;
}

/* ---- AJAX cart: toasts ------------------------------------------------ */
.shop-toast-container {
    position: fixed;
    inset-inline-end: 1rem;
    bottom: 1rem;
    z-index: 1080;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    max-width: min(92vw, 22rem);
}

.shop-toast {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: .5rem;
    padding: .65rem .85rem;
    border-radius: .6rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .15);
    font-size: .88rem;
    color: #0f172a;
    animation: shopToastIn .22s ease-out;
}

.shop-toast.is-leaving {
    animation: shopToastOut .22s ease-in forwards;
}

.shop-toast__icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 800;
    line-height: 1;
}

.shop-toast--success .shop-toast__icon { background: #dcfce7; color: #15803d; }
.shop-toast--error .shop-toast__icon { background: #fee2e2; color: #b91c1c; }

.shop-toast__text { flex: 1 1 auto; }

.shop-toast__close {
    border: 0;
    background: transparent;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    color: #94a3b8;
}

.shop-toast__close:focus-visible {
    outline: 2px solid #4f46e5;
    outline-offset: 2px;
    border-radius: .25rem;
}

/* Optional toast actions (e.g. "view cart" / "continue shopping") */
.shop-toast__actions {
    flex: 1 0 100%;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: .5rem;
}

.shop-toast__action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.25rem;
    padding: .4rem .85rem;
    border-radius: .45rem;
    border: 1px solid transparent;
    font-size: .8rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
}

.shop-toast__action:focus-visible {
    outline: 2px solid #4f46e5;
    outline-offset: 2px;
}

a.shop-toast__action {
    background: #4f46e5;
    border-color: #4f46e5;
    color: #fff;
}

a.shop-toast__action:hover { background: #4338ca; color: #fff; }

button.shop-toast__action {
    background: #fff;
    border-color: #cbd5e1;
    color: #0f172a;
}

button.shop-toast__action:hover { background: #f1f5f9; }

.shop-toast--success { border-inline-start: 4px solid #16a34a; }
.shop-toast--error { border-inline-start: 4px solid #dc2626; }

@keyframes shopToastIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes shopToastOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(10px); }
}

/* ---- Quantity stepper (− / +) ----------------------------------------- */
.shop-qty-stepper {
    display: inline-flex;
    align-items: stretch;
    border: 1px solid #cbd5e1;
    border-radius: .4rem;
    overflow: hidden;
    background: #fff;
}

.shop-qty-stepper .shop-qty {
    width: 3.5rem;
    border: 0;
    border-radius: 0;
    padding: .3rem .35rem;
}

.shop-qty-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    min-width: 2rem;
    border: 0;
    background: #f1f5f9;
    color: #0f172a;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
}

.shop-qty-btn:hover { background: #e2e8f0; }
.shop-qty-btn:active { background: #cbd5e1; }
.shop-qty-btn:disabled { opacity: .5; cursor: not-allowed; }

.shop-qty-stepper .shop-qty:focus { outline: none; }

.shop-qty-stepper:focus-within {
    border-color: #4f46e5;
    box-shadow: 0 0 0 2px rgba(79, 70, 229, .15);
}

@media (max-width: 575.98px) {
    .shop-qty-stepper .shop-qty { width: 3rem; }
    .shop-qty-btn { width: 2.25rem; min-width: 2.25rem; }
}

/* Smaller stepper used inside the shop cards */
.shop-qty-stepper--sm .shop-qty { width: 2.75rem; }
.shop-qty-stepper--sm .shop-qty-btn { width: 1.75rem; min-width: 1.75rem; font-size: .95rem; }

/* Cart line: inline stepper, no separate Update button */
.shop-cart-qty-form {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    margin: 0;
}

/* Card cart layout is defined alongside .shop-card__actions above. */

/* ==========================================================================
   Checkout (v2) — light, clean, RTL-first. Presentation only; scoped to
   .checkout-page so nothing else in the shop is affected.
   ========================================================================== */
.checkout-page {
    --co-accent: #4f46e5;
    --co-accent-soft: #eef2ff;
    --co-border: #e8eaf0;
    --co-muted: #6b7280;
    --co-ink: #111827;
    --co-radius: 14px;
}

.checkout-steps {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .4rem;
    padding: 0;
    margin: 0 0 1.25rem;
}

.checkout-steps__item {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .35rem .8rem;
    border: 1px solid var(--co-border);
    border-radius: 999px;
    background: #fff;
    color: var(--co-muted);
    font-size: .82rem;
    line-height: 1.4;
}

.checkout-steps__dot {
    width: .5rem;
    height: .5rem;
    border-radius: 50%;
    background: currentColor;
    opacity: .5;
    flex: 0 0 auto;
}

.checkout-steps__item.is-done {
    color: var(--co-accent);
    border-color: #dfe3fb;
    background: var(--co-accent-soft);
}

.checkout-steps__item.is-current {
    color: #fff;
    background: var(--co-accent);
    border-color: var(--co-accent);
    font-weight: 600;
}

.checkout-steps__item.is-current .checkout-steps__dot { opacity: 1; }

.checkout-steps__sep { color: #cbd0dd; font-size: .75rem; }

.checkout-card {
    background: #fff;
    border: 1px solid var(--co-border);
    border-radius: var(--co-radius);
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
    padding: 1.15rem 1.25rem;
    margin-bottom: 1rem;
}

.checkout-card__title {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--co-ink);
    margin: 0 0 1rem;
}

.checkout-card__title i { color: var(--co-accent); }

.checkout-page .form-label { font-weight: 500; color: #374151; margin-bottom: .35rem; }

.checkout-page .form-control,
.checkout-page .form-select {
    border-color: var(--co-border);
    border-radius: 10px;
    padding: .6rem .75rem;
}

.checkout-page .form-control:focus,
.checkout-page .form-select:focus {
    border-color: var(--co-accent);
    box-shadow: 0 0 0 .2rem rgba(79, 70, 229, .15);
}

/* Selectable option card (shipping method / payment method) */
.checkout-choice {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: .85rem 1rem;
    border: 1px solid var(--co-border);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}

.checkout-choice + .checkout-choice { margin-top: .6rem; }
.checkout-choice:hover { border-color: #c7cbe0; }
.checkout-choice.is-selected { border-color: var(--co-accent); background: var(--co-accent-soft); }

.checkout-choice input.form-check-input { margin-top: .2rem; flex: 0 0 auto; }
.checkout-choice input.form-check-input:checked {
    background-color: var(--co-accent);
    border-color: var(--co-accent);
}

.checkout-choice__body { flex: 1 1 auto; min-width: 0; }

.checkout-choice__row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
}

.checkout-choice__title { font-weight: 600; color: var(--co-ink); }
.checkout-choice__price { font-weight: 600; white-space: nowrap; }
.checkout-choice__desc { display: block; color: var(--co-muted); font-size: .82rem; margin-top: .15rem; }

/* Summary */
.checkout-summary--sticky { }

@media (min-width: 992px) {
    .checkout-summary--sticky { position: sticky; top: 1rem; }
}

.checkout-totals {
    margin: 1rem 0 0;
    padding: 1rem 0 0;
    border-top: 1px solid var(--co-border);
}

.checkout-totals__row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .55rem;
}

.checkout-totals__row dt { font-weight: 400; color: var(--co-muted); }
.checkout-totals__row dd { margin: 0; font-weight: 600; color: var(--co-ink); }

.checkout-totals__row--grand {
    margin-top: .75rem;
    padding-top: .75rem;
    border-top: 1px dashed var(--co-border);
}

.checkout-totals__row--grand dt { color: var(--co-ink); font-weight: 600; }
.checkout-totals__row--grand dd strong { font-size: 1.25rem; color: var(--co-accent); }

.checkout-submit { width: 100%; margin-top: 1rem; }
.checkout-submit.is-loading { opacity: .7; pointer-events: none; }

[data-checkout-shipping].is-loading,
[data-checkout-total].is-loading { opacity: .5; }

@media (max-width: 575.98px) {
    .checkout-card { padding: 1rem; }
    .checkout-steps { font-size: .8rem; }
    .checkout-steps__sep { display: none; }
}

/* ==========================================================================
   Checkout (v2) — polish layer. Refines the block above; scoped, no new deps.
   ========================================================================== */

/* Steps */
.checkout-steps { gap: .5rem; margin-bottom: 1.75rem; }
.checkout-steps__item { padding: .4rem .95rem; border-color: #e6e8f0; }
.checkout-steps__item.is-done { background: #f4f5fd; border-color: #e3e5fb; }
.checkout-steps__item.is-current { box-shadow: 0 4px 12px rgba(79, 70, 229, .25); }
.checkout-steps__sep { color: #d3d7e3; }

/* Sections */
.checkout-card {
    padding: 1.4rem 1.5rem;
    margin-bottom: 1.5rem;
    border-color: #eceef4;
    box-shadow: 0 1px 3px rgba(16, 24, 40, .05), 0 1px 2px rgba(16, 24, 40, .03);
}

.checkout-card__title { font-size: 1.05rem; margin-bottom: .35rem; }

.checkout-card__title i {
    display: inline-flex;
    width: 1.9rem;
    height: 1.9rem;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--co-accent-soft);
    font-size: 1rem;
}

.checkout-card__hint { color: var(--co-muted); font-size: .82rem; margin: 0 0 1.15rem; }

/* Inputs */
.checkout-page .form-control,
.checkout-page .form-select {
    min-height: 2.85rem;
    padding: .65rem .85rem;
    font-size: .95rem;
    border-color: #e6e8f0;
}

.checkout-page textarea.form-control { min-height: 0; }
.checkout-page .form-control::placeholder { color: #9aa1ae; }

/* Choice cards (shipping / payment) */
.checkout-choice {
    padding: .95rem 1.1rem;
    border-color: #e6e8f0;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.checkout-choice:hover { border-color: #c9cee6; box-shadow: 0 1px 2px rgba(16, 24, 40, .05); }
.checkout-choice.is-selected { border-color: var(--co-accent); background: #f5f6ff; box-shadow: inset 0 0 0 1px var(--co-accent); }
.checkout-choice:focus-within { border-color: var(--co-accent); box-shadow: 0 0 0 .2rem rgba(79, 70, 229, .15); }
.checkout-choice__title { font-size: .97rem; }
.checkout-choice__price { font-size: .97rem; }

/* Subtle, non-intrusive radio indicator (still a real accessible radio) */
.checkout-choice input.form-check-input {
    appearance: none;
    -webkit-appearance: none;
    width: 1.05rem;
    height: 1.05rem;
    margin-top: .15rem;
    border: 1.5px solid #cbd0e0;
    border-radius: 50%;
    background: #fff;
    position: relative;
    transition: border-color .15s ease, background .15s ease;
}

.checkout-choice input.form-check-input:checked { border-color: var(--co-accent); background: var(--co-accent); }

.checkout-choice input.form-check-input:checked::after {
    content: "";
    position: absolute;
    inset: .26rem;
    border-radius: 50%;
    background: #fff;
}

.checkout-choice input.form-check-input:focus { box-shadow: 0 0 0 .2rem rgba(79, 70, 229, .18); outline: none; }
.checkout-choice input.form-check-input:disabled { opacity: .5; }

/* Summary */
.checkout-summary--sticky { padding: 1.4rem 1.5rem; }
.checkout-page .shop-summary__title { font-size: 1.05rem; }
.checkout-page .shop-summary__item { padding: .7rem 0; }
.checkout-page .shop-summary__items { margin-bottom: 1rem; }
.checkout-totals { margin-top: 1.15rem; padding-top: 1.15rem; }
.checkout-totals__row dt { font-size: .9rem; }
.checkout-totals__row--grand { margin-top: .9rem; padding-top: .9rem; }
.checkout-totals__row--grand dt { font-size: 1rem; }
.checkout-totals__row--grand dd strong { font-size: 1.6rem; line-height: 1.2; }

/* Primary CTA — the visually strongest control, right under the total */
.checkout-submit {
    margin-top: 1.25rem;
    padding: .85rem 1rem;
    font-size: 1.02rem;
    border-radius: .7rem;
    box-shadow: 0 6px 16px rgba(79, 70, 229, .22);
}

.checkout-submit:hover { box-shadow: 0 8px 20px rgba(79, 70, 229, .28); }
.checkout-submit.is-loading { box-shadow: none; }

/* Subtle value transition while the server recalculates */
.checkout-page [data-checkout-shipping],
.checkout-page [data-checkout-total] { transition: opacity .15s ease; }

.checkout-page [data-checkout-quote-error] { font-size: .86rem; padding: .6rem .8rem; }

/* Mobile: keep the natural order (form → summary → CTA), trim spacing */
@media (max-width: 991.98px) {
    .checkout-page .checkout-summary--sticky { position: static; }
}

@media (max-width: 575.98px) {
    .checkout-card { padding: 1.1rem 1.05rem; margin-bottom: 1.1rem; }
    .checkout-summary--sticky { padding: 1.15rem 1.05rem; }
    .checkout-totals__row--grand dd strong { font-size: 1.4rem; }
    .checkout-steps__item { padding: .32rem .65rem; }
}
