/* Custom Sliding Cart Drawer */

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(2px);
}

.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: -400px; /* Start offscreen */
    width: 100%;
    max-width: 400px;
    height: 100vh;
    background: var(--color-sand);
    z-index: 1001;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.3);
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    color: var(--color-ink);
}

.cart-drawer.active {
    right: 0;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    background: var(--color-forest);
    color: var(--color-gold);
}

.cart-header h2 {
    font-size: 1.2rem;
    margin: 0;
    font-family: 'Playfair Display', serif;
}

.close-cart {
    background: none;
    border: none;
    color: var(--color-gold);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
}

.cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-item {
    display: flex;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.cart-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 15px;
}

.cart-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cart-item-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.cart-item-price {
    font-size: 0.9rem;
    color: var(--color-forest);
    font-weight: bold;
    margin-bottom: 10px;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.qty-btn {
    background: none;
    border: 1px solid #ccc;
    width: 24px;
    height: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.remove-item {
    background: none;
    border: none;
    color: #e74c3c;
    font-size: 0.8rem;
    cursor: pointer;
    margin-left: auto;
    text-decoration: underline;
}

.cart-empty-msg {
    text-align: center;
    color: #666;
    margin-top: 50px;
    font-size: 0.9rem;
}

.cart-footer {
    padding: 20px;
    background: #fff;
    border-top: 1px solid rgba(0,0,0,0.1);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 20px;
    color: var(--color-ink);
}

.checkout-btn {
    width: 100%;
    padding: 15px;
    background: var(--color-forest);
    color: var(--color-gold);
    border: none;
    font-size: 1rem;
    font-family: 'Playfair Display', serif;
    cursor: pointer;
    transition: background 0.3s;
}

.checkout-btn:hover {
    background: #112923;
}
