/* Cart Sidebar Styles */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    max-width: 100vw;
    overflow: hidden;
    transform: translateZ(0);
}

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

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

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

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 2px solid #e1e5e9;
    background: #f8f9fa;
}

.cart-header h3 {
    font-family: 'Oswald', sans-serif;
    font-size: 1.5rem;
    color: #343a40;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.close-cart {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6c757d;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-cart:hover {
    background: #e9ecef;
    color: #343a40;
}

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

.cart-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid #e1e5e9;
    transition: background-color 0.3s ease;
}

.cart-item:hover {
    background: #f8f9fa;
}

.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;
    min-width: 0;
}

.cart-item-title {
    font-weight: 600;
    color: #343a40;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cart-item-variant {
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
}

.cart-item-price {
    font-weight: bold;
    color: #28a745;
    font-size: 0.9rem;
}

.cart-item-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #f8f9fa;
    border-radius: 20px;
    padding: 0.25rem;
}

.quantity-btn {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.8rem;
    font-weight: bold;
}

.quantity-btn:hover {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.quantity-display {
    min-width: 30px;
    text-align: center;
    font-weight: bold;
    font-size: 0.9rem;
}

.remove-item {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

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

.cart-footer {
    padding: 1.5rem;
    border-top: 2px solid #e1e5e9;
    background: #f8f9fa;
}

.cart-total {
    text-align: center;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    color: #343a40;
}

.checkout-btn {
    width: 100%;
    background: linear-gradient(45deg, #007bff, #0056b3);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
    font-family: 'Oswald', sans-serif;
}

.checkout-btn:hover {
    background: linear-gradient(45deg, #0056b3, #004085);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

.checkout-btn:active {
    transform: translateY(0);
}

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

.empty-cart {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
}

.empty-cart i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-cart p {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.continue-shopping {
    background: #007bff;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

.continue-shopping:hover {
    background: #0056b3;
    color: white;
    text-decoration: none;
}

/* Cart Animation */
.cart-item-enter {
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.cart-item-remove {
    animation: slideOutRight 0.3s ease-in forwards;
}

@keyframes slideOutRight {
    to {
        opacity: 0;
        transform: translateX(100px);
        height: 0;
        padding: 0;
        margin: 0;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .cart-sidebar {
        width: 90%;
        max-width: 350px;
        right: -90%;
    }
    
    .cart-sidebar.active {
        right: 0;
    }
    
    .cart-item {
        padding: 0.75rem;
    }
    
    .cart-item-image {
        width: 50px;
        height: 50px;
    }
    
    .cart-item-title {
        font-size: 0.8rem;
    }
    
    .quantity-btn {
        width: 25px;
        height: 25px;
        font-size: 0.7rem;
    }
    
    .quantity-display {
        min-width: 25px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .cart-sidebar {
        width: 95%;
        max-width: 320px;
        right: -95%;
    }
}

@media (max-width: 360px) {
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
}