/* ============================================
 * 移动端适配样式（仅移动端）
 * ============================================ */
@media screen and (max-width: 768px) {
  /* 导航栏适配 */
  .header {
    height: auto;
    padding: 6px 0;
  }

  .header-content {
    padding: 0 10px;
    flex-wrap: nowrap;
    align-items: center;
  }

  /* Logo区域 - 移动端隐藏 */
  .logo {
    display: none !important;
  }

  /* 导航菜单 - 移动端隐藏 */
  .nav-menu {
    display: none !important;
  }

  /* 移动端菜单切换按钮 - 隐藏 */
  .mobile-menu-toggle {
    display: none !important;
  }

  /* 搜索框适配 - 缩小显示 */
  .search-box {
    flex: 1;
    margin-right: 8px;
  }

  .search-input-wrapper {
    display: flex;
    align-items: center;
  }

  .search-input {
    font-size: 14px;
    padding: 6px 10px;
    height: 36px;
  }

  .search-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    font-size: 12px;
  }

  /* 用户区域适配 - 缩小显示 */
  .header-right {
    gap: 6px;
    align-items: center;
    flex-shrink: 0;
  }

  .login-btn, .register-btn {
    font-size: 12px;
    padding: 5px 10px;
    min-height: 32px;
  }

  /* 主体区域 */
  .main {
    padding-top: 56px;
  }

  .section-container {
    padding: 10px;
  }

  /* 筛选区域移动端紧凑布局 */
  .filter-section {
    padding: 8px 10px;
  }

  .filter-row {
    gap: 6px;
    padding: 4px 0;
  }

  .filter-label {
    width: 40px;
    font-size: 12px;
    padding-top: 2px;
  }

  .filter-list {
    gap: 3px;
  }

  .filter-item {
    padding: 2px 8px;
    font-size: 11px;
  }

  /* 快捷功能适配 */
  .quick-functions {
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 16px;
  }

  .function-item {
    padding: 12px 8px;
  }

  .function-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    font-size: 24px;
  }

  .function-item span {
    font-size: 12px;
    text-align: center;
    line-height: 1.4;
  }

  /* 卡片网格适配：单列布局，左图右文 */
  .model-grid, .merchant-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .model-card .cover, .merchant-card .cover {
    height: 150px;
  }

  /* 信息卡片布局：左图右文 */
  .info-card {
    flex-direction: row;
    height: auto;
    min-height: 160px;
  }

  .info-image-wrapper {
    width: 140px;
    min-width: 140px;
    height: 160px;
  }

  .info-content {
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-width: 0;
  }

  .info-header {
    margin-bottom: 8px;
  }

  .info-title {
    font-size: 15px;
    margin-bottom: 6px;
    line-height: 1.3;
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    white-space: normal;
  }

  .info-top-meta {
    font-size: 12px;
    gap: 10px;
    margin-bottom: 6px;
    writing-mode: horizontal-tb;
    text-orientation: mixed;
  }

  .info-desc {
    font-size: 12px;
    line-height: 1.4;
    -webkit-line-clamp: unset;
    margin-bottom: 8px;
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    white-space: normal;
    overflow: visible;
    display: block;
  }

  .info-meta {
    font-size: 12px;
    writing-mode: horizontal-tb;
    text-orientation: mixed;
  }

  /* 收藏按钮位置保持在图片右上角 */
  .favorite-btn {
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
  }

  /* 分页适配 */
  .pagination {
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
  }

  .page-btn {
    min-width: 44px;
    height: 44px;
    font-size: 14px;
  }

  /* 按钮尺寸适配 */
  .btn {
    padding: 12px 20px;
    font-size: 15px;
    min-height: 44px;
  }

  /* 弹窗适配 */
  .modal {
    padding: 10px;
  }

  .modal-content {
    width: 100%;
    max-width: 100%;
    margin: 0;
    max-height: 90vh;
    overflow-y: auto;
  }

  /* 底部适配 */
  .footer {
    padding: 20px 12px;
    text-align: center;
  }

  .footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  .footer-links a {
    font-size: 13px;
  }

  /* 确保移动端不溢出，无横向滚动 */
  body {
    overflow-x: hidden;
  }

  .section-container {
    overflow-x: hidden;
  }
}

/* ============================================
 * 小屏设备额外适配（屏幕宽度 ≤ 480px）
 * ============================================ */
@media screen and (max-width: 480px) {
  .model-grid, .merchant-grid {
    grid-template-columns: 1fr;
  }

  .quick-functions {
    grid-template-columns: repeat(4, 1fr);
  }

  .model-card .cover, .merchant-card .cover {
    height: 130px;
  }

  .function-icon {
    width: 44px;
    height: 44px;
    font-size: 22px;
  }

  /* 移动端卡片布局：左图右文，单列显示，横向文字 */
  .info-card {
    flex-direction: row;
    height: auto;
    min-height: 160px;
  }

  .info-image-wrapper {
    width: 120px;
    min-width: 120px;
    height: 160px;
  }

  .info-content {
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-width: 0;
  }

  .info-header {
    margin-bottom: 8px;
  }

  .info-title {
    font-size: 14px;
    margin-bottom: 6px;
    line-height: 1.3;
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    white-space: normal;
  }

  .info-top-meta {
    font-size: 11px;
    gap: 8px;
    margin-bottom: 6px;
    writing-mode: horizontal-tb;
    text-orientation: mixed;
  }

  .info-desc {
    font-size: 11px;
    line-height: 1.4;
    -webkit-line-clamp: unset;
    margin-bottom: 8px;
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    white-space: normal;
    overflow: visible;
    display: block;
  }

  .info-meta {
    font-size: 11px;
    writing-mode: horizontal-tb;
    text-orientation: mixed;
  }

  /* 收藏按钮位置保持不变 */
  .favorite-btn {
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
  }
}
