/* ==========================================
   FLUID RESPONSIVE SYSTEM
   ========================================== */

/* Large screens and laptops (min-width: 1200px) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px !important;
    }
}

/* Medium screens and tablets (max-width: 992px) */
@media (max-width: 992px) {
    .section-title {
        font-size: 2.4rem !important;
        margin-bottom: 35px !important;
    }
    
    .menu-card-img {
        height: 220px !important;
    }

    .checkout-hero h1 {
        font-size: 2.8rem !important;
    }

    .checkout-form-card, 
    .order-summary-box, 
    .payment-box,
    .success-card,
    .summary-card {
        padding: 1.8rem !important;
        border-radius: 16px !important;
    }

    .address-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    
    /* Ensure elements stack cleanly on tablets */
    .sticky-sidebar {
        position: static !important;
        margin-top: 2rem;
    }
}

/* Mobile Devices and Small Tablets (max-width: 768px) */
@media (max-width: 768px) {
    body {
        font-size: 0.92rem !important;
    }

    .container {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    .section-title {
        font-size: 1.8rem !important;
        margin-bottom: 25px !important;
    }

    .menu-card-body {
        padding: 20px !important;
    }
    
    .menu-title {
        font-size: 1.35rem !important;
    }

    /* Floating Cart Optimization */
    .floating-cart-box {
        right: 12px !important;
        bottom: 12px !important;
        width: calc(100% - 24px) !important;
        padding: 14px 18px !important;
        border-radius: 12px !important;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8) !important;
    }

    .floating-cart-total {
        font-size: 1.25rem !important;
        margin-bottom: 12px !important;
    }

    /* Checkout & Hero section scaling */
    .checkout-hero {
        padding: 5rem 0 3.5rem 0 !important;
        margin-bottom: 2rem !important;
    }

    .checkout-hero h1 {
        font-size: 2.1rem !important;
    }

    .checkout-hero p {
        font-size: 0.8rem !important;
        letter-spacing: 2px !important;
    }

    .checkout-section-title {
        font-size: 1.45rem !important;
        margin-bottom: 1.2rem !important;
    }

    .checkout-form-card, 
    .order-summary-box, 
    .payment-box,
    .success-card,
    .summary-card {
        padding: 1.25rem !important;
        border-radius: 12px !important;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25) !important;
    }

    /* Touch Friendly Target Sizes */
    .form-control-checkout,
    .input-field {
        min-height: 44px !important;
        padding: 0.75rem 1rem !important;
        font-size: 0.92rem !important;
    }

    .btn-premium, 
    .btn-checkout, 
    .btn-submit, 
    .btn-place-order, 
    .btn-success-action, 
    .btn-secondary-action {
        min-height: 46px !important;
        padding: 12px 20px !important;
        font-size: 0.92rem !important;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
    }

    /* Table/Cart Item list stacking */
    .cart-img {
        width: 60px !important;
        height: 60px !important;
        border-radius: 8px !important;
    }

    .cart-item-name {
        font-size: 0.95rem !important;
    }

    .table > :not(caption) > * > * {
        padding: 1rem 0.5rem !important;
    }

    /* Success Screen */
    .success-title {
        font-size: 1.85rem !important;
    }

    .success-card {
        padding: 1.5rem 1rem !important;
        width: 100% !important;
    }

    .invoice-box {
        padding: 1.1rem !important;
        margin-bottom: 1.8rem !important;
    }

    .invoice-header {
        flex-direction: column !important;
        text-align: left !important;
        gap: 12px !important;
    }

    .invoice-header .text-end {
        text-align: left !important;
    }
    
    .invoice-table th, .invoice-table td {
        font-size: 0.85rem !important;
    }

    .btn-group-success {
        flex-direction: column !important;
        gap: 12px !important;
    }
    
    .btn-group-success a, 
    .btn-group-success button {
        width: 100% !important;
        justify-content: center !important;
    }

    /* Brand Login Portals */
    .login-container {
        padding: 30px 20px !important;
        max-width: 92% !important;
        margin: 0 auto !important;
    }
    
    .brand-logo-img {
        width: 80px !important;
        height: 80px !important;
    }

    .form-options {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 15px !important;
    }
}

/* Very Small Mobile Screens (max-width: 480px) */
@media (max-width: 480px) {
    .checkout-hero h1 {
        font-size: 1.7rem !important;
    }

    .success-title {
        font-size: 1.6rem !important;
    }

    .floating-cart-box {
        width: calc(100% - 16px) !important;
        right: 8px !important;
        bottom: 8px !important;
        padding: 10px 14px !important;
    }

    .floating-cart-total {
        font-size: 1.15rem !important;
        margin-bottom: 8px !important;
    }

    .floating-cart-btn {
        padding: 8px !important;
        font-size: 0.88rem !important;
    }
}
