/* ========================================
   SuperCue 移动端响应式增强样式
   覆盖所有产品页和首页的移动端体验
   ======================================== */

/* ========== 触屏优化: 禁用 hover + 添加 active 反馈 ========== */
@media (hover: none) and (pointer: coarse) {
  * {
    -webkit-overflow-scrolling: touch;
  }

  /* 禁用所有 hover 变换，防止移动端点击后残留 hover 状态 */
  .spec-item:hover,
  .feature-card:hover,
  .shop-card:hover,
  .btn-primary:hover,
  .btn-secondary:hover,
  .back-btn:hover,
  .cta-btn:hover,
  .thumb:hover,
  .gallery-item:hover,
  .product-card:hover,
  .pdf-card:hover,
  .honor-card:hover,
  .testimonial-card:hover,
  .aftersale-badge:hover {
    transform: none !important;
  }

  .spec-item:active,
  .feature-card:active,
  .shop-card:active {
    transform: scale(0.97) !important;
    background: #f5f3ff !important;
  }

  .btn-primary:active,
  .btn-secondary:active,
  .back-btn:active,
  .cta-btn:active {
    transform: scale(0.96) !important;
  }
}

/* ========== 768px 及以下: 手机 & 小平板 ========== */
@media (max-width: 768px) {

  /* ---- 全局 ---- */
  body {
    -webkit-text-size-adjust: 100%;
  }

  /* ---- Header 顶部导航 ---- */
  .header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    padding: 8px 12px !important;
    height: auto;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.95) !important;
    border-bottom: 1px solid #E5E7EB;
    flex-wrap: nowrap;
  }

  .logogo {
    margin-left: 0 !important;
    flex-shrink: 0;
  }

  .logogo img,
  .logogo .pic {
    width: 140px !important;
    height: auto !important;
  }

  .back-btn {
    padding: 8px 14px !important;
    font-size: 12px !important;
    border-radius: 20px;
    white-space: nowrap;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
  }

  .nav-links {
    display: none !important;
  }

  /* ---- Hero 主区域 ---- */
  .hero {
    padding: 60px 12px 24px !important;
    min-height: auto !important;
    display: block !important;
    align-items: stretch !important;
  }

  .hero-inner {
    max-width: 100%;
    margin: 0;
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
  }

  .product-showcase {
    order: -1;
    width: 100%;
    margin-bottom: 0;
  }

  /* ---- 产品卡片 ---- */
  .product-card {
    padding: 16px 14px !important;
    min-height: auto !important;
    border-radius: 16px !important;
  }

  .product-image-container {
    height: 200px !important;
    border-radius: 12px !important;
  }

  .product-tag {
    top: 10px;
    left: 10px;
    padding: 5px 12px !important;
    font-size: 10px !important;
  }

  .product-glow {
    width: 150px !important;
    height: 150px !important;
  }

  /* ---- 缩略图 ---- */
  .thumbnails {
    gap: 8px !important;
    margin-top: 12px !important;
    flex-wrap: wrap;
  }

  .thumb {
    width: 48px !important;
    height: 34px !important;
    border-radius: 8px !important;
    padding: 4px !important;
  }

  /* ---- 产品信息 ---- */
  .product-info {
    padding: 0 !important;
    width: 100%;
  }

  .series-badge {
    font-size: 11px !important;
    padding: 6px 14px !important;
    margin-bottom: 12px !important;
    border-radius: 20px !important;
  }

  .product-title {
    font-size: 24px !important;
    margin-bottom: 8px !important;
    line-height: 1.2 !important;
  }

  .product-subtitle {
    font-size: 14px !important;
    margin-bottom: 12px !important;
    gap: 8px !important;
  }

  .product-desc {
    font-size: 13px !important;
    line-height: 1.6 !important;
    margin-bottom: 16px !important;
  }

  /* ---- 参数网格 ---- */
  .specs-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    margin-bottom: 16px !important;
  }

  .spec-item {
    padding: 12px 10px !important;
    border-radius: 12px !important;
  }

  .spec-value {
    font-size: 18px !important;
    margin-bottom: 2px !important;
  }

  .spec-label {
    font-size: 10px !important;
    letter-spacing: 0.3px !important;
  }

  /* ---- 购买区域标题 ---- */
  .shop-channels .section-inner {
    padding: 0 !important;
    max-width: 100% !important;
  }

  .shop-channels-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    margin-top: 20px !important;
  }

  /* ---- 购买渠道卡片 - 移动端全新设计 ---- */
  .shop-card {
    padding: 16px !important;
    border-radius: 16px !important;
    border: none !important;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06) !important;
    display: block !important;
    position: relative;
    overflow: hidden;
  }

  /* 平台品牌色左边框 */
  .shop-card::before {
    content: '';
    position: absolute;
    left: 0; top: 12px; bottom: 12px;
    width: 4px;
    border-radius: 0 3px 3px 0;
  }

  /* 淘宝 - 橙色系 */
  .shop-card.taobao {
    background: linear-gradient(135deg, #FFF8F3 0%, #FFF 100%) !important;
  }
  .shop-card.taobao::before {
    background: linear-gradient(180deg, #FF5000, #FF8C42);
  }

  /* 京东 - 红色系 */
  .shop-card.jd {
    background: linear-gradient(135deg, #FFF5F5 0%, #FFF 100%) !important;
  }
  .shop-card.jd::before {
    background: linear-gradient(180deg, #E2231A, #FF4D4F);
  }

  /* 闲鱼 - 黄色系 */
  .shop-card.xianyu {
    background: linear-gradient(135deg, #FFFDF5 0%, #FFF 100%) !important;
  }
  .shop-card.xianyu::before {
    background: linear-gradient(180deg, #FFB800, #FFD21E);
  }

  .shop-card-inner {
    width: 100% !important;
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 0 !important;
    padding-left: 8px;
  }

  /* 顶部行: Logo + 信息 */
  .shop-logo {
    width: 48px !important;
    height: 40px !important;
    flex-shrink: 0;
    border-radius: 10px !important;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    padding: 4px;
  }

  .shop-logo img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
    margin-left: 0 !important;
  }

  .shop-info {
    flex: 1 !important;
    min-width: 0 !important;
    margin-left: 10px;
  }

  .shop-info .shop-title {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #1F2937;
    margin-bottom: 3px !important;
  }

  .shop-card.taobao .shop-info .shop-title { color: #D4450F; }
  .shop-card.jd .shop-info .shop-title { color: #C41200; }
  .shop-card.xianyu .shop-info .shop-title { color: #D48800; }

  .shop-info .shop-desc {
    font-size: 11px !important;
    color: #9CA3AF;
    line-height: 1.3;
  }

  /* 购买按钮 - 底部全宽品牌色实心按钮 */
  .shop-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100% !important;
    margin-top: 12px !important;
    padding: 12px 0 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    border-radius: 12px !important;
    text-decoration: none;
    letter-spacing: 0.5px;
    min-height: 46px;
    float: none !important;
    flex-shrink: 1;
    border: none !important;
    color: #fff !important;
    transition: transform 0.15s, box-shadow 0.15s;
  }

  .shop-btn:active {
    transform: scale(0.97);
  }

  /* 淘宝按钮 */
  .shop-card.taobao .shop-btn {
    background: linear-gradient(135deg, #FF5000, #FF7A33) !important;
    box-shadow: 0 4px 12px rgba(255,80,0,0.25);
  }
  .shop-card.taobao .shop-btn:active {
    box-shadow: 0 2px 6px rgba(255,80,0,0.3);
  }

  /* 京东按钮 */
  .shop-card.jd .shop-btn {
    background: linear-gradient(135deg, #E2231A, #FF4242) !important;
    box-shadow: 0 4px 12px rgba(226,35,26,0.25);
  }
  .shop-card.jd .shop-btn:active {
    box-shadow: 0 2px 6px rgba(226,35,26,0.3);
  }

  /* 闲鱼按钮 */
  .shop-card.xianyu .shop-btn {
    background: linear-gradient(135deg, #FFB800, #FFD21E) !important;
    box-shadow: 0 4px 12px rgba(255,184,0,0.25);
    color: #8B5E00 !important;
  }
  .shop-card.xianyu .shop-btn:active {
    box-shadow: 0 2px 6px rgba(255,184,0,0.3);
  }

  /* ---- 全球影响力数据 ---- */
  .about-stats {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
    justify-items: center !important;
  }

  .about-stat {
    width: auto !important;
    height: auto !important;
    min-height: 110px !important;
    padding: 12px 8px !important;
  }

  .about-stat .num {
    font-size: 30px !important;
  }

  .about-stat .txt {
    font-size: 11px !important;
  }

  /* ---- 配套软件与硬件卡片 ---- */
  .software-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  .software-card {
    padding: 20px 16px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    overflow: hidden;
  }

  .software-card .icon {
    width: 100% !important;
    height: auto !important;
    background: none !important;
    border-radius: 12px !important;
    box-shadow: none !important;
    margin-bottom: 12px !important;
    display: block !important;
  }

  .software-card .icon img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
    border-radius: 12px !important;
    margin-top: 0 !important;
  }

  .software-card h3 {
    margin-top: 8px !important;
    font-size: 17px !important;
    font-weight: 700 !important;
  }

  .software-card p {
    font-size: 13px !important;
    line-height: 1.6 !important;
    margin-bottom: 0 !important;
    color: var(--text-muted, #666);
    padding: 0 !important;
  }

  /* ---- 操作按钮 ---- */
  .action-buttons {
    flex-direction: column !important;
    gap: 10px !important;
    margin-top: 12px !important;
  }

  .action-buttons .btn-primary,
  .action-buttons .btn-secondary {
    width: 100%;
    padding: 14px 20px !important;
    font-size: 14px !important;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 24px !important;
  }

  /* ---- 特性区域 ---- */
  .features {
    padding: 36px 14px !important;
  }

  .section-header {
    margin-bottom: 28px !important;
  }

  .section-header h2 {
    font-size: 22px !important;
    margin-bottom: 8px !important;
  }

  .section-header p {
    font-size: 13px !important;
  }

  .features-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    max-width: 100% !important;
  }

  .feature-card {
    padding: 18px 14px !important;
    border-radius: 14px !important;
  }

  .feature-icon {
    width: 48px !important;
    height: 48px !important;
    border-radius: 14px !important;
    margin-bottom: 12px !important;
  }

  .feature-icon svg {
    width: 24px !important;
    height: 24px !important;
  }

  .feature-card h4 {
    font-size: 15px !important;
    margin-bottom: 6px !important;
  }

  .feature-card p {
    font-size: 12px !important;
    line-height: 1.5 !important;
  }

  /* ---- 参数表格 (改为卡片式堆叠) ---- */
  .specs-section {
    padding: 36px 14px !important;
  }

  .specs-container {
    border-radius: 16px !important;
    overflow: visible !important;
  }

  .specs-table {
    display: block !important;
  }

  .specs-table thead {
    display: none !important;
    /* 移动端隐藏表头 */
  }

  .specs-table tbody {
    display: block !important;
  }

  .specs-table tr {
    display: flex !important;
    flex-direction: column !important;
    padding: 12px 16px !important;
    border-bottom: 1px solid #E5E7EB;
  }

  .specs-table tr:last-child {
    border-bottom: none;
  }

  .specs-table td {
    display: block !important;
    padding: 3px 0 !important;
    border-bottom: none !important;
    white-space: normal !important;
    width: auto !important;
  }

  .specs-table td.label {
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #7C3AED !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
  }

  .specs-table td.value {
    font-size: 14px !important;
    color: #1F2937 !important;
  }

  .specs-table tr:hover td {
    background: #FAFAFA !important;
  }

  /* ---- 产品图集 ---- */
  .gallery-section {
    padding: 36px 14px !important;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }

  .gallery-item {
    border-radius: 10px !important;
  }

  .gallery-item img {
    height: 110px !important;
    padding: 8px !important;
  }

  /* ---- CTA 引导区 ---- */
  .cta-section {
    padding: 36px 14px !important;
  }

  .cta-container {
    padding: 28px 18px !important;
    border-radius: 20px !important;
    max-width: 100% !important;
  }

  .cta-container h2 {
    font-size: 20px !important;
    margin-bottom: 8px !important;
  }

  .cta-container p {
    font-size: 13px !important;
    margin-bottom: 20px !important;
  }

  .cta-btn {
    padding: 14px 36px !important;
    font-size: 14px !important;
    min-height: 48px;
    border-radius: 24px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* ---- Footer 页脚 ---- */
  .footer {
    padding: 32px 14px !important;
    flex-direction: column !important;
  }

  .footer-inner {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
    text-align: center !important;
    max-width: 100% !important;
  }

  .footer-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .footer-brand .logo {
    margin-bottom: 12px;
  }

  .footer-brand .logo img {
    width: 150px !important;
    height: auto !important;
  }

  .footer-brand p {
    font-size: 12px !important;
    line-height: 1.6 !important;
  }

  .footer-brand .social {
    justify-content: center;
  }

  .footer-col {
    text-align: center;
  }

  .footer-col h4 {
    font-size: 13px !important;
    margin-bottom: 10px !important;
  }

  .footer-col ul {
    align-items: center;
    gap: 8px !important;
  }

  .footer-col ul li a {
    font-size: 12px !important;
  }

  .footer-bottom {
    flex-direction: column !important;
    gap: 6px !important;
    text-align: center !important;
    padding-top: 16px !important;
    margin-top: 20px !important;
    max-width: 100% !important;
  }

  .footer-bottom p {
    font-size: 11px !important;
    padding: 0 !important;
  }

  .footer-bottom a {
    font-size: 12px !important;
  }

  /* ---- Toast 通知 ---- */
  #toast {
    left: 16px !important;
    right: 16px !important;
    bottom: 24px !important;
    padding: 12px 20px !important;
    font-size: 13px !important;
    transform: translateX(0) translateY(100px) !important;
    border-radius: 10px !important;
  }

  /* ---- 图片弹窗 ---- */
  .gallery-modal-close {
    top: 12px !important;
    right: 16px !important;
    font-size: 32px !important;
  }

  /* ---- 价格区域 ---- */
  .price-section {
    flex-wrap: wrap;
    gap: 12px !important;
    padding: 16px !important;
    border-radius: 14px !important;
    margin-bottom: 20px !important;
  }

  .price {
    font-size: 32px !important;
  }

  .price-note {
    margin-left: 0 !important;
    width: 100%;
  }

  /* ---- 背景装饰 - 移动端简化 ---- */
  .bg-grid {
    background-size: 30px 30px !important;
  }
}

/* ========== 480px 及以下: 小屏手机 ========== */
@media (max-width: 480px) {

  .header {
    padding: 6px 10px !important;
    min-height: 46px;
  }

  .logogo img,
  .logogo .pic {
    width: 120px !important;
  }

  .back-btn {
    padding: 6px 12px !important;
    font-size: 11px !important;
    min-height: 32px;
  }

  .hero {
    padding: 52px 10px 20px !important;
  }

  .product-card {
    padding: 12px 10px !important;
    border-radius: 14px !important;
  }

  .product-image-container {
    height: 170px !important;
  }

  .product-title {
    font-size: 22px !important;
  }

  .product-subtitle {
    font-size: 13px !important;
  }

  .product-desc {
    font-size: 12px !important;
  }

  .specs-grid {
    gap: 6px !important;
  }

  .spec-item {
    padding: 10px 8px !important;
    border-radius: 10px !important;
  }

  .spec-value {
    font-size: 16px !important;
  }

  .spec-label {
    font-size: 9px !important;
  }

  .thumb {
    width: 40px !important;
    height: 28px !important;
  }

  .features {
    padding: 28px 12px !important;
  }

  .feature-card {
    padding: 14px 12px !important;
  }

  .feature-icon {
    width: 40px !important;
    height: 40px !important;
    border-radius: 12px !important;
  }

  .feature-icon svg {
    width: 20px !important;
    height: 20px !important;
  }

  .feature-card h4 {
    font-size: 14px !important;
  }

  .gallery-grid {
    gap: 6px !important;
  }

  .gallery-item img {
    height: 90px !important;
  }

  .cta-container {
    padding: 24px 14px !important;
  }

  .cta-container h2 {
    font-size: 18px !important;
  }

  .section-header h2 {
    font-size: 20px !important;
  }

  .shop-info .shop-title {
    font-size: 14px !important;
  }

  .shop-btn {
    padding: 11px 0 !important;
    font-size: 13px !important;
  }
}

/* ========== 375px 及以下: 超小屏手机 ========== */
@media (max-width: 375px) {

  .logogo img,
  .logogo .pic {
    width: 110px !important;
  }

  .back-btn {
    padding: 6px 10px !important;
    font-size: 11px !important;
  }

  .product-title {
    font-size: 20px !important;
  }

  .product-image-container {
    height: 150px !important;
  }

  .spec-value {
    font-size: 15px !important;
  }

  .gallery-item img {
    height: 80px !important;
  }

  .features-grid {
    gap: 8px !important;
  }

  .cta-container h2 {
    font-size: 17px !important;
  }
}

/* ========== 横屏手机优化 ========== */
@media (max-width: 768px) and (orientation: landscape) {
  .hero {
    padding-top: 52px !important;
    min-height: auto !important;
  }

  .hero-inner {
    gap: 12px !important;
  }

  .product-image-container {
    height: 140px !important;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .specs-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

/* ========== 刘海屏安全区域适配 ========== */
@supports (padding: max(0px)) {
  @media (max-width: 768px) {
    .header {
      padding-top: max(8px, env(safe-area-inset-top)) !important;
      padding-left: max(12px, env(safe-area-inset-left)) !important;
      padding-right: max(12px, env(safe-area-inset-right)) !important;
    }

    .hero,
    .features,
    .specs-section,
    .cta-section,
    .gallery-section {
      padding-left: max(14px, env(safe-area-inset-left)) !important;
      padding-right: max(14px, env(safe-area-inset-right)) !important;
    }

    .footer {
      padding-bottom: max(32px, env(safe-area-inset-bottom)) !important;
      padding-left: max(14px, env(safe-area-inset-left)) !important;
      padding-right: max(14px, env(safe-area-inset-right)) !important;
    }
  }
}

/* ========== 页面首次加载: 防止 FOUT ========== */
@media (max-width: 768px) {
  .product-image {
    transition: opacity 0.3s ease !important;
  }

  img {
    max-width: 100%;
    height: auto;
  }
}

/* ========== 对比表格横向滚动优化 ========== */
@media (max-width: 768px) {
  .table-wrap {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .table-wrap::-webkit-scrollbar {
    height: 4px;
  }

  .table-wrap::-webkit-scrollbar-thumb {
    background: #D1D5DB;
    border-radius: 2px;
  }
}

/* ========== 移动端图片弹窗全屏 ========== */
@media (max-width: 768px) {
  .gallery-modal img {
    max-width: 95% !important;
    max-height: 85% !important;
  }
}
