/* ==========================================================================
   Cart Drawer Component CSS - 100% Mobile Full-Width & Desktop Slide-Over
   ========================================================================== */

#cartDrawer {
    position: fixed;
    inset: 0;
    z-index: 70;
    pointer-events: none;
    visibility: hidden;
    transition: visibility 0.3s ease;
}

#cartDrawer.is-active,
#cartDrawer.is-open {
    pointer-events: auto;
    visibility: visible;
}

#cartDrawerBackdrop {
    position: absolute;
    inset: 0;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#cartDrawer.is-active #cartDrawerBackdrop,
#cartDrawer.is-open #cartDrawerBackdrop {
    opacity: 1;
}

#cartDrawerPanel {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #ffffff;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.2);
    /* In RTL, drawer slides from LEFT */
    transform: translateX(-100%);
    transition: transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
    z-index: 10;
}

@media (min-width: 640px) {
    #cartDrawerPanel {
        width: 440px;
        max-width: 90vw;
    }
}

#cartDrawer.is-active #cartDrawerPanel,
#cartDrawer.is-open #cartDrawerPanel {
    transform: translateX(0);
}

/* Drawer Cart Item Card Styling */
.drawer-item-card {
    background-color: #ffffff;
    border: 1px solid #f1f5f9;
    border-radius: 1rem;
    padding: 0.75rem;
    display: flex;
    gap: 0.75rem;
    align-items: center;
    transition: border-color 0.15s ease;
}

.drawer-item-card:hover {
    border-color: #e2e8f0;
}

.drawer-qty-btn {
    width: 26px;
    height: 26px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f1f5f9;
    color: #475569;
    border: none;
    cursor: pointer;
    font-weight: 800;
    font-size: 0.75rem;
    transition: all 0.15s ease;
}

.drawer-qty-btn:hover {
    background-color: #e2e8f0;
    color: #0f172a;
}
