html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

html,
body {
    max-width: 100%;
    overflow-x: clip;
}

img,
video,
iframe,
table {
    max-width: 100%;
}

.nav-toggle,
.nav-menu-quote,
.nav-backdrop {
    display: none;
}

body.nav-locked {
    overflow: hidden;
}

@media (max-width: 900px) {
    .header {
        position: sticky !important;
        top: 0;
        z-index: 50 !important;
        padding: 0 12px !important;
        padding-left: calc(12px + env(safe-area-inset-left)) !important;
        padding-right: calc(12px + env(safe-area-inset-right)) !important;
    }

    .nav,
    .header .nav {
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        min-height: 58px;
        padding: 0 !important;
        gap: 8px !important;
    }

    .logo,
    .logo a {
        max-width: 46vw;
        justify-content: flex-start !important;
    }

    .logo-img {
        height: 36px !important;
        max-width: 150px !important;
    }

    .nav-toggle {
        display: inline-flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        order: 3;
        width: 42px;
        height: 42px;
        margin: 0;
        padding: 0;
        border: 0;
        background: transparent;
        cursor: pointer;
    }

    .nav-toggle span {
        display: block;
        width: 20px;
        height: 2px;
        margin: 0 auto;
        background: #fff;
        transition: transform 0.2s ease, opacity 0.2s ease;
    }

    .header.is-open .nav-toggle span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .header.is-open .nav-toggle span:nth-child(2) {
        opacity: 0;
    }

    .header.is-open .nav-toggle span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .nav-right {
        width: auto !important;
        flex: 0 0 auto !important;
        order: 2;
        gap: 0 !important;
    }

    .nav-right .social-buttons {
        display: none !important;
    }

    .language-switcher {
        padding: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    .language-switcher select {
        max-width: 118px;
        min-height: 36px;
        padding: 0.35rem 0.45rem;
        font-size: 13px;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 51;
        width: 100% !important;
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        align-items: stretch;
        justify-content: flex-start !important;
        gap: 0 !important;
        margin: 0;
        padding: 8px 16px 20px !important;
        overflow: auto !important;
        background: #111827;
        box-shadow: 0 16px 32px rgba(0, 0, 0, 0.2);
    }

    .header.is-open .nav-menu {
        display: flex;
    }

    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .nav-menu a {
        display: block;
        padding: 14px 4px;
        font-size: 16px !important;
        white-space: normal !important;
    }

    .nav-menu-quote {
        display: list-item;
        border-bottom: 0;
        padding: 12px 0 4px;
    }

    .nav-menu-quote a {
        display: flex;
        justify-content: center;
        width: 100%;
        min-height: 44px;
    }

    .nav-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 40;
        background: rgba(15, 23, 42, 0.42);
    }

    .nav-backdrop[hidden] {
        display: none;
    }

    .container,
    .search-container,
    .process-container {
        width: 100%;
        padding-left: 16px;
        padding-right: 16px;
    }

    .search-section,
    .search-page-main,
    .search-page-main.search-section,
    .detail-page {
        padding-top: 20px !important;
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    .search-section {
        padding-bottom: 28px !important;
    }

    .search-title,
    .search-results-title,
    .section-title,
    .section-head h2 {
        font-size: 22px !important;
        line-height: 1.35;
        margin-bottom: 16px !important;
    }

    .search-box,
    .search-page-main .search-box {
        width: 100%;
        flex-direction: column !important;
        gap: 10px;
    }

    .search-input,
    .search-btn,
    .search-page-main .search-input,
    .search-page-main .search-btn,
    input,
    select,
    textarea,
    button {
        max-width: 100%;
    }

    .search-input,
    .search-page-main .search-input,
    .search-btn,
    .search-page-main .search-btn {
        width: 100%;
        min-height: 46px;
        font-size: 16px;
    }

    .search-tags,
    .product-filter,
    .search-page-main .search-tags {
        justify-content: flex-start;
        gap: 8px;
    }

    .process-section,
    .products,
    .news-section,
    .service-section,
    .about,
    .contact-section,
    .search-results-section {
        padding: 36px 16px !important;
    }

    .process-list {
        display: grid !important;
        grid-template-columns: 1fr;
        gap: 16px !important;
    }

    .process-item {
        min-width: 0 !important;
        flex: none !important;
    }

    .products-grid,
    .news-grid,
    .service-list,
    .service-grid,
    .recommend-list,
    .search-seo-grid,
    .search-filter-panel,
    .about-container,
    .about-content,
    .contact-wrap,
    .contact-content,
    .footer-content,
    .detail-wrap,
    .key-spec-grid,
    .btn-group {
        grid-template-columns: 1fr !important;
    }

    .spec-grid,
    .intro-image-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .product-card,
    .search-product-card,
    .news-card,
    .recommend-item {
        width: 100%;
        min-width: 0;
    }

    .product-image,
    .product-card img,
    .search-product-card .product-image,
    .news-card-media {
        width: 100%;
        height: auto !important;
        min-height: 0;
        max-height: 220px;
        object-fit: cover;
    }

    .product-actions,
    .btn-group,
    .lead-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .product-actions a,
    .btn-group .btn,
    .filter-btn-main,
    .filter-btn-reset,
    .submit-btn {
        width: 100%;
    }

    .about-right img {
        width: 100%;
        max-height: 280px;
        object-fit: cover;
    }

    .gallery-main {
        aspect-ratio: 4 / 3;
        height: auto;
    }

    .gallery-main img,
    .main-img {
        width: 100%;
        height: 100% !important;
        object-fit: cover;
    }

    .car-title {
        font-size: 22px !important;
        min-height: 0 !important;
    }

    .car-price {
        font-size: 24px !important;
    }

    .detail-info,
    .detail-desc,
    .detail-spec-panel,
    .service-panel,
    .recommend,
    .search-seo-panel {
        padding: 16px !important;
    }

    .breadcrumb {
        white-space: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .lead-modal {
        align-items: flex-end !important;
        padding: 0 !important;
    }

    .lead-modal-card {
        width: 100% !important;
        max-height: min(92vh, 100%);
        border-radius: 14px 14px 0 0 !important;
    }

    .lead-form-grid,
    .lead-form-grid.compact {
        grid-template-columns: 1fr !important;
    }

    .lead-form-field input,
    .lead-form-field select,
    .lead-form-field textarea {
        font-size: 16px;
    }

    .wa-float {
        right: calc(14px + env(safe-area-inset-right));
        bottom: calc(14px + env(safe-area-inset-bottom));
        width: 54px;
        height: 54px;
    }

    html[dir="rtl"] .wa-float {
        right: auto;
        left: calc(14px + env(safe-area-inset-left));
    }

    .footer {
        padding: 32px 16px calc(24px + env(safe-area-inset-bottom)) !important;
    }

    .info-list div strong,
    .footer-section p,
    .footer-section a {
        word-break: break-word;
    }
}

@media (max-width: 480px) {
    .logo-img {
        height: 32px !important;
        max-width: 128px !important;
    }

    .search-title,
    .section-title,
    .section-head h2 {
        font-size: 20px !important;
    }

    .product-image,
    .product-card img,
    .search-product-card .product-image,
    .news-card-media {
        max-height: 190px;
    }

    .spec-grid,
    .intro-image-grid,
    .service-grid,
    .recommend-list {
        grid-template-columns: 1fr !important;
    }
}

.product-image,
.image-carousel,
.product-image a {
    position: relative;
    display: block;
    width: 100%;
    height: 220px;
    min-height: 220px;
    background: #e5e7eb;
}

.product-image img,
.carousel-image {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
    object-fit: cover;
    opacity: 1 !important;
    display: block;
}

.gallery-main {
    position: relative;
    height: 420px;
    min-height: 280px;
    background: #e5e7eb;
    overflow: hidden;
}

.gallery-main img,
.main-img,
.thumb img,
.intro-image-card img,
.recommend-item img {
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
    object-fit: cover;
    display: block;
    opacity: 1 !important;
}

.intro-image-card {
    position: relative;
    aspect-ratio: 16 / 10;
    min-height: 160px;
    overflow: hidden;
    background: #e5e7eb;
}

.recommend-item img {
    height: 160px !important;
}
