/* Cart Basket Styles */
.cart-basket-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Toggle Button */
.cart-toggle-btn {
    background: linear-gradient(135deg, #cfac48 0%, #eeee9a 100%);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 15px 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    animation: float 3s ease-in-out infinite;
}

.cart-toggle-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, #cfac48 0%, #eeee9a 100%);
}

.cart-icon {
    position: relative;
    font-size: 24px;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #FF4757;
    color: white;
    font-size: 12px;
    font-weight: bold;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    border: 2px solid white;
}

.cart-preview {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
}

.cart-items-preview {
    font-size: 14px;
    opacity: 0.9;
}

.cart-total-preview {
    font-size: 18px;
    font-weight: bold;
}

/* Cart Popup */
.cart-popup {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    overflow: hidden;
}

.cart-popup.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.cart-header {
    background: linear-gradient(135deg, #2d3436 0%, #636e72 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h3 {
    margin: 0;
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.close-btn:hover {
    transform: rotate(90deg);
}

/* Cart Items */
.cart-items {
    max-height: 400px;
    overflow-y: auto;
    padding: 20px;
}

.empty-cart {
    text-align: center;
    padding: 40px 20px;
    color: #95a5a6;
}

.empty-cart i {
    margin-bottom: 15px;
    color: #dfe6e9;
}

.empty-cart p {
    margin: 10px 0;
    font-size: 16px;
    color: #7f8c8d;
}

.empty-cart small {
    color: #b2bec3;
}

.cart-item {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.cart-item:hover {
    background: #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

.cart-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.cart-item-title {
    font-weight: 600;
    color: #2d3436;
    font-size: 16px;
    margin: 0;
}

.cart-item-price {
    color: #25D366;
    font-weight: bold;
    font-size: 16px;
}

.cart-item-description {
    color: #636e72;
    font-size: 13px;
    margin-bottom: 15px;
    line-height: 1.4;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-btn {
    background: #e9ecef;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: bold;
    color: #2d3436;
    transition: all 0.2s ease;
}

.quantity-btn:hover {
    background: #25D366;
    color: white;
}

.quantity-display {
    min-width: 30px;
    text-align: center;
    font-weight: 600;
}

.remove-btn {
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 8px 15px;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
}

.remove-btn:hover {
    background: #ff4757;
    transform: translateY(-1px);
}

/* Cart Summary */
.cart-summary {
    background: #f8f9fa;
    padding: 20px;
    border-top: 1px solid #e9ecef;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    color: #636e72;
    font-size: 15px;
}

.summary-row.total-row {
    color: #2d3436;
    font-size: 18px;
    font-weight: bold;
    margin: 20px 0 0 0;
    padding-top: 15px;
    border-top: 2px solid #dfe6e9;
}

/* Cart Actions */
.cart-actions {
    padding: 20px;
    background: white;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checkout-btn {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.checkout-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.3);
}

.checkout-btn:disabled {
    background: #b2bec3;
    cursor: not-allowed;
    opacity: 0.7;
}

.invoice-btn {
    background: white;
    color: #2d3436;
    border: 2px solid #25D366;
    padding: 14px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.invoice-btn:hover {
    background: #25D366;
    color: white;
    transform: translateY(-2px);
}

/* Animations */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideOutDown {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(30px);
    }
}

/* Scrollbar Styling */
.cart-items::-webkit-scrollbar {
    width: 6px;
}

.cart-items::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.cart-items::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.cart-items::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cart-basket-container {
        bottom: 20px;
        right: 20px;
    }
    
    .cart-toggle-btn {
        padding: 12px 20px;
    }
    
    .cart-popup {
        width: 320px;
        right: 0;
    }
    
    .cart-preview {
        display: none;
    }
}

@media (max-width: 480px) {
    .cart-popup {
        width: 280px;
    }
    
    .cart-header {
        padding: 15px;
    }
    
    .cart-items {
        max-height: 300px;
    }
}