/* Shopping Cart Styles */

/* Cart Icon in Navigation */
.cart-icon {
    position: relative;
    display: inline-block;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #d4834f;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.7rem;
    font-weight: bold;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-family: 'Open Sans', sans-serif;
}

/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: white;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

/* Cart Header */
.cart-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
}

.cart-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.25rem;
    font-family: 'Lora', serif;
    font-weight: 400;
}

.close-cart {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-cart:hover {
    background: #e9ecef;
    color: #2c3e50;
}

/* Cart Items */
.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #e9ecef;
    gap: 1rem;
    position: relative;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-details {
    flex: 1;
}

.cart-item-details h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    color: #2c3e50;
    line-height: 1.2;
    font-family: 'Lora', serif;
    font-weight: 400;
}

.cart-item-price {
    color: #d4834f;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    font-family: 'Open Sans', sans-serif;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cart-item-qty-btn {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.cart-item-qty-btn:hover {
    background: #e9ecef;
    border-color: #d4a574;
}

.cart-item-quantity .quantity {
    font-weight: 600;
    min-width: 20px;
    text-align: center;
    font-size: 0.9rem;
}

.cart-item-total {
    color: #2c3e50;
    font-weight: 700;
    font-size: 1rem;
    margin-right: 2rem;
}

.remove-item {
    position: absolute;
    top: 0.5rem;
    right: 0;
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.remove-item:hover {
    background: #fee;
    color: #dc3545;
}

.empty-cart {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 2rem;
    font-family: 'Open Sans', sans-serif;
}

/* Cart Footer */
.cart-footer {
    padding: 1.5rem;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
}

.cart-total {
    margin-bottom: 1rem;
    text-align: center;
    font-size: 1.25rem;
    color: #2c3e50;
    font-family: 'Lora', serif;
    font-weight: 400;
}

.checkout-btn {
    width: 100%;
    padding: 0.75rem;
    background: linear-gradient(135deg, #d4834f, #c9753d);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Open Sans', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.checkout-btn:hover {
    background: linear-gradient(135deg, #c9753d, #b86932);
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(212, 131, 79, 0.3);
}

.checkout-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
}

/* Cart Messages */
.cart-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    z-index: 2000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    max-width: 300px;
}

.cart-message.show {
    transform: translateX(0);
}

.cart-message.success {
    background: #28a745;
}

.cart-message.error {
    background: #dc3545;
}

.cart-message.info {
    background: #17a2b8;
}

/* Product Quantity Controls */
.quantity-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 1rem 0;
}

.qty-btn {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.3s ease;
    color: #2c3e50;
}

.qty-btn:hover {
    background: #e9ecef;
    border-color: #d4a574;
}

.qty-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.qty-input {
    width: 60px;
    height: 32px;
    text-align: center;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
}

.qty-input:focus {
    outline: none;
    border-color: #d4a574;
    box-shadow: 0 0 0 2px rgba(212, 165, 116, 0.2);
}

/* Add to Cart Button States */
.add-to-cart:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.add-to-cart:disabled:hover {
    background: #6c757d;
    transform: none;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
    
    .cart-sidebar.active {
        right: 0;
    }
    
    .cart-item {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .cart-item-image {
        width: 50px;
        height: 50px;
    }
    
    .cart-item-details {
        min-width: 0;
    }
    
    .cart-item-total {
        margin-right: 1.5rem;
        font-size: 0.9rem;
    }
    
    .cart-message {
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(-100px);
    }
    
    .cart-message.show {
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .cart-header {
        padding: 1rem;
    }
    
    .cart-items {
        padding: 0.5rem;
    }
    
    .cart-footer {
        padding: 1rem;
    }
    
    .cart-item {
        padding: 0.75rem 0;
    }
}
