/* 响应式设计 */
@media (max-width: 1200px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .qr-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .product-detail-top {
        gap: 30px;
    }
    
    .product-detail-buttons {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .button-group {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 992px) {
    .section-title {
        font-size: 2rem;
    }
    
    .slide-title {
        font-size: 2.8rem;
    }
    
    .slide-subtitle {
        font-size: 1.3rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .qr-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .product-detail-top {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .product-detail-buttons {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    
    .button-group {
        width: auto;
    }
    
    .spec-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .brand-title {
        font-size: 3rem;
    }
    
    .nav-list {
        gap: 20px;
    }
    
    .nav-link {
        font-size: 1rem;
    }
    
    .header-content {
        position: relative;
    }
    
    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: white;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        padding: 20px;
        display: none;
        flex-direction: column;
    }
    
    .main-nav.active {
        display: flex;
    }
    
    .nav-list {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-link {
        color: var(--dark-color);
        padding: 10px 0;
        width: 100%;
        display: block;
        font-size: 1.1rem;
    }
    
    .header.scrolled .nav-link {
        color: var(--dark-color);
    }
    
    .search-container {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        padding: 20px;
        background-color: white;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        display: none;
    }
    
    .search-container.active {
        display: block;
    }
    
    .search-box {
        width: 100%;
    }
    
    .search-input {
        width: 100%;
    }
    
    .menu-toggle,
    .search-toggle {
        display: block;
    }
    
    .search-toggle {
        margin-left: 15px;
    }
}

@media (max-width: 768px) {
    .hero-slider {
        height: 400px;
    }
    
    .slide-title {
        font-size: 2.2rem;
    }
    
    .slide-subtitle {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .values-grid,
    .info-grid,
    .qr-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .spec-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .product-detail-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .button-group {
        flex-direction: column;
        width: 100%;
    }
    
    .button-group .btn {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .product-detail-qr-small {
        align-self: center;
        margin-top: 10px;
    }
    
    .brand-title {
        font-size: 2.5rem;
    }
    
    .brand-tagline {
        font-size: 1.2rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .modal-container {
        width: 95%;
        max-height: 85vh;
    }
    
    .modal-header {
        padding: 15px 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .product-detail-top {
        gap: 20px;
    }
    
    .product-detail-title {
        font-size: 1.6rem;
    }
    
    .product-main-image {
        height: 300px;
    }
    
    /* 移动端底部二维码排列 */
    .footer-qr-container {
        flex-direction: column !important;
        align-items: center;
    }
    
    /* 移动端产品分类 */
    .level2-categories {
        justify-content: center;
        flex-wrap: wrap;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 15px;
    }
    
    .page-container {
        padding: 40px 0;
    }
    
    .page-section {
        padding: 40px 0;
    }
    
    .hero-slider {
        height: 300px;
    }
    
    .slide-content {
        bottom: 50px;
    }
    
    .slide-title {
        font-size: 1.8rem;
        margin-bottom: 10px;
    }
    
    .slide-subtitle {
        font-size: 1rem;
        margin-bottom: 20px;
    }
    
    .services-section,
    .products-section,
    .articles-section,
    .brand-values,
    .brand-story,
    .company-info,
    .qr-codes,
    .social-platforms {
        padding: 40px 0;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .logo-text {
        font-size: 1.5rem;
    }
    
    .search-input {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
    
    .service-card {
        padding: 25px 15px;
    }
    
    .service-icon {
        font-size: 2rem;
        margin-bottom: 15px;
    }
    
    .service-title {
        font-size: 1.1rem;
        margin-bottom: 10px;
    }
    
    .product-image {
        height: 200px;
    }
    
    .article-image {
        height: 180px;
    }
    
    .value-card,
    .info-card,
    .qr-card {
        padding: 20px;
    }
    
    .qr-image {
        width: 100px;
        height: 100px;
    }
    
    .product-detail-buttons {
        padding: 15px;
    }
    
    .product-detail-qr-small {
        width: 80px;
        height: 80px;
    }
    
    .scroll-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .modal-header {
        padding: 15px 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .product-detail-title {
        font-size: 1.6rem;
    }
    
    .product-main-image {
        height: 250px;
    }
    
    .article-detail-title {
        font-size: 1.5rem;
    }
    
    /* 搜索选项卡 */
    .search-tabs .tab-buttons {
        flex-direction: column;
    }
}
@media (max-width: 992px) {
    /* 保持1:1比例 */
    .product-image-container {
        aspect-ratio: 1/1;
    }
    
    .product-image {
        height: 100%;
    }
}

@media (max-width: 768px) {
    .product-image {
        height: 100%; /* 确保移动端也是100%高度 */
    }
    
    /* 产品详情页的大图也可以响应式调整 */
    .product-main-image {
        height: 300px; /* 或者保持100% */
        height: 100%;
    }
}

@media (max-width: 576px) {
    /* 小屏幕保持1:1 */
    .product-image {
        height: 100%;
    }
    
    /* 如果产品详情页大图需要调整 */
    .product-main-image {
        height: 250px;
        height: 100%; /* 推荐使用100% */
    }
}

/* ---------- 新增：移动端强制保持服务和产品网格列数不变 ---------- */
@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: repeat(3, minmax(140px, 1fr));
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 10px;
    }
    .products-grid {
        grid-template-columns: repeat(2, minmax(200px, 1fr));
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 15px;
    }
    /* 可选：微调卡片内边距，使内容更协调（不影响列数） */
    .service-card {
        padding: 12px;
        height: 160px;
    }
    .service-title {
        font-size: 1rem;
    }
    .product-card .product-info {
        padding: 15px;
    }
    .product-title {
        font-size: 1rem;
    }
}