@charset "utf-8";
/* Responsive styles for HopQuaViet (Option 1: preserves desktop > 1024px) */

.kmt_mobile_nav_bar {
    display: none;
}

/* Tablet and below (<= 1024px) */
@media (max-width: 1024px) {

    html,
    body {
        min-width: 0;
        width: 100%;
        overflow-x: hidden;
        padding: 0;
    }

    #wrap_all {
        width: 100%;
        max-width: 1020px;
        display: block;
        overflow-x: hidden;
    }

    #wrap_logo_hotline_slide_socical,
    #wrap_logo_hotline_socical,
    #wrap_slide,
    #wrap_menutop,
    #wrap_content,
    #wrap_bg_footer,
    #wrap_footer,
    #wrap_copyright {
        width: 100%;
        box-sizing: border-box;
    }

    /* Proportional header + Nivo Slider on tablet */
    #wrap_logo_hotline_slide_socical {
        height: 220px;
    }

    #wrap_logo_hotline_socical {
        height: 220px;
        background-size: cover;
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
    }

    #wrap_logo_hotline {
        width: 300px;
        float: none;
        padding-top: 20px;
    }

    #wrap_logo_hotline p {
        margin-top: 12px;
    }

    #wrap_social {
        width: auto;
        float: none;
        padding-right: 12px;
    }

    #wrap_slide {
        height: 220px;
        overflow: hidden;
    }

    .theme-default .nivoSlider,
    .nivoSlider {
        width: 100% !important;
        height: auto !important;
        margin-bottom: 0;
    }

    .nivoSlider img,
    .nivo-main-image {
        width: 100% !important;
        height: auto !important;
        max-width: 100% !important;
    }

    /* Top menu on tablet */
    #wrap_menutop {
        height: auto;
        line-height: normal;
        padding: 8px 0;
    }

    .menu {
        width: 100%;
        padding-top: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .menu>ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }

    .menu>ul>li {
        float: none;
        height: auto;
        line-height: 24px;
        margin: 6px 0;
    }

    .menu a {
        padding: 0 12px;
        font-size: 14px;
    }

    /* Two-column flex content on tablet */
    #wrap_content {
        display: flex;
        align-items: flex-start;
        gap: 16px;
        padding: 10px 12px;
    }

    #wrap_content_left {
        flex: 0 0 220px;
        width: 220px;
        float: none;
        padding: 10px;
        box-sizing: border-box;
    }

    #wrap_content_right {
        flex: 1;
        min-width: 0;
        width: auto;
        float: none;
        padding: 0;
    }

    /* Fluid right-column & inner blocks */
    .block_right,
    .content_block_right,
    #wrap_intro,
    .list_news,
    .list_news li,
    #wrap_details_product,
    #info_pd,
    #warp_cart,
    .list_cart,
    .list_cart li,
    #wrap_contactpage,
    #wrap_map,
    #wrap_form_contact {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    /* Responsive product cards grid (3 cols on tablet) */
    .list_pd {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 12px;
        width: 100%;
    }

    .list_pd li {
        width: auto;
        min-height: 0;
        float: none;
        margin: 0;
        position: relative;
        display: flex;
        flex-direction: column;
        background: #fff;
        border: 1px solid #e6d5de;
        border-radius: 10px;
        padding: 8px;
        box-sizing: border-box;
    }

    .wrap_img_pd {
        position: static;
        width: 100%;
        height: auto;
        background: none;
    }

    .wrap_img_pd>div {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 145px;
        padding: 6px;
        box-sizing: border-box;
        overflow: hidden;
    }

    .wrap_img_pd>div a {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 100%;
    }

    .wrap_img_pd>div img {
        max-width: 100%;
        max-height: 100%;
        width: auto;
        height: auto;
        object-fit: contain;
        display: block;
    }

    .kmt_km {
        width: 50px;
        height: 42px;
        background-size: contain;
        top: 6px;
        right: 6px;
    }

    .wrap_content_pd {
        position: static;
        width: 100%;
        margin-top: 6px;
    }

    .wrap_content_pd h3 {
        height: auto;
        padding-right: 0;
        margin-bottom: 4px;
        text-align: right;
    }

    .wrap_content_pd h3 img {
        height: 22px;
        width: auto;
    }

    /* Home intro */
    #wrap_intro {
        display: flex;
        float: none;
        gap: 15px;
        align-items: flex-start;
    }

    #wrap_img_intro {
        flex: 0 0 220px;
        width: 220px;
        margin-right: 0;
        float: none;
    }

    #wrap_img_intro img {
        width: 100%;
        max-width: 100%;
        height: auto;
    }

    #wrap_content_intro {
        flex: 1;
        min-width: 0;
        width: auto;
        float: none;
    }

    /* News list */
    .list_news li {
        display: flex;
        gap: 12px;
        align-items: flex-start;
        padding-bottom: 12px;
        border-bottom: 1px solid #eee;
    }

    .wrap_img_news {
        flex: 0 0 110px;
        width: 110px;
        height: 90px;
        float: none;
        margin-right: 0;
    }

    .wrap_img_news img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 6px;
    }

    .wrap_content_news {
        flex: 1;
        min-width: 0;
        width: auto;
        float: none;
    }

    /* Product detail */
    #wrap_details_product {
        display: flex;
        gap: 16px;
        align-items: flex-start;
    }

    #wrap_details_product_left {
        flex: 0 0 46%;
        width: auto;
        float: none;
        margin-right: 0;
    }

    #wrap_img_details_product {
        width: 100%;
        height: auto;
        background: #fff;
        border: 1px solid #e6d5de;
        border-radius: 10px;
        padding: 10px;
        box-sizing: border-box;
    }

    #wrap_img_details_product>div {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: auto;
        padding: 0;
    }

    #wrap_img_details_product>div img {
        max-width: 100%;
        max-height: 300px;
        width: auto;
        height: auto;
    }

    #wrap_details_product_right {
        flex: 1;
        min-width: 0;
        width: auto;
        float: none;
    }

    /* Article & product description HTML safeguards (CKEditor / DB content) */
    .content_article {
        padding: 5px 0;
        overflow-wrap: break-word;
    }

    #info_pd *,
    .content_article * {
        max-width: 100%;
        box-sizing: border-box;
    }

    #info_pd img,
    .content_article img {
        max-width: 100% !important;
        height: auto !important;
    }

    #info_pd iframe,
    .content_article iframe {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 16 / 9;
    }

    #info_pd table,
    .content_article table {
        max-width: 100% !important;
        width: 100% !important;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Cart tablet adjustments */
    .list_cart li:not(#action_cart) {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
    }

    .content_cart {
        flex: 1;
        min-width: 160px;
        width: auto;
        height: auto;
        float: none;
        padding: 5px 10px !important;
    }

    .price_one {
        width: auto;
        min-width: 90px;
    }

    #icon_cart,
    #total_cart {
        width: auto;
        float: none;
    }

    #action_cart {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
    }

    #total_cart {
        padding: 0 14px;
    }

    /* Contact map */
    #wrap_map {
        height: 340px;
    }

    #wrap_map iframe {
        width: 100% !important;
        height: 100% !important;
        display: block;
        border: 0;
    }

    /* Footer on tablet */
    #wrap_footer {
        display: flex;
        gap: 12px;
        padding: 12px;
    }

    #wrap_footer_left,
    #wrap_footer_right {
        float: none;
        flex: 1;
        width: auto;
        margin: 0;
        min-height: 0;
        box-sizing: border-box;
    }

    #wrap_footer_left {
        padding-right: 110px;
        background-size: 90px auto;
    }

    #wrap_footer_right {
        padding-right: 120px;
        background-size: 110px auto;
    }

    #wrap_copyright {
        height: auto;
        padding: 14px 12px;
        background: #ec008c;
        text-align: center;
        line-height: 1.5;
    }
}

/* Mobile (<= 768px) */
@media (max-width: 768px) {

    /* Unstack header so logo/social never cover banner */
    #wrap_logo_hotline_slide_socical {
        height: auto;
        position: static;
        display: flex;
        flex-direction: column;
    }

    #wrap_logo_hotline_socical {
        position: static;
        height: auto;
        background: #fff;
        padding: 10px 12px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        border-bottom: 1px solid #f0d7e3;
    }

    #wrap_logo_hotline {
        width: auto;
        float: none;
        padding-top: 0;
        display: flex;
        align-items: center;
        gap: 10px;
        text-align: left;
        min-width: 0;
    }

    #wrap_logo_hotline h1 img {
        max-height: 52px;
        width: auto;
        display: block;
    }

    #wrap_logo_hotline p {
        margin-top: 0;
        font-size: 14px;
        line-height: 1.3;
        text-shadow: none;
    }

    #wrap_social {
        width: auto;
        float: none;
        margin-top: 0;
        padding-right: 0;
        display: flex;
        align-items: center;
        gap: 4px;
        flex-shrink: 0;
    }

    #wrap_social a {
        margin-left: 0;
        padding: 3px;
        border-radius: 4px;
    }

    #wrap_slide {
        position: relative;
        height: auto;
        z-index: 1;
    }

    /* Mobile navigation bar & collapsible menu */
    #wrap_menutop {
        padding: 0;
        border-bottom: 2px solid #9ddcf9;
    }

    .kmt_mobile_nav_bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 8px 12px;
        background: #fff;
    }

    .kmt_mobile_menu_toggle {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        min-height: 40px;
        padding: 6px 14px;
        background: #9ddcf9;
        color: #683c3f;
        border: 0;
        border-radius: 20px;
        font-size: 15px;
        font-weight: bold;
        cursor: pointer;
    }

    .kmt_mobile_menu_toggle.is-active {
        background: #f5b0ca;
    }

    .kmt_hamburger_icon {
        display: inline-flex;
        flex-direction: column;
        gap: 4px;
        width: 18px;
    }

    .kmt_hamburger_icon span {
        display: block;
        height: 2px;
        width: 100%;
        background: #683c3f;
        border-radius: 2px;
    }

    .kmt_mobile_cart_link {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        min-height: 40px;
        padding: 6px 14px;
        background: #f3bfde;
        color: #683c3f;
        border-radius: 20px;
        font-size: 13px;
        font-weight: bold;
        text-decoration: none;
    }

    .kmt_mobile_cart_link img {
        width: 18px;
        height: 18px;
    }

    #kmt_main_menu {
        display: none;
        width: 100%;
        border-top: 1px solid #eee;
    }

    #kmt_main_menu.is-open {
        display: block;
    }

    #kmt_main_menu>ul {
        flex-direction: column;
    }

    #kmt_main_menu>ul>li {
        width: 100%;
        margin: 0;
        border-right: 0;
        border-bottom: 1px solid #f0f0f0;
        text-align: left;
    }

    #kmt_main_menu a {
        display: block;
        padding: 12px 16px;
        font-size: 15px;
        text-align: left;
        white-space: normal;
    }

    /* Reorder content so categories stay accessible at top, main content comes before support/news */
    #wrap_content {
        display: flex;
        flex-direction: column;
        gap: 14px;
        padding: 10px 12px;
    }

    #wrap_content_left {
        display: contents;
    }

    .block_left_categories {
        order: 1;
        width: 100%;
        margin: 0;
    }

    #wrap_content_right {
        order: 2;
        width: 100%;
        padding: 0;
    }

    .block_left_support {
        order: 3;
        width: 100%;
        margin: 6px 0 0;
        background: #fff;
        padding: 12px;
        border-radius: 10px;
        box-sizing: border-box;
    }

    .block_left_news {
        order: 4;
        width: 100%;
        margin: 0;
        background: #fff;
        padding: 12px;
        border-radius: 10px;
        box-sizing: border-box;
    }

    /* Collapsible category drawer */
    .block_left_categories .kmt_title {
        margin-bottom: 0;
    }

    .block_left_categories .kmt_title a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
        padding: 10px 16px;
        font-size: 15px;
    }

    .block_left_categories .kmt_title a::after {
        content: "▾";
        font-size: 16px;
        transition: transform 0.2s ease;
    }

    .block_left_categories.is-open .kmt_title a::after {
        transform: rotate(180deg);
    }

    .block_left_categories .content_block_left {
        display: none;
        width: 100%;
        background: #fff;
        padding: 10px 12px;
        margin-top: 8px;
        border-radius: 8px;
        border: 1px solid #d5ecfa;
        box-sizing: border-box;
    }

    .block_left_categories.is-open .content_block_left {
        display: block;
    }

    .block_menuleft,
    .block_menuleft ul,
    .content_block_left,
    #wrap_support,
    .block_support,
    .block_support ul,
    .list_news_home,
    .list_news_home li {
        width: 100%;
        box-sizing: border-box;
    }

    .block_menuleft h2 {
        width: auto;
        height: auto;
        min-height: 32px;
        line-height: 32px;
        font-size: 15px;
    }

    .block_menuleft ul li {
        width: auto;
        height: auto;
        min-height: 34px;
        line-height: 34px;
        margin-left: 16px;
    }

    .list_news_home li {
        display: flex;
        gap: 10px;
        align-items: flex-start;
    }

    .wrap_img_news_home {
        flex: 0 0 80px;
        float: none;
        margin-right: 0;
    }

    .wrap_content_news_home {
        flex: 1;
        min-width: 0;
        width: auto;
        float: none;
    }

    /* Section titles */
    .kmt_title a {
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
        font-size: 15px;
        padding: 8px 16px;
    }

    /* Home intro stacked */
    #wrap_intro {
        flex-direction: column;
    }

    #wrap_img_intro {
        flex: none;
        width: 100%;
        text-align: center;
    }

    #wrap_img_intro img {
        max-width: 260px;
    }

    #wrap_content_intro {
        font-size: 14px;
        line-height: 1.6;
    }

    /* 2-column product grid on mobile */
    .list_pd {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .wrap_img_pd>div {
        height: 130px;
    }

    .wrap_content_pd h4 a {}

    .wrap_content_pd h5 {
        font-size: 12px;
    }

    /* Touch-friendly pagination */
    .page_in {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px;
        margin: 14px 0;
    }

    .page_in a,
    #current_page {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 34px;
        min-height: 34px;
        padding: 4px 10px;
        font-size: 14px;
        border: 1px solid #ddd;
        border-radius: 6px;
        background: #fff;
        margin: 0;
    }

    #current_page {
        background: #ec008c;
        color: #fff;
        border-color: #ec008c;
    }

    /* Product detail stacked */
    .breadcrumb {
        font-size: 12px;
        line-height: 1.5;
        word-break: break-word;
    }

    #wrap_details_product {
        flex-direction: column;
    }

    #wrap_details_product_left {
        flex: none;
        width: 100%;
    }

    #wrap_details_product_right h2 {
        font-size: 20px;
        margin-bottom: 12px;
    }

    .hotline {
        margin-top: 16px;
        font-size: 18px;
    }

    .kmt_btc {
        margin-top: 16px;
    }

    .kmt_btc a {
        display: inline-block;
        padding: 12px 28px;
        font-size: 15px;
    }

    /* Reset floated images in CKEditor articles */
    .content_article img,
    #info_pd img {
        float: none !important;
        display: block;
        margin: 10px auto !important;
    }

    /* Cart card layout on mobile */
    .list_cart li.cart_header_row {
        display: none !important;
    }

    .list_cart li:not(#action_cart):not(.cart_header_row) {
        display: grid;
        grid-template-columns: 84px 1fr;
        gap: 8px 12px;
        padding: 12px;
        background: #fff;
        border: 1px solid #d5ecfa;
        border-radius: 8px;
        margin-bottom: 10px;
        position: relative;
        align-items: start;
    }

    .no_cart {
        display: none;
    }

    .img_cart {
        grid-column: 1;
        grid-row: 1 / span 2;
        width: 84px;
        height: auto;
        float: none;
        padding: 0 !important;
    }

    .img_cart img {
        width: 84px;
        height: auto;
        border-radius: 4px;
    }

    .content_cart {
        grid-column: 2;
        width: auto;
        height: auto;
        float: none;
        padding: 0 32px 0 0 !important;
        font-size: 13px;
        line-height: 1.45;
    }

    .qty_cart {
        grid-column: 1;
        width: auto;
        height: auto;
        float: none;
        text-align: left;
        padding: 4px 0 0 !important;
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .qty_cart::before {
        content: "SL:";
        font-size: 12px;
        font-weight: bold;
        color: #555;
    }

    .qty_cart input {
        width: 46px;
        height: 34px;
        margin-top: 0;
        font-size: 14px;
        border: 1px solid #ccc;
        border-radius: 4px;
        box-sizing: border-box;
    }

    .price_one {
        grid-column: 2;
        width: auto;
        float: none;
        text-align: right;
        line-height: 34px;
        font-weight: bold;
        font-size: 15px;
        padding: 4px 0 0 !important;
    }

    .act_cart {
        position: absolute;
        top: 8px;
        right: 8px;
        width: auto;
        height: auto;
        float: none;
        padding: 0 !important;
    }

    #action_cart {
        display: flex;
        flex-direction: column-reverse;
        gap: 10px;
        padding: 10px 0;
    }

    #total_cart {
        width: 100%;
        float: none;
        height: auto;
        padding: 10px;
        box-sizing: border-box;
        border-radius: 6px;
    }

    #icon_cart {
        width: 100%;
        float: none;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .kmt_cart_btn {
        flex: 1 1 calc(50% - 4px);
        text-align: center;
        height: auto;
        line-height: 1.3;
        padding: 10px 12px;
        margin-right: 0;
        box-sizing: border-box;
    }

    .kmt_cart_btn_primary {
        flex: 1 1 100%;
        background: #ec008c;
        color: #fff;
    }

    /* Stacked responsive forms on mobile */
    .kmt_form_row {
        flex-direction: column;
        gap: 4px;
        margin-bottom: 12px;
    }

    .kmt_form_label {
        width: 100%;
        flex: none;
        text-align: left;
        padding-right: 0;
        line-height: 1.4;
        font-weight: bold;
    }

    .kmt_form_label_empty {
        display: none;
    }

    .kmt_form_field {
        width: 100%;
    }

    .kmt_form_field input[type="text"],
    .kmt_form_field input[type="email"],
    .kmt_form_field textarea {
        width: 100%;
        max-width: 100%;
        min-height: 40px;
        padding: 8px 10px;
        font-size: 15px;
        border: 1px solid #ccc;
        border-radius: 6px;
        box-sizing: border-box;
    }

    .kmt_form_field textarea {
        min-height: 100px;
    }

    .kmt_form_buttons {
        display: flex;
        gap: 10px;
    }

    .kmt_form_buttons input {
        flex: 1;
        height: 42px;
        font-size: 15px;
        border-radius: 6px;
        margin-right: 0;
    }

    /* Footer stacked on mobile */
    #wrap_footer {
        flex-direction: column;
        gap: 12px;
        padding: 12px;
    }

    #wrap_footer_left {
        padding: 14px;
        background-image: none;
        background-color: #a8dcf6;
    }

    #wrap_footer_right {
        padding: 14px;
        background-image: none;
        background-color: #f8c7d9;
    }

    #wrap_footer_left p,
    #wrap_footer_right p,
    #wrap_footer_right a {
        overflow-wrap: break-word;
        word-break: break-word;
    }

    /* Compact circular floating contact buttons on mobile */
    .kmt_floating_contact {
        right: 14px;
        bottom: 16px;
        gap: 10px;
    }

    .kmt_float_btn {
        width: 48px;
        height: 48px;
    }

    #wrap_copyright {
        padding-bottom: 72px;
    }
}

/* Small phones (<= 480px) */
@media (max-width: 480px) {
    #wrap_logo_hotline h1 img {
        max-height: 44px;
    }

    #wrap_logo_hotline p {
        font-size: 13px;
    }

    .wrap_img_pd>div {
        height: 115px;
    }

    .wrap_img_news {
        flex: 0 0 88px;
        width: 88px;
        height: 72px;
    }

    #wrap_map {
        height: 260px;
    }
}