/* cart.css - Premium Shopping Cart Styles */

/* Products Section */
.products-section {
    background-color: var(--vanilla-white);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.product-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.product-image {
    height: 220px;
    position: relative;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--brand-blue);
    color: white;
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.product-info {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-info h3 {
    font-size: 1.6rem;
    margin-bottom: 10px;
}

.product-info p {
    color: var(--soft-gray);
    margin-bottom: 20px;
    font-size: 0.95rem;
    flex-grow: 1;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.product-price {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--brand-blue);
    font-family: var(--font-heading);
}

.add-btn {
    padding: 10px 24px;
    font-size: 1rem;
}

/* Floating Cart Button */
.floating-cart-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 65px;
    height: 65px;
    background: linear-gradient(135deg, var(--pastel-pink), #e8a1ba);
    color: white;
    border-radius: 50%;
    border: none;
    box-shadow: 0 10px 25px rgba(245, 184, 207, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 999;
    transition: var(--transition);
    animation: bounceIn 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.floating-cart-btn:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 15px 30px rgba(245, 184, 207, 0.8);
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--brand-blue);
    color: white;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.8rem;
    font-weight: 700;
    border: 2px solid white;
    transition: transform 0.3s ease;
}

.cart-badge.pop {
    animation: pop 0.3s ease;
}

/* Cart Overlay & Drawer */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

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

.cart-drawer {
    position: fixed;
    top: 0;
    right: -450px;
    width: 100%;
    max-width: 450px;
    height: 100vh;
    background: white;
    z-index: 1001;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    transition: right 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

.cart-header {
    padding: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.cart-header h3 {
    font-size: 1.8rem;
    margin: 0;
}

.cart-close {
    background: var(--vanilla-white);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    color: var(--soft-gray);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    justify-content: center;
    align-items: center;
}

.cart-close:hover {
    background: var(--pastel-pink);
    color: white;
    transform: rotate(90deg);
}

/* Cart Items */
.cart-items {
    flex-grow: 1;
    overflow-y: auto;
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.empty-cart-message {
    text-align: center;
    margin: auto 0;
    color: var(--soft-gray);
    display: none;
}

.empty-cart-message.active {
    display: block;
}

.empty-cart-message i {
    font-size: 4rem;
    color: var(--pastel-blue);
    margin-bottom: 20px;
}

.empty-cart-message p {
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.cart-item {
    background: var(--vanilla-white);
    border-radius: var(--radius-md);
    padding: 15px;
    display: flex;
    gap: 15px;
    position: relative;
    animation: slideInRight 0.4s ease forwards;
}

.cart-item-img {
    width: 70px;
    height: 70px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

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

.cart-item-title {
    font-weight: 700;
    font-family: var(--font-subheading);
    color: var(--brand-blue);
    font-size: 1.1rem;
    margin-bottom: 2px;
}

.cart-item-flavors {
    font-size: 0.8rem;
    color: var(--soft-gray);
    margin-bottom: 8px;
    line-height: 1.3;
}

.cart-item-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-item-price {
    font-weight: 700;
    color: var(--pastel-pink);
}

.quantity-controls {
    display: flex;
    align-items: center;
    background: white;
    border-radius: var(--radius-pill);
    padding: 2px 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.qty-btn {
    background: none;
    border: none;
    width: 24px;
    height: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    color: var(--brand-blue);
    font-size: 1rem;
    transition: var(--transition);
}

.qty-btn:hover {
    color: var(--pastel-pink);
}

.qty-val {
    font-weight: 700;
    width: 20px;
    text-align: center;
    font-size: 0.9rem;
}

.remove-item {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: #ff6b6b;
    cursor: pointer;
    font-size: 1.1rem;
    transition: var(--transition);
}

.remove-item:hover {
    transform: scale(1.2);
}

/* Cart Footer & Checkout Form */
.cart-footer {
    background: white;
    padding: 25px;
    border-top: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 -10px 20px rgba(0,0,0,0.02);
}

.cart-subtotal {
    display: flex;
    justify-content: space-between;
    color: var(--soft-gray);
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.checkout-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.form-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.95rem;
    background: var(--vanilla-white);
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--pastel-pink);
    background: white;
    box-shadow: 0 0 0 3px rgba(245, 184, 207, 0.2);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--brand-blue);
    font-family: var(--font-heading);
    margin-bottom: 20px;
}

.btn-whatsapp-cart {
    width: 100%;
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: white;
    border: none;
    padding: 16px;
    border-radius: var(--radius-pill);
    font-size: 1.1rem;
    font-weight: 700;
    font-family: var(--font-subheading);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp-cart:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(37, 211, 102, 0.5);
}

/* Flavor Selection Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

.flavor-modal {
    background: white;
    width: 90%;
    max-width: 600px;
    border-radius: var(--radius-lg);
    padding: 30px;
    position: relative;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    transform: translateY(30px);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.modal-overlay.active .flavor-modal {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--vanilla-white);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--soft-gray);
}

.modal-close:hover {
    background: var(--pastel-pink);
    color: white;
}

.flavor-modal h3 {
    font-size: 1.8rem;
    margin-bottom: 5px;
    padding-right: 40px;
}

.flavor-modal p {
    color: var(--soft-gray);
    margin-bottom: 20px;
}

.flavor-selector-container {
    overflow-y: auto;
    flex-grow: 1;
    padding-right: 10px;
}

/* Custom Scrollbar for container */
.flavor-selector-container::-webkit-scrollbar {
    width: 6px;
}
.flavor-selector-container::-webkit-scrollbar-track {
    background: var(--vanilla-white);
    border-radius: 10px;
}
.flavor-selector-container::-webkit-scrollbar-thumb {
    background: #d1d1d1;
    border-radius: 10px;
}

.flavor-category-title {
    font-family: var(--font-subheading);
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--brand-blue);
    margin: 15px 0 10px;
    padding-bottom: 5px;
    border-bottom: 2px dashed rgba(0,0,0,0.05);
}

.flavor-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.flavor-chip {
    padding: 8px 16px;
    background: var(--vanilla-white);
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
}

.flavor-chip:hover {
    background: #fff;
    border-color: var(--pastel-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.flavor-chip.selected {
    background: var(--brand-blue);
    color: white;
    border-color: var(--brand-blue);
    box-shadow: 0 4px 10px rgba(74, 111, 180, 0.3);
}

.modal-footer {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.flavors-count {
    font-weight: 600;
    color: var(--soft-gray);
}

.flavors-count span {
    color: var(--pastel-pink);
    font-size: 1.2rem;
}

/* Animations */
@keyframes pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

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

@keyframes bounceIn {
    0% { opacity: 0; transform: scale(0.3); }
    50% { opacity: 1; transform: scale(1.05); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); }
}

/* Mobile Adjustments */
@media (max-width: 480px) {
    .floating-cart-btn {
        bottom: 20px;
        right: 20px;
        width: 60px;
        height: 60px;
    }
    
    .cart-drawer {
        width: 100%;
        max-width: 100%;
        right: -100%;
    }
    
    .flavor-modal {
        width: 95%;
        padding: 20px;
    }
    
    .modal-footer {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
        text-align: center;
    }
}
