/* ============================================================
   CART.CSS — Aura & Earth
   Scope: Page header, progress steps, two-column layout,
          cart items, qty controls, coupon section,
          order summary, checkout form, WhatsApp CTA,
          trust strip, dark mode, responsive
   Depends on: global.css
   ============================================================ */


/* ============================================================
   1. PAGE HEADER
   ============================================================ */
.cart-page-header {
    background: var(--bg-luxe);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding: 40px 5% 36px;
}

.cart-page-header-inner {
    max-width: 1400px;
    margin: 0 auto;
}

.cart-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #999;
    margin-bottom: 24px;
    transition: var(--transition);
}

.cart-back-link:hover {
    color: var(--accent);
    transform: translateX(-3px);
}

.cart-page-title-wrap {
    margin-bottom: 28px;
}

.cart-page-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.6rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.2;
    margin-bottom: 6px;
}

.cart-page-subtitle {
    font-size: 0.88rem;
    color: #aaa;
}

/* Progress steps */
.cart-progress {
    display: flex;
    align-items: center;
    max-width: 380px;
}

.cart-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.cart-progress-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid #e0d8d0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: #ccc;
    background: var(--white);
    transition: var(--transition);
}

.cart-progress-step.active .cart-progress-icon {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--white);
    box-shadow: 0 4px 14px rgba(122, 92, 133, 0.35);
}

.cart-progress-step span {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #ccc;
}

.cart-progress-step.active span {
    color: var(--accent);
}

.cart-progress-line {
    flex: 1;
    height: 2px;
    background: linear-gradient(to right, var(--accent-light), #e0d8d0);
    margin: 0 8px 22px;
}


/* ============================================================
   2. MAIN LAYOUT
   ============================================================ */
.cart-main {
    background: var(--bg-luxe);
    min-height: 60vh;
    padding: 48px 5% 80px;
}

.cart-layout {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 460px;
    gap: 32px;
    align-items: start;
}


/* ============================================================
   3. SHARED CARD STYLES
   ============================================================ */
.cart-card,
.checkout-card {
    background: var(--white);
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.04);
    margin-bottom: 20px;
}

.cart-card:last-child,
.checkout-card:last-child {
    margin-bottom: 0;
}

.cart-card-header,
.checkout-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid #f5f0eb;
}

/* Inner flex group for icon + title */
.cart-card-header>div {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cart-card-header i,
.checkout-card-header i {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--accent), #5a3e63);
    color: var(--white);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.cart-card-header h2,
.checkout-card-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-main);
    margin: 0;
}

.cart-item-count {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent);
    background: rgba(122, 92, 133, 0.1);
    padding: 5px 12px;
    border-radius: 50px;
}

/* ============================================================
   4. CART ITEMS
   ============================================================ */
.cart-items-list {
    display: flex;
    flex-direction: column;
}

.cart-item-row {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    padding: 28px 0;
    border-bottom: 1px solid #f5f0eb;
    transition: var(--transition);
}

.cart-item-row:first-child {
    padding-top: 0;
}

.cart-item-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.cart-item-img-wrap {
    width: 140px;
    height: 140px;
    border-radius: 18px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-luxe);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.09);
}

.cart-item-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.cart-item-row:hover .cart-item-img-wrap img {
    transform: scale(1.05);
}

.cart-item-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 140px;
    justify-content: space-between;
}

.cart-item-top-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.cart-item-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.3;
    flex: 1;
}

.cart-item-price {
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--accent);
    white-space: nowrap;
}

/* Inline selectors */
.cart-item-selectors {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.cart-inline-select-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cart-inline-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: #bbb;
}

.cart-inline-select {
    padding: 7px 28px 7px 11px;
    border: 1.5px solid #e8e4e0;
    border-radius: 9px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-main);
    background: var(--white);
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23b393bd' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 9px center;
    cursor: pointer;
    transition: var(--transition);
    outline: none;
}

.cart-inline-select:focus,
.cart-inline-select:hover {
    border-color: var(--accent-light);
    box-shadow: 0 0 0 3px rgba(122, 92, 133, 0.08);
}

.cart-item-footer-row {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.cart-item-unit-price {
    font-size: 0.75rem;
    color: #bbb;
    font-weight: 500;
}

/* Qty controls */
.cart-qty-controls {
    display: flex;
    align-items: center;
    border: 1.5px solid #e8e4e0;
    border-radius: 10px;
    overflow: hidden;
    width: fit-content;
}

.cart-qty-btn {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: var(--text-main);
    transition: var(--transition);
}

.cart-qty-btn:hover {
    background: var(--bg-luxe);
    color: var(--accent);
}

.cart-qty-display {
    width: 32px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-main);
    border-left: 1.5px solid #e8e4e0;
    border-right: 1.5px solid #e8e4e0;
    line-height: 30px;
    user-select: none;
}

.cart-remove-btn {
    margin-left: auto;
    font-size: 0.72rem;
    font-weight: 600;
    color: #ccc;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
}

.cart-remove-btn:hover {
    color: #e63946;
}

/* Empty state */
.cart-empty-state {
    text-align: center;
    padding: 40px 20px;
}

.cart-empty-icon {
    width: 72px;
    height: 72px;
    background: #f5f0eb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: #ccc;
    margin: 0 auto 20px;
}

.cart-empty-state h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    color: var(--text-main);
    margin-bottom: 8px;
}

.cart-empty-state p {
    font-size: 0.88rem;
    color: #aaa;
    line-height: 1.6;
    margin-bottom: 24px;
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
}

.cart-shop-now-btn {
    display: inline-block;
    padding: 13px 28px;
    background: linear-gradient(135deg, var(--accent), #5a3e63);
    color: var(--white);
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: 0 8px 24px rgba(122, 92, 133, 0.3);
    transition: var(--transition);
}

.cart-shop-now-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(122, 92, 133, 0.45);
    color: var(--white);
}


/* ============================================================
   5. COUPON SECTION
   ============================================================ */

.cart-coupon-row {
    display: flex;
    gap: 10px;
}

.cart-pincode-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
}

.cart-pincode-row .cart-coupon-input-wrap {
    flex: 1;
    min-width: 0;
}

.cart-pincode-feedback {
    margin-top: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    line-height: 1.5;
    min-height: 0;
}

.cart-pincode-feedback.success {
    color: #27ae60;
}

.cart-pincode-feedback.error {
    color: #e63946;
}

.cart-utility-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, #ede8e2, transparent);
    margin: 20px 0;
}

.cart-coupon-input-wrap {
    flex: 1;
}

.cart-coupon-input {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #e8e4e0;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    background: var(--white);
    outline: none;
    transition: var(--transition);
    letter-spacing: 1px;
    text-transform: uppercase;
    font-family: 'Montserrat', sans-serif;
}

.cart-coupon-input::placeholder {
    text-transform: none;
    font-weight: 400;
    letter-spacing: 0;
    color: #ccc;
}

.cart-coupon-input:focus {
    border-color: var(--accent-light);
    box-shadow: 0 0 0 3px rgba(122, 92, 133, 0.08);
}

.cart-coupon-apply-btn {
    padding: 12px 22px;
    background: var(--accent);
    color: var(--white);
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: var(--transition);
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(122, 92, 133, 0.3);
    flex-shrink: 0;
    font-family: 'Montserrat', sans-serif;
}

.cart-coupon-apply-btn:hover {
    background: #5a3e63;
    box-shadow: 0 6px 20px rgba(122, 92, 133, 0.45);
    transform: translateY(-1px);
}

.cart-coupon-feedback {
    margin-top: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    min-height: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cart-coupon-feedback.success {
    color: #27ae60;
}

.cart-coupon-feedback.error {
    color: #e63946;
}

.cart-coupon-hints {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    font-size: 0.72rem;
    color: #bbb;
    flex-wrap: wrap;
}

.cart-hint-pill {
    padding: 4px 12px;
    border: 1.5px dashed #e0d8d0;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    color: #aaa;
    letter-spacing: 0.5px;
    transition: var(--transition);
    font-family: 'Montserrat', sans-serif;
}

.cart-hint-pill:hover {
    border-color: var(--accent-light);
    color: var(--accent);
    background: rgba(122, 92, 133, 0.05);
}


/* ============================================================
   6. ORDER SUMMARY
   ============================================================ */
.cart-summary-card {
    padding: 28px 32px;
}

.cart-summary-lines {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.cart-summary-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.88rem;
    color: #777;
}

.cart-summary-lines>.cart-summary-line>span:first-child {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-summary-discount {
    display: none;
}

.cart-summary-discount.visible {
    display: flex;
}

.cart-discount-value {
    color: #27ae60;
    font-weight: 700;
}

.cart-coupon-applied-badge {
    background: rgba(39, 174, 96, 0.12);
    color: #27ae60;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 50px;
    text-transform: uppercase;
}

.cart-shipping-note {
    font-size: 0.7rem;
    color: #bbb;
    font-weight: 500;
}

.cart-summary-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, #e8e4e0, transparent);
    margin: 18px 0;
}

.cart-summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}

.cart-summary-total span:last-child {
    color: var(--accent);
}

.cart-summary-gst {
    text-align: right;
    font-size: 0.68rem;
    color: #bbb;
    margin-top: 4px;
}


/* ============================================================
   7. CHECKOUT FORM
   ============================================================ */
.checkout-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.checkout-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.checkout-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.checkout-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: #888;
}

.checkout-optional {
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.72rem;
    color: #ccc;
}

.checkout-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.checkout-input-icon {
    position: absolute;
    left: 14px;
    color: #ccc;
    font-size: 0.85rem;
    pointer-events: none;
    z-index: 1;
}

.checkout-textarea-icon {
    top: 14px;
    align-self: flex-start;
}

.checkout-input {
    width: 100%;
    padding: 13px 14px 13px 40px;
    border: 1.5px solid #e8e4e0;
    border-radius: 12px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.88rem;
    color: var(--text-main);
    background: var(--white);
    outline: none;
    transition: var(--transition);
    resize: none;
    line-height: 1.5;
}

.checkout-input:focus {
    border-color: var(--accent-light);
    box-shadow: 0 0 0 3px rgba(122, 92, 133, 0.08);
}

.checkout-input.error {
    border-color: #e63946;
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.08);
}

.checkout-textarea-wrap {
    align-items: flex-start;
}

.checkout-error {
    font-size: 0.72rem;
    color: #e63946;
    font-weight: 600;
    min-height: 16px;
    display: flex;
    align-items: center;
    gap: 4px;
}


/* ============================================================
   8. TRUST STRIP
   ============================================================ */
.checkout-trust-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.checkout-trust-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--white);
    border-radius: 14px;
    padding: 16px 14px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.checkout-trust-item i {
    font-size: 1.2rem;
    color: var(--accent);
    flex-shrink: 0;
}

.checkout-trust-item strong {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 2px;
}

.checkout-trust-item span {
    font-size: 0.68rem;
    color: #aaa;
    line-height: 1.4;
}


/* ============================================================
   9. DARK MODE
   ============================================================ */
body.dark-theme .cart-card,
body.dark-theme .checkout-card,
body.dark-theme .checkout-trust-item {
    background: #1e1e1e;
    border-color: #333;
}

body.dark-theme .cart-page-header {
    background: #1a1a1a;
    border-bottom-color: #333;
}

body.dark-theme .cart-main {
    background: #121212;
}

body.dark-theme .cart-item-name,
body.dark-theme .cart-summary-total,
body.dark-theme .cart-page-title,
body.dark-theme .checkout-trust-item strong {
    color: #f0f0f0;
}

body.dark-theme .cart-item-meta span,
body.dark-theme .cart-empty-icon {
    background: #2a2a2a;
}

body.dark-theme .checkout-input {
    background: #1a1a1a;
    border-color: #444;
    color: #e0e0e0;
}

body.dark-theme .checkout-input:focus {
    border-color: var(--accent-light);
}

body.dark-theme .cart-coupon-input {
    background: #1a1a1a;
    border-color: #444;
    color: #e0e0e0;
}

body.dark-theme .cart-inline-select {
    background-color: #1a1a1a;
    border-color: #444;
    color: #e0e0e0;
}

body.dark-theme .cart-qty-controls {
    border-color: #444;
}

body.dark-theme .cart-qty-display,
body.dark-theme .cart-qty-btn {
    border-color: #444;
    color: #e0e0e0;
}

body.dark-theme .cart-summary-divider {
    background: linear-gradient(to right, transparent, #444, transparent);
}

body.dark-theme .cart-item-row {
    border-bottom-color: #2a2a2a;
}

body.dark-theme .cart-card-header,
body.dark-theme .checkout-card-header {
    border-bottom-color: #2a2a2a;
}

body.dark-theme .cart-progress-icon {
    background: #1e1e1e;
    border-color: #444;
    color: #666;
}

body.dark-theme .cart-hint-pill {
    border-color: #444;
    color: #666;
}

body.dark-theme .cart-coupon-hints {
    color: #555;
}


/* ============================================================
   10. RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
    .cart-layout {
        grid-template-columns: 1fr 400px;
        gap: 24px;
    }
}

@media (max-width: 900px) {
    .cart-layout {
        grid-template-columns: 1fr;
    }

    .cart-col {
        order: -1;
        position: static;
    }

    .checkout-col {
        order: 1;
    }

    .checkout-trust-strip {
        grid-template-columns: 1fr;
    }

    .cart-progress {
        max-width: 100%;
    }
}

@media (max-width: 640px) {
    .cart-main {
        padding: 28px 5% 60px;
    }

    .cart-card,
    .checkout-card {
        padding: 22px 20px;
    }

    .cart-coupon-card,
    .cart-summary-card {
        padding: 20px;
    }

    .cart-page-title {
        font-size: 2rem;
    }

    .checkout-form-row {
        grid-template-columns: 1fr;
    }

    .cart-item-img-wrap {
        width: 100px;
        height: 100px;
        border-radius: 13px;
    }

    .cart-item-body {
        min-height: 100px;
    }

    .checkout-trust-strip {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .cart-coupon-row {
        flex-direction: column;
    }

    .cart-pincode-row {
        flex-direction: row;
    }

    .cart-coupon-apply-btn {
        width: 100%;
        text-align: center;
        padding: 13px;
    }
}

/* ============================================================
   11. MOBILE STICKY PLACE ORDER BAR
   Only shown on ≤640px when the main WhatsApp button is off-screen
   ============================================================ */
.cart-mobile-sticky-bar {
    display: none;
    /* hidden on desktop */
}

@media (max-width: 640px) {
    .cart-mobile-sticky-bar {
        display: flex;
        align-items: center;
        gap: 12px;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--white);
        border-top: 1px solid rgba(0, 0, 0, 0.08);
        padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
        z-index: 800;
        box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.1);
        transform: translateY(100%);
        transition: transform 0.35s cubic-bezier(0.23, 1, 0.32, 1);
    }

    .cart-mobile-sticky-bar.visible {
        transform: translateY(0);
    }

    .cart-sticky-summary {
        flex: 1;
        display: flex;
        flex-direction: column;
    }

    .cart-sticky-label {
        font-size: 0.68rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: #aaa;
    }

    .cart-sticky-amount {
        font-family: 'Playfair Display', serif;
        font-size: 1.2rem;
        font-weight: 700;
        color: var(--accent);
    }

    .cart-sticky-place-btn {
        flex-shrink: 0;
        padding: 13px 20px;
        background: linear-gradient(135deg, #25d366, #128c7e);
        color: var(--white);
        border-radius: 50px;
        font-size: 0.8rem;
        font-weight: 700;
        letter-spacing: 1px;
        text-transform: uppercase;
        display: flex;
        align-items: center;
        gap: 8px;
        box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
        font-family: 'Montserrat', sans-serif;
        transition: transform 0.3s ease;
    }

    .cart-sticky-place-btn:active {
        transform: scale(0.97);
    }

    /* Extra bottom padding so content isn't hidden behind sticky bar */
    .cart-main {
        padding-bottom: calc(80px + env(safe-area-inset-bottom));
    }
}

/* ============================================================
   12. ADDITIONAL MOBILE REFINEMENTS  (≤480px)
   ============================================================ */
@media (max-width: 480px) {
    .cart-page-header {
        padding: 28px 5% 24px;
    }

    .cart-page-title {
        font-size: 1.75rem;
    }

    .cart-page-subtitle {
        font-size: 0.8rem;
    }

    .cart-item-row {
        gap: 14px;
        padding: 20px 0;
    }

    .cart-item-img-wrap {
        width: 84px;
        height: 84px;
        border-radius: 12px;
    }

    .cart-item-body {
        min-height: 84px;
    }

    .cart-item-name {
        font-size: 0.95rem;
    }

    .cart-item-price {
        font-size: 1rem;
    }

    .cart-item-unit-price {
        display: none;
        /* save space on very small screens */
    }

    .cart-item-footer-row {
        gap: 10px;
    }

    .cart-summary-total {
        font-size: 1.3rem;
    }

    .cart-progress {
        display: none;
        /* hide progress bar on tiny phones — too cramped */
    }

    .cart-layout {
        gap: 16px;
    }

    /* Checkout form row always stacks on phone */
    .checkout-form-row {
        grid-template-columns: 1fr;
    }

    .checkout-trust-strip {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 360px) {
    .cart-page-title {
        font-size: 1.5rem;
    }

    .cart-card,
    .checkout-card {
        padding: 18px 16px;
    }
}

/* ============================================================
   AURA & EARTH — UPI CHECKOUT CSS
   upi-checkout.css

   WHERE TO PASTE: Copy this entire file's contents and paste
   at the BOTTOM of your existing css/cart.css file.

   Contains styles for:
   1. UPI Payment Section (QR code, steps, UTR input, CTA)
   2. Order Success Modal (overlay, gem animation, detail card)

   All class names are prefixed with `upi-` or `order-success-`
   / `success-` to guarantee zero collision with existing cart.css
   selectors. No existing rules are overridden.
   ============================================================ */


/* ============================================================
   1. UPI PAYMENT SECTION
   ============================================================ */

.upi-payment-section {
    margin-top: 28px;
    padding-top: 28px;
    border-top: 1px solid rgba(0, 0, 0, 0.07);
}

.upi-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.upi-section-header i {
    font-size: 1.3rem;
    color: var(--accent);
}

.upi-section-header h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-main);
    margin: 0;
}

/* ── Numbered step indicator ── */
.upi-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.upi-step-badge {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
}

.upi-step-label {
    font-size: 0.88rem;
    color: #666;
    margin: 0;
    line-height: 1.5;
}

/* ── QR Code wrapper ── */
.upi-qr-wrapper {
    position: relative;
    margin: 16px auto 0;
    width: 200px;
    height: 200px;
    border-radius: 16px;
    background: #fff;
    border: 1.5px solid rgba(122, 92, 133, 0.18);
    box-shadow:
        0 4px 16px rgba(122, 92, 133, 0.10),
        0 1px 4px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

.upi-qr-img {
    width: 180px;
    height: 180px;
    object-fit: contain;
    display: block;
    /* Invisible until loaded — prevents layout shift from broken-image icon */
    opacity: 0;
    transition: opacity 0.4s ease;
}

.upi-qr-img.loaded {
    opacity: 1;
}

/* Loading spinner shown while QR image fetches */
.upi-qr-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: var(--accent);
    background: #fff;
    border-radius: inherit;
    transition: opacity 0.3s ease;
}

.upi-qr-loading.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Total amount pill overlaid at bottom of QR */
.upi-amount-pill {
    position: absolute;
    bottom: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--accent), #5a3e63);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 5px 16px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 4px 14px rgba(122, 92, 133, 0.35);
    white-space: nowrap;
    letter-spacing: 0.3px;
}

.upi-amount-pill i {
    font-size: 0.72rem;
}

/* UPI app pills row */
.upi-app-row {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 28px;
    /* extra top margin to clear the amount pill */
}

.upi-app-hint {
    font-size: 0.78rem;
    color: #999;
    font-weight: 500;
}

.upi-app-pill {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--accent);
    background: rgba(122, 92, 133, 0.08);
    border: 1px solid rgba(122, 92, 133, 0.18);
    padding: 3px 11px;
    border-radius: 20px;
    letter-spacing: 0.2px;
}

/* ── Place Order CTA ── */
.upi-place-order-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin-top: 16px;
    padding: 16px 0;
    background: linear-gradient(135deg, #2d241e, #4a3b32);
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 8px 28px rgba(45, 36, 30, 0.22);
    transition: background 0.35s ease, transform 0.25s ease, box-shadow 0.35s ease;
    position: relative;
    overflow: hidden;
}

.upi-place-order-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
    transform: translateX(-100%);
    transition: transform 0.55s ease;
}

.upi-place-order-btn:hover {
    background: linear-gradient(135deg, var(--accent), #5a3e63);
    transform: translateY(-2px);
    box-shadow: 0 12px 36px rgba(122, 92, 133, 0.38);
}

.upi-place-order-btn:hover::after {
    transform: translateX(100%);
}

.upi-place-order-btn:active {
    transform: translateY(0);
}

.upi-place-order-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Info note below the CTA */
.upi-note {
    margin-top: 14px;
    font-size: 0.78rem;
    color: #999;
    line-height: 1.55;
    display: flex;
    align-items: flex-start;
    gap: 7px;
}

.upi-note i {
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--accent);
    opacity: 0.7;
}

/* ── Dark mode ── */
body.dark-theme .upi-payment-section {
    border-top-color: rgba(255, 255, 255, 0.08);
}

body.dark-theme .upi-qr-wrapper {
    background: #1e1e1e;
    border-color: rgba(179, 140, 195, 0.22);
}

body.dark-theme .upi-qr-loading {
    background: #1e1e1e;
}

body.dark-theme .upi-qr-img.loaded {
    /* QR codes are black-on-white; invert them for dark mode readability */
    filter: invert(1) hue-rotate(180deg);
}

body.dark-theme .upi-step-label {
    color: #aaa;
}

body.dark-theme .upi-note {
    color: #888;
}

body.dark-theme .upi-app-pill {
    background: rgba(179, 140, 195, 0.12);
    border-color: rgba(179, 140, 195, 0.22);
}


/* ============================================================
   2. ORDER SUCCESS MODAL
   ============================================================ */

/*
   The overlay fills the viewport and sits above everything.
   It is display:none by default and becomes display:flex
   when JS adds class .visible.
   Opacity transitions provide the fade-in.
*/
.order-success-overlay {
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: rgba(20, 15, 25, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.order-success-overlay.visible {
    display: flex;
    opacity: 1;
}

/* Trigger opacity on the NEXT frame so the transition fires */
.order-success-overlay.animating {
    opacity: 1;
}

.order-success-modal {
    background: var(--bg-body, #fdfaf6);
    border-radius: 28px;
    padding: 48px 40px 40px;
    max-width: 460px;
    width: 100%;
    text-align: center;
    box-shadow:
        0 24px 80px rgba(0, 0, 0, 0.22),
        0 4px 16px rgba(0, 0, 0, 0.10);
    position: relative;
    transform: translateY(24px);
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.order-success-overlay.visible .order-success-modal {
    transform: translateY(0);
}

/* ── Gem icon with pulse ring ── */
.success-icon-wrap {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
}

/* Expanding ring animation */
.success-pulse-ring {
    position: absolute;
    inset: -12px;
    border-radius: 50%;
    border: 2px solid rgba(122, 92, 133, 0.35);
    animation: success-ring-expand 1.8s ease-out infinite;
}

@keyframes success-ring-expand {
    0% {
        transform: scale(0.8);
        opacity: 0.7;
    }

    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

.success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7a5c85, #5a3e63);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.9rem;
    color: #fff;
    box-shadow: 0 8px 28px rgba(122, 92, 133, 0.38);
    animation: success-gem-pop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes success-gem-pop {
    from {
        transform: scale(0.5);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* ── Modal text ── */
.success-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-main);
    margin: 0 0 10px;
}

.success-subtitle {
    font-size: 0.92rem;
    color: #777;
    line-height: 1.6;
    margin: 0 0 28px;
}

/* ── Order detail card ── */
.success-detail-card {
    background: rgba(122, 92, 133, 0.05);
    border: 1px solid rgba(122, 92, 133, 0.12);
    border-radius: 14px;
    padding: 18px 20px;
    margin-bottom: 28px;
    text-align: left;
}

.success-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 7px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.success-detail-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.success-detail-label {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #999;
    flex-shrink: 0;
}

.success-detail-value {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-main);
    text-align: right;
    word-break: break-all;
}

.success-status-pill {
    display: inline-block;
    background: rgba(212, 175, 55, 0.12);
    color: #b5863a;
    border: 1px solid rgba(181, 134, 58, 0.25);
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    padding: 3px 10px;
    border-radius: 20px;
    text-align: center;
    letter-spacing: 0.3px;
}

/* ── CTAs ── */
.success-cta-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 15px 0;
    background: linear-gradient(135deg, var(--accent), #5a3e63);
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-radius: 50px;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(122, 92, 133, 0.30);
    transition: transform 0.25s ease, box-shadow 0.3s ease;
}

.success-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(122, 92, 133, 0.42);
    color: #fff;
}

.success-secondary-link {
    display: block;
    margin-top: 16px;
    font-size: 0.82rem;
    color: #999;
    text-decoration: none;
    transition: color 0.2s;
}

.success-secondary-link:hover {
    color: var(--accent);
}

/* ── Dark mode ── */
body.dark-theme .order-success-modal {
    background: #1a1410;
}

body.dark-theme .success-detail-card {
    background: rgba(179, 140, 195, 0.07);
    border-color: rgba(179, 140, 195, 0.14);
}

body.dark-theme .success-detail-row {
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

body.dark-theme .success-subtitle,
body.dark-theme .success-secondary-link {
    color: #888;
}

/* ── Responsive ── */
@media (max-width: 480px) {
    .order-success-modal {
        padding: 36px 24px 32px;
        border-radius: 22px;
    }

    .success-title {
        font-size: 1.5rem;
    }

    .upi-qr-wrapper {
        width: 180px;
        height: 180px;
    }

    .upi-qr-img {
        width: 160px;
        height: 160px;
    }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {

    .success-pulse-ring,
    .success-icon {
        animation: none;
    }

    .order-success-modal {
        transform: none;
        transition: none;
    }
}

/* ══════════════════════════════════════════════════
   PAYMENT METHOD TOGGLE
══════════════════════════════════════════════════ */
.payment-section {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid rgba(110, 148, 114, 0.18);
}

.payment-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    color: var(--text-main, #2a2420);
}

.payment-section-header i {
    color: var(--accent, #6e9472);
    font-size: 1rem;
}

.payment-section-header h3 {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin: 0;
}

.payment-toggle-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

/* The clickable label IS the pill */
.payment-toggle-pill {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border: 1.5px solid rgba(110, 148, 114, 0.25);
    border-radius: 14px;
    cursor: pointer;
    background: var(--surface, #fdfcf9);
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    user-select: none;
}

.payment-toggle-pill:hover {
    border-color: var(--accent, #6e9472);
    background: rgba(110, 148, 114, 0.04);
}

/* Hide the native radio — the label acts as the control */
.payment-toggle-pill input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Selected state — driven by JS adding .selected class */
.payment-toggle-pill.selected {
    border-color: var(--accent, #6e9472);
    background: rgba(110, 148, 114, 0.07);
    box-shadow: 0 2px 12px rgba(110, 148, 114, 0.15);
}

.pill-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(110, 148, 114, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--accent, #6e9472);
    flex-shrink: 0;
    transition: background 0.2s ease;
}

.payment-toggle-pill.selected .pill-icon {
    background: rgba(110, 148, 114, 0.18);
}

.pill-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pill-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main, #2a2420);
    line-height: 1.2;
}

.pill-sub {
    font-size: 0.75rem;
    color: var(--text-muted, #9c9080);
}

.pill-check {
    font-size: 1.1rem;
    color: var(--accent, #6e9472);
    opacity: 0;
    transition: opacity 0.18s ease;
    flex-shrink: 0;
}

.payment-toggle-pill.selected .pill-check {
    opacity: 1;
}

/* COD info panel */
.cod-info-panel {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(110, 148, 114, 0.07);
    border: 1px solid rgba(110, 148, 114, 0.2);
    border-radius: 10px;
    margin-bottom: 22px;
    font-size: 0.82rem;
    color: var(--text-soft, #5a5248);
    line-height: 1.5;
}

.cod-info-panel i {
    color: var(--accent, #6e9472);
    font-size: 1rem;
    margin-top: 2px;
    flex-shrink: 0;
}

.cod-info-panel strong {
    display: block;
    font-weight: 600;
    color: var(--text-main, #2a2420);
    margin-bottom: 2px;
}

.cod-info-panel p {
    margin: 0;
}

/* UPI section smooth reveal */
.upi-payment-section {
    animation: fadeSlideDown 0.28s ease;
}

@keyframes fadeSlideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ============================================================
   STICKY ORDER SUMMARY (Conversion Improvement #1)
   Keeps the total + CTA visible while filling the form.
   The `top` offset accounts for the fixed navbar height.
   ============================================================ */
@media (min-width: 1024px) {
    .cart-col {
        position: sticky;
        top: 88px;
        /* adjust if your navbar height differs */
        align-self: flex-start;
        max-height: calc(100vh - 108px);
        overflow-y: auto;
        scrollbar-width: none;
    }

    .cart-col::-webkit-scrollbar {
        display: none;
    }
}

/* ============================================================
   FREE SHIPPING PROGRESS BAR (Conversion Improvement #2)
   Injected below #shippingNote by JS in recalculateTotals().
   ============================================================ */
.cart-shipping-progress-wrap {
    width: 100%;
    box-sizing: border-box;
    margin-top: 4px;
    padding: 10px 14px 12px;
    background: linear-gradient(135deg, rgba(110, 148, 114, 0.07) 0%, rgba(110, 148, 114, 0.03) 100%);
    border: 1px solid rgba(110, 148, 114, 0.18);
    border-radius: 10px;
}

.cart-shipping-progress-label {
    font-size: 0.78rem;
    color: var(--text-muted, #7a6f65);
    margin-bottom: 7px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cart-shipping-progress-label .progress-amount {
    font-weight: 700;
    color: var(--accent, #6e9472);
}

.cart-shipping-progress-track {
    height: 6px;
    background: rgba(110, 148, 114, 0.15);
    border-radius: 99px;
    overflow: hidden;
}

.cart-shipping-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6e9472 0%, #a8c5a0 100%);
    border-radius: 99px;
    transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    min-width: 4px;
}

.cart-shipping-progress-fill.full {
    background: linear-gradient(90deg, #4caf50 0%, #81c784 100%);
}

/* ============================================================
   MULTI-STEP CHECKOUT — Step transition, Back button, CTA
   ============================================================ */

/* Fade-in animation used when a step becomes visible */
@keyframes stepFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-fade-in {
    animation: stepFadeIn 0.32s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* ── Back to Cart button ── */
.step-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: #999;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-bottom: 20px;
    transition: color 0.2s ease, transform 0.2s ease;
}

.step-back-btn:hover {
    color: var(--accent, #6e9472);
    transform: translateX(-3px);
}

.step-back-btn i {
    font-size: 0.75rem;
}

/* ── Proceed to Checkout / Place Order CTA ── */
.step-proceed-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin-top: 20px;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--accent, #6e9472), #4a7a4e);
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(110, 148, 114, 0.35);
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.step-proceed-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(110, 148, 114, 0.48);
}

.step-proceed-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

/* Place Order state — slightly different gradient to signal finality */
.step-proceed-btn.is-place-order {
    background: linear-gradient(135deg, var(--accent, #6e9472), #2e5c32);
    box-shadow: 0 8px 24px rgba(46, 92, 50, 0.38);
}

.step-proceed-btn.is-place-order:hover {
    box-shadow: 0 12px 32px rgba(46, 92, 50, 0.52);
}

/* ── Progress bar step 3 active state (driven by JS class toggle) ── */
.cart-progress-step.step3-active .cart-progress-icon {
    border-color: var(--accent, #6e9472);
    background: var(--accent, #6e9472);
    color: #fff;
    box-shadow: 0 4px 14px rgba(110, 148, 114, 0.35);
}

.cart-progress-step.step3-active span {
    color: var(--accent, #6e9472);
}

/* ── On desktop, when step2 is showing, make checkout-col full width ── */
@media (min-width: 901px) {
    #step2-checkout {
        /* checkout form stays in its checkout-col, no width change needed */
        width: 100%;
    }
}

/* ── Mobile sticky bar text update is handled in JS ── */

/* ============================================================
   UPI SECTION — Overflow & Responsive Fix
   ============================================================ */

/* Constrain the whole UPI panel so nothing bleeds out */
.upi-payment-section {
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* QR image: responsive, never overflows its card */
.upi-qr-img {
    max-width: 100%;
    width: 180px;
    height: 180px;
    object-fit: contain;
    display: block;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.upi-qr-img.loaded {
    opacity: 1;
}

/* QR wrapper: centered, fixed square, never overflows */
.upi-qr-wrapper {
    position: relative;
    margin: 16px auto 0;
    width: min(200px, 100%);
    height: 200px;
    border-radius: 16px;
    background: #fff;
    border: 1.5px solid rgba(122, 92, 133, 0.18);
    box-shadow: 0 4px 16px rgba(122, 92, 133, 0.10);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* UPI app pills row: wrap neatly, don't overflow */
.upi-app-row {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 28px;
    width: 100%;
}

/* Each app pill: no overflow on small containers */
.upi-app-pill {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* UTR input: always stays within its card */
#utrNumber {
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
}

/* Amount pill: prevent overflow if total is long */
.upi-amount-pill {
    max-width: calc(100% - 16px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============================================================
   REMOVE INTERNAL SCROLLING FROM RIGHT COLUMN
   Overrides the max-height + overflow-y set in the
   @media (min-width: 1024px) block above.
   The column now grows to fit its content naturally and
   stays static within its sticky anchor — no internal scroll.
   ============================================================ */
@media (min-width: 1024px) {
    .cart-col {
        max-height: none;
        overflow-y: visible;
        overflow: visible;
    }

    /* Webkit scrollbar rule is now moot but kept harmless */
    .cart-col::-webkit-scrollbar {
        display: none;
    }
}

/* Also ensure the base unconditional rule stays clean */
.cart-col {
    max-height: none;
    overflow: visible;
}

/* ============================================================
   CUSTOM STACK BUNDLE — Cart Row Styles
   ============================================================ */

/* Bundle row gets a subtle accent background to distinguish it */
.cart-item-row--bundle {
    background: linear-gradient(135deg,
            rgba(122, 92, 133, 0.04) 0%,
            rgba(122, 92, 133, 0.02) 100%);
    border: 1.5px solid rgba(122, 92, 133, 0.18);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 12px;
}

/* 2×2 mosaic of bracelet thumbnails */
.cart-item-img-wrap--bundle {
    position: relative;
    width: 88px;
    flex-shrink: 0;
    align-self: flex-start;
}

.bundle-mosaic {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3px;
    width: 88px;
    height: 88px;
    border-radius: 12px;
    overflow: hidden;
}

.bundle-mosaic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Discount badge overlaid on the mosaic */
.cart-bundle-discount-badge {
    display: inline-block;
    margin-top: 6px;
    background: linear-gradient(135deg, #7a5c85, #5a3e63);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 20px;
    white-space: nowrap;
}

/* Price display for bundles — crossed-out original + sale price */
.cart-bundle-price-wrap {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* Sub-item list — each bracelet shown as a thumbnail + name row */
.bundle-sub-items-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 10px 0 12px;
    padding: 10px 12px;
    background: rgba(122, 92, 133, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(122, 92, 133, 0.10);
}

.bundle-sub-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bundle-sub-img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 1.5px solid rgba(122, 92, 133, 0.20);
}

.bundle-sub-name {
    font-size: 0.78rem;
    color: var(--text-soft, #5a5248);
    font-weight: 500;
    line-height: 1.3;
}

/* Piece count label in footer row */
.cart-bundle-piece-count {
    font-size: 0.75rem;
    color: var(--accent, #7a5c85);
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* Dark mode */
body.dark-theme .cart-item-row--bundle {
    background: linear-gradient(135deg,
            rgba(179, 147, 189, 0.07) 0%,
            rgba(179, 147, 189, 0.03) 100%);
    border-color: rgba(179, 147, 189, 0.22);
}

body.dark-theme .bundle-sub-items-list {
    background: rgba(179, 147, 189, 0.06);
    border-color: rgba(179, 147, 189, 0.12);
}

body.dark-theme .bundle-sub-name {
    color: var(--text-muted, #9c9080);
}

/* Mobile — tighten up the mosaic */
@media (max-width: 480px) {
    .cart-item-img-wrap--bundle {
        width: 72px;
    }

    .bundle-mosaic {
        width: 72px;
        height: 72px;
    }

    .cart-bundle-discount-badge {
        font-size: 0.58rem;
        padding: 2px 6px;
    }
}

/* ══════════════════════════════════════════════════════════
   STACK BUNDLE CART ROW
   A single "Custom Crystal Stack" entry that shows a 2×2
   image mosaic, all sub-item names, the original combined
   price crossed out, and the discounted bundle price.
══════════════════════════════════════════════════════════ */

/* Bundle row — slightly elevated background to distinguish from regular items */
.cart-item-row--bundle {
    background: linear-gradient(135deg, rgba(122, 92, 133, 0.04) 0%, rgba(122, 92, 133, 0.01) 100%);
    border: 1.5px solid rgba(122, 92, 133, 0.14);
    border-radius: 16px;
    padding: 16px;
}

/* Image area: replaced by a 2×2 mosaic grid */
.cart-item-img-wrap--bundle {
    position: relative;
    width: 100px;
    height: 100px;
    flex-shrink: 0;
}

.bundle-mosaic {
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 3px;
    border-radius: 12px;
    overflow: hidden;
}

.bundle-mosaic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Discount badge overlaid on the mosaic */
.cart-bundle-discount-badge {
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #7a5c85, #5a3e63);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(122, 92, 133, 0.35);
}

/* Sub-item list — small image + name for each bracelet */
.bundle-sub-items-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 10px 0 12px;
}

.bundle-sub-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bundle-sub-img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid rgba(122, 92, 133, 0.2);
    flex-shrink: 0;
}

.bundle-sub-name {
    font-size: 0.78rem;
    color: var(--text-muted, #888);
    line-height: 1.3;
}

/* Price block when a discount is active */
.cart-bundle-price-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Piece count label at bottom of bundle row */
.cart-bundle-piece-count {
    font-size: 0.75rem;
    color: var(--accent, #7a5c85);
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* Dark mode adjustments */
body.dark-theme .cart-item-row--bundle {
    background: linear-gradient(135deg, rgba(179, 147, 189, 0.07) 0%, rgba(179, 147, 189, 0.02) 100%);
    border-color: rgba(179, 147, 189, 0.18);
}

body.dark-theme .bundle-sub-name {
    color: var(--text-muted-dark, #666);
}