/* Mobile-specific layout and touch controls. Desktop styles live in styles.css. */
.mobile-listing-tools { display: none; }

@media (max-width: 760px) {
  html { min-width: 320px; }
  body { overflow-x: hidden; }
  .container { width: calc(100% - 28px); }
  .topbar { display: block; }
  .topbar .container { justify-content: flex-end; }
  .topbar .container > span { display: none; }

  .main-header { box-shadow: 0 2px 10px #ab3d261c; }
  .header-inner { padding: 12px 0 13px; }
  .logo { width: fit-content; }
  .search-area { margin-top: 12px; }
  .search-form { height: 44px; border-radius: 5px; }
  .search-form input { font-size: 16px; padding: 0 10px; }
  .search-form input::placeholder { font-size: 12px; }
  .search-form button { width: 48px; height: 38px; flex: none; }

  .hero-layout { margin-top: 14px; }
  .hero-main { border-radius: 6px; }
  .hero-cta { min-height: 44px; align-items: center; }
  .promo { border-radius: 6px; }
  .promo .mini-label, .promo h3, .promo a { position: relative; z-index: 2; }
  .promo svg { opacity: .75; }
  .benefits { margin-top: 12px; }
  .benefit { min-height: 62px; }
  .section-heading { align-items: flex-end; gap: 10px; }
  .section-heading h2 { font-size: 18px; }
  .section-heading p { line-height: 1.5; }
  .more-link { white-space: nowrap; }
  .category-tile { min-height: 123px; justify-content: center; }

  .product-grid, .listing-content .product-grid { gap: 10px; }
  .product-image, .listing-content .product-image { height: auto; aspect-ratio: 1.28; }
  .product-info { padding: 11px; }
  .product-name { font-size: 13px; }
  .product-desc { margin-bottom: 10px; }
  .metrics { display: grid; grid-template-columns: minmax(0,1fr) 1px minmax(0,1fr); gap: 5px; }
  .metric strong { font-size: 18px; }
  .metric-caption { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
  .card-footer { gap: 3px 7px; flex-wrap: wrap; line-height: 1.4; }
  .favorite { width: 34px; height: 34px; }
  .favorite svg { width: 17px; height: 17px; }

  .breadcrumb { margin: 16px 0 12px; line-height: 1.6; }
  .page-layout { padding-bottom: 38px; }
  .sidebar { padding: 10px; }
  .mobile-listing-tools { display: flex; align-items: center; gap: 8px; }
  .mobile-listing-tools label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .mobile-listing-tools select, .mobile-listing-tools button {
    min-width: 0; height: 44px; border-radius: 4px; font-size: 13px;
  }
  .mobile-listing-tools select { flex: 1; padding: 0 10px; border: 1px solid #e5e5e5; color: #333; background: #fff; }
  .mobile-listing-tools button { flex: none; padding: 0 14px; border: 1px solid #f3baa8; background: #fff6f2; color: #e64c2c; font-weight: 700; }
  .sidebar .filter-group { display: none; }
  .sidebar.filters-open .filter-group {
    display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px;
    margin-top: 12px; padding-top: 12px; border-top: 1px solid #eee;
  }
  .sidebar .filter-group label, .sidebar .filter-group select { grid-column: 1 / -1; }
  .sidebar .filter-group input, .sidebar .filter-group select { width: 100%; height: 44px; margin: 0; font-size: 16px; }
  .sidebar .filter-group label { margin: 0; font-size: 12px; }
  .sidebar .filter-group button { width: 100%; height: 44px; margin: 0; }
  .listing-head { padding: 16px; }
  .listing-head h1 { font-size: 21px; overflow-wrap: anywhere; }
  .sortbar { min-height: 54px; padding: 6px; gap: 5px; }
  .sortbar > span:first-child { display: none; }
  .sortbar button { flex: 1; min-width: 0; min-height: 42px; padding: 5px 3px; font-size: 11px; white-space: nowrap; }
  .sortbar .result-count { display: none; }

  .detail-layout { gap: 0; }
  .detail-visual { height: auto; min-height: 0; aspect-ratio: 1.18; }
  .detail-visual svg { min-height: 0; height: 100%; }
  .detail-rating { flex-wrap: wrap; gap: 5px 9px; }
  .detail-stats { padding: 16px 4px; }
  .detail-stat strong { font-size: 20px; }
  .detail-stat span { font-size: 10px; }
  .detail-actions { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
  .detail-actions button { min-height: 44px; padding: 8px 5px; font-size: 12px; }
  .detail-section { padding: 18px; margin-top: 14px; }
  .step { padding: 15px; }
  .steps { gap: 9px; }
  .story-banner { gap: 15px; }
  .story-banner a { min-height: 44px; display: flex; align-items: center; text-align: center; }
}

@media (max-width: 480px) {
  .hero-main { height: 265px; padding: 27px 21px; }
  .hero-main h1 { font-size: 25px; line-height: 1.4; }
  .hero-main p { max-width: 205px; }
  .hero-plane { width: 205px; right: -39px; top: 100px; opacity: .85; }
  .hero-copy { max-width: 270px; }
  .hero-cta { position: relative; z-index: 3; }
  .hero-side { gap: 8px; }
  .promo { padding: 14px 11px; }
  .promo h3 { font-size: 14px; }
  .promo .mini-label { font-size: 8px; letter-spacing: .5px; }
  .promo a { font-size: 10px; }
  .promo svg { opacity: .4; }
  .category-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .category-tile { border-bottom: 1px solid #f1f1f1; }
  .category-tile:nth-child(3) { border-right: 1px solid #f1f1f1; }
  .category-tile:nth-child(even) { border-right: 0; }
  .category-tile:nth-last-child(-n+2) { border-bottom: 0; }
  .story-banner { padding: 21px 17px; }
  .story-banner h2 { font-size: 16px; }
  .story-banner p { font-size: 11px; }
  .story-banner a { flex: none; max-width: 105px; line-height: 1.4; }
  .story-banner:after { display: none; }
}

@media (max-width: 360px) {
  .product-grid, .listing-content .product-grid { gap: 7px; }
  .product-info { padding: 8px; }
  .product-tag { top: 7px; left: 7px; padding: 4px 5px; }
  .metric strong { font-size: 16px; }
  .metric-caption { font-size: 9px; }
  .card-footer > span:last-child { display: none; }
  .detail-actions { grid-template-columns: 1fr; }
  .hero-plane { right: -57px; opacity: .7; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .product-card, .category-tile { transition: none; }
}
