﻿/* ================================================================
   SMG — CART PAGE STYLES (Premium Overhaul)
   World-class cart experience with glassmorphism, gold accents
   ================================================================ */

/* ── 1. PAGE BASE ─────────────────────────────────────────────── */
.cart-page {
    background: var(--bg-primary);
    padding-top: 80px;
    min-height: 100vh;
    padding-bottom: 40px;
}

.cart-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 24px;
}


/* ── 2. PROGRESS STEPPER ──────────────────────────────────────── */
.cart-stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 32px 0 28px;
    max-width: 520px;
    margin: 0 auto;
}

.cart-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 1;
}

.cart-step-num {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    border: 2px solid var(--border-light);
    background: var(--bg-card);
    color: var(--text-muted);
    transition: all 0.4s ease;
    position: relative;
}

.cart-step.active .cart-step-num {
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
    border-color: var(--gold-primary);
    color: var(--bg-primary);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.35);
}

.cart-step.done .cart-step-num {
    background: rgba(16, 185, 129, 0.15);
    border-color: #10b981;
    color: #10b981;
}

.cart-step-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.cart-step.active .cart-step-label {
    color: var(--gold-primary);
}

.cart-step.done .cart-step-label {
    color: #10b981;
}

.cart-step-line {
    flex: 1;
    height: 2px;
    background: var(--border-light);
    margin: 0 -4px;
    margin-bottom: 24px;
    min-width: 60px;
    position: relative;
    overflow: hidden;
}

.cart-step-line.done {
    background: linear-gradient(90deg, #10b981, var(--gold-primary));
}


/* ── 3. CART HEADER ───────────────────────────────────────────── */
.cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.cart-header-left {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.cart-title {
    font-family: var(--font-heading);
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.cart-count {
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 500;
    color: var(--text-muted);
}

.cart-continue-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--gold-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
}

.cart-continue-link:hover {
    background: rgba(212, 175, 55, 0.06);
    border-color: rgba(212, 175, 55, 0.15);
}

.cart-continue-link svg {
    width: 16px;
    height: 16px;
    transition: transform 0.2s;
}

.cart-continue-link:hover svg {
    transform: translateX(-3px);
}


/* ── 4. ALERTS BANNER ─────────────────────────────────────────── */
.cart-alerts {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.08), rgba(251, 191, 36, 0.03));
    border: 1px solid rgba(251, 191, 36, 0.25);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: var(--warning);
    font-size: 14px;
    line-height: 1.5;
    animation: slideDown 0.3s ease;
}

.cart-alerts svg { flex-shrink: 0; margin-top: 1px; }

.cart-alert-dismiss {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
}


/* ── 5. CART LAYOUT ───────────────────────────────────────────── */
.cart-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 32px;
    align-items: start;
}


/* ── 6. TOOLBAR ───────────────────────────────────────────────── */
.cart-toolbar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    margin-bottom: 12px;
}

.cart-select-all {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    user-select: none;
}

.cart-select-all input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--gold-primary);
    cursor: pointer;
    border-radius: 4px;
}

.cart-selected-count {
    font-size: 13px;
    color: var(--text-muted);
    border-left: 1px solid var(--border-subtle);
    padding-left: 16px;
}

.cart-delete-selected {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid rgba(248, 113, 113, 0.25);
    background: rgba(248, 113, 113, 0.05);
    color: var(--error);
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.cart-delete-selected:hover:not(:disabled) {
    background: rgba(248, 113, 113, 0.12);
    border-color: rgba(248, 113, 113, 0.4);
}

.cart-delete-selected:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.cart-delete-selected svg { width: 15px; height: 15px; }


/* ── 7. CART ITEM CARD (Premium) ──────────────────────────────── */
.cart-item {
    display: grid;
    grid-template-columns: 36px 88px 1fr;
    grid-template-rows: auto auto;
    gap: 0 16px;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    margin-bottom: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.cart-item::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: transparent;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    transition: background 0.3s;
    pointer-events: none;
}

.cart-item:hover {
    border-color: rgba(212, 175, 55, 0.25);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(212, 175, 55, 0.08);
    transform: translateY(-1px);
}

.cart-item.out-of-stock {
    opacity: 0.5;
    filter: grayscale(0.3);
}

.cart-item.price-changed {
    border-color: rgba(251, 191, 36, 0.35);
}

.cart-item.removing {
    animation: itemSlideOut 0.35s ease forwards;
}

/* Checkbox */
.cart-item-check {
    display: flex;
    align-items: flex-start;
    padding-top: 4px;
    grid-row: 1 / 3;
}

.cart-item-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--gold-primary);
    cursor: pointer;
    border-radius: 4px;
}

/* Thumbnail */
.cart-item-thumb {
    width: 88px;
    height: 88px;
    background: linear-gradient(145deg, var(--bg-elevated), rgba(212, 175, 55, 0.04));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    overflow: hidden;
    border: 1px solid rgba(212, 175, 55, 0.12);
    grid-row: 1 / 3;
    transition: border-color 0.2s;
    position: relative;
}

.cart-item:hover .cart-item-thumb {
    border-color: rgba(212, 175, 55, 0.3);
}

.cart-item-thumb svg {
    width: 55px;
    height: 55px;
    color: var(--gold-primary);
    opacity: 0.5;
}

.cart-item-thumb-badge {
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 9px;
    font-weight: 700;
    color: var(--bg-primary);
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
    padding: 2px 8px;
    border-radius: 10px;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

/* Info section — top row */
.cart-item-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    grid-column: 3;
}

.cart-item-info {
    min-width: 0;
    flex: 1;
}

.cart-item-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    line-height: 1.4;
}

.cart-item-name a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.cart-item-name a:hover {
    color: var(--gold-primary);
}

.cart-item-variant {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cart-item-variant-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--text-muted);
}

.cart-item-stock-warn {
    font-size: 11px;
    color: var(--error);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
}

.cart-item-stock-warn.out {
    color: var(--error);
    font-weight: 600;
}

.cart-item-stock-warn.low {
    color: var(--warning);
}

.cart-item-price-changed-badge {
    font-size: 10px;
    background: rgba(251, 191, 36, 0.12);
    color: var(--warning);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    font-weight: 600;
}

/* Price area next to product name */
.cart-item-price-area {
    text-align: right;
    flex-shrink: 0;
}

.cart-item-price-current {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    color: var(--gold-primary);
}

.cart-item-price-original {
    font-size: 12px;
    color: var(--text-muted);
    text-decoration: line-through;
    margin-top: 2px;
}

.cart-item-price-promo {
    display: inline-block;
    font-size: 10px;
    color: #fff;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 700;
    margin-top: 3px;
}

/* Bottom row — qty, subtotal, actions */
.cart-item-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    grid-column: 3;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-subtle);
}

.cart-item-bottom-left {
    display: flex;
    align-items: center;
    gap: 16px;
}


/* ── 8. QTY STEPPER (Premium) ─────────────────────────────────── */
.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-elevated);
}

.cart-qty-btn {
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.2s;
    position: relative;
}

.cart-qty-btn:hover:not(:disabled) {
    background: rgba(212, 175, 55, 0.1);
    color: var(--gold-primary);
}

.cart-qty-btn:active:not(:disabled) {
    transform: scale(0.9);
}

.cart-qty-btn:disabled {
    opacity: 0.25;
    cursor: not-allowed;
}

.cart-qty-input {
    width: 48px;
    height: 36px;
    text-align: center;
    background: var(--bg-card);
    border: none;
    border-left: 1px solid var(--border-subtle);
    border-right: 1px solid var(--border-subtle);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-mono);
    -moz-appearance: textfield;
    appearance: textfield;
}

.cart-qty-input::-webkit-outer-spin-button,
.cart-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.cart-qty-input:focus {
    outline: none;
    background: rgba(212, 175, 55, 0.05);
}

/* Subtotal */
.cart-item-subtotal {
    text-align: right;
}

.cart-item-subtotal-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.cart-item-subtotal-value {
    font-family: var(--font-heading);
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
}


/* ── 9. ITEM ACTIONS ──────────────────────────────────────────── */
.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: auto;
}

.cart-action-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-md);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.cart-action-btn svg {
    width: 16px;
    height: 16px;
}

.cart-action-btn:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.cart-action-btn.delete:hover {
    color: var(--error);
    background: rgba(248, 113, 113, 0.1);
}

.cart-action-btn.wishlist.active {
    color: var(--gold-primary);
}

.cart-action-btn.wishlist:hover {
    color: var(--gold-primary);
    background: rgba(212, 175, 55, 0.08);
}

.cart-action-divider {
    width: 1px;
    height: 16px;
    background: var(--border-subtle);
    margin: 0 4px;
}


/* ── 10. SUMMARY SIDEBAR (Glassmorphism) ──────────────────────── */
.cart-sidebar {
    position: sticky;
    top: 100px;
}

.cart-summary {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    overflow: hidden;
    position: relative;
}

.cart-summary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gold-primary), var(--gold-dark), var(--gold-primary));
}

.cart-summary-inner {
    padding: 28px 24px 24px;
}


/* ── 11. SHIPPING PROGRESS ────────────────────────────────────── */
.cart-shipping-progress {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.06), rgba(16, 185, 129, 0.02));
    border: 1px solid rgba(16, 185, 129, 0.15);
    border-radius: var(--radius-lg);
    padding: 14px 16px;
    margin-bottom: 20px;
}

.cart-shipping-progress.achieved {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.04));
    border-color: rgba(16, 185, 129, 0.25);
}

.shipping-progress-text {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    line-height: 1.4;
}

.shipping-progress-text svg {
    width: 18px;
    height: 18px;
    color: #10b981;
    flex-shrink: 0;
}

.shipping-progress-text strong {
    color: #10b981;
}

.shipping-progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 99px;
    overflow: hidden;
}

.shipping-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #34d399);
    border-radius: 99px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}


/* ── 12. SAVINGS HIGHLIGHT ────────────────────────────────────── */
.cart-savings {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.08), rgba(212, 175, 55, 0.03));
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--text-secondary);
    animation: fadeIn 0.3s ease;
}

.cart-savings svg {
    width: 18px;
    height: 18px;
    color: var(--gold-primary);
    flex-shrink: 0;
}

.cart-savings strong {
    color: var(--gold-primary);
}


/* ── 13. SUMMARY ROWS & TOTAL ─────────────────────────────────── */
.cart-summary-title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-summary-title svg {
    width: 20px;
    height: 20px;
    color: var(--gold-primary);
}

.cart-summary-rows {
    margin-bottom: 4px;
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: var(--text-secondary);
    padding: 9px 0;
}

.cart-summary-row span:last-child {
    font-weight: 500;
    color: var(--text-primary);
}

.cart-summary-discount-value {
    color: #10b981 !important;
    font-weight: 600 !important;
}

.text-success { color: #10b981 !important; font-weight: 600 !important; }

.cart-summary-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-light), transparent);
    margin: 12px 0;
}

.cart-summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0 20px;
}

.cart-summary-total span:first-child {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.cart-summary-total-value {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 700;
    color: var(--gold-primary);
    letter-spacing: -0.01em;
}


/* ── 14. PROMO CODE ───────────────────────────────────────────── */
.cart-promo {
    margin-bottom: 20px;
}

.cart-promo-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cart-promo-label svg {
    width: 14px;
    height: 14px;
    color: var(--gold-primary);
}

.cart-promo-input-wrap {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.cart-promo-input {
    flex: 1;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    color: var(--text-primary);
    font-size: 13px;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: border-color 0.2s;
}

.cart-promo-input::placeholder {
    text-transform: none;
    font-family: var(--font-body);
    letter-spacing: 0;
}

.cart-promo-input:focus {
    outline: none;
    border-color: var(--gold-primary);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.08);
}

.cart-promo-apply {
    flex-shrink: 0;
    padding: 10px 20px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.cart-promo-apply:hover {
    border-color: var(--gold-primary);
    color: var(--gold-primary);
    background: rgba(212, 175, 55, 0.06);
}

.cart-promo-applied {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}

.cart-promo-tag {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(16, 185, 129, 0.06);
    border: 1px solid rgba(16, 185, 129, 0.15);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    font-size: 13px;
    color: #10b981;
}

.cart-promo-tag-code {
    font-family: var(--font-mono);
    font-weight: 700;
    letter-spacing: 0.5px;
}

.cart-promo-tag-value {
    margin-left: auto;
    font-weight: 600;
}

.cart-promo-tag-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 2px 4px;
    line-height: 1;
    font-size: 16px;
    border-radius: 4px;
    transition: all 0.2s;
}

.cart-promo-tag-remove:hover {
    color: var(--error);
    background: rgba(248, 113, 113, 0.1);
}

.cart-promo-link {
    background: none;
    border: none;
    color: var(--gold-primary);
    font-size: 13px;
    cursor: pointer;
    padding: 0;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
    font-family: inherit;
}

.cart-promo-link:hover {
    color: var(--gold-bright);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cart-promo-link svg {
    width: 14px;
    height: 14px;
}


/* ── 15. CHECKOUT BUTTON (Premium) ────────────────────────────── */
.cart-checkout-btn {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
    border: none;
    border-radius: var(--radius-lg);
    color: var(--bg-primary);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: inherit;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.02em;
}

.cart-checkout-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.cart-checkout-btn:hover:not(:disabled)::before {
    opacity: 1;
}

.cart-checkout-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(212, 175, 55, 0.35);
}

.cart-checkout-btn:active:not(:disabled) {
    transform: translateY(0);
}

.cart-checkout-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: var(--bg-elevated);
    color: var(--text-muted);
    box-shadow: none;
}

.cart-checkout-btn svg {
    width: 18px;
    height: 18px;
    transition: transform 0.2s;
}

.cart-checkout-btn:hover:not(:disabled) svg {
    transform: translateX(3px);
}

.checkout-count {
    font-weight: 400;
    opacity: 0.9;
}


/* ── 16. TRUST BADGES (Premium) ───────────────────────────────── */
.cart-trust {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.cart-trust-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    transition: border-color 0.2s;
}

.cart-trust-item:hover {
    border-color: rgba(212, 175, 55, 0.15);
}

.cart-trust-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: rgba(212, 175, 55, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cart-trust-icon svg {
    width: 16px;
    height: 16px;
    color: var(--gold-primary);
}

.cart-trust-text {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.4;
}

.cart-trust-text strong {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 1px;
}


/* ── 17. EMPTY STATE (Premium) ────────────────────────────────── */
.cart-empty {
    padding: 0;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 40px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
}

.empty-state-icon {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(145deg, rgba(212, 175, 55, 0.08), rgba(212, 175, 55, 0.02));
    border: 1px solid rgba(212, 175, 55, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 28px;
    animation: emptyFloat 3s ease-in-out infinite;
}

.empty-state-icon svg {
    width: 52px;
    height: 52px;
    color: var(--gold-primary);
    opacity: 0.6;
}

.empty-state-title {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.empty-state-text {
    font-size: 15px;
    color: var(--text-muted);
    max-width: 360px;
    line-height: 1.6;
    margin-bottom: 28px;
}

.empty-state .btn {
    padding: 14px 32px;
    font-size: 15px;
    font-weight: 600;
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
    color: var(--bg-primary);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.empty-state .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.3);
}


/* ── 18. CART DRAWER ──────────────────────────────────────────── */
.cart-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.cart-drawer-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.cart-drawer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    top: auto;
    width: 100%;
    max-height: 80vh;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.cart-drawer.show {
    transform: translateY(0);
}

.cart-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-subtle);
    flex-shrink: 0;
}

.cart-drawer-title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.cart-drawer-count {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 400;
    color: var(--text-muted);
    margin-left: 6px;
}

.cart-drawer-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.cart-drawer-close:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.cart-drawer-close svg { width: 20px; height: 20px; }


/* Drawer Body */
.cart-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 24px;
}

.cart-drawer-body::-webkit-scrollbar { width: 4px; }
.cart-drawer-body::-webkit-scrollbar-track { background: transparent; }
.cart-drawer-body::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 4px; }

/* Drawer Item */
.drawer-item {
    display: flex;
    gap: 12px;
    padding: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    margin-bottom: 10px;
    align-items: center;
    transition: border-color 0.2s;
}

.drawer-item:hover { border-color: rgba(212, 175, 55, 0.15); }

.drawer-item-thumb {
    width: 56px;
    height: 56px;
    background: linear-gradient(145deg, var(--bg-elevated), rgba(212, 175, 55, 0.04));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid rgba(212, 175, 55, 0.1);
}

.drawer-item-thumb svg {
    width: 36px;
    height: 36px;
    color: var(--gold-primary);
    opacity: 0.5;
}

.drawer-item-info { flex: 1; min-width: 0; }

.drawer-item-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 4px;
}

.drawer-item-price {
    font-size: 13px;
    color: var(--gold-primary);
    font-weight: 700;
    font-family: var(--font-heading);
}

.drawer-item-qty-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
}

.drawer-qty-btn {
    width: 26px;
    height: 26px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    padding: 0;
    line-height: 1;
    transition: all 0.2s;
}

.drawer-qty-btn:hover:not(:disabled) {
    background: rgba(212, 175, 55, 0.1);
    border-color: rgba(212, 175, 55, 0.3);
    color: var(--gold-primary);
}

.drawer-qty-btn:disabled { opacity: 0.3; }

.drawer-item-qty-val {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    font-family: var(--font-mono);
    min-width: 20px;
    text-align: center;
}

.drawer-item-subtotal {
    font-size: 12px;
    color: var(--text-secondary);
    margin-left: auto;
    font-weight: 500;
}

.drawer-item-delete {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    flex-shrink: 0;
    transition: all 0.2s;
    border-radius: var(--radius-sm);
}

.drawer-item-delete:hover {
    color: var(--error);
    background: rgba(248, 113, 113, 0.1);
}

.drawer-item-delete svg { width: 16px; height: 16px; }

/* Drawer Empty */
.drawer-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.drawer-empty-icon {
    width: 64px;
    height: 64px;
    color: var(--text-muted);
    opacity: 0.3;
    margin-bottom: 16px;
}

.drawer-empty-text {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

/* Drawer Footer */
.cart-drawer-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-subtle);
    flex-shrink: 0;
    background: var(--bg-card);
}

.cart-drawer-subtotal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 14px;
    color: var(--text-secondary);
}

.cart-drawer-subtotal-value {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: var(--gold-primary);
}

.cart-drawer-actions {
    display: flex;
    gap: 10px;
}

.cart-drawer-actions .btn { flex: 1; }


/* ── 19. SAVED FOR LATER ──────────────────────────────────────── */
.cart-saved-section {
    margin-top: 24px;
    border-top: 1px solid var(--border-subtle);
    padding-top: 20px;
}

.cart-saved-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 0;
    font-family: inherit;
}

.cart-saved-chevron {
    transition: transform 0.3s;
    color: var(--text-muted);
}

.cart-saved-toggle.expanded .cart-saved-chevron {
    transform: rotate(180deg);
}

.cart-saved-items {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.saved-item-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: border-color 0.2s;
}

.saved-item-card:hover { border-color: rgba(212, 175, 55, 0.15); }

.saved-item-top { display: flex; gap: 10px; align-items: center; }

.saved-item-thumb {
    width: 48px;
    height: 48px;
    background: linear-gradient(145deg, var(--bg-elevated), rgba(212, 175, 55, 0.04));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid rgba(212, 175, 55, 0.1);
}

.saved-item-thumb svg { width: 30px; height: 30px; color: var(--gold-primary); opacity: 0.5; }
.saved-item-info { min-width: 0; }

.saved-item-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.saved-item-price {
    font-size: 13px;
    color: var(--gold-primary);
    font-weight: 700;
    font-family: var(--font-heading);
    margin-top: 2px;
}

.saved-item-actions { display: flex; gap: 8px; }
.saved-item-actions .btn { flex: 1; font-size: 12px; padding: 7px 10px; }


/* ── 20. VOUCHER MODAL ────────────────────────────────────────── */
.cart-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cart-modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 540px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    animation: modalSlideUp 0.3s ease;
    overflow: hidden;
}

@keyframes modalSlideUp {
    from { transform: translateY(24px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.cart-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-subtle);
    flex-shrink: 0;
}

.cart-modal-title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.cart-modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.cart-modal-close:hover { color: var(--text-primary); background: var(--bg-hover); }
.cart-modal-close svg { width: 20px; height: 20px; }

.voucher-filter-tabs {
    display: flex;
    gap: 8px;
    padding: 14px 24px;
    border-bottom: 1px solid var(--border-subtle);
    overflow-x: auto;
}

.voucher-filter-tab {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    padding: 7px 16px;
    border-radius: 99px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    font-family: inherit;
}

.voucher-filter-tab:hover { border-color: var(--border-light); color: var(--text-primary); }

.voucher-filter-tab.active {
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
    color: var(--bg-primary);
    border-color: var(--gold-primary);
    font-weight: 600;
}

.cart-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 24px;
}

.voucher-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-left: 4px solid var(--gold-primary);
    border-radius: var(--radius-md);
    padding: 18px;
    margin-bottom: 12px;
    transition: all 0.2s;
}

.voucher-card:hover { border-color: rgba(212, 175, 55, 0.2); }
.voucher-card.disabled { opacity: 0.5; border-left-color: var(--text-muted); }

.voucher-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.voucher-code {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 700;
    color: var(--gold-primary);
    letter-spacing: 1px;
}

.voucher-discount {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}

.voucher-card-body { margin-bottom: 10px; }

.voucher-desc { font-size: 13px; color: var(--text-secondary); margin-bottom: 4px; }
.voucher-min, .voucher-validity { font-size: 11px; color: var(--text-muted); }

.voucher-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.voucher-terms-toggle {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 11px;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
    padding: 0;
    font-family: inherit;
}

.voucher-terms-toggle:hover { color: var(--text-secondary); }

.voucher-terms {
    font-size: 11px;
    color: var(--text-muted);
    padding: 10px 0 0;
    line-height: 1.6;
    border-top: 1px solid var(--border-subtle);
    margin-top: 10px;
}

.voucher-use-btn {
    font-size: 12px;
    padding: 8px 18px;
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
    color: var(--bg-primary);
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.voucher-use-btn:hover { box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3); }

.voucher-empty {
    text-align: center;
    padding: 50px 20px;
    color: var(--text-muted);
    font-size: 14px;
}


/* ── 21. RECOMMENDATIONS ──────────────────────────────────────── */
.cart-recommendations {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--border-subtle);
}

.cart-rec-header {
    margin-bottom: 24px;
}

.cart-rec-header h2 {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.cart-rec-header p {
    font-size: 14px;
    color: var(--text-muted);
}

.cart-rec-carousel {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 12px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.cart-rec-carousel::-webkit-scrollbar { height: 4px; }
.cart-rec-carousel::-webkit-scrollbar-track { background: transparent; }
.cart-rec-carousel::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 4px; }

.cart-rec-carousel .mp-card {
    min-width: 220px;
    max-width: 240px;
    scroll-snap-align: start;
    flex-shrink: 0;
}


/* ── 22. MOBILE STICKY BAR ────────────────────────────────────── */
.cart-sticky-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border-subtle);
    padding: 12px 16px;
    z-index: 90;
    display: none;
    animation: slideUp 0.3s ease;
}

.cart-sticky-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    max-width: 600px;
    margin: 0 auto;
}

.cart-sticky-info { display: flex; flex-direction: column; }

.cart-sticky-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.cart-sticky-total {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: var(--gold-primary);
}

.cart-sticky-checkout {
    flex-shrink: 0;
    padding: 12px 28px;
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
    color: var(--bg-primary);
    border: none;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.cart-sticky-checkout:hover:not(:disabled) {
    box-shadow: 0 4px 16px rgba(212, 175, 55, 0.3);
}

.cart-sticky-checkout:disabled { opacity: 0.4; cursor: not-allowed; }


/* ── 23. ANIMATIONS & KEYFRAMES ───────────────────────────────── */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes itemSlideOut {
    to { opacity: 0; transform: translateX(30px); height: 0; padding: 0; margin: 0; overflow: hidden; }
}

@keyframes emptyFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}


/* ── 24. RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 1024px) {
    .cart-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .cart-sidebar { position: static; }
    .cart-trust { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .cart-page { padding-top: 70px; }
    .cart-container { padding: 0 16px; }

    .cart-stepper { padding: 20px 0 20px; max-width: 360px; }
    .cart-step-num { width: 34px; height: 34px; font-size: 12px; }
    .cart-step-label { font-size: 11px; }

    .cart-title { font-size: 24px; }
    .cart-count { font-size: 13px; }

    .cart-item {
        grid-template-columns: 28px 72px 1fr;
        gap: 0 12px;
        padding: 16px;
    }

    .cart-item-thumb { width: 72px; height: 72px; }

    .cart-item-top { flex-direction: column; gap: 6px; }

    .cart-item-price-area { text-align: left; }
    .cart-item-price-current { font-size: 14px; }

    .cart-item-bottom {
        flex-wrap: wrap;
        gap: 10px;
    }

    .cart-item-subtotal {
        text-align: left;
    }

    .cart-toolbar {
        flex-wrap: wrap;
        gap: 10px;
        padding: 12px 16px;
    }

    .cart-selected-count {
        border-left: none;
        padding-left: 0;
        order: 3;
        width: 100%;
    }

    .cart-sticky-bar { display: block; }

    .cart-summary-total-value { font-size: 22px; }

    .cart-trust { grid-template-columns: 1fr; }

    .cart-saved-items { grid-template-columns: 1fr; }

    .cart-continue-link { display: none; }
}

@media (max-width: 480px) {
    .cart-item {
        grid-template-columns: 24px 60px 1fr;
        gap: 0 10px;
        padding: 14px;
    }
    .cart-item-thumb { width: 60px; height: 60px; }
    .cart-item-name { font-size: 13px; }
    .cart-step-line { min-width: 40px; }
    .cart-rec-carousel .mp-card { min-width: 180px; max-width: 200px; }
}

/* ── Order status badges (shared from profile) ────────────────── */
.status-badge{font-size:.72rem;font-weight:600;padding:3px 10px;border-radius:999px}
.status-pending{background:rgba(245,158,11,.12);color:#f59e0b}
.status-processing{background:rgba(59,130,246,.12);color:#3b82f6}
.status-shipped{background:rgba(139,92,246,.12);color:#8b5cf6}
.status-delivered{background:rgba(16,185,129,.12);color:#10b981}
.status-completed{background:rgba(16,185,129,.12);color:#10b981}
.status-cancelled{background:rgba(239,68,68,.12);color:#ef4444}
