/* ==========================================================================
   SANGHAMITRA DAIRY - CART & CHECKOUT STYLES (assets/css/cart.css)
   ========================================================================== */

/* Fixes Issue #4: Floating Mobile Cart Button (Prevents Navbar Overlap) */
.floating-mobile-cart {
    display: none;
}

@media (max-width: 768px) {
    .desktop-cart-only {
        display: none !important;
    }

    .floating-mobile-cart {
        display: flex !important;
        align-items: center;
        justify-content: center;
        position: fixed;
        bottom: 24px;
        right: 18px;
        width: 56px;
        height: 56px;
        background: var(--primary, #00ADEF);
        color: #FFFFFF;
        border-radius: 50%;
        box-shadow: 0 8px 24px rgba(0, 173, 239, 0.4);
        z-index: 9999;
        font-size: 1.4rem;
        text-decoration: none;
    }

    .floating-mobile-cart .cart-badge {
        position: absolute;
        top: -2px;
        right: -2px;
        background: var(--gamosa, #BE3A34);
        color: #FFFFFF;
        font-size: 0.75rem;
        font-weight: 800;
        width: 22px;
        height: 22px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 2px solid #FFFFFF;
    }
}

/* Toast Notification Popup */
.toast-box {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: #0F172A;
    color: #FFFFFF;
    padding: 12px 22px;
    border-radius: 9999px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    z-index: 100000;
    font-size: 0.9rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    animation: toastSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}

@keyframes toastSlideUp {
    from { transform: translate(-50%, 20px); opacity: 0; }
    to { transform: translate(-50%, 0); opacity: 1; }
}

@media (max-width: 768px) {
    .toast-box {
        bottom: 90px;
    }
}

/* Fixes Issue #1: Zomato-Style Cart Items & Free Delivery Progress */
.cart-page-section {
    padding-top: 100px;
    padding-bottom: 60px;
    min-height: 85vh;
}

.cart-grid {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 24px;
    align-items: start;
}

@media (max-width: 992px) {
    .cart-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .cart-page-section {
        padding-top: 85px;
    }
}

.delivery-progress-card {
    background: #FFFFFF;
    padding: 12px 16px;
    border-radius: 14px;
    border: 1px solid #E2E8F0;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(11,37,48,0.05);
}

.delivery-progress-card:empty {
    display: none !important;
}

.delivery-progress-text {
    font-size: 0.8rem;
    font-weight: 700;
    color: #0B2530;
    margin-bottom: 6px;
    display: flex;
    justify-content: space-between;
}

.delivery-progress-bar-bg {
    width: 100%;
    height: 6px;
    background: #E2E8F0;
    border-radius: 10px;
    overflow: hidden;
}

.delivery-progress-bar-fill {
    height: 100%;
    background: #22C55E;
    transition: width 0.3s ease;
}

.zomato-cart-card {
    background: #FFFFFF;
    border-radius: 14px;
    border: 1px solid #E2E8F0;
    padding: 14px;
    margin-bottom: 12px;
    display: flex;
    gap: 12px;
    align-items: center;
}

.zomato-item-img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 10px;
    flex-shrink: 0;
}

.zomato-item-details {
    flex: 1;
    min-width: 0;
}

.zomato-item-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: #0B2530;
    margin-bottom: 2px;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.zomato-item-meta {
    font-size: 0.75rem;
    color: #526874;
    margin-bottom: 6px;
}

.zomato-stepper {
    display: inline-flex;
    align-items: center;
    background: #F0FDF4;
    border: 1px solid #22C55E;
    border-radius: 8px;
    overflow: hidden;
}

.zomato-stepper button {
    width: 28px;
    height: 28px;
    background: none;
    border: none;
    color: #15803D;
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.zomato-stepper button:hover {
    background: rgba(34, 197, 94, 0.1);
}

.zomato-stepper span {
    padding: 0 8px;
    font-size: 0.85rem;
    font-weight: 800;
    color: #15803D;
}

.zomato-bill-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: 8px;
    color: #0B2530;
}

.zomato-bill-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.05rem;
    font-weight: 800;
    border-top: 1px dashed #CBD5E1;
    padding-top: 10px;
    margin-top: 6px;
    color: #0B2530;
}

/* Fixes Issue #3: Input Validation Highlight */
.form-control.invalid {
    border-color: #BE3A34 !important;
    background-color: #FEF2F2 !important;
}