/* ===== Cart Drawer ===== */
.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}
.cart-overlay.open {
    opacity: 1;
    visibility: visible;
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: -420px;
    width: 400px;
    max-width: 90vw;
    height: 100vh;
    background: #fdfcfa;
    z-index: 1000;
    transition: right 0.35s ease;
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 30px rgba(0,0,0,0.1);
}
.cart-drawer.open {
    right: 0;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.4rem 1.5rem;
    border-bottom: 1px solid #eee8e0;
}
.cart-header h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    color: #2d5016;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.cart-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: #f0ebe4;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s;
    color: #6b5e4f;
}
.cart-close:hover {
    background: #e0dbd4;
}

.cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.5rem;
}

.cart-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: #6b5e4f;
}
.cart-empty-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    opacity: 0.6;
}
.cart-empty p {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}
.cart-empty a {
    color: #2d5016;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 2px solid #2d5016;
    padding-bottom: 2px;
}

/* Cart Items */
.cart-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 0;
    border-bottom: 1px solid #f0ebe4;
    animation: cartItemIn 0.3s ease;
}
@keyframes cartItemIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}
.cart-item-icon {
    font-size: 2rem;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: #f5efe4;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.cart-item-info {
    flex: 1;
    min-width: 0;
}
.cart-item-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #2c2416;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cart-item-meta {
    font-size: 0.78rem;
    color: #6b5e4f;
    margin-top: 2px;
}
.cart-item-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.3rem;
    flex-shrink: 0;
}
.cart-qty {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid #e0dbd4;
    border-radius: 8px;
    overflow: hidden;
}
.cart-qty-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: white;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.2s;
    color: #2d5016;
    font-weight: 600;
}
.cart-qty-btn:hover {
    background: #f0f7e8;
}
.cart-qty-num {
    width: 28px;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: #2c2416;
    border-left: 1px solid #e0dbd4;
    border-right: 1px solid #e0dbd4;
    line-height: 28px;
}
.cart-item-subtotal {
    font-weight: 700;
    font-size: 0.85rem;
    color: #5c3a1e;
}
.cart-remove-btn {
    background: none;
    border: none;
    color: #c0b0a0;
    font-size: 0.75rem;
    cursor: pointer;
    padding: 2px;
    transition: color 0.2s;
}
.cart-remove-btn:hover {
    color: #b83232;
}

/* Cart Footer */
.cart-footer {
    border-top: 2px solid #e8e0d4;
    padding: 1.2rem 1.5rem;
    background: white;
}
.cart-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
}
.cart-total-label {
    font-size: 0.9rem;
    color: #6b5e4f;
}
.cart-total-value {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: #2d5016;
}
.cart-free-delivery {
    font-size: 0.78rem;
    color: #6b8f3c;
    margin-bottom: 1rem;
    text-align: right;
}
.cart-checkout-btn {
    display: block;
    width: 100%;
    padding: 0.9rem;
    border: none;
    border-radius: 50px;
    background: #2d5016;
    color: white;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    text-decoration: none;
}
.cart-checkout-btn:hover {
    background: #4a7c29;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(45,80,22,0.3);
}
.cart-continue {
    display: block;
    text-align: center;
    margin-top: 0.8rem;
    font-size: 0.85rem;
    color: #6b5e4f;
    text-decoration: none;
    cursor: pointer;
    background: none;
    border: none;
    font-family: 'Inter', sans-serif;
    width: 100%;
}
.cart-continue:hover {
    color: #2d5016;
}

/* Nav Cart Button */
.nav-cart-btn {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    background: none;
    border: none;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: #2c2416;
    padding: 0;
    text-decoration: none;
}
.nav-cart-btn::after { display: none !important; }
.cart-icon-wrap {
    position: relative;
}
.cart-icon-wrap svg {
    display: block;
}
.cart-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #b83232;
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    display: none;
    justify-content: center;
    align-items: center;
    line-height: 1;
}

/* Toast notification */
.cart-toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #2d5016;
    color: white;
    padding: 0.8rem 1.4rem;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 1001;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s;
    pointer-events: none;
    box-shadow: 0 4px 20px rgba(45,80,22,0.3);
}
.cart-toast.show {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 480px) {
    .cart-drawer {
        width: 100vw;
        right: -100vw;
    }
}
