﻿/* ============================================
   RESPONSIVE HEADER FIXES - ONLY BELOW 1617px
   ============================================ */

/* Không can thiệp vào layout desktop >= 1617px */

/* Responsive breakpoints - chỉ áp dụng dưới 1617px */
@media (max-width: 1616px) {
    /* Reset min-width */
    body {
        min-width: 100% !important;
    }

    .container {
        max-width: 100%;
        min-width: auto;
        padding: 0 15px;
    }
}

/* Medium screens: 1400px - 1616px */
@media (max-width: 1616px) and (min-width: 1400px) {
    /* Giảm khoảng cách giữa các items */
    .global-header-bottom-group {
        padding: 10px 0;
    }

    .header-left-group {
        width: 170px;
        margin-right: 20px;
    }

    .header-middle-group {
        width: calc(100% - 540px);
        margin-right: 20px;
    }

    .header-right-group {
        width: 330px;
    }

    /* Search box nhỏ hơn */
    .header-search-group .text-search {
        width: calc(100% - 162px);
    }

    /* Static group giảm font */
    .header-static-group a {
        font-size: 13px;
        padding: 6px 10px;
    }

    .header-static-group .icons {
        width: 20px;
        height: 20px;
    }
}

/* Smaller screens: 1200px - 1399px */
@media (max-width: 1399px) and (min-width: 1200px) {
    .header-left-group {
        width: 150px;
        margin-right: 15px;
    }

    .header-logo img {
        max-width: 140px;
    }

    .header-middle-group {
        width: calc(100% - 480px);
        margin-right: 15px;
    }

    .header-right-group {
        width: 300px;
    }

    .header-search-group .header-search-option-group {
        width: 100px;
        padding: 0 12px;
    }

    .header-search-group .text-search {
        width: calc(100% - 152px);
    }

    .header-static-group {
        flex-wrap: wrap;
        gap: 6px;
    }

        .header-static-group a {
            font-size: 12px;
            padding: 5px 8px;
        }

    .header-hotline-group .item {
        margin-right: 10px;
        padding-right: 10px;
    }

    .header-hotline-group .text {
        font-size: 13px;
    }
}

/* Tablet: 992px - 1199px */
@media (max-width: 1199px) and (min-width: 992px) {
    /* Stack header items */
    .global-header-bottom-group .container {
        flex-direction: column;
        gap: 12px;
    }

    .header-left-group,
    .header-middle-group,
    .header-right-group {
        width: 100%;
        margin: 0;
    }

    .header-left-group {
        text-align: center;
    }

    .header-search-group .text-search {
        width: calc(100% - 162px);
    }

    /* Menu full width */
    .header-menu-group,
    .header-buildpc {
        width: 100%;
        margin: 4px 0;
    }

    .header-buildpc {
        margin-top: 8px;
    }

    /* Hotline group center */
    .header-hotline-group {
        justify-content: center;
    }

    /* Static group 2 rows */
    .header-static-group {
        justify-content: center;
    }
}

/* Small tablet: 768px - 991px */
@media (max-width: 991px) and (min-width: 768px) {
    /* Hide static group */
    .header-static-group {
        display: none;
    }

    /* Simplify hotline */
    .header-hotline-group {
        flex-wrap: wrap;
        gap: 8px;
    }

        .header-hotline-group .item {
            border: none;
            margin: 0;
            padding: 4px 8px;
        }

    /* Search full width */
    .header-search-group .text-search {
        width: calc(100% - 122px);
    }

    .header-search-group .header-search-option-group {
        width: 80px;
        font-size: 13px;
    }
}

/* Mobile: < 768px */
@media (max-width: 767px) {
    /* Hide desktop elements */
    .header-static-group,
    .showroom-pc {
        display: none !important;
    }

    /* Show mobile elements */
    .showroom-mobile {
        display: block !important;
    }

    /* Header simplified */
    .global-header-top {
        display: none; /* Ẩn top bar trên mobile */
    }

    .header-logo img {
        max-width: 120px;
    }

    /* Search vertical */
    .header-search-group form {
        flex-direction: column;
        gap: 8px;
    }

    .header-search-group .header-search-option-group {
        width: 100%;
        border: none;
        border-bottom: 1px solid #cacaca;
        padding: 8px 0;
        margin: 0;
    }

    .header-search-group .text-search {
        width: 100%;
    }

    .header-search-group .btn-search {
        position: relative;
        width: 100%;
        border-radius: 500px;
    }

    /* Hotline compact */
    .header-hotline-group {
        flex-direction: column;
        gap: 8px;
    }

        .header-hotline-group .item {
            width: 100%;
            border: none;
            text-align: center;
            padding: 8px;
        }
}

/* Very small mobile: < 576px */
@media (max-width: 575px) {
    .container {
        padding: 0 10px;
    }

    .header-logo {
        text-align: center;
    }

        .header-logo img {
            max-width: 100px;
        }

    /* Contact box bottom responsive */
    .contact-box-bottom {
        flex-direction: row;
        justify-content: space-around;
        padding: 6px;
        width: 100%;
        bottom: 0;
    }

    .contact-box-wrapper {
        flex-direction: column;
        font-size: 9px;
    }

    .contact-icon-box {
        width: 28px !important;
        height: 28px !important;
    }

    .contact-info {
        display: none;
    }
}

/* Fix header block height động */
@media (max-width: 1199px) {
    .global-header-block {
        height: auto !important;
        min-height: 220px;
    }
}

@media (max-width: 767px) {
    .global-header-block {
        min-height: 280px;
    }
}

/* Fix footer responsive */
@media (max-width: 991px) {
    .footer-middle {
        flex-direction: column;
    }

    .footer-social,
    .footer-links {
        width: 100%;
        margin-bottom: 20px;
    }
}

@media (max-width: 767px) {
    .footer-top .container {
        flex-direction: column;
    }

    .footer-rating,
    .footer-gallery {
        width: 100% !important;
        margin-bottom: 20px;
    }
}
