/* Desktop view - keep original layout */
@media (min-width: 769px) {
    .main-content {
        flex-direction: row !important;
        gap: 20px !important;
    }
    
    .mobile-row-1, .mobile-row-2, .mobile-row-3 {
        display: contents !important;
    }
    
    .mobile-row-3 {
        margin-top: 0px !important;
    }
}

/* Mobile responsive for red-bar-footer */
@media (max-width: 768px) {
    body {
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .red-bar-footer {
        padding: 15px 10px !important;
        position: relative !important;
        z-index: 10 !important;
        margin-bottom: 0px !important;
        height: auto !important;
        display: flex !important;
        background-color: #dc3545 !important;
    }
    
    .main-content {
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 15px !important;
        width: 100% !important;
        margin-bottom: 0px !important;
    }
    
    /* แถวที่ 1: ฟรี!! Booster 1 กระป๋อง */
    .mobile-row-1 {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 15px !important;
        width: 100% !important;
    }
    
    /* แถวที่ 2: Booster Benzene */
    .mobile-row-2 {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 5px !important;
        width: 100% !important;
    }
    
    /* แถวที่ 3: Booster Diesel */
    .mobile-row-3 {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 10px !important;
        width: 100% !important;
        margin-top: 15px !important;
    }
    
    .section-1 {
        flex: 0 0 auto !important;
        text-align: center !important;
    }
    
    .section-1 .highlight {
        font-size: 14px !important;
    }
    
    .section-4:first-of-type {
        flex: 0 0 auto !important;
        text-align: center !important;
    }
    
    .section-4:first-of-type .highlight {
        font-size: 12px !important;
    }
    
    .section-4:first-of-type span:not(.highlight) {
        font-size: 8px !important;
    }
    
    .section-2, .section-4:not(:first-of-type) {
        flex: 0 0 auto !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .section-2 img, .section-4:not(:first-of-type) img {
        width: 50px !important;
        height: 50px !important;
    }
    
    .section-3, .section-5 {
        flex: 0 0 auto !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 1px !important;
    }
    
    .booster-button, .code-button {
        width: 30px !important;
        height: 12px !important;
        font-size: 4px !important;
        padding: 1px 2px !important;
        margin: 0px 0 !important;
    }
    
    .terms-text {
        font-size: 9px !important;
        line-height: 1.2 !important;
        margin-top: 10px !important;
        margin-bottom: 0px !important;
        text-align: center !important;
        padding: 0 5px !important;
    }
    
    /* Ensure footer doesn't overlap */
    #footerContainer {
        margin-top: 0px !important;
        margin-bottom: 0px !important;
        padding-top: 0px !important;
        padding-bottom: 0px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        min-height: 50px !important;
    }
    
    #footerContainer * {
        margin-top: 0px !important;
        margin-bottom: 0px !important;
        padding-top: 0px !important;
        text-align: center !important;
    }
}

/* iPhone 16 Pro (393px) */
@media (max-width: 393px) and (min-width: 391px) {
    .red-bar-footer {
        padding: 12px 8px !important;
        height: auto !important;
    }
    
    .main-content {
        gap: 8px !important;
    }
    
    .mobile-row-1, .mobile-row-2, .mobile-row-3 {
        gap: 8px !important;
    }
    
    .section-1 .highlight {
        font-size: 18px !important;
    }
    
    .section-4:first-of-type .highlight {
        font-size: 14px !important;
    }
    
    .section-4:first-of-type span:not(.highlight) {
        font-size: 11px !important;
    }
    
    .section-2 img, .section-4:not(:first-of-type) img {
        width: 48px !important;
        height: 48px !important;
    }
    
    .booster-button, .code-button {
        width: 38px !important;
        height: 13px !important;
        font-size: 4.5px !important;
        padding: 1px 2px !important;
    }
    
    .terms-text {
        font-size: 7.5px !important;
        line-height: 1.1 !important;
        padding: 0 3px !important;
        margin-bottom: 0px !important;
    }
}

/* iPhone 12 Pro and similar devices (390px) */
@media (max-width: 414px) {
    .red-bar-footer {
        height: auto !important;
    }
    
    .section-1 .highlight {
        font-size: 20px !important;
    }
    
    .section-4:first-of-type .highlight {
        font-size: 16px !important;
    }
    
    .section-4:first-of-type span:not(.highlight) {
        font-size: 12px !important;
    }
    
    .section-2 img, .section-4:not(:first-of-type) img {
        width: 55px !important;
        height: 55px !important;
    }
    
    .booster-button, .code-button {
        width: 40px !important;
        height: 14px !important;
        font-size: 5px !important;
        padding: 1px 2px !important;
    }
    
    .terms-text {
        font-size: 8px !important;
    }
}

/* Very small screens */
@media (max-width: 360px) {
    .red-bar-footer {
        padding: 10px 5px !important;
        height: auto !important;
    }
    
    .main-content {
        gap: 3px !important;
    }
    
    .section-1 .highlight {
        font-size: 18px !important;
    }
    
    .section-4:first-of-type .highlight {
        font-size: 14px !important;
    }
    
    .section-4:first-of-type span:not(.highlight) {
        font-size: 11px !important;
    }
    
    .section-2 img, .section-4:not(:first-of-type) img {
        width: 45px !important;
        height: 45px !important;
    }
    
    .booster-button, .code-button {
        width: 35px !important;
        height: 12px !important;
        font-size: 4px !important;
        padding: 1px 2px !important;
    }
    
    .terms-text {
        font-size: 7px !important;
    }
}