/* 移动端统一适配与美观优化（覆盖Tailwind默认间距与字号） */

/* 基础：安全区域与图片约束 */
:root {
  --safe-top: env(safe-area-inset-top);
  --safe-bottom: env(safe-area-inset-bottom);
}

img, video { max-width: 100%; height: auto; display: block; }

/* 全局排版优化：移动端减少大标题字号与行高 */
@media (max-width: 640px) {
  h1 { font-size: 1.5rem !important; line-height: 1.25 !important; }
  h2 { font-size: 1.25rem !important; line-height: 1.25 !important; }
  h3 { font-size: 1.125rem !important; line-height: 1.25 !important; }
  p { font-size: 0.95rem; line-height: 1.6; }
}

/* 容器内边距：移动端统一缩小，避免左右裁切 */
@media (max-width: 640px) {
  .container { padding-left: 1rem !important; padding-right: 1rem !important; }
}

/* 顶部间距：为有安全区的设备留白 */
@supports (padding: max(0px)) {
  body { padding-top: max(0px, var(--safe-top)); padding-bottom: max(0px, var(--safe-bottom)); }
}

/* 导航：移动端菜单全屏遮罩与更大触点 */
@media (max-width: 768px) {
  /* 顶部展开按钮打开的移动菜单：统一深色配色，匹配站点风格 */
  .mobile-menu { position: fixed; inset: 0; z-index: 50; overflow-y: auto; padding: 1rem; background: rgba(15,23,42,0.95); color: #e5e7eb; backdrop-filter: saturate(180%) blur(8px); }
  .mobile-menu .px-2.pt-2.pb-3 { background: transparent !important; box-shadow: none !important; }
  .nav-link-mobile { font-size: 1.125rem; padding: 0.75rem 1rem; border-radius: 0.5rem; color: #e5e7eb; transition: background-color 160ms ease, color 160ms ease; }
  .nav-link-mobile:hover { color: #fbbf24; background-color: rgba(255,255,255,0.08); }
  .mobile-menu-button { touch-action: manipulation; padding: 0.5rem; }
}

/* 首页/页脚：移动端收紧内边距 */
@media (max-width: 640px) {
  footer .container { padding-left: 1rem !important; padding-right: 1rem !important; }
}

/* 产品列表：小屏（≥480px）两列，列表视图保持单列 */
@media (min-width: 480px) and (max-width: 640px) {
  #productGrid:not(.view-list) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 0.75rem !important; }
  #productGrid.view-list { display: grid !important; grid-template-columns: 1fr !important; gap: 0.5rem !important; }
}

/* 产品卡片：移动端缩小内边距与标题字号，优化纵向密度 */
@media (max-width: 640px) {
  .product-card .p-6, .product-card .p-4 { padding: 0.75rem !important; }
  .product-card .text-2xl { font-size: 1.125rem !important; }
  .product-card .text-xl { font-size: 1rem !important; }
  .product-card .leading-tight { line-height: 1.3 !important; }
  .product-card .relative { aspect-ratio: 16 / 10; }
}

/* 询价按钮：移动端更易点击 */
@media (max-width: 640px) {
  .product-card .inquiry-button { min-height: 40px; padding: 0.5rem 0.75rem; font-weight: 600; }
}

/* 产品详情：缩略图滚动更顺滑（补充） */
@media (max-width: 768px) {
  #thumbnails.thumbnails-scroll { -webkit-overflow-scrolling: touch; scroll-snap-type: x mandatory; }
  #thumbnails.thumbnails-scroll .thumbnail { scroll-snap-align: start; }
}

/* 导航栏：移动端收紧高度与元素大小，避免遮挡 */
@media (max-width: 640px) {
  .navbar-glass { top: 0; }
  /* 盒模型统一为border-box，避免内边距导致宽度溢出 */
  .navbar-glass,
  .navbar-glass * { box-sizing: border-box; }
  .navbar-glass .container { width: 100%; max-width: 100%; padding-top: 0.5rem !important; padding-bottom: 0.5rem !important; padding-left: 1rem !important; padding-right: 1rem !important; }
  .navbar-glass img[data-site-info="logo_url"] { height: 2rem !important; width: auto !important; }
  .navbar-glass .text-2xl { font-size: 1.125rem !important; }
  /* 隐藏移动端头部的语言选择与询价按钮，避免过宽占位 */
  .navbar-glass select,
  .navbar-glass .navbar-quotes-button { display: none !important; }
}

/* 兜底：防止任何模块造成的水平溢出 */
@media (max-width: 640px) {
  html, body { overflow-x: hidden; }
}

/* 首页轮播：移动端按图片比例自适应高度，去除上下留白（扩大到768px） */
@media (max-width: 768px) {
  #home { padding-top: var(--home-top-padding, 0px) !important; min-height: auto !important; overflow: hidden; background-color: rgba(36,36,36,0.95) !important; }
  #home .animate-bounce { display: none !important; }
  /* 使用 JS 动态设置的 --carousel-height，保证无留白 */
  #carouselContainer { height: var(--carousel-height, calc(100vw * 0.6)) !important; min-height: 0 !important; margin: 0 !important; touch-action: pan-y; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
  #carouselIndicators { bottom: max(0.75rem, calc(var(--safe-bottom) + 0.75rem)); gap: 0.375rem; }
  #prevSlide, #nextSlide { top: 50%; transform: translateY(-50%); padding: 0.5rem; width: 36px; height: 36px; }
  .carousel-indicator { width: 8px !important; height: 8px !important; opacity: 0.7; transition: transform 200ms ease, opacity 200ms ease; }
  #carouselIndicators .carousel-indicator.bg-white { opacity: 1; transform: scale(1.15); }
  .carousel-slide { border-radius: 0 !important; will-change: opacity, transform; contain: layout paint size; background-color: transparent; }
}

/* 轮播媒体：移动端采用前景contain + 背景模糊填充（扩大到768px） */
@media (max-width: 768px) {
  /* 前景主图使用 contain，完整显示左右内容 */
  .carousel-slide .bg-contain { background-position: center; background-size: contain !important; background-repeat: no-repeat; background-color: transparent; }
  /* 背景填充层：同图模糊覆盖以消除上下留白 */
  .carousel-slide .bg-cover { display: block !important; filter: blur(18px) !important; transform: scale(1.10) !important; opacity: 0.35 !important; pointer-events: none !important; }
  /* 顶部/底部渐隐覆盖，弱化任何残余白边 */
  .carousel-slide::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to bottom, rgba(0,0,0,0.28) 0%, rgba(0,0,0,0) 18%, rgba(0,0,0,0) 82%, rgba(0,0,0,0.28) 100%); }
  /* 视频完整呈现，避免裁剪 */
  .carousel-slide video { object-fit: contain !important; background-color: transparent; }
}

/* 桌面端轮播：保留后层全屏，隐藏前景contain并取消模糊（从769px开始） */
@media (min-width: 769px) {
  /* 仅显示一层轮播图，避免视觉上出现两层重叠 */
  .carousel-slide .bg-contain { display: none !important; }
  /* 移除背景层的模糊与缩放，显示清晰的全屏覆盖 */
  .carousel-slide .bg-cover { filter: none !important; transform: none !important; opacity: 1 !important; }
  /* 桌面端隐藏前景 <img>（object-contain）避免与背景层重叠的小轮播 */
  .carousel-slide img.object-contain { display: none !important; }
}

/* 首页模块：为手机重排尺寸与密度（只影响移动端） */
@media (max-width: 640px) {
  /* 统一收紧模块的上下内边距 */
  #brands, #hot-selling, #preferred-products, footer { padding-top: 1.25rem !important; padding-bottom: 1.25rem !important; }
  #brands .container, #hot-selling .container, #preferred-products .container, footer .container { padding-left: 1rem !important; padding-right: 1rem !important; }
  
  /* 分类网格：超小屏 1 列，小屏 2 列 */
  #categoriesGrid { gap: 0.75rem !important; }
}

/* 首页下方模块与分类标题的距离（移动端：减小空隙） */
@media (max-width: 640px) {
  #home { padding-bottom: 0 !important; }
  /* 增大与下一个模块（分类/品牌等）的间距 */
  #home + section { padding-top: 1.5rem !important; }
}

@media (max-width: 380px) {
  #categoriesGrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  #hotSellingGrid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)) !important; gap: 0.5rem !important; }
  #preferredProductsGrid { display: grid; grid-template-columns: 1fr !important; gap: 0.75rem !important; }
  #brandsContainer { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)) !important; gap: 0.5rem !important; }
  #homeStatsGrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 0.75rem !important; }
}

@media (min-width: 381px) and (max-width: 640px) {
  #categoriesGrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  #hotSellingGrid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)) !important; gap: 0.5rem !important; }
  #preferredProductsGrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 0.75rem !important; }
  #brandsContainer { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)) !important; gap: 0.5rem !important; }
  #homeStatsGrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 0.75rem !important; }
}

/* 首页子分类：移动端减小文字尺寸与行高 */
@media (max-width: 640px) {
  #hotSellingGrid .text-2xl { font-size: 0.95rem !important; line-height: 1.25 !important; }
  #hotSellingGrid .text-xl { font-size: 0.9rem !important; line-height: 1.25 !important; }
  #hotSellingGrid .text-lg { font-size: 0.82rem !important; line-height: 1.25 !important; }
  #hotSellingGrid .text-base { font-size: 0.78rem !important; line-height: 1.25 !important; }
  #hotSellingGrid .text-sm { font-size: 0.72rem !important; line-height: 1.2 !important; }
}

/* 首页子分类：移动端图片与文字间距（更贴近） */
@media (max-width: 640px) {
  /* 缩小文字容器内边距，贴近图片 */
  #hotSellingGrid .card-hover .p-2 { padding-top: 0.25rem !important; padding-bottom: 0.25rem !important; }
  /* 减小标题与描述的上下外边距 */
  #hotSellingGrid .card-hover h3 { margin-top: 0.125rem !important; margin-bottom: 0.125rem !important; }
  #hotSellingGrid .card-hover p { margin-top: 0.125rem !important; margin-bottom: 0.125rem !important; }
}

/* 首页子分类：移动端图文0距离（≤768px，仅影响手机/小平板） */
@media (max-width: 768px) {
  #hotSellingGrid .card-hover .p-2 { padding-top: 0 !important; padding-bottom: 0 !important; }
  #hotSellingGrid .card-hover h3 { margin-top: 0 !important; margin-bottom: 0 !important; }
  #hotSellingGrid .card-hover p { margin-top: 0 !important; margin-bottom: 0 !important; }
}

/* 首页子分类：移动端卡片高度大幅压缩，仅图片+两行文本 */
@media (max-width: 768px) {
  /* 图片高度显著缩小，覆盖 Tailwind h-48 */
  #hotSellingGrid .card-hover img { height: 12vw !important; max-height: 72px !important; object-fit: contain !important; }
  /* 占位图容器也同步压缩高度与内边距 */
  #hotSellingGrid .card-hover .bg-gray-100 { padding: 0.25rem !important; min-height: 12vw !important; }
  #hotSellingGrid .card-hover .fa-image { font-size: 1rem !important; }
  #hotSellingGrid .card-hover .bg-gray-100 .text-sm { font-size: 0.68rem !important; }
  /* 文本继续调小，总体两行占位（标题1行 + 描述1行） */
  #hotSellingGrid .card-hover h3 { font-size: 0.70rem !important; line-height: 1.15 !important; }
  #hotSellingGrid .card-hover p { font-size: 0.68rem !important; line-height: 1.15 !important; }
  /* 将所有 .line-clamp-2 在该区域下压缩为 1 行 */
  #hotSellingGrid .card-hover .line-clamp-2 { -webkit-line-clamp: 1 !important; line-clamp: 1 !important; }
}

/* 产品卡片网格：移动端统一两列（列表视图单列） */
@media (max-width: 640px) {
  #productGrid:not(.view-list) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 0.75rem !important; }
  #productGrid.view-list { display: grid !important; grid-template-columns: 1fr !important; gap: 0.5rem !important; }
  /* 等比例缩小卡片媒体区高度，适配两列布局 */
  #productGrid .product-card .relative { height: 9rem !important; }
  #productGrid .product-card img, #productGrid .product-card video { height: 9rem !important; object-fit: contain !important; background-color: #ffffff !important; }
  #productGrid .product-card .relative > .bg-gray-100 { height: 9rem !important; background-color: #ffffff !important; }
}
/* 首页优选产品卡片：移动端强制两列（含超小屏） */
@media (max-width: 640px) {
  #preferredProductsGrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 0.75rem !important; }
  #preferredProductsGrid .product-card .relative { height: 9rem !important; }
  #preferredProductsGrid .product-card img, #preferredProductsGrid .product-card video { height: 9rem !important; object-fit: contain !important; background-color: #ffffff !important; }
  #preferredProductsGrid .product-card .relative > .bg-gray-100 { height: 9rem !important; background-color: #ffffff !important; }
}

/* 移动端总规则追加：子分类改为4列（统一覆盖任意更早的规则） */
@media (max-width: 640px) {
  #hotSellingGrid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)) !important; gap: 0.5rem !important; }
}

/* 关于我们相关图片：移动端两列 */
@media (max-width: 640px) {
  #aboutRelatedImages { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 0.5rem !important; }
}

/* 选择我们：移动端两列 */
@media (max-width: 640px) {
  #chooseUsCards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 0.75rem !important; }
}

/* 选择我们卡片：移动端压缩文本区与统一字号 */
@media (max-width: 640px) {
  /* 压缩卡片文字间距 */
  #chooseUsCards .choose-us-card .space-y-4 > * + * { margin-top: 0.25rem !important; }
  /* 标题更小更紧凑 */
  #chooseUsCards .choose-us-card h3 { font-size: 1rem !important; line-height: 1.25 !important; }
  /* 副标题与内容统一减小 */
  #chooseUsCards .choose-us-card p.text-base { font-size: 0.85rem !important; line-height: 1.25 !important; }
  #chooseUsCards .choose-us-card p.text-sm { font-size: 0.75rem !important; line-height: 1.2 !important; }
  /* 文本长度裁剪：副标题 1 行，内容 2 行 */
  #chooseUsCards .choose-us-card p.text-base { display: -webkit-box; -webkit-line-clamp: 1; line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
  #chooseUsCards .choose-us-card p.text-sm { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
}

/* 选择我们卡片：进一步减小字体并取消不雅截断 */
@media (max-width: 640px) {
  #chooseUsCards .choose-us-card h3 { font-size: 0.88rem !important; line-height: 1.2 !important; }
  #chooseUsCards .choose-us-card p.text-base { font-size: 0.78rem !important; line-height: 1.2 !important; display: block !important; overflow: visible !important; -webkit-line-clamp: unset !important; line-clamp: unset !important; -webkit-box-orient: initial !important; }
  #chooseUsCards .choose-us-card p.text-sm { font-size: 0.70rem !important; line-height: 1.2 !important; display: block !important; overflow: visible !important; -webkit-line-clamp: unset !important; line-clamp: unset !important; -webkit-box-orient: initial !important; }
}

@media (max-width: 640px) {
  #chooseUsCards .choose-us-icon { margin: 0 !important; }
  #chooseUsCards .choose-us-icon .h-48 { height: 9rem !important; }
#chooseUsCards .choose-us-icon img { height: 9rem !important; width: 100% !important; object-fit: contain !important; object-position: center !important; padding: 0 !important; }
  #chooseUsCards .choose-us-card .p-8 { padding: 0.75rem !important; }
}

/* 选择我们：移动端图片贴到卡片外边框（参考PC端负外边距） */
@media (max-width: 640px) {
  #chooseUsCards .choose-us-card .choose-us-icon { margin-left: -0.75rem !important; margin-right: -0.75rem !important; margin-top: -0.75rem !important; }
}

/* 关于我们：内容文字缩小，标题保持 */
@media (max-width: 640px) {
  #company-description { font-size: 0.85rem !important; line-height: 1.5 !important; }
}

/* 客户评价：移动端两列并缩小卡片与文字 */
@media (max-width: 640px) {
  #testimonialsContainer { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 0.5rem !important; }
  #testimonialsContainer .testimonial-card { padding: 0.75rem !important; }
  #testimonialsContainer .testimonial-card h4 { font-size: 0.85rem !important; line-height: 1.2 !important; }
  #testimonialsContainer .testimonial-card p.text-xs { font-size: 0.7rem !important; }
  #testimonialsContainer .testimonial-card p.text-sm { font-size: 0.75rem !important; }
  #testimonialsContainer .testimonial-card .rounded-full { width: 1.75rem !important; height: 1.75rem !important; }
  /* 底部公司与国家区域：左侧公司完整显示，无截断；右侧国旗+国家垂直排布 */
  #testimonialsContainer .testimonial-divider { display: grid !important; grid-template-columns: 1fr auto !important; column-gap: 0.5rem; align-items: center; }
  #testimonialsContainer .testimonial-divider .truncate { overflow: visible !important; text-overflow: clip !important; white-space: normal !important; }
  #testimonialsContainer .testimonial-divider .ml-3 { margin-left: 0 !important; }
  #testimonialsContainer .testimonial-divider .shrink-0 { display: flex !important; flex-direction: column !important; align-items: center !important; }
  #testimonialsContainer .testimonial-divider .shrink-0 span { margin-left: 0 !important; margin-top: 0.25rem !important; }
}

/* 首页优选产品：移动端保留展示（取消隐藏规则） */
/* 原有在 max-width:640px 下隐藏 #preferred-products 的规则已移除，确保移动端可见 */

/* 品牌卡片：移动端更紧凑以适配五列 */
@media (max-width: 640px) {
  #brandsContainer .p-6 { padding: 0.5rem !important; }
  #brandsContainer img { height: 10vw !important; max-height: 44px !important; object-fit: contain !important; }
  #brandsContainer .text-xs { font-size: 0.7rem !important; }
}

/* 关于我们：手机端上下结构 */
@media (max-width: 640px) {
  #about .flex.items-start { flex-direction: column; gap: 1rem; }
  #about .flex.items-start > div { width: 100%; }
  #about img { width: 100%; height: auto; object-fit: cover; border-radius: 0.5rem; }
}

/* 证书模块：移动端保持居中并呈现中间最大、两侧递减 */
@media (max-width: 640px) {
  #certificates { padding-top: 0.75rem !important; padding-bottom: 0.75rem !important; }
  #certificates .container { padding-left: 0.75rem !important; padding-right: 0.75rem !important; }
  /* 保留Flex排列，允许宽高与缩放差异 */
  #certificatesTrack { display: flex !important; align-items: center !important; justify-content: center !important; --gap: 0.25rem; gap: var(--gap) !important; padding: 0 !important; flex-wrap: nowrap !important; }
  /* 容器不产生横向滚动，确保左右留白可见 */
  #certificatesContainer { overflow-x: hidden !important; }
  /* 每个证书项使用JS设置的尺寸与缩放，避免强制等宽等高 */
  #certificatesTrack [class^="certificate-item-"] { width: auto; height: auto; max-width: none; padding: 0.125rem !important; border-width: 0.5px !important; box-shadow: none !important; transform-origin: center !important; }
  /* 控制图片最大高度，防止过高 */
  #certificatesTrack .cert-image, #certificatesTrack img { width: 100% !important; height: auto !important; max-height: 45vw !important; object-fit: contain !important; }
}

/* 选择我们统计：手机端两列并缩小卡片与字体 */
@media (max-width: 640px) {
  #homeStatsGrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 0.75rem !important; }
  #homeStatsGrid .group { padding: 0.75rem !important; }
  #homeStatsGrid .group .text-4xl { font-size: 1.5rem !important; line-height: 1.75rem !important; }
  #homeStatsGrid .group .text-sm { font-size: 0.75rem !important; }
}

/* 产品卡片：移动端视觉一致性与紧凑布局 */
@media (max-width: 640px) {
  .product-card .p-6, .product-card .p-4 { padding: 0.75rem !important; }
  .product-card .text-2xl { font-size: 1.125rem !important; }
  .product-card .text-xl { font-size: 1rem !important; }
  .product-card .leading-tight { line-height: 1.3 !important; }
  .product-card .relative { aspect-ratio: 16 / 10; }
}

/* 页脚：移动端三列布局，精选入口与分类、热销同行（不影响PC端） */
@media (max-width: 640px) {
  .site-footer .container { padding-left: 1rem !important; padding-right: 1rem !important; }
  .site-footer .footer-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) !important; column-gap: 0.5rem !important; row-gap: 0.5rem !important; }
  /* 站点信息首列独占一行 */
  .site-footer .footer-grid > div:first-child { grid-column: 1 / -1; }
  /* 统一标题与内容字号（与“热销产品”保持一致） */
  .site-footer h3, .site-footer h4 { font-size: 0.9rem !important; margin-bottom: 0.5rem !important; }
  .site-footer ul { margin: 0; padding: 0; }
  .site-footer .space-y-2 > * + * { margin-top: 0.25rem !important; }
  /* 分类/热销/精选入口的链接文字统一 */
  #footerCategories li a, #footerHotProducts li a, .site-footer .footer-grid ul.space-y-2 a:not([data-contact]) { display: inline-block; padding: 0.25rem 0.125rem !important; font-size: 0.85rem !important; }
  /* 联系方式链接与分类链接统一间距与展示 */
  .site-footer .footer-grid ul.space-y-2 a[data-contact], .site-footer .footer-grid ul.space-y-2 span[data-contact] { display: inline-block; padding: 0.25rem 0.125rem !important; }
  /* 联系方式字号与行高统一 */
  .site-footer a[data-contact], .site-footer span[data-contact] { font-size: 0.85rem !important; line-height: 1.25 !important; word-break: break-word; }
  .site-footer li .fas, .site-footer li .fab { font-size: 0.95rem !important; }
  /* 联系方式：每个字段一行，字段内容不换行 */
  .site-footer .footer-grid > div:last-child { display: grid; grid-template-columns: 1fr; align-items: start; row-gap: 0.5rem; }
  .site-footer .footer-grid > div:last-child > ul { grid-column: 1; display: block !important; overflow: visible !important; white-space: normal !important; }
  .site-footer .footer-grid > div:last-child > ul li { display: flex !important; align-items: center !important; }
  .site-footer .footer-grid > div:last-child > ul li::after { content: none !important; }
  .site-footer a[data-contact], .site-footer span[data-contact] { white-space: nowrap !important; }
}

/* 社媒图标：移动端多列栅格并自动换行，居中对齐 */
@media (max-width: 640px) {
  .social-icons-grid { display: grid !important; grid-template-columns: repeat(6, minmax(0, 1fr)) !important; gap: 0.5rem !important; justify-items: center !important; align-items: center !important; }
}
@media (max-width: 380px) {
  .social-icons-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
}

/* 选择我们统计：手机端单行并缩小字号 */
@media (max-width: 640px) {
  #homeStatsGrid.mobile-one-row { gap: 0.5rem !important; }
  #homeStatsGrid.mobile-one-row .group .text-4xl { font-size: 1.35rem !important; }
  #homeStatsGrid.mobile-one-row .group .text-sm { font-size: 0.7rem !important; }
}

/* 产品卡片媒体区：手机端统一高度与占位图高度，避免描述为空时扩展 */
@media (max-width: 640px) {
  .product-card .relative { height: 9rem !important; aspect-ratio: initial !important; }
  .product-card img,
  .product-card video { height: 9rem !important; object-fit: contain !important; background-color: #ffffff !important; }
  .product-card .relative .bg-gray-100 { height: 9rem !important; background-color: #ffffff !important; }
}

/* 热销子分类：手机端进一步缩小且不截断，超出换行 */
@media (max-width: 640px) {
  #hotSellingGrid .card-hover h3 { font-size: 0.66rem !important; line-height: 1.15 !important; }
  #hotSellingGrid .card-hover p { font-size: 0.64rem !important; line-height: 1.15 !important; }
  #hotSellingGrid .card-hover .line-clamp-2,
  #hotSellingGrid .card-hover .line-clamp-1 { display: block !important; -webkit-line-clamp: initial !important; line-clamp: initial !important; -webkit-box-orient: initial !important; overflow: visible !important; white-space: normal !important; }
}
/* 选择我们与评价模块：移动端收紧上下间距（覆盖） */
@media (max-width: 640px) {
  /* 收紧选择我们标题区的下边距与统计区的上边距 */
  #choose-us .text-center.mb-20 { margin-bottom: 0.75rem !important; }
  #choose-us .mt-20 { margin-top: 0.75rem !important; }
  /* 收紧选择我们模块底部与评价模块顶部间距 */
  #choose-us { padding-bottom: 1rem !important; }
  #testimonials { padding-top: 1rem !important; }
  #testimonials .text-center { margin-bottom: 0.75rem !important; }
}

/* 社媒图标：移动端自适应列数（覆盖） */
@media (max-width: 640px) {
  .social-icons-grid { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(36px, 1fr)) !important; gap: 0.5rem !important; justify-items: center !important; align-items: center !important; }
}
@media (max-width: 380px) {
  .social-icons-grid { grid-template-columns: repeat(auto-fit, minmax(32px, 1fr)) !important; }
}

/* 页脚：移动端隐藏分类/热销/精选入口三列，仅保留站点信息与联系方式 */
@media (max-width: 640px) {
  .site-footer .footer-grid > div:nth-child(2),
  .site-footer .footer-grid > div:nth-child(3),
  .site-footer .footer-grid > div:nth-child(4) { display: none !important; }
  /* 剩余采用单列布局，信息在上、联系方式在下 */
  .site-footer .footer-grid { grid-template-columns: 1fr !important; }
  /* 联系方式图标与文字垂直居中对齐 */
  .site-footer .footer-grid > div:last-child > ul li { align-items: center !important; }
  .site-footer .footer-grid > div:last-child > ul li .mt-1 { margin-top: 0 !important; }
}

/* 优选产品：移动端保留（覆盖） */
@media (max-width: 640px) {
  #preferred-products { display: block !important; padding-top: 0.75rem !important; padding-bottom: 0.75rem !important; }
}

/* 证书模块：移动端边框与容器随图片一起缩放 */
@media (max-width: 640px) {
  #certificatesTrack .certificate-bg { display: inline-flex !important; width: auto !important; height: auto !important; padding: 4px !important; border-width: 1px !important; outline-width: 1px !important; border-radius: 6px !important; }
  #certificatesTrack .cert-inner { width: auto !important; height: auto !important; padding: 6px !important; border-width: 1px !important; }
  #certificatesTrack .cert-corner { width: 16px !important; height: 16px !important; }
  #certificatesTrack .corner-tl, #certificatesTrack .corner-tr, #certificatesTrack .corner-bl, #certificatesTrack .corner-br { border-width: 2px !important; }
}

/* 选择我们：移动端图片铺满卡片到模块边框，布局与PC风格一致 */
@media (max-width: 640px) {
  /* 缩小容器左右留白，让图片更靠近模块边界 */
  #choose-us .container { padding-left: 0.75rem !important; padding-right: 0.75rem !important; }
  /* 图片外层全宽，消除卡片内边距影响 */
  #chooseUsCards .choose-us-card .p-8 { padding: 0.75rem !important; }
  #chooseUsCards .choose-us-icon { margin-left: -0.75rem !important; margin-right: -0.75rem !important; margin-top: -0.75rem !important; }
  /* 图片高度随屏幕宽度扩大，视觉更饱满 */
  #chooseUsCards .choose-us-icon .h-48 { height: 45vw !important; }
  #chooseUsCards .choose-us-icon img { width: 100% !important; height: 100% !important; object-fit: cover !important; object-position: center !important; }
}

/* 订单描述：移动端统一字号为产品卡片描述 */
@media (max-width: 640px) {
  #ordersLiveDesc { font-size: 0.875rem !important; line-height: 1.4 !important; }
}