/* Buyer 公共页面移动端布局。桌面端样式保持原样。 */
@media (max-width: 767px) {
  html, body { width: 100%; max-width: 100%; overflow-x: hidden; }
  body.qct-home { min-width: 0 !important; }
  .qct-home-top, .qct-home-head, .qct-home-hero, .qct-home-section,
  .qct-home-assurance, .qct-footer-grid { padding-left: 12px !important; padding-right: 12px !important; }
  .qct-home-top { height: auto !important; min-height: 40px; gap: 10px; }
  .qct-home-top > div { display: none !important; }
  .qct-home-head { flex-wrap: wrap; gap: 12px !important; padding-top: 12px !important; padding-bottom: 12px !important; }
  .qct-home-head > a:first-child span { font-size: 17px !important; }
  .qct-home-head form { order: 3; flex-basis: 100%; }
  .qct-home-head form button { padding-left: 16px !important; padding-right: 16px !important; }
  .qct-home-head > a:not(:first-child) { display: none !important; }
  .qct-home-hero { display: block !important; padding-top: 14px !important; padding-bottom: 14px !important; }
  .qct-home-categories { display: none !important; }
  .qct-home-promo { padding: 24px 20px !important; min-height: 300px; }
  .qct-home-promo h1 { font-size: 30px !important; }
  .qct-home-login { margin-top: 12px; }
  .qct-home-section { padding-bottom: 20px !important; }
  .qct-home-section > .grid.grid-cols-3 { grid-template-columns: 1fr !important; }
  .qct-home-section > .grid.grid-cols-3 > a { border-right: 0 !important; border-bottom: 1px solid #e2e8f0; }
  .qct-home-section > .grid.grid-cols-3 > a:last-child { border-bottom: 0; }
  .qct-home-assurance { display: block !important; padding-top: 24px !important; padding-bottom: 24px !important; }
  .qct-home-assurance > div + div { margin-top: 20px; grid-template-columns: 1fr !important; gap: 18px !important; }
  .qct-product-grid, #items, #shopGrid, .qct-recommend-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px !important; }
  .qct-list-toolbar { align-items: flex-start !important; gap: 10px; }
  .qct-list-toolbar > div { min-width: 0; overflow-x: auto; }
  .qct-list-toolbar #homeSort { width: max-content; }
  #homePager { align-items: flex-start !important; flex-direction: column; gap: 10px; overflow-x: auto; }
  #homePager > div { width: max-content; }
  .qct-footer-grid, .qct-home footer > div, .qct-layout footer > div { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 24px 16px !important; padding: 28px 12px !important; }
  .qct-footer-grid > div:first-child, .qct-home footer > div > div:first-child, .qct-layout footer > div > div:first-child { grid-column: 1 / -1; }
  #homeList > div:first-child { align-items: flex-start !important; gap: 10px; }
  #homeList > div:first-child > div { min-width: 0; overflow-x: auto; }
  #filterForm > div { padding: 14px !important; }
  #filterForm .grid { grid-template-columns: 72px minmax(0, 1fr) !important; }
  #items + div { overflow-x: auto; }

  body.qct-layout { height: auto !important; min-height: 100%; overflow: auto !important; }
  body.qct-layout > div { min-height: 100vh; }
  .qct-layout header > div, .qct-layout .qct-breadcrumb > div { max-width: 100% !important; padding-left: 12px !important; padding-right: 12px !important; }
  .qct-layout .qct-tools { display: none !important; }
  .qct-layout .qct-public-head { flex-wrap: wrap; gap: 12px !important; padding-top: 12px !important; padding-bottom: 12px !important; }
  .qct-layout .qct-public-head > a:first-child span { font-size: 17px !important; }
  .qct-layout .qct-public-head form { order: 3; flex-basis: 100%; }
  .qct-layout .qct-public-head form button { padding-left: 16px !important; padding-right: 16px !important; }
  .qct-layout .qct-public-head > a:not(:first-child) { display: none !important; }
  .qct-main { overflow-y: visible !important; padding: 12px !important; }
  .qct-breadcrumb { display: none !important; }

  #product-detail { width: 100%; }
  .qct-detail-top { grid-template-columns: minmax(0, 1fr) !important; gap: 12px !important; }
  #product-main-preview { height: auto !important; min-height: 300px; aspect-ratio: 1 / 1; }
  #product-detail > section, #product-detail .qct-detail-top > section { padding: 16px !important; }
  #product-detail h1 { font-size: 21px !important; }
  .qct-spec-grid { grid-template-columns: 1fr !important; gap: 12px !important; }
  #delivery-area { align-items: flex-start !important; flex-wrap: wrap; }
  #delivery-area-panel { position: fixed !important; left: 12px !important; right: 12px !important; top: 18% !important; width: auto !important; max-height: 72vh; overflow-y: auto; }
  .qct-area-selects { grid-template-columns: 1fr !important; }
  #da-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .qct-detail-actions { flex-wrap: wrap; }
  .qct-detail-actions > span { width: 100%; }
  .qct-detail-actions > form, .qct-detail-actions > a { min-width: calc(50% - 8px); }
  .qct-detail-tabs { padding-left: 16px !important; padding-right: 16px !important; gap: 18px !important; }
  .qct-detail-tabs > span { display: none !important; }
  .qct-guarantee-grid { grid-template-columns: 1fr !important; }
  #product-detail img { max-width: 100%; height: auto; }
  #product-zoom { display: none !important; }

  .qct-shop-layout { flex-direction: column; }
  .qct-shop-sidebar { position: static !important; width: 100% !important; }
  .qct-shop-nav { gap: 18px !important; overflow-x: auto; white-space: nowrap; }
  .qct-shop-nav a { flex-shrink: 0; }
  .qct-shop-table-wrap { overflow-x: auto; }

  .qct-standalone { min-width: 0 !important; }
  .qct-standalone header > div, .qct-standalone section > div, .qct-standalone main > div,
  .qct-standalone main > section, .qct-standalone footer > div {
    max-width: 100% !important; padding-left: 12px !important; padding-right: 12px !important;
  }
  .qct-standalone header > div { height: auto !important; min-height: 56px; flex-wrap: wrap; gap: 10px; padding-top: 10px !important; padding-bottom: 10px !important; }
  .qct-standalone header nav, .qct-sitemap header > div > div:last-child { width: 100%; margin-left: 0 !important; overflow-x: auto; white-space: nowrap; }
  .qct-sitemap section > div { flex-wrap: wrap; gap: 12px; }
  .qct-sitemap section form { flex-basis: 100%; order: 3; }
  .qct-sitemap #mapGrid { grid-template-columns: 1fr !important; }
  .qct-sitemap footer > div { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 24px 16px !important; }
  .qct-sitemap footer > div > div:first-child { grid-column: 1 / -1; }
  .qct-recruit main > section:first-child > div { grid-template-columns: 1fr !important; gap: 28px !important; padding-top: 48px !important; padding-bottom: 48px !important; }
  .qct-recruit h1 { font-size: 34px !important; }
  .qct-recruit main section .grid-cols-3 { grid-template-columns: 1fr !important; }
  .qct-recruit main section .grid-cols-6 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .qct-recruit footer > div { align-items: flex-start !important; flex-direction: column; gap: 8px; }
}

@media (max-width: 380px) {
  .qct-product-grid, #items, #shopGrid, .qct-recommend-grid { grid-template-columns: 1fr !important; }
}
