/* Cart Styles */
.cart-icon-container {
    position: relative;
    margin-right: 1rem;
}

.cart-toggle-btn {
    background: linear-gradient(135deg, #7B1E3A, #1E90FF);
    border: 2px solid rgba(255,255,255,0.3);
    color: #F9FAFB;
    padding: 0.5rem;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.cart-toggle-btn:hover {
    background: linear-gradient(135deg, #1E90FF, #7B1E3A);
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(30,144,255,0.6);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #C5A572;
    color: #0A192F;
    border-radius: 50%;
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
    border: 2px solid #0A192F;
    display: none;
}

.cart-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: rgba(10,25,47,0.95);
    backdrop-filter: blur(20px);
    border-left: 1px solid rgba(30,144,255,0.2);
    box-shadow: -5px 0 20px rgba(0,0,0,0.3);
    z-index: 10000;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.cart-panel.open {
    right: 0;
}

.cart-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(30,144,255,0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h3 {
    color: #F9FAFB;
    margin: 0;
    font-size: 1.5rem;
}

.cart-close-btn {
    background: none;
    border: none;
    color: #F9FAFB;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.cart-close-btn:hover {
    color: #1E90FF;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.empty-cart {
    text-align: center;
    color: rgba(249,250,251,0.7);
    padding: 3rem 1rem;
}

.empty-cart i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.cart-item {
    display: flex;
    align-items: center;
    background: rgba(30,144,255,0.1);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    position: relative;
    transition: all 0.3s ease;
}

.cart-item:hover {
    background: rgba(30,144,255,0.2);
    transform: translateX(-5px);
}

.cart-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    margin-right: 1rem;
}

.item-details {
    flex: 1;
}

.item-details h4 {
    color: #F9FAFB;
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    font-weight: 600;
}

.item-price {
    color: #C5A572;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.qty-btn {
    background: rgba(30,144,255,0.2);
    border: 1px solid rgba(30,144,255,0.5);
    color: #F9FAFB;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.qty-btn:hover {
    background: #1E90FF;
    transform: scale(1.1);
}

.qty-input {
    background: rgba(10,25,47,0.8);
    border: 1px solid rgba(30,144,255,0.3);
    color: #F9FAFB;
    width: 3rem;
    height: 2rem;
    text-align: center;
    border-radius: 6px;
    font-size: 0.9rem;
}

.qty-input:focus {
    outline: none;
    border-color: #1E90FF;
    box-shadow: 0 0 5px rgba(30,144,255,0.5);
}

.remove-item-btn {
    background: #7B1E3A;
    border: none;
    color: #F9FAFB;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.remove-item-btn:hover {
    background: #a0324a;
    transform: scale(1.1);
}

.cart-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(30,144,255,0.2);
    background: rgba(10,25,47,0.8);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: bold;
}

.cart-total span:first-child {
    color: #F9FAFB;
}

.total-amount {
    color: #C5A572;
}

.whatsapp-btn {
    width: 100%;
    background: linear-gradient(135deg, #25D366, #128C7E);
    border: none;
    color: #F9FAFB;
    padding: 1rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.whatsapp-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #128C7E, #25D366);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37,211,102,0.4);
}

.whatsapp-btn:disabled {
    background: rgba(37,211,102,0.3);
    cursor: not-allowed;
    transform: none;
}

.whatsapp-btn i {
    font-size: 1.2rem;
}

/* Mobile cart icon */
.mobile-cart-icon {
    padding: 0.5rem 1rem;
    border-top: 1px solid rgba(30,144,255,0.1);
}

.mobile-cart-icon .cart-toggle-btn {
    width: 100%;
    border-radius: 8px;
    justify-content: flex-start;
    padding: 0.75rem 1rem;
    font-size: 1rem;
}

.mobile-cart-icon .cart-count {
    margin-left: auto;
    margin-right: 0.5rem;
}

/* Notification */
.cart-notification {
    position: fixed;
    top: 100px;
    right: 20px;
    background: linear-gradient(135deg, #7B1E3A, #1E90FF);
    color: #F9FAFB;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    z-index: 10001;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
    font-weight: 500;
}

.cart-notification.show {
    transform: translateX(0);
    opacity: 1;
}

/* Bounce animation for cart icon */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Add to Cart Button */
.add-to-cart-btn {
    background: linear-gradient(135deg, #7B1E3A, #1E90FF);
    border: none;
    color: #F9FAFB;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}

.add-to-cart-btn:hover {
    background: linear-gradient(135deg, #1E90FF, #7B1E3A);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(30,144,255,0.4);
}

/* Admin Buttons */
.admin-buttons {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 5px;
}

.edit-btn, .delete-btn {
    background: rgba(30,144,255,0.2);
    border: 1px solid rgba(30,144,255,0.5);
    color: #F9FAFB;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.edit-btn:hover {
    background: #1E90FF;
    transform: scale(1.1);
}

.delete-btn {
    background: rgba(123, 30, 58, 0.2);
    border-color: rgba(123, 30, 58, 0.5);
}

.delete-btn:hover {
    background: #7B1E3A;
    transform: scale(1.1);
}

/* Responsive */
@media (max-width: 768px) {
    .cart-panel {
        width: 100vw;
        right: -100vw;
        top: 0;
        height: 100vh;
    }

    .cart-panel.open {
        right: 0;
    }

    .cart-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1rem;
    }

    .cart-item img {
        width: 80px;
        height: 80px;
        margin-right: 0;
        align-self: center;
    }

    .item-details {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .quantity-controls {
        justify-content: center;
        margin-top: 0.5rem;
    }

    .cart-header {
        padding: 1.5rem 1rem;
    }

    .cart-header h3 {
        font-size: 1.25rem;
    }

    .cart-close-btn {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1.5rem;
    }

    .cart-items {
        padding: 1rem;
    }

    .cart-footer {
        padding: 1.5rem 1rem;
    }

    .cart-total {
        font-size: 1.1rem;
        margin-bottom: 1.5rem;
    }

    .whatsapp-btn {
        padding: 1rem;
        font-size: 1rem;
    }

    /* Mobile cart icon adjustments */
    .mobile-cart-icon {
        padding: 0.75rem 1rem;
    }

    .mobile-cart-icon .cart-toggle-btn {
        width: 100%;
        padding: 0.75rem 1rem;
        font-size: 1rem;
        border-radius: 12px;
    }

    .mobile-cart-icon .cart-count {
        margin-left: auto;
        margin-right: 0.5rem;
        width: 1.25rem;
        height: 1.25rem;
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    /* Extra small screens */
    .cart-panel {
        width: 100vw;
    }

    .cart-header h3 {
        font-size: 1.1rem;
    }

    .cart-item {
        padding: 0.75rem;
    }

    .cart-item img {
        width: 70px;
        height: 70px;
    }

    .item-details h4 {
        font-size: 0.85rem;
    }

    .item-price {
        font-size: 0.9rem;
    }

    .quantity-controls {
        gap: 0.25rem;
    }

    .qty-btn {
        width: 1.75rem;
        height: 1.75rem;
        font-size: 1rem;
    }

    .qty-input {
        width: 2.5rem;
        height: 1.75rem;
        font-size: 0.9rem;
    }

    .remove-item-btn {
        width: 1.75rem;
        height: 1.75rem;
        font-size: 1rem;
    }

    .cart-total {
        font-size: 1rem;
    }

    .total-amount {
        font-size: 1.1rem;
    }

    .whatsapp-btn {
        padding: 0.875rem;
        font-size: 0.9rem;
    }

    .mobile-cart-icon .cart-toggle-btn {
        padding: 0.625rem 0.875rem;
        font-size: 0.9rem;
    }

    .mobile-cart-icon .cart-count {
        width: 1.1rem;
        height: 1.1rem;
        font-size: 0.65rem;
    }
}
