/* Mobile and tablet overrides. Loaded after page-specific CSS by build.mjs. */

.nav-toggle {
    display: none;
}

@media (max-width: 1240px) {
    body {
        min-width: 0;
        overflow-x: hidden;
    }

    .navbar,
    .w12,
    .wrap,
    .containt-div,
    .feature ul,
    .industry_inner,
    .functions_con,
    .why_choose_cntrast,
    .plan_b,
    .case-panel,
    .system_display ul,
    .contact_con,
    .service_con,
    .duan,
    .product_banner .inner_con,
    .product01_con,
    .product02_con,
    .product03_con,
    .solution-container,
    .solution-grid,
    .pricing-cards {
        width: 100% !important;
        max-width: 1200px;
        box-sizing: border-box;
    }
}

@media (max-width: 900px) {
    body {
        overflow-x: hidden;
    }

    .header {
        height: 64px;
        overflow: visible;
        z-index: 1000;
    }

    .navbar {
        display: flex;
        align-items: center;
        width: 100%;
        padding: 0 16px;
        height: 64px;
    }

    .logo {
        float: none;
        flex: 0 0 auto;
    }

    .logo {
        width: auto;
    }

    .logo img {
        width: auto !important;
        height: 30px !important;
        max-width: none !important;
        margin-top: 0;
    }

    .nav-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 4px;
        width: 40px;
        height: 40px;
        margin-left: 16px;
        padding: 8px;
        border: 0;
        background: transparent;
        cursor: pointer;
        order: 3;
    }

    .nav-toggle span {
        display: block;
        width: 22px;
        height: 2px;
        background: #323C55;
        border-radius: 2px;
    }

    .top_nav {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        width: 100%;
        height: auto;
        max-height: calc(100dvh - 120px);
        overflow-y: auto;
        margin: 0;
        padding: 8px 0;
        background: #fff;
        box-shadow: 0 12px 24px rgba(47, 56, 111, .12);
        z-index: 100;
        line-height: 1.5;
        flex-direction: column;
    }

    .top_nav.open {
        display: flex;
    }

    .top_nav a {
        display: block;
        margin: 0;
        padding: 12px 20px;
        font-size: 15px;
    }

    .mobilephone {
        float: none;
        margin-left: auto;
        font-size: 14px;
        line-height: 64px;
        order: 2;
    }

    .mobilephone img {
        width: 14px;
        height: 20px;
    }

    .bannerbox {
        height: auto;
        min-height: 0;
        margin-top: 64px;
    }

    .bannerbox ul li {
        position: relative;
        height: auto;
        min-height: 0;
    }

    .containt-div {
        width: 100%;
        height: auto;
        padding: 0 16px;
    }

    .banner-01-a,
    .banner-02-a,
    .banner-03-a {
        position: relative !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: auto !important;
        margin: 0 !important;
        opacity: 1 !important;
        padding: 24px 0;
    }

    .banner-01-a img,
    .banner-02-a img,
    .banner-03-a img {
        width: 100% !important;
        height: auto !important;
    }

    .banner-01-b,
    .banner-02-b,
    .banner-03-b {
        display: none !important;
    }

    .bannerbox .nav {
        bottom: 12px;
        right: 16px;
        left: auto;
        margin-left: 0;
    }

    .feature ul {
        height: auto;
        display: flex;
        flex-wrap: wrap;
        padding: 12px;
    }

    .feature ul li {
        width: 50%;
        float: none;
        padding: 12px;
        border-right: 0;
        box-sizing: border-box;
    }

    .feature ul li p {
        margin-top: 6px;
    }

    .industry_lists {
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
    }

    .industry_lists li {
        width: calc(50% - 6px);
        height: 150px;
        float: none;
        margin: 0;
        background-size: cover !important;
    }

    .industry_lists li span {
        margin: 25px auto;
        width: 90px;
        height: 90px;
        line-height: 82px;
    }

    .why_choose_cntrast {
        padding: 16px;
    }

    .plan_a,
    .plan_b,
    .plan_c {
        width: 100% !important;
        padding: 16px !important;
        box-sizing: border-box;
    }

    .plan_a_left p {
        width: auto;
    }

    .costs-container,
    .feature-columns {
        display: block !important;
        width: 100% !important;
        padding: 0 16px !important;
    }

    .costs-container > *,
    .feature-columns > * {
        width: 100% !important;
        margin-bottom: 16px;
    }

    .questions {
        height: auto;
    }

    .contact_con,
    .service_con,
    .duan,
    .system_display ul,
    .case-panel {
        width: 100% !important;
        padding-left: 16px;
        padding-right: 16px;
        box-sizing: border-box;
    }

    .system_display,
    .case-panel {
        height: auto !important;
    }

    .product_banner {
        height: auto;
        padding: 32px 16px 40px;
    }

    .product_banner .inner_con {
        display: flex;
        flex-direction: column;
        gap: 24px;
        height: auto;
    }

    .product_banner .left_ma {
        float: none;
        margin: 0 auto !important;
    }

    .product_banner .right_con h1 {
        font-size: 28px;
        line-height: 36px;
        text-align: center;
    }

    .product_banner .right_con h6 {
        margin-top: 16px;
        font-size: 17px;
        line-height: 24px;
        text-align: center;
    }

    .product_banner .right_con .more {
        margin: 24px auto 0 !important;
    }

    .product_tab {
        height: auto;
    }

    .product_tab ul {
        display: flex;
    }

    .product_tab li {
        width: 33.333%;
        height: auto;
        float: none;
    }

    .product_tab li a {
        height: auto;
        min-height: 56px;
        padding: 10px 4px;
        font-size: 14px;
        line-height: 1.4;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .product01_con,
    .product02_con,
    .product03_con {
        width: 100% !important;
        padding: 0 16px;
        box-sizing: border-box;
    }

    .product01_con ul,
    .product02_con ul,
    .product03_con ul {
        width: 100% !important;
    }

    .product01_con li,
    .product02_con li,
    .product03_con li {
        width: 100% !important;
        float: none !important;
        box-sizing: border-box;
    }

    .product01_con img,
    .product02_con img,
    .product03_con img {
        max-width: 100% !important;
        height: auto !important;
    }

    .entance_con {
        width: 100% !important;
        padding: 0 16px;
    }

    .entance_right {
        width: 100% !important;
    }

    .entance_right li {
        width: 100% !important;
        float: none !important;
        box-sizing: border-box;
    }

    .entance a.more {
        position: static;
        margin: 24px auto 0;
        right: auto;
        top: auto;
    }

    .entance_bgimg_top,
    .entance_bgimg_left,
    .entance_bgimg_bottom {
        display: none;
    }

    .solution-grid {
        grid-template-columns: 1fr !important;
    }

    .solution-container {
        padding: 0 16px !important;
        margin-bottom: 40px !important;
    }

    .pricing-cards {
        display: block !important;
        padding: 0 16px !important;
    }

    .pricing-card {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 0 20px !important;
    }

    .about .grid-cols-3,
    .grid.grid-cols-3 {
        grid-template-columns: 1fr !important;
    }

    .grid.gap-16 {
        gap: 24px !important;
    }

    .flex.justify-center.items-start.gap-16 {
        flex-direction: column !important;
        align-items: center !important;
    }

    section,
    .pd100 {
        padding-top: 48px !important;
        padding-bottom: 48px !important;
    }
}

@media (max-width: 480px) {
    .feature ul li {
        width: 100%;
    }

    .industry_lists li {
        width: 100%;
        height: 160px;
    }

    .product_tab li a {
        font-size: 12px;
    }
}

/* Additional mobile fixes for legacy fixed-width layouts. */
@media (max-width: 900px) {
    html {
        overflow-x: hidden;
    }

    .geometric-shape {
        display: none;
    }

    .comparison-grid {
        grid-template-columns: 1fr !important;
        gap: 16px;
        padding: 0;
    }

    .comparison-grid .card {
        width: 100% !important;
    }

    .contact_us_l,
    .contact_us_m,
    .contact_us_r {
        width: 100% !important;
        float: none !important;
        margin: 0 0 20px !important;
    }

    .contact_us_num {
        overflow-wrap: anywhere;
    }

    .entance_con {
        padding-left: 16px !important;
        padding-right: 16px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .entance .entance_right {
        width: 100% !important;
        float: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .entance .entance_right li {
        width: 100% !important;
        float: none !important;
        margin: 0 0 16px !important;
        box-sizing: border-box;
    }

    .entance .entance_right li .font_left {
        width: 100% !important;
        float: none !important;
    }

    .entance .entance_right p {
        overflow-wrap: anywhere;
    }

    img.w600,
    img.w620,
    .product01_con img.w600,
    .product02_con img.w600,
    .product03_con img.w620 {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
    }

    .solution_con .font440,
    .font440,
    .font_l,
    .font_r {
        width: 100% !important;
        max-width: 100% !important;
        float: none !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box;
    }

    .solution_con li,
    .maternal_stores_con li,
    .mall_con li,
    .beauty_characteristics li,
    .yoga_fitness_con li,
    .petshop_con li {
        width: 100% !important;
        float: none !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box;
    }

    .solution_con img.img_l,
    .solution_con img.img_r,
    .solution_con img.img_m,
    .maternal_stores_con img.img_l,
    .maternal_stores_con img.img_r,
    .mall_con img.img_l,
    .mall_con img.img_r,
    .yoga_fitness_con img.img_l,
    .yoga_fitness_con img.img_r,
    .petshop_con img.img_l,
    .petshop_con img.img_r,
    .beauty_characteristics img.img_l,
    .beauty_characteristics img.img_r {
        position: static !important;
        left: auto !important;
        right: auto !important;
        top: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        float: none !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .circle_l,
    .circle_r,
    .circle_t,
    .cicle_l,
    .cicle_r,
    .cicle_t {
        display: none !important;
    }

    .duan {
        width: 100% !important;
        height: auto !important;
        white-space: normal !important;
        overflow: hidden;
    }

    .duan_inner {
        width: 100% !important;
        display: flex;
        flex-wrap: wrap;
    }

    .duan .terminal {
        width: 33.333% !important;
        min-width: 0;
        height: 52px !important;
        margin: 0 !important;
        padding: 0 4px !important;
        font-size: 12px;
        line-height: 52px !important;
        float: none !important;
        box-sizing: border-box;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .case-panel,
    .system_display ul,
    .solution_con ul,
    .yoga_solution_display ul {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }

    .solution_con ul li,
    .yoga_solution_display ul li {
        width: 100% !important;
        float: none !important;
        box-sizing: border-box;
    }

    .solution_banner h1,
    .solution_banner h6 {
        padding-left: 16px;
        padding-right: 16px;
        box-sizing: border-box;
    }

    .solution_banner .inner_con {
        width: 100% !important;
        padding: 0 16px;
        box-sizing: border-box;
    }

    .solution_banner .saoma_experience {
        float: none !important;
        margin: 0 auto 16px !important;
    }

    .solution_banner a.experience_demo {
        float: none !important;
        margin: 0 auto !important;
        display: inline-flex;
    }

    .solution_banner p.call {
        padding: 0 16px;
        box-sizing: border-box;
    }

    .pricing-grid,
    .pricing-container,
    .price-cards {
        display: block !important;
        width: 100% !important;
        padding: 0 16px !important;
        box-sizing: border-box;
    }
}

/* Product detail pages: stack text and screenshots. */
@media (max-width: 900px) {
    .product01_con ul li,
    .product02_con ul li,
    .product03_con ul li {
        display: block !important;
        height: auto !important;
        min-height: 0 !important;
        padding: 16px 0 !important;
        float: none !important;
    }

    .product01_con img.w1000,
    .product01_con img.w1200,
    .product02_con img.w1200,
    .product03_con img.w640,
    .product03_con img.w840 {
        position: static !important;
        float: none !important;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        margin: 16px auto !important;
    }

    .product01_con ul li .font,
    .product02_con ul li .font,
    .product03_con ul li .font,
    .product01_con .font,
    .product02_con .font,
    .product03_con .font {
        width: 100% !important;
        float: none !important;
        margin: 0 !important;
        padding: 0 16px !important;
        box-sizing: border-box;
    }

    .product01_con ul li .font *,
    .product02_con ul li .font *,
    .product03_con ul li .font * {
        max-width: 100%;
    }

    .product01_con p,
    .product02_con p,
    .product03_con p,
    .product01_con h2,
    .product02_con h2,
    .product03_con h2 {
        overflow-wrap: anywhere;
    }
}

/* Solution detail pages: remove absolute positioning and fixed heights. */
@media (max-width: 900px) {
    .solution_con li,
    .beauty_con li,
    .mall_con li,
    .maternal_stores_con li,
    .petshop_con li,
    .yoga_fitness_con li {
        height: auto !important;
        min-height: 0 !important;
        padding: 24px 0 !important;
        box-sizing: border-box;
    }

    .solution_con li .inner,
    .beauty_con li .inner,
    .mall_con li .inner,
    .maternal_stores_con li .inner,
    .petshop_con li .inner,
    .yoga_fitness_con li .inner {
        height: auto !important;
        min-height: 0 !important;
        position: static !important;
        padding: 0 16px !important;
        box-sizing: border-box;
    }

    .solution_con .font_l,
    .solution_con .font_r,
    .solution_con .font_m,
    .beauty_con .font_l,
    .beauty_con .font_r,
    .beauty_con .font_m,
    .mall_con .font_l,
    .mall_con .font_r,
    .mall_con .font_m,
    .maternal_stores_con .font_l,
    .maternal_stores_con .font_r,
    .maternal_stores_con .font_m,
    .petshop_con .font_l,
    .petshop_con .font_r,
    .petshop_con .font_m,
    .yoga_fitness_con .font_l,
    .yoga_fitness_con .font_r,
    .yoga_fitness_con .font_m {
        position: static !important;
        left: auto !important;
        right: auto !important;
        top: auto !important;
        float: none !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 0 16px !important;
        padding: 0 !important;
        box-sizing: border-box;
    }

    .solution_con h2,
    .solution_con h3,
    .solution_con p,
    .beauty_con h2,
    .mall_con h2,
    .maternal_stores_con h2,
    .petshop_con h2,
    .yoga_fitness_con h2 {
        overflow-wrap: anywhere;
    }

    .function_li,
    .function_li.fl,
    .function_lists .function_li {
        float: none !important;
        display: inline-block;
        vertical-align: top;
        width: 48% !important;
        margin: 0 1% 16px !important;
        box-sizing: border-box;
    }

    .function_li img,
    .function_lists .function_li img {
        width: auto !important;
        max-width: 48px !important;
        height: auto !important;
        margin: 0 auto 8px !important;
    }
}

@media (max-width: 900px) {
    .case-panel,
    .case-panel ul,
    .case-panel ul li {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        min-height: 220px;
        float: none !important;
        box-sizing: border-box;
    }

    .case-panel ul {
        display: block !important;
    }

    .case-panel ul li {
        margin: 0 0 16px !important;
        background-size: cover !important;
        background-position: center !important;
    }

    .applicable_scenario_li,
    .applicable_scenario_li.mr30 {
        width: 100% !important;
        margin: 0 0 16px !important;
        box-sizing: border-box;
    }

    .applicable_scenario_li .mask,
    .applicable_scenario_li h3 {
        width: 100% !important;
    }

    .yoga_solution_display p {
        padding: 0 !important;
    }
}

@media (max-width: 900px) {
    .font_m p[style],
    .yoga_fitness_con .font_m p {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .case-panel > li {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        min-height: 220px;
        background-size: cover !important;
        background-position: center !important;
        box-sizing: border-box;
    }

    .animate__fadeInRight {
        -webkit-animation: none !important;
        animation: none !important;
        opacity: 1 !important;
        -webkit-transform: none !important;
        transform: none !important;
    }
}

/* Mobile contact bar */
@media (max-width: 900px) {
    body {
        padding-bottom: 56px;
    }

    .fr_contact {
        right: 0;
        left: 0;
        bottom: 0;
        width: 100%;
        height: 56px;
        display: flex;
        border-radius: 0;
        background: #22273a;
    }

    .fr_contact li {
        flex: 1;
        height: 56px;
        padding: 4px 2px;
        box-sizing: border-box;
        border-right: 1px solid rgba(255, 255, 255, .12);
    }

    .fr_contact li:last-child {
        border-right: 0;
    }

    .fr_contact li .inner {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 6px;
        width: 100%;
        height: 48px;
        border-bottom: 0;
        text-decoration: none;
    }

    .fr_contact img {
        width: 18px;
        height: 18px;
        margin: 0;
    }

    .fr_contact span {
        width: auto;
        font-size: 11px;
        line-height: 1.2;
        white-space: nowrap;
    }

    .fr_contact .contact_content {
        display: none !important;
    }
}

@media (max-width: 900px) {
    .industry_inner,
    .functions_con,
    .why_choose_cntrast,
    .questions,
    .contact_con,
    .service_con {
        padding-left: 16px !important;
        padding-right: 16px !important;
        box-sizing: border-box;
    }
}

@media (max-width: 900px) {
    .bannerbox {
        height: 270px;
        min-height: 270px;
        overflow: hidden;
    }

    .bannerbox ul,
    .bannerbox ul li,
    .bannerbox .containt-div {
        height: 270px !important;
        min-height: 270px !important;
    }

    .banner-01-a,
    .banner-02-a,
    .banner-03-a {
        height: 270px !important;
        padding: 0 !important;
    }

    .banner-01-a img,
    .banner-02-a img,
    .banner-03-a img {
        width: 100% !important;
        height: 270px !important;
        object-fit: contain;
    }

    .animated,
    .animate__animated {
        -webkit-animation: none !important;
        animation: none !important;
        opacity: 1 !important;
        -webkit-transform: none !important;
        transform: none !important;
    }
}

/* Tablet: avoid fixed-width float overflow. */
@media (max-width: 1240px) {
    .feature ul {
        height: auto;
        display: flex;
        flex-wrap: wrap;
    }

    .feature ul li {
        width: 50%;
        float: none;
        border-right: 0;
        box-sizing: border-box;
    }

    .questions {
        height: auto !important;
        padding-bottom: 40px;
    }

    .questions ul {
        display: flex;
        flex-wrap: wrap;
        gap: 16px;
        padding: 0 16px;
    }

    .questions li {
        width: calc(50% - 8px) !important;
        float: none !important;
        margin: 0 !important;
        box-sizing: border-box;
    }
}

/* Mobile: footer, home highlights, banners, price header. */
@media (max-width: 900px) {
    .footer {
        height: auto !important;
        min-height: 60px;
        line-height: 1.6 !important;
        padding: 14px 16px;
        box-sizing: border-box;
    }

    .questions ul {
        gap: 12px;
    }

    .questions li {
        width: 100% !important;
    }

    .solution_banner {
        height: auto !important;
        padding: 40px 0 32px !important;
        overflow: hidden;
    }

    .solution_banner .w12 {
        width: 100% !important;
        padding: 0 16px;
        box-sizing: border-box;
        overflow: hidden;
    }

    .solution_banner .w12 > div.fl {
        float: none !important;
        text-align: center;
    }

    .solution_banner h1 {
        margin-bottom: 16px;
        font-size: 30px;
        line-height: 1.35;
        text-align: center;
    }

    .solution_banner h6 {
        margin-bottom: 24px;
        font-size: 17px;
        line-height: 1.5;
        text-align: center;
    }

    .solution_banner .saoma_experience {
        width: 140px;
        margin: 0 auto 16px !important;
    }

    .solution_banner .saoma_experience img {
        width: 100px !important;
        height: 100px !important;
        margin: 0 auto;
    }

    .solution_banner a.experience_demo {
        margin: 0 auto !important;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .solution_banner p.call {
        margin-top: 12px;
        text-align: center;
    }

    .section-header {
        height: auto !important;
        min-height: 250px;
        padding: 56px 16px 32px;
    }

    .main-title {
        padding: 0 16px;
        font-size: 30px;
        line-height: 1.35;
    }

    .main-title::before,
    .main-title::after {
        display: none;
    }

    .sub-title {
        padding: 0 16px;
        font-size: 16px;
    }
}

/* Mobile: show full phone screenshots as a horizontal gallery. */
@media (max-width: 900px) {
    .display_area {
        height: auto !important;
        padding: 24px 0 32px !important;
        overflow: hidden;
    }

    .case-panel {
        position: static !important;
        width: 100% !important;
        max-width: 100% !important;
        opacity: 1 !important;
        height: auto !important;
        display: none !important;
    }

    .case-panel.active {
        display: block !important;
    }

    .case-panel ul {
        display: flex !important;
        width: 100% !important;
        height: auto !important;
        gap: 12px;
        padding: 0 16px 12px;
        box-sizing: border-box;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
    }

    .case-panel li {
        flex: 0 0 78% !important;
        width: 78% !important;
        height: auto !important;
        min-height: 0 !important;
        margin: 0 !important;
        aspect-ratio: 285 / 591;
        background-size: contain !important;
        background-position: top center !important;
        background-color: #f7f8fb;
        border-radius: 12px;
    }

    .case-panel.tab-3 li {
        flex-basis: 100% !important;
        width: 100% !important;
        aspect-ratio: 1200 / 490;
    }
}

/* Tablet: keep tabbed screenshots in a horizontal strip instead of
   stacking absolute panels outside the display area. */
@media (min-width: 901px) and (max-width: 1240px) {
    .display_area {
        height: auto !important;
        padding: 32px 0 48px !important;
        overflow: hidden;
    }

    .case-panel {
        position: static !important;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        opacity: 1 !important;
        display: none !important;
    }

    .case-panel.active {
        display: block !important;
    }

    .case-panel ul {
        display: flex !important;
        width: 100% !important;
        height: auto !important;
        gap: 16px;
        padding: 0 16px 12px;
        box-sizing: border-box;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
    }

    .case-panel li {
        flex: 0 0 285px !important;
        width: 285px !important;
        height: 591px !important;
        min-height: 0 !important;
        margin: 0 !important;
        background-size: contain !important;
        background-position: top center !important;
        background-color: #f7f8fb;
        border-radius: 12px;
    }

    .case-panel.tab-3 li {
        flex-basis: 100% !important;
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 1200 / 490;
    }
}
