/* =========================================
   MOBILE (รวม 2 อัน)
   - base: max-width 600px
   - special: 400-500w & 800-950h (override เฉพาะที่ต่าง)
========================================= */
@media screen and (max-width: 600px) {

    /* Fix layout squeezing */
    .container {
        margin: 0 auto;
        padding: 0 15px;
        width: 100%;
        overflow-x: clip;
    }

    header {
        flex-direction: column;
        padding: 20px 0px;
        gap: 15px;
    }

    /* Nav adjustments */
    nav {
        margin: 0;
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }

    nav a {
        font-size: 13px;
    }

    /* Hero adjustments */
    .hero {
        flex-direction: column !important;
        padding: 40px 20px;
        margin-bottom: 30px;
        text-align: center;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero h1 {
        font-size: 40px !important;
        letter-spacing: -1px;
    }

    .hero p {
        font-size: 15px;
        margin-bottom: 35px;
        color: #444;
        max-width: 85%;
        margin-left: 30px;
    }

    .hero h2 {
        font-size: 18px !important;
    }

    .img-hero-kiosk {
        position: relative !important;
        width: 100% !important;
        max-width: 300px;
        right: 0 !important;
        bottom: 0 !important;
        margin-top: 30px;
        display: block;
        margin-left: auto;
        margin-right: auto;
    }

    /* Huge Custom Fonts */
    .product-title-display {
        margin-top: 20px;
    }

    .product-title .sigage-small,
    .product-title-display .display-small,
    .product-title-display h2 {
        font-size: 28px;
    }

    .product-title .sigage-big,
    .product-title-display .display-big {
        font-size: 36px;
        line-height: 1.1;
    }

    /* Product Sections adjustments */
    .product-section {
        flex-direction: column !important;
        padding: 40px 20px;
        text-align: center;
        gap: 30px;
    }

    /* Image position overrides */
    .product-image-display img,
    .product-image-dark img,
    .product-img-red {
        position: relative !important;
        top: 0 !important;
        left: 0 !important;
        transform: none !important;
        width: 100% !important;
        max-width: 320px;
        margin: 20px auto;
        display: block;
    }

    .product-image-display,
    .product-image-dark,
    .product-image {
        min-height: auto;
        width: 100%;
    }

    /* Section spacing */
    .section-dark {
        margin-top: 40px;
    }

    /* Banner Card fixes */
    .banner-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    /* Section spacing */
    .section-dark {
        margin-top: 40px;
    }

    /* Banner Card fixes */
    .banner-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .banner-card.bg-red {
        padding: 30px 20px;
        justify-content: center;
    }

    .banner-img-red,
    .banner-img-yellow,
    .banner-img-dark {
        position: relative;
        height: 150px;
        left: 0;
        bottom: 0;
        margin: 10px auto;
        display: block;
    }


    .banner-content {
        align-items: center !important;
        width: 100%;
    }

    .banner-content h3 {
        margin-top: 0;
        align-self: center;
    }

    .banner-img-red,
    .banner-img-yellow,
    .banner-img-dark {
        position: relative !important;
        height: 130px !important;
        left: 0 !important;
        bottom: 0 !important;
        margin: 20px auto 0 !important;
        display: block;
        filter: none !important;
    }

    /* Benefits Section */
    .benefits {
        flex-direction: column;
        align-items: center;
        gap: 25px;
    }

    .benefit-item {
        width: 100%;
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }

    /* Footer Adjustments */
    .footer-banner {
        margin-top: 60px;
        padding: 25px 20px;
    }

    .qr-container {
        width: 100px;
        height: 100px;
    }

    .contact-info h3 {
        font-size: 20px;
        white-space: normal;
    }

    .contact-info p,
    .address-block p {
        white-space: normal;
    }

    /* Responsive Buttons */
    .btn-kiosk,
    .btn-red,
    .btn-yellow,
    .btn-black,
    .btn-signage,
    .btn-display,
    .btn-smart-tv {
        width: 100% !important;
        text-align: center !important;
        justify-content: center !important;
        align-self: center !important;
        padding: 12px 20px;
        font-size: 16px;
        margin-top: 20px;
    }

    .contact-methods {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }



    /* =========================================
     SPECIAL OVERRIDES (เดิม: 400-500w & 800-950h)
     override เฉพาะค่าที่ "ต่าง" จาก base
  ========================================= */
    @media screen and (min-width: 400px) and (max-width: 500px) and (min-height: 800px) and (max-height: 950px) {

        header {
            padding: 20px 15px;
        }

        /* ตามของเดิม: h1/h2 เล็กลงนิดนึง */
        .hero h1 {
            font-size: 38px !important;
            letter-spacing: -1px;
        }

        .hero h2 {
            font-size: 16px !important;
        }

        /* ตามของเดิม: รูป kiosk ไม่ล็อก max-width 300 */
        .img-hero-kiosk {
            max-width: none;
            margin-top: 20px;
        }

        /* ตามของเดิม: รูปสินค้าไม่มี max-width 320 + margin คนละแบบ */
        .product-image-display img,
        .product-image-dark img,
        .product-img-red {
            max-width: none;
            margin: 15px 0 0 0;
        }

        /* ตามของเดิม: banner img สูง 150 */
        .banner-img-red,
        .banner-img-yellow,
        .banner-img-dark {
            height: 150px !important;
        }

        /* ตามของเดิม: benefits ชิดซ้าย */
        .benefits {
            align-items: flex-start;
        }

        .benefit-item {
            text-align: left;
        }
    }
}

/* =========================================
   IPAD PORTRAIT & TABLETS: up to 1024px
*/
@media screen and (max-width: 1024px) {

    .banner-card.bg-yellow,
    .banner-card.bg-dark {
        padding: 15px;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 12px;
    }
}