/* ========================================= */
/* LUXURY CART PAGE STYLES                   */
/* ========================================= */

@keyframes slideUpFade {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.lux-cart-page {
    background-color: #fdfbfb;
    padding: 6rem 2rem 10rem 2rem; /* Extra bottom padding for mobile footer */
    min-height: 70vh;
    max-width: 1400px;
    margin: 0 auto;
}

/* Header & Typography */
.cart-header {
    text-align: center;
    margin-bottom: 4rem;
    animation: slideUpFade 0.8s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

.hero-subtitle {
    display: block; font-size: 0.85rem; text-transform: uppercase;
    letter-spacing: 3px; color: #888; margin-bottom: 0.5rem; font-weight: 700;
}

.lux-page-title {
    font-family: var(--font-family-headings);
    font-size: 3rem;
    font-weight: 800;
    color: #111;
    letter-spacing: -1px;
    margin-bottom: 0.5rem;
}

.decorative-line { width: 60px; height: 4px; background: var(--accent-color); margin: 0 auto; border-radius: 2px; }

/* --- CART LAYOUT --- */
.lux-cart-container {
    display: grid;
    grid-template-columns: 1fr 400px; /* 400px fixed width for summary */
    gap: 4rem;
    align-items: flex-start;
}

/* --- CART ITEMS LIST --- */
.lux-cart-items {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.lux-cart-item {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.04);
    padding: 1.5rem;
    border-radius: 24px;
    gap: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    opacity: 0; /* Animated in via JS */
    animation: slideUpFade 0.6s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

.lux-cart-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.08);
    border-color: rgba(0,0,0,0.08);
}

.item-image-wrapper {
    width: 140px;
    height: 140px;
    flex-shrink: 0;
    background: linear-gradient(135deg, #f9f9f9 0%, #f0f0f0 100%);
    border-radius: 16px;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.item-image-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
}
.lux-cart-item:hover .item-image-wrapper img { transform: scale(1.1); }

.item-details-body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.item-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.item-name-link {
    text-decoration: none;
    color: #111;
    font-family: var(--font-family-headings);
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
    transition: color 0.3s;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.item-name-link:hover { color: var(--accent-color); }

.item-sku { font-size: 0.75rem; color: #888; font-family: monospace; letter-spacing: 1px; }

/* Elegant Delete Button */
.remove-btn {
    background: #fcfcfc;
    border: 1px solid #eee;
    color: #999;
    width: 36px; height: 36px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all 0.3s ease;
}
.remove-btn i { font-size: 1.2rem; }
.remove-btn:hover { background: #fee2e2; color: #ef4444; border-color: #fca5a5; transform: rotate(90deg); }

.item-bottom-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
}

.item-price {
    font-size: 1.4rem;
    font-weight: 800;
    color: #111;
    letter-spacing: -0.5px;
}

/* Premium Pill Quantity Control */
.lux-qty-pill {
    display: inline-flex;
    align-items: center;
    background: #f9f9f9;
    border: 1px solid #eaeaea;
    border-radius: 30px;
    padding: 4px;
}

.qty-btn {
    background: #fff;
    border: none;
    width: 32px; height: 32px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; font-weight: 500; color: #555;
    cursor: pointer; box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
}
.qty-btn:hover { background: #111; color: #fff; }

.qty-val {
    padding: 0 16px;
    font-weight: 700;
    font-size: 1.05rem;
    color: #111;
}


/* --- STICKY SUMMARY CARD --- */
.lux-summary-wrapper {
    position: sticky;
    top: 100px;
    animation: slideUpFade 0.8s cubic-bezier(0.165, 0.84, 0.44, 1) 0.2s forwards;
    opacity: 0;
}

.lux-summary-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 2.5rem;
    border-radius: 24px;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 20px 50px rgba(0,0,0,0.06);
}

.lux-summary-card h2 {
    font-family: var(--font-family-headings);
    font-size: 1.6rem;
    font-weight: 800;
    color: #111;
    margin-bottom: 2rem;
    letter-spacing: -0.5px;
}

.summary-details { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 2rem; }
.summary-row { display: flex; justify-content: space-between; font-size: 1.05rem; color: #666; font-weight: 500; }
.highlight-text { color: var(--accent-color); font-weight: 600; font-size: 0.9rem; }

.summary-divider { height: 1px; background: #eee; margin: 0.5rem 0; }

.summary-row.total {
    font-size: 1.3rem; color: #111; font-weight: 700; align-items: center; margin-top: 0.5rem;
}
#total-price { font-size: 1.8rem; font-weight: 800; letter-spacing: -1px; }

/* Metallic Checkout Button */
.lux-checkout-btn {
    width: 100%;
    background: #25D366; /* WhatsApp Green */
    color: white;
    border: none;
    padding: 18px;
    border-radius: 16px;
    font-family: var(--font-family-headings);
    font-weight: 700;
    font-size: 1.15rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.3);
    transition: all 0.3s ease;
}

.lux-checkout-btn .btn-content {
    position: relative; z-index: 2; display: flex; align-items: center; justify-content: center; gap: 10px;
}
.lux-checkout-btn i { font-size: 1.4rem; }

.lux-checkout-btn::after {
    content: ''; position: absolute; top: 0; left: -100%; width: 50%; height: 100%;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.25), transparent);
    transform: skewX(-20deg); transition: 0.6s; z-index: 1;
}
.lux-checkout-btn:hover { background: #1ebe5d; transform: translateY(-3px); box-shadow: 0 15px 30px rgba(37, 211, 102, 0.4); }
.lux-checkout-btn:hover::after { left: 150%; }

/* Trust Badges inside Summary */
.lux-trust-badges { display: flex; justify-content: center; gap: 20px; margin-top: 2rem; }
.t-badge { display: flex; flex-direction: column; align-items: center; gap: 5px; opacity: 0.7; }
.t-badge i { font-size: 1.5rem; color: #666; }
.t-badge span { font-size: 0.75rem; text-transform: uppercase; font-weight: 600; color: #888; letter-spacing: 0.5px; }


/* --- EMPTY STATE --- */
.lux-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6rem 2rem;
    animation: slideUpFade 0.8s ease forwards;
}

.empty-icon-circle {
    width: 120px; height: 120px;
    background: #f4f4f4; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 2rem;
}
.empty-icon-circle i { font-size: 4rem; color: #ccc; }

.lux-empty-state h2 { font-family: var(--font-family-headings); font-size: 2.2rem; color: #111; margin-bottom: 1rem; letter-spacing: -0.5px; }
.lux-empty-state p { font-size: 1.1rem; color: #666; margin-bottom: 2.5rem; max-width: 500px; line-height: 1.6; }

.lux-cta-btn {
    background: #111; color: #fff; text-decoration: none; padding: 16px 36px; border-radius: 30px;
    font-weight: 700; font-size: 1.05rem; transition: all 0.3s ease;
}
.lux-cta-btn:hover { background: var(--accent-color); transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0,0,0,0.1); }

/* Hide Mobile Elements by default */
.premium-mobile-footer { display: none; }


/* ========================================= */
/* PREMIUM RESPONSIVE DESIGN                 */
/* ========================================= */
@media (max-width: 1024px) {
    .lux-cart-container { grid-template-columns: 1fr 350px; gap: 2rem; }
    .lux-cart-item { gap: 1.5rem; padding: 1.2rem; }
    .item-image-wrapper { width: 110px; height: 110px; }
    .lux-summary-card { padding: 2rem; }
}

@media (max-width: 768px) {
    .lux-cart-page { padding: 4rem 1.2rem 8rem 1.2rem; }
    .cart-header { margin-bottom: 2.5rem; }
    .lux-page-title { font-size: 2.2rem; }
    
    /* Layout shifts to column */
    .lux-cart-container { grid-template-columns: 1fr; gap: 2.5rem; }
    
    /* Compact Mobile Cart Items */
    .lux-cart-item { 
        padding: 1rem; gap: 1rem; border-radius: 16px; 
        align-items: flex-start; /* Align top on mobile */
    }
    .item-image-wrapper { width: 90px; height: 90px; padding: 0.5rem; border-radius: 12px; }
    
    .item-name-link { font-size: 1.05rem; }
    .item-sku { font-size: 0.7rem; }
    .remove-btn { width: 30px; height: 30px; position: absolute; bottom: 1rem; right: 1rem; background: transparent; border: none; }
    
    .item-bottom-row { margin-top: auto; padding-top: 10px; flex-direction: column-reverse; align-items: flex-start; gap: 10px; }
    .item-price { font-size: 1.2rem; }
    .lux-qty-pill { transform: scale(0.9); transform-origin: left center; }
    
    /* Adjust Inline Summary for Mobile */
    .lux-summary-wrapper { position: relative; top: 0; }
    .lux-summary-card { padding: 1.5rem; border-radius: 16px; }
    .lux-summary-card h2 { font-size: 1.4rem; margin-bottom: 1.5rem; }
    
    /* Hide desktop checkout button inside summary, trust sticky footer */
    .lux-checkout-btn { display: none; } 
    
    /* 5-LAKH MOBILE UX: Sticky Bottom Checkout Bar */
    .premium-mobile-footer {
        display: flex !important; /* Force display on mobile */
        justify-content: space-between;
        align-items: center;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-top: 1px solid rgba(0,0,0,0.05);
        box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.08);
        z-index: 10000;
        border-radius: 24px 24px 0 0;
        animation: slideUpFade 0.5s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
    }

    .pmf-price-col { display: flex; flex-direction: column; gap: 2px; }
    .pmf-label { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 1px; color: #888; font-weight: 700; }
    .pmf-price { font-size: 1.35rem; font-weight: 800; color: #111; letter-spacing: -0.5px; }

    .lux-whatsapp-btn {
        padding: 0 24px; height: 48px; border-radius: 24px;
        background: #25D366; color: #fff; border: none;
        font-family: var(--font-family-headings); font-weight: 700; font-size: 1rem;
        display: flex; align-items: center; gap: 8px;
        box-shadow: 0 8px 20px rgba(37, 211, 102, 0.3);
    }
    
    /* Hide floating FAB if sticky footer is active */
    .whatsapp-fab { display: none !important; }
}

@media (max-width: 380px) {
    .lux-cart-item { flex-direction: column; align-items: center; text-align: center; }
    .item-image-wrapper { width: 100%; height: 180px; }
    .item-header-row { flex-direction: column; align-items: center; gap: 5px; }
    .item-bottom-row { align-items: center; width: 100%; flex-direction: row; justify-content: space-between; }
    .remove-btn { top: 10px; right: 10px; bottom: auto; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
}