/* ========================================
   Mobile Responsive Optimization
   移动端响应式优化
   ======================================== */

/* 基础移动端设置 */
@media (max-width: 768px) {
  
  /* 容器内边距减小 */
  .container {
    padding: 0 16px;
  }
  
  /* 标题字号优化 */
  h1 {
    font-size: 28px !important;
    line-height: 1.3;
  }
  
  h2 {
    font-size: 24px !important;
  }
  
  h3 {
    font-size: 20px !important;
  }
  
  /* 正文优化 */
  p {
    font-size: 15px;
    line-height: 1.7;
  }
  
  /* 导航栏优化 */
  .nav-menu {
    padding: 0;
  }
  
  .nav-menu li a {
    padding: 12px 16px !important;
    font-size: 14px !important;
  }
  
  /* Hero 区域优化 */
  .hero {
    height: 400px !important;
  }
  
  .hero-content h1 {
    font-size: 32px !important;
  }
  
  .hero-content p {
    font-size: 16px !important;
  }
  
  .hero-buttons {
    flex-direction: column !important;
    gap: 12px !important;
  }
  
  .hero-buttons .btn {
    width: 100% !important;
  }
  
  /* 产品卡片优化 */
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    gap: 16px !important;
  }
  
  .product-card {
    margin-bottom: 16px;
  }
  
  .product-card-image-wrapper {
    height: 200px !important;
  }
  
  .product-card-content {
    padding: 16px !important;
  }
  
  .product-card-content h3 {
    font-size: 16px !important;
    margin-bottom: 8px !important;
  }
  
  .product-card-content p {
    font-size: 13px !important;
  }
  
  /* 类别卡片优化 */
  .category-card-large {
    margin-bottom: 24px;
  }
  
  .category-card-large .product-card-image-wrapper {
    height: 180px !important;
  }
  
  /* 产品详情页优化 */
  .product-detail-grid {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }
  
  .product-gallery {
    position: static !important;
  }
  
  .main-image-container {
    height: 300px !important;
  }
  
  .thumbnail-container {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 6px !important;
  }
  
  .thumbnail {
    border-radius: 4px;
  }
  
  .product-title {
    font-size: 24px !important;
    margin-bottom: 20px !important;
  }
  
  .detail-image-container img {
    min-height: 300px !important;
  }
  
  .cta-buttons {
    flex-direction: column !important;
  }
  
  .cta-buttons .btn {
    width: 100% !important;
  }
  
  /* 目录下载区域优化 */
  .catalog-section {
    padding: 40px 0 !important;
  }
  
  .catalog-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
  
  .catalog-card {
    padding: 24px 20px !important;
  }
  
  .catalog-icon {
    font-size: 48px !important;
  }
  
  /* 统计数据区域优化 */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 24px !important;
  }
  
  .stat-item h3 {
    font-size: 36px !important;
  }
  
  .stat-item p {
    font-size: 14px !important;
  }
  
  /* 生产线图片优化 */
  .production-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px !important;
  }
  
  .production-card {
    aspect-ratio: 4/3;
  }
  
  /* 优势卡片优化 */
  .advantages-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
  
  .advantage-card {
    padding: 24px 20px !important;
  }
  
  .advantage-card .icon {
    font-size: 36px !important;
  }
  
  /* 联系表单优化 */
  .contact-grid {
    grid-template-columns: 1fr !important;
  }
  
  .contact-form {
    padding: 24px 20px !important;
  }
  
  .form-row {
    grid-template-columns: 1fr !important;
  }
  
  /* Footer 优化 */
  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }
  
  .footer-section {
    text-align: left;
  }
  
  .footer-wechat img {
    width: 100px !important;
    height: 100px !important;
  }
  
  /* 移动端联系栏 */
  .mobile-contact-bar {
    display: block !important;
  }
  
  body {
    padding-bottom: 70px;
  }
  
  .mobile-contact-bar .container {
    gap: 6px;
  }
  
  .mobile-contact-bar a,
  .mobile-contact-bar .wechat-qr-trigger {
    padding: 10px 8px;
    font-size: 12px;
  }
  
  /* 悬浮返回按钮优化 */
  .floating-back {
    left: 10px !important;
    padding: 10px 14px !important;
    font-size: 12px !important;
  }
  
  .floating-back span:first-child {
    font-size: 20px !important;
  }
  
  /* 分页优化 */
  #pagination {
    flex-wrap: wrap;
    gap: 6px !important;
  }
  
  #pagination button {
    padding: 6px 12px !important;
    font-size: 13px !important;
  }
  
  /* Banner 轮播优化 */
  .hero-slide img {
    object-fit: cover;
  }
  
  /* 产品列表页头部优化 */
  .page-header {
    padding: 60px 0 !important;
  }
  
  .page-header h1 {
    font-size: 28px !important;
    margin-bottom: 12px !important;
  }
  
  .page-header p {
    font-size: 14px !important;
  }
  
  /* 关于我们页面优化 */
  .about-content {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }
  
  .about-content img {
    max-height: 300px !important;
  }
  
  /* 面包屑导航优化 */
  .product-breadcrumb {
    font-size: 12px !important;
    margin-bottom: 16px !important;
  }
  
  /* 产品元信息优化 */
  .product-meta {
    flex-direction: column !important;
    gap: 12px !important;
    padding: 16px 0 !important;
  }
  
  .meta-item {
    gap: 4px !important;
  }
  
  .meta-label {
    font-size: 12px !important;
  }
  
  .meta-value {
    font-size: 14px !important;
  }
  
  /* 产品描述优化 */
  .product-description {
    font-size: 14px !important;
    line-height: 1.8 !important;
  }
  
  .product-description h3 {
    font-size: 18px !important;
    margin-bottom: 12px !important;
  }
  
  .product-description ul {
    margin-left: 16px;
    font-size: 14px;
  }
  
  .product-description li {
    margin-bottom: 6px;
    line-height: 1.6;
  }
  
  /* 规格部分优化 */
  .specifications-section h2 {
    font-size: 22px !important;
    margin-bottom: 20px !important;
  }
  
  /* 微信二维码弹窗优化 */
  .wechat-modal-content {
    padding: 24px !important;
    max-width: 95% !important;
  }
  
  .wechat-modal-content img {
    width: 240px !important;
    height: 240px !important;
  }
  
  .wechat-modal-content h3 {
    font-size: 18px !important;
  }
  
  .wechat-modal-content p {
    font-size: 13px !important;
  }
  
  .wechat-modal-close {
    font-size: 24px !important;
    top: 8px !important;
    right: 12px !important;
  }
}

/* 超小屏幕优化（iPhone SE 等） */
@media (max-width: 375px) {
  .container {
    padding: 0 12px;
  }
  
  h1 {
    font-size: 24px !important;
  }
  
  h2 {
    font-size: 20px !important;
  }
  
  .hero {
    height: 350px !important;
  }
  
  .hero-content h1 {
    font-size: 26px !important;
  }
  
  .products-grid {
    grid-template-columns: 1fr !important;
  }
  
  .main-image-container {
    height: 250px !important;
  }
  
  .thumbnail-container {
    grid-template-columns: repeat(3, 1fr) !important;
  }
  
  .mobile-contact-bar a,
  .mobile-contact-bar .wechat-qr-trigger {
    font-size: 11px;
    padding: 8px 6px;
  }
}

/* 横屏优化 */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    height: 300px !important;
  }
  
  .main-image-container {
    height: 200px !important;
  }
  
  .product-detail-grid {
    gap: 20px !important;
  }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
  /* 增大点击区域 */
  .btn {
    min-height: 44px;
    padding: 12px 24px;
  }
  
  .nav-menu li a {
    min-height: 44px;
  }
  
  .thumbnail {
    min-width: 60px;
    min-height: 60px;
  }
  
  /* 移除 hover 效果 */
  .product-card:hover {
    transform: none;
  }
  
  .catalog-card:hover {
    transform: none;
  }
}

/* 防止 iOS 缩放 */
@media (max-width: 768px) {
  input,
  select,
  textarea {
    font-size: 16px !important;
  }
}

/* 加载状态优化 */
.loading {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 14px;
}

@media (max-width: 768px) {
  .loading {
    padding: 30px 16px;
    font-size: 13px;
  }
}
