/*  Updated: 2026-10-03 — Added coupon support. */
/* Updated: 2026-09-26 - Added checkout payment-option styling for secure checkout and PayPal paths. */
/* Updated: 2026-09-26 - Improved variant selector visibility on direct-purchase forms. */
/* Updated: 2026-09-19 - Added cart return and continue-shopping actions. */
/* Updated: 2026-09-19 */

.commerce-page {
    background: #f7f4f8;
    min-height: 60vh;
    padding: clamp(2rem, 5vw, 4.5rem) 1rem;
}

.commerce-shell {
    margin: 0 auto;
    max-width: 1120px;
}

.commerce-shell > h1 {
    margin-bottom: 1.75rem;
}

.commerce-layout {
    align-items: start;
    display: grid;
    gap: 1.5rem;
    grid-template-columns: minmax(0, 1.65fr) minmax(280px, .85fr);
}

.commerce-panel,
.commerce-summary,
.cart-item {
    background: #fff;
    border: 1px solid rgba(69, 42, 78, .12);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(45, 26, 51, .07);
}

.commerce-panel,
.commerce-summary {
    padding: clamp(1.25rem, 3vw, 2rem);
}

.commerce-summary {
    position: sticky;
    top: 1rem;
}

.commerce-summary h2,
.commerce-panel h2 {
    margin-top: 0;
    text-align: center;
}

.commerce-summary dl {
    margin: 1.25rem 0;
}

.commerce-summary dl > div {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: .5rem 0;
}

.commerce-summary dd {
    margin: 0;
    text-align: right;
}

.commerce-summary__total {
    border-top: 1px solid rgba(69, 42, 78, .2);
    font-size: 1.15rem;
    font-weight: 700;
    margin-top: .4rem;
    padding-top: .9rem !important;
}

.commerce-checkout-button {
    box-sizing: border-box;
    display: block;
    text-align: center;
    width: 100%;
}

.commerce-small {
    color: #625a66;
    font-size: .9rem;
}

.commerce-items {
    display: grid;
    gap: 1rem;
}

.cart-item {
    align-items: center;
    display: grid;
    gap: 1rem;
    grid-template-columns: 110px minmax(0, 1fr) auto;
    padding: 1rem;
}

.cart-item__image img {
    aspect-ratio: 1;
    border-radius: 10px;
    display: block;
    object-fit: contain;
    width: 100%;
}

.cart-item__content h2 {
    font-size: 1.1rem;
    margin: 0 0 .35rem;
}

.cart-item__content p {
    margin: .2rem 0;
}

.cart-item__return {
    color: #6b3378;
    display: inline-block;
    margin: .45rem .85rem .2rem 0;
    text-decoration: underline;
}

.cart-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
}

.cart-item__content input[type="number"],
.direct-purchase-form select,
.direct-purchase-form input[type="number"] {
    border: 1px solid #aaa0ae;
    border-radius: 7px;
    margin-left: .4rem;
    max-width: 90px;
    padding: .55rem;
}

.cart-item__total {
    font-size: 1.08rem;
    font-weight: 700;
}

.commerce-link-button {
    background: none;
    border: 0;
    color: #6b3378;
    cursor: pointer;
    font: inherit;
    padding: .4rem 0;
    text-decoration: underline;
}

/* Checkout payment options */
.checkout-payment {
    margin-top: 1.5rem;
}

.checkout-payment-option {
    padding: 1.25rem;
    border: 1px solid rgba(69, 42, 78, .12);
    border-radius: 12px;
    background: #fff;
    text-align: center;
}

.checkout-payment-option--stripe {
    background: #faf7fc;
    border-color: rgba(111, 63, 160, .22);
}

.checkout-payment-option--stripe h3, .checkout-payment-option--stripe p {
    text-align: center;
}

.checkout-payment-option--paypal {
    background: #fff;
}

.checkout-payment-methods {
    margin: .75rem 0 0;
    color: #625a66;
    font-size: .9rem;
    line-height: 1.55;
    text-align: center;
}

.checkout-payment-divider {
    display: flex;
    align-items: center;
    gap: .85rem;
    margin: 1.25rem 0;
    color: #746c78;
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.checkout-payment-divider::before,
.checkout-payment-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(69, 42, 78, .16);
}

.checkout-notice,
.checkout-error {
    border-radius: 10px;
    margin: 1.25rem 0;
    padding: 1rem;
}

.checkout-notice {
    background: #f2edf5;
    display: grid;
    gap: .25rem;
}

.checkout-error,
.checkout-message.is-error {
    background: #fff1f1;
    color: #8a2222;
}

.checkout-message {
    border-radius: 8px;
    min-height: 1.5em;
    padding: .65rem;
}

.checkout-items,
.confirmation-items {
    list-style: none;
    margin: 1rem 0;
    padding: 0;
}

.checkout-items li,
.confirmation-items li {
    border-bottom: 1px solid rgba(69, 42, 78, .12);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: .75rem 0;
}

.confirmation-lead {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.confirmation-details address {
    font-style: normal;
    line-height: 1.6;
}

.direct-purchase-form {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
}

.direct-purchase-form label {
    align-items: center;
    display: flex;
    gap: .25rem;
}

.direct-purchase-form__variant {
    align-items: stretch !important;
    flex: 1 1 320px;
    flex-direction: column;
    gap: .35rem !important;
    font-weight: 700;
}

.direct-purchase-form__variant select {
    box-sizing: border-box;
    margin-left: 0;
    max-width: none;
    min-width: 260px;
    width: 100%;
}

.cart-nav-link {
    white-space: nowrap;
}

.cart-count {
    align-items: center;
    background: #6b3378;
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    font-size: .75rem;
    font-weight: 700;
    height: 1.5rem;
    justify-content: center;
    margin-left: .2rem;
    min-width: 1.5rem;
    padding: 0 .25rem;
}

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

    .commerce-summary {
        position: static;
    }

    .cart-item {
        align-items: start;
        grid-template-columns: 82px minmax(0, 1fr);
    }

    .cart-item__total {
        grid-column: 2;
        margin: 0;
    }
}

p.after-desc{
    border-top:#625a66 1px solid;
    padding-top: 1rem;
    font-size: 0.9rem;
    color: #625a66;
}
.commerce-coupon { margin: 1rem 0; }
.commerce-coupon label { display:block; font-weight:600; margin-bottom:.4rem; }
.commerce-coupon input { box-sizing:border-box; width:100%; padding:.65rem; border:1px solid #cfc6bd; border-radius:5px; margin-bottom:.6rem; }
.commerce-coupon button { margin:0 .3rem .4rem 0; }
