/* Side Cart Container */
#side-cart-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    display: none;
    z-index: 999;
}

.custom-cart-items {
    margin: 0;
    padding: 20px !important;
}

#side-cart-overlay.active {
    display: block;
}

#side-cart {
    position: fixed;
    right: -400px;
    top: 0;
    width: 350px;
    height: 100%;
    background: #fff;
    box-shadow: -2px 0 10px rgba(0,0,0,0.2);
    z-index: 1000;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

#side-cart.active {
    right: 0;
}



.side-cart-header {
    padding: 20px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
} 

.side-cart-header h3{ 
    margin:0px;
}

.side-cart-content {
    flex: 1;
    overflow-y: auto;
    padding: 0px !important;
}

.custom-cart-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.cart-item-image img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    margin-right: 10px;
}

.cart-item-details {
    flex: 1;
}

.cart-item-name {
    font-weight: bold;
}

.cart-item-qty,
.cart-item-price {
    display: block;
    font-size: 14px;
    color: #555;
}

.remove-item {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f8f8f8;
    color: #999;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.remove-item:hover {
    background: #ff4444;
    color: #fff;
    transform: scale(1.05);
}

.empty-cart {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 24px;
    list-style: none !important;
}

span#close-side-cart {
    font-size: 30px;
}

.side-cart-footer {
    padding: 20px;
    border-top: 1px solid #ddd;
}

.checkout-btn {
    display: block;
    width: 100%;
    padding: 10px;
    background: #154BA1;
    color: #fff;
    text-align: center;
    text-decoration: none;
    border-radius: 5px;
}
/* Footer */
.side-cart-footer {
    padding: 20px 24px;
    border-top: 1px solid #f0f0f0;
    background: #fff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.checkout-btn {
    display: block;
    width: 100%;
    padding: 16px 24px;
    background: #000;
    color: #fff;
    text-align: center;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s ease;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.checkout-btn:hover {
    background: #333;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Cart Icon */
.cart-icon {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.cart-icon:hover {
    background: #f8f8f8;
    border-color: #ccc;
    transform: translateY(-1px);
}

.cart-count {
    background: #000;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive */
@media (max-width: 480px) {
    #side-cart {
        width: 100%;
        right: -100%;
    }
    
    .cart-item-image {
        width: 70px;
        height: 70px;
    }
    
    .side-cart-header,
    .side-cart-content,
    .side-cart-footer {
        padding: 16px 20px;
    }
}

/* Scrollbar Styling */
.side-cart-content::-webkit-scrollbar {
    width: 6px;
}

.side-cart-content::-webkit-scrollbar-track {
    background: #f8f8f8;
}

.side-cart-content::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 10px;
}

.side-cart-content::-webkit-scrollbar-thumb:hover {
    background: #ccc;
}

/* Animation */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.custom-cart-item {
    animation: slideIn 0.3s ease forwards;
}

/* Loading state */
.side-cart-content.loading {
    opacity: 0.7;
    pointer-events: none;
}

.side-cart-content.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Body lock when cart is open */
html.side-cart-open {
    overflow: hidden;
}

/* Removal animation */
.custom-cart-item.removing {
    opacity: 0.5;
    pointer-events: none;
}

.custom-cart-item {
    transition: all 0.3s ease;
    max-height: 150px;
    overflow: hidden;
}