/* ============================================================
   ALPHABET CORPORATION – COMPREHENSIVE MOBILE RESPONSIVENESS
   Covers: All pages, all sections, breakpoints 992/768/480px
   ============================================================ */

* { box-sizing: border-box; }
html, body { overflow-x: hidden; max-width: 100%; }
img { max-width: 100%; height: auto; }

/* ── TABLET  (≤ 992px) ──────────────────────────────────────── */
@media (max-width: 992px) {
    .hero-title  { font-size: 36px; }
    .hero-subtitle { font-size: 17px; }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .footer-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 24px !important;
    }
}

/* ── MOBILE  (≤ 768px) ──────────────────────────────────────── */
@media (max-width: 768px) {

    /* Container */
    .container { padding: 0 16px; }

    /* Utility topbar */
    .utility-topbar {
        padding: 6px 0 !important;
    }
    .utility-topbar .container {
        flex-direction: column !important;
        gap: 5px !important;
        text-align: center !important;
        font-size: 11.5px !important;
        padding: 4px 14px !important;
    }
    .topbar-meta {
        display: none !important;
    }
    .topbar-actions {
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 5px !important;
    }
    .topbar-contact-group {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 6px !important;
        font-size: 11.5px !important;
        flex-wrap: nowrap !important;
        white-space: nowrap !important;
    }
    .topbar-email {
        white-space: nowrap !important;
    }
    .topbar-phone {
        white-space: nowrap !important;
        font-weight: 700 !important;
    }
    .topbar-socials {
        border-left: none !important;
        padding-left: 0 !important;
        gap: 14px !important;
        justify-content: center !important;
    }
    .topbar-social-icon svg {
        width: 14px !important;
        height: 14px !important;
    }

    /* Header */
    .mirai-header { padding: 12px 0; }
    .mirai-logo img { height: 36px; }
    .mobile-toggle { display: flex !important; }
    .desktop-only  { display: none  !important; }
    .mobile-only   { display: block !important; }

    .mirai-nav {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        padding: 16px 20px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.12);
        border-top: 1px solid #e2e8f0;
        z-index: 200;
        gap: 0;
    }
    .mirai-nav.active { display: flex; }
    .mirai-nav a {
        padding: 12px 0;
        border-bottom: 1px solid #f1f5f9;
        font-size: 15px;
    }
    .mirai-nav a:last-child { border-bottom: none; }
    .btn-rfq.mobile-only {
        display: block !important;
        margin-top: 12px;
        text-align: center;
    }

    /* Hero */
    .hero-section { padding: 48px 0 40px; }
    .hero-grid {
        grid-template-columns: 1fr !important;
        gap: 32px;
    }
    .hero-content { text-align: center; }
    .hero-title { font-size: 28px; line-height: 1.3; }
    .hero-subtitle { font-size: 15px; margin-bottom: 20px; }
    .hero-trust-pills { justify-content: center; }
    .hero-buttons {
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }
    .hero-buttons .btn-primary,
    .hero-buttons .btn-secondary {
        width: 100%;
        text-align: center;
        padding: 14px 20px;
        font-size: 14px;
    }

    /* Hero slider */
    .hero-showcase { height: 340px !important; }
    .slide-media   { height: 240px !important; }
    .slide-footer  {
        height: auto !important;
        min-height: 100px;
        padding: 10px 14px 18px !important;
        gap: 10px;
        flex-wrap: wrap;
    }
    .slide-title       { font-size: 15px !important; white-space: normal !important; }
    .slide-desc        { font-size: 12px !important; }
    .slide-action-btn  { padding: 8px 12px !important; font-size: 12px !important; }
    .slider-arrow      { top: 120px !important; width: 34px !important; height: 34px !important; }

    /* Stats */
    .stats-section { padding: 28px 0; }
    .stats-grid    { grid-template-columns: repeat(2, 1fr) !important; gap: 14px; }
    .stat-item h3  { font-size: 28px; }

    /* Products */
    .products-section { padding: 48px 0; }
    .section-title    { font-size: 26px; }
    .products-grid    { grid-template-columns: 1fr !important; gap: 20px; }
    .product-card-img-wrapper { height: 200px !important; }

    /* Category tabs – horizontal scroll strip */
    .category-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 8px;
        gap: 8px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .category-tabs::-webkit-scrollbar { display: none; }
    .cat-tab { white-space: nowrap; flex-shrink: 0; }

    /* Category quick pills */
    .category-quick-pills { gap: 6px; }
    .cat-quick-chip { font-size: 12px; padding: 6px 10px; }

    /* Corporate overview inline grid (index.php) */
    .about-overview-section { padding: 40px 0 !important; }
    [style*="grid-template-columns: 1.15fr 0.85fr"] {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
    }

    /* All inline 2-column form grids */
    [style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    /* Inquiry / form card padding */
    #inquiry { padding: 24px 18px !important; }
    .contact-section .container > div[style*="padding: 40px"] {
        padding: 24px 18px !important;
    }

    /* Clients marquee */
    .clients-section  { padding: 32px 0 40px; }
    .clients-title    { font-size: 22px; }
    .clients-sub      { font-size: 14px; }
    .clients-marquee-container::before,
    .clients-marquee-container::after { width: 40px; }
    .client-logo-card { min-width: 130px; height: 60px; padding: 10px 16px; }
    .client-logo-card img { max-height: 30px; max-width: 100px; }

    /* Footer */
    .mirai-footer { padding: 40px 0 16px; }
    .footer-grid  { grid-template-columns: 1fr !important; gap: 28px !important; }
    .footer-certifications { flex-wrap: wrap; }
    .footer-bottom p { font-size: 12px; line-height: 1.7; }

    /* Floating buttons */
    #aiChatWindow {
        width: calc(100vw - 24px) !important;
        right: 12px !important;
        bottom: 140px !important;
        max-height: calc(100vh - 160px) !important;
    }

    /* About page */
    .about-content { padding: 36px 0 !important; }
    .about-content [style*="padding: 40px"] { padding: 24px 18px !important; }

    /* About CTA flex → column */
    .about-content [style*="display: flex"][style*="gap: 15px"] {
        flex-direction: column !important;
        gap: 12px !important;
    }
    .about-content [style*="display: flex"][style*="gap: 15px"] a {
        width: 100% !important;
        text-align: center !important;
        justify-content: center !important;
    }

    /* Contact page – info cards grid */
    .contact-section [style*="grid-template-columns: repeat(auto-fit"] {
        grid-template-columns: 1fr !important;
    }

    /* Section heading sizes */
    .section-title-editorial { font-size: 1.75rem; }

    /* Packaging / shop pages */
    [class*="packaging"] [style*="grid-template-columns"],
    [class*="shop"] [style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }
}

/* ── SMALL MOBILE  (≤ 480px) ────────────────────────────────── */
@media (max-width: 480px) {

    .container { padding: 0 12px; }

    /* Hero */
    .hero-section { padding: 32px 0 28px; }
    .hero-title   { font-size: 22px !important; }

    /* Showcase */
    .hero-showcase { height: 290px !important; }
    .slide-media   { height: 200px !important; }

    /* Stats tighter */
    .stat-item    { padding: 14px; }
    .stat-item h3 { font-size: 24px; }
    .stat-item p  { font-size: 13px; }

    /* Buttons full-width */
    .btn-primary,
    .btn-secondary { width: 100%; text-align: center; }

    /* Category chips */
    .cat-quick-chip { font-size: 11px; padding: 5px 8px; }

    /* Prevent iOS zoom on input focus */
    input, select, textarea { font-size: 16px !important; }

    /* Footer smaller text */
    .footer-bottom p { font-size: 11px; }

    /* AI chat window */
    #aiChatWindow {
        width: calc(100vw - 16px) !important;
        right: 8px !important;
        bottom: 130px !important;
    }

    /* Contact form card */
    #inquiry { padding: 18px 14px !important; border-radius: 8px !important; }

    /* About card */
    .about-content [style*="padding: 24px 18px"] { padding: 16px 12px !important; }

    /* Topbar – hide address on very small screens */
    .utility-topbar .container > div:first-child { display: none; }

    /* Hero buttons stack */
    .hero-buttons .btn-primary,
    .hero-buttons .btn-secondary {
        font-size: 13px;
        padding: 13px 16px;
    }

    /* Master Catalogue Download Mobile Optimization */
    .master-catalog-download-section {
        padding: 40px 0 !important;
    }
    .catalog-dl-title {
        font-size: 24px !important;
        line-height: 1.25 !important;
    }
    .catalog-dl-subtitle {
        font-size: 13.5px !important;
        line-height: 1.55 !important;
        margin-bottom: 20px !important;
    }
    .catalog-dl-actions {
        width: 100% !important;
    }
    .catalog-dl-btn {
        width: 100% !important;
        justify-content: center !important;
        padding: 12px 16px !important;
        font-size: 14px !important;
    }
    .catalog-dl-ticks {
        flex-direction: column !important;
        gap: 8px !important;
        align-items: center !important;
        font-size: 12px !important;
    }
    .catalog-dl-card {
        max-width: 280px !important;
        padding: 20px 16px !important;
        margin: 0 auto !important;
    }
}
