/* Checkout & Cart Drawer Styles */

/* 1. Cart Icon in Navbar (replaces profile) */
.nav-cart-btn {
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.nav-cart-btn:hover {
    background-color: rgba(27, 137, 65, 0.1);
}

.cart-icon {
    font-size: 1.4rem;
}

.cart-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background-color: #E63946;
    /* Alert Red */
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cart-badge.active {
    opacity: 1;
    transform: scale(1);
}

/* 2. Cart Drawer Overlay */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1500;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease;
    backdrop-filter: blur(2px);
}

.cart-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* 3. Cart Drawer Sidebar */
.cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 400px;
    max-width: 90%;
    height: 100%;
    background-color: white;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.15);
    z-index: 1501;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.cart-drawer.open {
    transform: translateX(0);
}

/* Header */
.drawer-header {
    padding: 1.5rem;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.drawer-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--color-text-main);
    margin: 0;
}

.btn-close-cart {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-text-light);
    transition: color 0.3s;
}

.btn-close-cart:hover {
    color: var(--color-primary);
}

/* Body */
.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.cart-empty-state {
    text-align: center;
    margin-top: 3rem;
    color: var(--color-text-light);
}

.cart-empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Cart Items */
.cart-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #f9f9f9;
    animation: slideInLeft 0.3s ease;
}

.cart-item-img {
    width: 70px;
    height: 70px;
    object-fit: contain;
    border-radius: 10px;
    background-color: #f8f9f5;
    padding: 5px;
}

.cart-item-details {
    flex: 1;
}

.cart-item-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--color-text-main);
}

.cart-item-price {
    color: var(--color-primary);
    font-weight: 700;
}

.cart-item-remove {
    color: #ff6b6b;
    font-size: 0.85rem;
    cursor: pointer;
    margin-top: 5px;
    display: inline-block;
}

/* Footer & Checkout */
.drawer-footer {
    padding: 1.5rem;
    border-top: 1px solid #f0f0f0;
    background-color: #fcfcfc;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-text-main);
}

.btn-checkout {
    display: block;
    width: 100%;
    padding: 1rem;
    background-color: var(--color-primary);
    color: white;
    border: none;
    border-radius: var(--radius-round);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.btn-checkout:hover {
    background-color: var(--color-secondary);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(27, 137, 65, 0.3);
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}