:root {
    --checkout-ink: #0b1930;
    --checkout-copy: #526277;
    --checkout-muted: #718096;
    --checkout-border: #dfe6ef;
    --checkout-soft: #f3f6fa;
    --checkout-accent: #e0ad45;
    --checkout-action: #146ef5;
    --checkout-radius: 18px;
}

body.storefront-checkout {
    min-height: 100vh;
    margin: 0;
    color: var(--checkout-ink);
    background:
        radial-gradient(circle at 5% 0, rgba(224, 173, 69, .13), transparent 28rem),
        linear-gradient(180deg, #f8fafc, #eef3f8);
    -webkit-font-smoothing: antialiased;
}

.storefront-checkout #app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.checkout-header {
    position: relative;
    z-index: 20;
    border-bottom: 1px solid rgba(11, 25, 48, .08);
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 8px 28px rgba(11, 25, 48, .05);
}

.checkout-header__inner,
.checkout-footer__inner,
.checkout-container {
    width: min(100% - 40px, 1180px);
    max-width: 1180px;
    margin: 0 auto;
}

.checkout-header__inner {
    min-height: 86px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.checkout-brand {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--checkout-ink);
}

.checkout-brand:hover {
    color: var(--checkout-ink);
    text-decoration: none;
}

.checkout-brand img {
    width: 70px;
    height: 54px;
    display: block;
    object-fit: contain;
    object-position: left center;
}

.checkout-brand strong {
    max-width: 280px;
    overflow: hidden;
    font-size: 16px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.checkout-brand__mark {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    color: var(--checkout-ink);
    background: var(--checkout-accent);
    font-weight: 900;
}

.checkout-security {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 13px;
    border: 1px solid #d7e8dc;
    border-radius: 999px;
    color: #176b38;
    background: #effaf2;
    font-size: 12px;
    font-weight: 750;
}

.checkout-main {
    flex: 1;
    padding: 64px 0 80px;
}

.checkout-container > [class*="col-"] {
    padding-right: 0;
    padding-left: 0;
}

.cart-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.cart-eyebrow {
    display: block;
    margin-bottom: 9px;
    color: #916313;
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.cart-eyebrow i {
    margin-right: 5px;
}

.cart-heading h1 {
    margin: 0 0 7px;
    color: var(--checkout-ink);
    font-size: clamp(34px, 4vw, 52px);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -.045em;
}

.cart-heading p {
    margin: 0;
    color: var(--checkout-copy);
    font-size: 15px;
}

.cart-currency .btn {
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid var(--checkout-border);
    border-radius: 11px;
    color: var(--checkout-ink);
    background: #fff;
    font-size: 13px;
    font-weight: 750;
    box-shadow: 0 6px 18px rgba(11, 25, 48, .05);
}

.cart-currency .dropdown-menu {
    min-width: 230px;
    padding: 8px;
    border: 1px solid var(--checkout-border);
    border-radius: 12px;
    box-shadow: 0 18px 40px rgba(11, 25, 48, .12);
}

.cart-currency .dropdown-item {
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--checkout-copy);
    font-size: 13px;
}

.cart-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 26px;
    align-items: start;
}

.cart-content {
    min-width: 0;
    display: grid;
    gap: 18px;
}

.checkout-card {
    overflow: hidden;
    border: 1px solid var(--checkout-border);
    border-radius: var(--checkout-radius);
    background: #fff;
    box-shadow: 0 12px 35px rgba(11, 25, 48, .055);
}

.checkout-card__header {
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--checkout-border);
}

.checkout-card__header > div {
    display: flex;
    align-items: center;
    gap: 12px;
}

.checkout-card__header h2 {
    margin: 0;
    color: var(--checkout-ink);
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -.02em;
}

.checkout-step {
    width: 32px;
    height: 32px;
    display: grid;
    flex: 0 0 32px;
    place-items: center;
    border-radius: 10px;
    color: var(--checkout-ink);
    background: #f6dfaa;
    font-size: 12px;
    font-weight: 850;
}

.cart-item-count {
    padding: 6px 10px;
    border-radius: 999px;
    color: var(--checkout-copy);
    background: var(--checkout-soft);
    font-size: 12px;
    font-weight: 750;
}

.cart-item {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr) auto 34px;
    gap: 18px;
    align-items: center;
    padding: 22px 24px;
    border-bottom: 1px solid var(--checkout-border);
}

.cart-item:last-child {
    border-bottom: 0;
}

.cart-item__image {
    width: 92px;
    height: 76px;
    display: block;
    overflow: hidden;
    border: 1px solid var(--checkout-border);
    border-radius: 12px;
    background: var(--checkout-soft);
}

.cart-item__image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.cart-item__type {
    display: block;
    margin-bottom: 5px;
    color: #24834a;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.cart-item__details h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 750;
    line-height: 1.35;
}

.cart-item__details h3 a {
    color: var(--checkout-ink);
}

.cart-item__details h3 a:hover {
    color: var(--checkout-action);
    text-decoration: none;
}

.cart-item__details small {
    display: block;
    margin-top: 8px;
    color: var(--checkout-muted);
    line-height: 1.5;
}

.cart-item__price {
    color: var(--checkout-ink);
    font-size: 15px;
    font-weight: 850;
    white-space: nowrap;
}

.cart-item__action {
    text-align: right;
}

.cart-remove {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border: 1px solid #f1d4d4;
    border-radius: 9px;
    color: #b63838;
    background: #fff8f8;
}

.cart-remove span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.cart-remove:hover {
    color: #fff;
    background: #b63838;
    text-decoration: none;
}

.cart-required {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 8px;
    border-radius: 999px;
    color: var(--checkout-copy);
    background: var(--checkout-soft);
    font-size: 10px;
    font-weight: 750;
}

.coupon-card,
.payment-card {
    padding-bottom: 24px;
}

.coupon-form,
.payment-options,
.payment-free,
.payment-card > .alert {
    margin: 22px 24px 0;
}

.coupon-form label {
    color: var(--checkout-ink);
    font-size: 12px;
    font-weight: 750;
}

.coupon-form__controls {
    display: flex;
    gap: 10px;
}

.coupon-form .form-control {
    min-height: 48px;
    border: 1px solid #ccd6e3;
    border-radius: 11px;
    color: var(--checkout-ink);
    background: #fff;
}

.coupon-form .form-control:focus {
    border-color: var(--checkout-action);
    box-shadow: 0 0 0 3px rgba(20, 110, 245, .12);
}

.coupon-button {
    min-width: 104px;
    border: 0;
    border-radius: 11px;
    color: #fff;
    background: var(--checkout-ink);
    font-weight: 750;
}

.payment-options {
    display: grid;
    gap: 10px;
}

.payment-option {
    min-height: 60px;
    display: flex;
    align-items: center;
    gap: 13px;
    margin: 0;
    padding: 13px 15px;
    border: 1px solid var(--checkout-border);
    border-radius: 12px;
    color: var(--checkout-copy);
    background: #fff;
    cursor: pointer;
}

.payment-option:has(input:checked) {
    border-color: var(--checkout-action);
    color: var(--checkout-ink);
    background: #f4f8ff;
    box-shadow: 0 0 0 3px rgba(20, 110, 245, .08);
}

.payment-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.payment-option__radio {
    width: 19px;
    height: 19px;
    display: block;
    flex: 0 0 19px;
    border: 2px solid #aab6c6;
    border-radius: 50%;
    background: #fff;
    box-shadow: inset 0 0 0 4px #fff;
}

.payment-option input:checked + .payment-option__radio {
    border-color: var(--checkout-action);
    background: var(--checkout-action);
}

.payment-option__label {
    flex: 1;
    font-weight: 700;
}

.payment-option > i {
    color: #a9b4c2;
    font-size: 11px;
}

.payment-free {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 15px;
    border-radius: 12px;
    color: #176b38;
    background: #effaf2;
    font-weight: 700;
}

.order-summary {
    position: sticky;
    top: 24px;
}

.order-summary__card {
    padding: 26px;
}

.summary-row,
.summary-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.summary-row {
    padding: 16px 0 10px;
    border-bottom: 1px solid var(--checkout-border);
    color: var(--checkout-copy);
    font-size: 13px;
}

.summary-remove {
    display: inline-block;
    margin-top: 8px;
    color: #b63838;
    font-size: 11px;
    font-weight: 700;
}

.summary-total {
    align-items: flex-end;
    margin: 22px 0;
}

.summary-total span {
    color: var(--checkout-copy);
    font-size: 14px;
    font-weight: 700;
}

.summary-total strong {
    color: var(--checkout-ink);
    font-size: 25px;
    font-weight: 850;
    letter-spacing: -.035em;
    text-align: right;
}

.checkout-button {
    width: 100%;
    min-height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 12px;
    color: #fff !important;
    background: var(--checkout-action);
    box-shadow: 0 10px 24px rgba(20, 110, 245, .24);
    font-size: 14px;
    font-weight: 800;
}

.checkout-button:hover {
    color: #fff;
    background: #0959cd;
    transform: translateY(-1px);
}

.checkout-button:disabled {
    cursor: not-allowed;
    opacity: .55;
    box-shadow: none;
}

.checkout-button__busy {
    display: none;
}

.checkout-button.is-busy .checkout-button__idle {
    display: none;
}

.checkout-button.is-busy .checkout-button__busy {
    display: inline;
}

.continue-shopping {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 9px;
    border-radius: 10px;
    color: var(--checkout-copy);
    font-size: 12px;
    font-weight: 750;
}

.continue-shopping:hover {
    color: var(--checkout-ink);
    background: var(--checkout-soft);
    text-decoration: none;
}

.summary-security {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 18px 0 0;
    padding-top: 18px;
    border-top: 1px solid var(--checkout-border);
    color: var(--checkout-muted);
    font-size: 11px;
    line-height: 1.55;
}

.summary-security i {
    margin-top: 2px;
    color: #24834a;
}

.empty-cart {
    max-width: 620px;
    margin: 20px auto 0;
    padding: 58px 42px;
    text-align: center;
}

.empty-cart__icon {
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    margin: 0 auto 18px;
    border-radius: 18px;
    color: var(--checkout-ink);
    background: #f6dfaa;
    font-size: 24px;
}

.empty-cart h2 {
    color: var(--checkout-ink);
    font-weight: 800;
}

.empty-cart p {
    margin-bottom: 25px;
    color: var(--checkout-copy);
}

.empty-cart .checkout-button {
    width: auto;
    min-width: 210px;
    padding: 0 22px;
}

.checkout-footer {
    border-top: 1px solid rgba(11, 25, 48, .09);
    background: #fff;
}

.checkout-footer__inner {
    min-height: 86px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.checkout-footer__navigation a {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0 12px;
    border: 1px solid var(--checkout-border);
    border-radius: 9px;
    color: var(--checkout-copy);
    font-size: 12px;
    font-weight: 700;
}

.checkout-footer__navigation a:hover {
    color: var(--checkout-ink);
    background: var(--checkout-soft);
    text-decoration: none;
}

.checkout-footer p {
    margin: 0;
    color: var(--checkout-muted);
    font-size: 12px;
}

/* Existing package and bookstore checkout views also inherit this cleaner shell. */
.storefront-checkout .pbc,
.storefront-checkout .book-checkout {
    margin-top: 0;
}

.storefront-checkout .card {
    border-color: var(--checkout-border);
    border-radius: var(--checkout-radius);
    box-shadow: 0 12px 35px rgba(11, 25, 48, .055);
}

@media (max-width: 900px) {
    .cart-layout {
        grid-template-columns: 1fr;
    }

    .order-summary {
        position: static;
    }
}

@media (max-width: 640px) {
    .checkout-header__inner,
    .checkout-footer__inner,
    .checkout-container {
        width: min(100% - 26px, 1180px);
    }

    .checkout-header__inner {
        min-height: 72px;
    }

    .checkout-brand img {
        width: 54px;
        height: 44px;
    }

    .checkout-brand strong,
    .checkout-security {
        display: none;
    }

    .checkout-main {
        padding: 40px 0 54px;
    }

    .cart-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .cart-item {
        grid-template-columns: 72px minmax(0, 1fr) auto;
        gap: 13px;
        padding: 18px;
    }

    .cart-item__image {
        width: 72px;
        height: 64px;
    }

    .cart-item__details h3 {
        font-size: 15px;
    }

    .cart-item__price {
        grid-column: 2;
        font-size: 14px;
    }

    .cart-item__action {
        grid-column: 3;
        grid-row: 1 / span 2;
    }

    .checkout-card__header,
    .coupon-form,
    .payment-options,
    .payment-free,
    .payment-card > .alert,
    .order-summary__card {
        padding-right: 18px;
        padding-left: 18px;
    }

    .coupon-form__controls {
        flex-direction: column;
    }

    .coupon-button {
        min-height: 46px;
    }

    .checkout-footer__inner {
        min-height: 110px;
        align-items: flex-start;
        justify-content: center;
        flex-direction: column;
        padding: 22px 0;
    }
}
