/* 全局手机端适配 */
@media (max-width: 768px) {
  /* 基础布局 */
  html, body { overflow-x: hidden; }

  /* 通用 flex 布局改为纵向 */
  div[style*="display:flex"][style*="gap:3rem"],
  div[style*="display:flex"][style*="gap:2rem"] {
    flex-direction: column !important;
    gap: 1.5rem !important;
  }

  /* 固定宽度侧边栏改为全宽 */
  div[style*="flex:0 0 380px"],
  div[style*="flex:0 0 350px"],
  div[style*="flex:0 0 320px"],
  div[style*="flex:0 0 300px"] {
    flex: none !important;
    width: 100% !important;
  }

  /* flex:1 内容区 */
  div[style*="flex:1"] {
    flex: none !important;
  }

  /* 图片响应式 */
  img {
    max-width: 100%;
    height: auto;
  }

  /* 文字大小调整 */
  h2 { font-size: 1.5rem !important; }
  h3 { font-size: 1.1rem !important; }
  p { font-size: 0.95rem !important; }

  /* padding 调整 */
  section[style*="padding:5rem"] {
    padding: 3rem 1rem !important;
  }

  /* 最大宽度调整 */
  div[style*="max-width:1000px"],
  div[style*="max-width:1080px"],
  div[style*="max-width:1200px"] {
    max-width: 100% !important;
    padding: 0 1rem;
  }

  /* 网格布局单列 */
  div[style*="grid-template-columns:repeat(3"],
  div[style*="grid-template-columns:repeat(4"],
  div[style*="grid-template-columns:repeat(5"] {
    grid-template-columns: 1fr !important;
  }

  /* 两列网格在小屏保持两列或改单列 */
  div[style*="grid-template-columns:repeat(2"] {
    grid-template-columns: 1fr !important;
  }

  /* 卡片内边距 */
  .literature-card,
  .news-card,
  .concert-card,
  .space-card {
    padding: 1rem !important;
  }

  /* 按钮区域 */
  .pagination {
    flex-wrap: wrap;
    gap: 0.5rem !important;
  }

  /* 二维码区域 */
  div[style*="flex:0 0 auto"] img[alt*="二维码"],
  div[style*="flex:0 0 auto"] img[alt*="QR"] {
    width: 120px !important;
    height: 120px !important;
  }

  /* 页脚二维码 */
  .footer-qr-images {
    flex-wrap: wrap;
    gap: 1rem !important;
    justify-content: center !important;
  }
  .footer-qr-images img {
    width: 90px !important;
    height: 90px !important;
  }

  /* 评论卡片 */
  .comment-card {
    padding: 1.5rem !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* 产品卡片 */
  .product-card {
    flex-direction: column !important;
    padding: 1.5rem !important;
  }

  /* 图片容器 */
  div[style*="position:relative"][style*="height:600px"],
  div[style*="position:relative"][style*="height:500px"] {
    height: auto !important;
  }
  div[style*="position:relative"][style*="height:600px"] img,
  div[style*="position:relative"][style*="height:500px"] img {
    position: static !important;
    width: 100% !important;
    margin-bottom: 1rem;
  }

  /* 滚动图片区域 */
  div[style*="overflow:hidden"] {
    width: 100% !important;
  }

  /* 分隔线 */
  .section-divider {
    margin: 1.5rem 1rem;
  }

  /* ========== 页脚手机端布局 ========== */
  .footer {
    padding: 3rem 1.5rem 1.5rem !important;
  }
  .footer-inner {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 2rem !important;
    text-align: center !important;
    overflow: visible !important;
  }

  /* 1. Logo icon */
  .footer-brand {
    order: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
  }
  .footer-brand img {
    width: 50px !important;
    height: 50px !important;
  }
  .footer-brand .copyright {
    margin-top: 0.75rem;
  }

  /* 2. 地址等信息 */
  .footer-info {
    order: 2 !important;
    text-align: center !important;
  }
  .footer-info p {
    margin: 0.25rem 0 !important;
  }

  /* 3. 导航 */
  .footer-nav {
    order: 3 !important;
    width: 100% !important;
    overflow: visible !important;
  }
  .footer-nav ul {
    justify-content: center !important;
    flex-wrap: wrap !important;
    gap: 0.5rem 1rem !important;
    overflow: visible !important;
  }
  .footer-dd-item {
    position: relative !important;
    overflow: visible !important;
  }
  .footer-dd {
    position: absolute !important;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    display: none;
    background: #1e293b !important;
    border-radius: 0.5rem !important;
    margin-top: 0.5rem !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2) !important;
    min-width: 120px;
    z-index: 100;
    white-space: nowrap;
  }
  .footer-dd-item.open .footer-dd {
    display: block !important;
    position: absolute !important;
  }
  .footer-dd a {
    display: block !important;
    padding: 0.5rem 1rem !important;
    text-align: center !important;
    white-space: nowrap;
  }

  /* 4. 二维码（同一行并排） */
  .footer-qr-images {
    order: 4 !important;
    display: flex !important;
    flex-direction: row !important;
    gap: 2rem !important;
    justify-content: center !important;
    align-items: center !important;
  }
  .footer-qr-images .qr-item {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
  }
  .footer-qr-images img {
    width: 100px !important;
    height: 100px !important;
  }
  .footer-qr-images .qr-label {
    margin-top: 0.5rem;
    font-size: 0.85rem;
  }

  /* 5. 二维码提示词 */
  .footer-qr-text {
    order: 5 !important;
    text-align: center !important;
  }
  .footer-qr-text p {
    margin: 0.25rem 0 !important;
    font-size: 0.85rem;
  }

  /* 页脚底部版权 */
  .footer-bottom {
    margin-top: 1.5rem !important;
    padding-top: 1rem !important;
  }
}
