/* ==========================================================================
   Master Mart - Responsive & Mobile-First Overrides
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. MOBILE STICKY BOTTOM BAR
   -------------------------------------------------------------------------- */
.mm-mobile-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #FFFFFF;
    border-top: 1.5px solid var(--mm-border);
    padding: 10px 16px;
    display: flex;
    gap: 12px;
    z-index: 1000;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
}

@media (min-width: 769px) {
    .mm-mobile-bar {
        display: none;
    }
}

.mm-mob-call {
    background: #FFF7ED;
    border: 1.5px solid #FFEDD5;
    color: var(--mm-orange);
    width: 52px;
    height: 50px;
    border-radius: var(--mm-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.mm-mob-call:hover {
    background: var(--mm-orange);
    color: #FFFFFF;
}

.mm-mob-order {
    flex: 1;
    background: linear-gradient(135deg, #FF6500 0%, #E05A00 100%);
    color: #FFFFFF !important;
    font-weight: 900;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--mm-radius-sm);
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(255, 101, 0, 0.4);
    transition: all 0.2s ease;
}

.mm-mob-order:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(255, 101, 0, 0.5);
}

/* --------------------------------------------------------------------------
   2. TABLET OVERRIDES (max-width: 1024px)
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
    .mm-features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .mm-benefits-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* --------------------------------------------------------------------------
   3. MOBILE OVERRIDES (max-width: 768px)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    html, body {
        overflow-x: hidden !important;
        width: 100%;
        max-width: 100vw;
    }

    body {
        padding-bottom: 78px; /* Clearance for sticky bottom bar */
    }

    /* Prevent iOS Safari auto-zoom on input focus */
    input[type="text"],
    input[type="tel"],
    input[type="number"],
    input[type="email"],
    select,
    textarea {
        font-size: 16px !important;
    }

    .mm-hero {
        padding: 24px 0 36px;
    }

    .mm-hero-grid {
        grid-template-columns: 1fr;
        gap: 28px;
        text-align: center;
    }

    .mm-badge {
        margin: 0 auto 16px;
        font-size: 13px;
        padding: 6px 14px;
    }

    .mm-hero-title {
        font-size: clamp(22px, 6vw, 28px);
        line-height: 1.3;
    }

    .mm-hero-lead {
        font-size: 14.5px;
    }

    .mm-hero-pills {
        justify-content: center;
        gap: 8px;
    }

    .mm-hero-pill {
        font-size: 13px;
        padding: 6px 12px;
    }

    .mm-hero-price-wrap {
        margin: 0 auto 20px;
        justify-content: center;
    }

    .mm-btn-cta {
        width: 100%;
        padding: 16px 20px;
        font-size: 17px;
        min-height: 52px;
    }

    .mm-hero-media {
        order: -1; /* Display bike image prominently first on mobile */
    }

    .mm-hero-img-wrap {
        max-width: 320px;
        margin: 0 auto;
    }

    .mm-checkout-card {
        border-radius: 14px;
        margin: 0 4px;
    }

    .mm-checkout-header {
        padding: 20px 16px;
    }

    .mm-form-grid {
        grid-template-columns: 1fr;
        padding: 20px 14px;
        gap: 22px;
    }

    .mm-form-left,
    .mm-form-right {
        width: 100%;
    }

    /* 2-Column Form Row (Name & Phone side-by-side like modern mobile app) */
    .mm-form-row-2col {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin-bottom: 14px;
    }

    /* 2-Column Delivery Zone Selector (side-by-side app selector cards) */
    .mm-zone-selector {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
        margin-bottom: 16px;
    }

    .mm-zone-option {
        min-height: auto !important;
        padding: 10px 8px !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        justify-content: space-between !important;
        gap: 6px !important;
        border-radius: 10px !important;
    }

    .mm-zone-left {
        display: flex;
        align-items: center;
        gap: 6px;
        width: 100%;
    }

    .mm-zone-option input[type="radio"] {
        width: 16px;
        height: 16px;
        margin: 0;
    }

    .mm-zone-name {
        font-size: 13px !important;
        font-weight: 800 !important;
        line-height: 1.2;
    }

    .mm-zone-time {
        font-size: 10px !important;
        line-height: 1.2;
        display: block;
    }

    .mm-zone-badge {
        align-self: flex-end;
        font-size: 11.5px !important;
        padding: 2px 7px !important;
    }

    /* 2-Column Mobile App Features Grid */
    .mm-features-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }

    .mm-feature-card {
        padding: 14px 10px !important;
        border-radius: 12px !important;
        text-align: center;
    }

    .mm-feature-icon {
        width: 40px !important;
        height: 40px !important;
        font-size: 19px !important;
        margin: 0 auto 8px !important;
    }

    .mm-feature-card h3 {
        font-size: 13.5px !important;
        margin-bottom: 4px !important;
    }

    .mm-feature-card p {
        font-size: 11.5px !important;
        line-height: 1.4 !important;
    }

    /* 2-Column Mobile App Benefits Grid */
    .mm-benefits-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }

    .mm-benefit-card {
        padding: 12px 10px !important;
        border-radius: 10px !important;
    }

    .mm-benefit-card h4 {
        font-size: 13px !important;
    }

    .mm-benefit-card p {
        font-size: 11px !important;
    }

    .mm-summary-box {
        padding: 18px 14px;
    }

    .mm-qty-wrap {
        padding: 10px 12px;
    }

    .mm-trust-pills {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 6px;
    }

    .mm-trust-pill {
        font-size: 11px;
        padding: 6px 2px;
    }

    .mm-submit-btn {
        min-height: 54px !important;
        font-size: 16.5px !important;
        padding: 14px 16px !important;
    }

    .mm-toast {
        bottom: 84px;
        left: 10px;
        right: 10px;
        max-width: calc(100% - 20px);
        font-size: 12.5px;
        padding: 10px 14px;
    }

    .mm-floating-wa {
        bottom: 84px;
        right: 14px;
        width: 48px;
        height: 48px;
    }
}

/* --------------------------------------------------------------------------
   4. SMALL MOBILE (max-width: 480px)
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
    /* Keep 2-column mobile app layout even on smallest screens */
    .mm-features-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }

    .mm-benefits-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }

    .mm-form-row-2col {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .mm-zone-selector {
        grid-template-columns: 1fr 1fr !important;
        gap: 6px !important;
    }

    .mm-zone-option {
        padding: 8px 6px !important;
    }

    .mm-zone-name {
        font-size: 12px !important;
    }

    .mm-urgency-bar {
        font-size: 12.5px;
        padding: 7px 8px;
    }

    .mm-logo-img {
        height: 40px;
    }

    .mm-faq-question {
        padding: 14px 16px;
        font-size: 15px;
    }

    .mm-faq-answer {
        padding: 0 16px 14px;
        font-size: 14px;
    }
}

