@media (max-width: 1199px) {
  .container {
    max-width: 960px;
  }
  
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .mega-menu-content {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .team-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .cases-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 991px) {
  :root {
    --header-height: 60px;
  }
  
  .container {
    max-width: 720px;
  }
  
  .top-bar {
    display: none;
  }
  
  .main-header {
    position: fixed !important;
    top: 0 !important;
  }
  
  body {
    padding-top: var(--header-height) !important;
  }
  
  body.site-header--fixed {
    padding-top: var(--header-height) !important;
  }
  
  .nav-menu {
    display: none;
  }
  
  .mobile-menu-btn {
    display: flex;
  }
  
  .page-layout {
    flex-direction: column;
  }
  
  .sidebar {
    width: 100%;
  }
  
  .services-grid {
    grid-template-columns: 1fr;
  }
  
  .service-card {
    flex-direction: column;
  }
  
  .service-card .product-image,
  .service-card .product-intro {
    width: 100%;
  }
  
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .cases-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .mega-menu-content {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .about-intro {
    flex-direction: column;
  }

  .about-content-wrapper {
    flex-direction: column;
    gap: var(--spacing-xl);
  }

  .about-text {
    order: 1;
  }

  .about-image {
    order: 2;
    max-width: 100%;
  }

  .about-title {
    font-size: 32px;
    letter-spacing: 4px;
  }
  
  .product-detail-gallery {
    flex-direction: column;
  }
  
  .page-content-wrapper {
    flex-direction: column;
  }
  
  .page-sidebar {
    width: 100%;
    order: 2;
  }
  
  .page-main {
    order: 1;
  }
  
  .sidebar-widget {
    margin-bottom: var(--spacing-lg);
  }
}

@media (max-width: 767px) {
  .container {
    max-width: 540px;
  }
  
  .section {
    padding: var(--spacing-xl) 0;
  }
  
  .section-title h2 {
    font-size: 24px;
  }
  
  .page-banner {
    height: 200px;
  }
  
  .page-banner-content h1 {
    font-size: 28px;
  }
  
  .slide-content h2 {
    font-size: 28px;
  }
  
  .slide-content p {
    font-size: 20px;
  }
  
  .hero-banner {
    height: 400px;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }
  
  .news-grid {
    grid-template-columns: 1fr;
  }
  
  .team-grid {
    grid-template-columns: 1fr;
  }
  
  .cases-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .product-grid {
    grid-template-columns: 1fr;
  }
  
  .recommended-products .product-grid-mini {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .testimonial-card {
    flex-direction: column;
    text-align: center;
  }
  
  .testimonial-card .testimonial-avatar {
    width: 80px;
    height: 80px;
  }
  
  .products-slider {
    padding: 0;
  }
  
  .testimonials-slider {
    padding: 0;
  }
  
  .contact-info-section {
    margin-top: var(--spacing-lg);
  }
  
  .job-card .job-meta {
    flex-direction: column;
    gap: var(--spacing-xs);
  }
  
  .news-detail-header h1 {
    font-size: 22px;
  }
  
  .news-detail-meta {
    flex-wrap: wrap;
    gap: var(--spacing-sm);
  }
  
  .product-detail-info h1 {
    font-size: 20px;
  }
  
  .product-detail-price {
    font-size: 24px;
  }
  
  .product-detail-actions {
    flex-direction: column;
  }
  
  .video-container h3 {
    font-size: 22px;
  }
  
  .video-play-btn {
    width: 60px;
    height: 60px;
    font-size: 20px;
  }
  
  .page-content-wrapper {
    padding: var(--spacing-lg) 0;
    gap: var(--spacing-lg);
  }
  
  .detail-header h1 {
    font-size: 22px;
    line-height: 1.3;
  }
  
  .detail-header .detail-info {
    flex-direction: column;
    gap: var(--spacing-sm);
    font-size: 13px;
  }
  
  .detail-content {
    font-size: 15px;
  }
  
  .detail-content img {
    width: 100% !important;
  }
  
  .detail-nav {
    flex-direction: column;
    gap: var(--spacing-sm);
  }
  
  .detail-nav a {
    width: 100%;
    text-align: center;
  }
  
  .page-title-section h2 {
    font-size: 20px;
  }
  
  .content-editor {
    font-size: 14px;
  }
  
  .column-nav-list {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .column-nav-list li a {
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: 13px;
  }
  
  .news-card .news-image {
    height: 160px;
  }
  
  .news-card .news-date {
    padding: var(--spacing-xs) var(--spacing-sm);
  }
  
  .news-card .news-date b {
    font-size: 18px;
  }
  
  .news-card .news-date span {
    font-size: 10px;
  }
  
  .news-card .news-content h2 {
    font-size: 16px;
  }
  
  .news-card .news-content p {
    font-size: 13px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  
  .news-card .news-meta {
    font-size: 12px;
  }
  
  .case-card img {
    height: 160px;
  }
}

@media (max-width: 575px) {
  .container {
    padding: 0 var(--spacing-sm);
  }
  
  .section-title h2 {
    font-size: 20px;
  }
  
  .section-title p {
    font-size: 14px;
  }
  
  .page-banner {
    height: 180px;
  }
  
  .page-banner-content h1 {
    font-size: 24px;
  }
  
  .slide-content h2 {
    font-size: 22px;
  }
  
  .slide-content p {
    font-size: 16px;
  }
  
  .hero-banner {
    height: 200px;
  }
  
  .btn {
    padding: var(--spacing-xs) var(--spacing-md);
    font-size: 13px;
  }
  
  .btn-lg {
    padding: var(--spacing-sm) var(--spacing-lg);
    font-size: 14px;
  }
  
  .product-image {
    height: 160px;
  }
  
  .product-title {
    font-size: 14px;
  }
  
  .product-description {
    font-size: 12px;
  }
  
  .cases-grid {
    grid-template-columns: 1fr;
  }
  
  .case-card img {
    height: 200px;
  }
  
  .news-card .news-image {
    height: 140px;
  }
  
  .news-card .news-content h2 {
    font-size: 15px;
  }
  
  .news-card .news-content p {
    font-size: 12px;
    -webkit-line-clamp: 2;
  }
  
  .team-card .image-holder img {
    height: 220px;
  }
  
  .recommended-products .product-grid-mini {
    grid-template-columns: 1fr;
  }
  
  .footer-section h4 {
    font-size: 14px;
  }
  
  .footer-section ul li a {
    font-size: 13px;
  }
  
  .footer-social a {
    width: 32px;
    height: 32px;
  }
  
  .scroll-top {
    width: 36px;
    height: 36px;
    bottom: 20px;
    right: 20px;
  }
  
  .pagination span,
  .pagination a {
    min-width: 32px;
    height: 32px;
    font-size: 13px;
  }
  
  .sidebar-widget {
    padding: var(--spacing-md);
  }
  
  .sidebar-widget h4 {
    font-size: 14px;
  }
  
  .contact-form {
    padding: var(--spacing-md);
  }
  
  .contact-form label {
    font-size: 13px;
  }
  
  .contact-form input,
  .contact-form textarea {
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: 13px;
  }
  
  .map-container {
    height: 250px;
  }
}

@media (min-width: 992px) {
  .visible-lg {
    display: block !important;
  }
  
  .hidden-lg {
    display: none !important;
  }
}

@media (min-width: 768px) and (max-width: 991px) {
  .visible-md {
    display: block !important;
  }
  
  .hidden-md {
    display: none !important;
  }
}

@media (min-width: 576px) and (max-width: 767px) {
  .visible-sm {
    display: block !important;
  }
  
  .hidden-sm {
    display: none !important;
  }
}

@media (max-width: 575px) {
  .visible-xs {
    display: block !important;
  }
  
  .hidden-xs {
    display: none !important;
  }
}

/* 热销产品区域：当产品有3-8个时，使用网格布局替代轮播 */

/* 大屏幕：显示2行4个产品（最多8个），超出隐藏 */
@media (min-width: 992px) {
  .products-slider {
    overflow: hidden;
  }
  
  .products-slider .swiper-wrapper {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, auto);
    gap: var(--spacing-lg);
    max-height: calc(2 * (200px + 100px + var(--spacing-lg))); /* 限制最大高度为2行 */
  }
  
  .products-slider .swiper-slide {
    width: 100% !important;
    margin-right: 0 !important;
  }
  
  /* 只显示前8个产品（2行 x 4列） */
  .products-slider .swiper-slide:nth-child(n+9) {
    display: none;
  }
  
  .products-slider .swiper-button-prev,
  .products-slider .swiper-button-next {
    display: none;
  }
}

/* 中等屏幕：显示2行3个产品（最多6个），超出隐藏 */
@media (min-width: 768px) and (max-width: 991px) {
  .products-slider {
    overflow: hidden;
  }
  
  .products-slider .swiper-wrapper {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, auto);
    gap: var(--spacing-md);
    max-height: calc(2 * (180px + 90px + var(--spacing-md))); /* 限制最大高度为2行 */
  }
  
  .products-slider .swiper-slide {
    width: 100% !important;
    margin-right: 0 !important;
  }
  
  /* 只显示前6个产品（2行 x 3列） */
  .products-slider .swiper-slide:nth-child(n+7) {
    display: none;
  }
  
  .products-slider .swiper-button-prev,
  .products-slider .swiper-button-next {
    display: none;
  }
}

/* 小屏幕：保持轮播样式 - 修复整屏切换和缝隙问题 */
@media (max-width: 767px) {
  .products-slider {
    overflow: hidden;
  }
  
  .products-slider .swiper-wrapper {
    display: flex;
    gap: 0;
  }
  
  .products-slider .swiper-slide {
    width: 50% !important; /* 默认显示2个 */
    margin-right: 0 !important;
    padding: 0 8px;
    box-sizing: border-box;
  }
  
  .products-slider .swiper-button-prev,
  .products-slider .swiper-button-next {
    display: flex;
  }
}

/* 最小移动端：只显示1个 */
@media (max-width: 575px) {
  .products-slider .swiper-slide {
    width: 100% !important; /* 只显示1个 */
    padding: 0 12px;
  }
}

@media print {
  .top-bar,
  .main-header,
  .site-footer,
  .scroll-top,
  .sidebar {
    display: none !important;
  }
  
  body {
    padding-top: 0;
  }
  
  .page-banner {
    height: auto;
    min-height: 100px;
  }
  
  .page-banner::before {
    display: none;
  }
  
  a {
    color: var(--text-primary) !important;
  }
  
  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 12px;
    color: var(--text-tertiary);
  }
}
