/* ═══════════════════════════════════════════════════════════
   CHETHI BATIK — LUXURY CART DRAWER & MOBILE BOTTOM NAVIGATION
   ═══════════════════════════════════════════════════════════ */

/* ─── Cart Drawer Overlay ─── */
.cart-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.cart-drawer-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

/* ─── Slide-out Cart Drawer ─── */
.cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 440px;
    max-width: 100vw;
    height: 100vh;
    background: #FFFFFF;
    color: var(--text-main, #111111);
    z-index: 10001;
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.2);
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.cart-drawer.is-active {
    transform: translateX(0);
}

/* ─── Drawer Header ─── */
.cart-drawer-header {
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
    background: #FAFAFA;
}

.cart-drawer-title {
    font-family: var(--font-display, 'Playfair Display', serif);
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: #111111;
}

.cart-drawer-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    border-radius: 12px;
    background: var(--red, #D32F2F);
    color: #FFFFFF;
    font-size: 0.75rem;
    font-weight: 700;
    font-family: var(--font-body, 'Inter', sans-serif);
}

.cart-drawer-close {
    background: transparent;
    border: none;
    font-size: 1.2rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666666;
    cursor: pointer !important;
    transition: all 0.2s ease;
}

.cart-drawer-close:hover {
    background: rgba(0, 0, 0, 0.06);
    color: #000000;
    transform: rotate(90deg);
}

/* ─── Free Shipping Progress Bar ─── */
.cart-free-shipping-bar {
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, rgba(211, 47, 47, 0.08) 0%, rgba(211, 47, 47, 0.04) 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.cart-shipping-msg {
    font-size: 0.82rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #333333;
    font-weight: 500;
}

.cart-shipping-msg i {
    color: var(--gold-dark, #8E0000);
    font-size: 0.95rem;
}

.cart-shipping-msg.is-unlocked {
    color: #1b7a37;
    font-weight: 600;
}

.cart-shipping-msg.is-unlocked i {
    color: #1b7a37;
}

.cart-progress-track {
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.cart-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #D32F2F 0%, #D32F2F 100%);
    border-radius: 3px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.cart-progress-fill.is-complete {
    background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
}

/* ─── Drawer Items List ─── */
.cart-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem 1.5rem;
    -webkit-overflow-scrolling: touch;
}

.cart-drawer-items {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.cart-drawer-item {
    display: flex;
    gap: 1rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    position: relative;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.cart-drawer-item.is-removing {
    opacity: 0;
    transform: translateX(30px);
}

.cart-drawer-item-img {
    width: 80px;
    height: 100px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: #f4f4f4;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.cart-drawer-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cart-drawer-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.cart-drawer-item-name {
    font-size: 0.92rem;
    font-weight: 600;
    color: #111111;
    text-decoration: none;
    margin-bottom: 0.25rem;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    transition: color 0.2s ease;
}

.cart-drawer-item-name:hover {
    color: var(--red, #D32F2F);
}

.cart-drawer-item-size {
    font-size: 0.75rem;
    color: #666666;
    background: #f0f0f0;
    padding: 2px 7px;
    border-radius: 4px;
    display: inline-block;
    width: fit-content;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.cart-drawer-item-price {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--red, #D32F2F);
    margin-bottom: auto;
}

.cart-drawer-item-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.5rem;
}

.cart-drawer-stepper {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 4px;
    background: #FFFFFF;
    overflow: hidden;
}

.cart-drawer-stepper button {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: #333333;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer !important;
    transition: background 0.15s ease;
}

.cart-drawer-stepper button:hover {
    background: #f0f0f0;
}

.cart-drawer-stepper span {
    min-width: 28px;
    text-align: center;
    font-size: 0.82rem;
    font-weight: 600;
    color: #111111;
}

.cart-drawer-item-remove {
    background: transparent;
    border: none;
    color: #999999;
    font-size: 0.85rem;
    cursor: pointer !important;
    padding: 4px;
    transition: color 0.2s ease;
}

.cart-drawer-item-remove:hover {
    color: #D32F2F;
}

/* ─── Empty Cart State ─── */
.cart-drawer-empty {
    text-align: center;
    padding: 3.5rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.cart-drawer-empty-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(211, 47, 47, 0.1);
    color: var(--gold-dark, #8E0000);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1.25rem;
}

.cart-drawer-empty h3 {
    font-family: var(--font-display, 'Playfair Display', serif);
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: #111111;
}

.cart-drawer-empty p {
    font-size: 0.88rem;
    color: #777777;
    margin-bottom: 1.5rem;
    max-width: 260px;
    line-height: 1.5;
}

.cart-drawer-empty .btn-explore {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #000000;
    color: #FFFFFF;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.cart-drawer-empty .btn-explore:hover {
    background: var(--red, #D32F2F);
    box-shadow: 0 4px 15px rgba(211, 47, 47, 0.3);
}

/* ─── Drawer Footer ─── */
.cart-drawer-footer {
    padding: 1.25rem 1.5rem;
    background: #FAFAFA;
    border-top: 1px solid rgba(0, 0, 0, 0.07);
}

.cart-drawer-subtotal-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.4rem;
}

.cart-drawer-subtotal-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #444444;
}

.cart-drawer-subtotal-val {
    font-size: 1.25rem;
    font-weight: 800;
    font-family: var(--font-display, 'Playfair Display', serif);
    color: #111111;
}

.cart-drawer-shipping-note {
    font-size: 0.78rem;
    color: #777777;
    margin-bottom: 1rem;
}

.cart-drawer-actions {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.btn-drawer-checkout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.9rem 1.25rem;
    background: var(--red, #D32F2F);
    color: #FFFFFF !important;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer !important;
}

.btn-drawer-checkout:hover {
    background: #b51c1c;
    box-shadow: 0 6px 20px rgba(211, 47, 47, 0.35);
    transform: translateY(-1px);
}

.btn-drawer-cart {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.75rem 1.25rem;
    background: transparent;
    color: #222222 !important;
    text-decoration: none;
    border: 1px solid rgba(0, 0, 0, 0.18);
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-drawer-cart:hover {
    background: #f0f0f0;
    border-color: #000000;
}

/* ═══════════════════════════════════════════════════════════
   MOBILE BOTTOM NAVIGATION (Sticky Thumb-friendly Nav)
   ═══════════════════════════════════════════════════════════ */
.mobile-bottom-nav {
    display: none;
}

@media (max-width: 768px) {
    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100vw;
        height: 60px;
        background: rgba(255, 255, 255, 0.96);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-top: 1px solid rgba(0, 0, 0, 0.08);
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
        z-index: 9998;
        align-items: center;
        justify-content: space-around;
        padding: 0 0.5rem;
    }

    .mobile-bottom-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        flex: 1;
        height: 100%;
        color: #555555;
        text-decoration: none;
        font-size: 0.65rem;
        font-weight: 600;
        gap: 3px;
        position: relative;
        background: transparent;
        border: none;
        cursor: pointer !important;
        transition: color 0.2s ease, transform 0.15s ease;
    }

    .mobile-bottom-item i {
        font-size: 1.15rem;
        transition: transform 0.2s ease;
    }

    .mobile-bottom-item:active {
        transform: scale(0.92);
    }

    .mobile-bottom-item.is-active,
    .mobile-bottom-item:hover {
        color: var(--red, #D32F2F);
    }

    .mobile-bottom-item.is-active i {
        transform: translateY(-2px);
    }

    .mobile-bottom-badge {
        position: absolute;
        top: 6px;
        right: 50%;
        transform: translateX(12px);
        min-width: 16px;
        height: 16px;
        padding: 0 4px;
        border-radius: 8px;
        background: var(--red, #D32F2F);
        color: #FFFFFF;
        font-size: 0.6rem;
        font-weight: 700;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Extra bottom padding for body so content isn't hidden behind the bar */
    body {
        padding-bottom: 64px !important;
    }

    /* Adjust floating WhatsApp and Scroll-to-Top buttons on mobile so they don't overlap the bottom nav */
    .whatsapp-float {
        bottom: 74px !important;
        right: 18px !important;
    }

    .scroll-top {
        bottom: 136px !important;
        right: 21px !important;
    }

    /* Drawer width on mobile */
    .cart-drawer {
        width: 100vw;
    }
}
