/* LIYUADS V47: mobile-only usability refinements. Desktop styles remain unchanged. */
@media (max-width: 767px) {
  /* Prevent flex/grid children and long product names from widening the viewport. */
  .liyu-topbar-inner, .liyu-navbar-inner, .ly-search, .ly-detail, .ly-home,
  .ly-search-head, .ly-browse-layout, .ly-browse-results, .ly-detail-grid,
  .ly9-card, .ly9-card-main { min-width: 0; }
  .liyu-search-form, .liyu-search-form input { min-width: 0; }
  .liyu-header-actions { flex-wrap: wrap; justify-content: flex-end; }
  .liyu-header-actions a, .liyu-mobile-menu-toggle,
  .ly-filter-actions button, .ly-filter-actions a,
  .ly-search-action, .ly-search-request, .ly-btn {
    min-height: 44px;
  }
  .ly-filter-actions { flex-wrap: wrap; white-space: normal; }
  .ly-search-head, .ly-panel, .ly9-card { max-width: 100%; }
  .ly-search-title, .ly-title, .ly9-card { overflow-wrap: anywhere; }
  .ly-detail .ly-gallery-main img, .ly-search-photo img { max-width: 100%; }
  .ly-detail .ly-thumbs { flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; }
  .ly-detail .ly-thumb { flex: 0 0 64px; width: 64px; height: 64px; }
  .ly-detail .ly-actions { align-items: stretch; }
  .ly-detail .ly-actions .ly-btn { text-align: center; }
  .ly-search-pages { flex-wrap: wrap; }
  .ly46-search input { min-width: 0; }
}
@media (max-width: 420px) {
  .liyu-header-actions { max-width: 100%; }
  .ly46-search { flex-wrap: wrap; }
  .ly46-search input, .ly46-search button { min-height: 44px; }
  .ly46-search input { flex: 1 1 100%; }
  .ly46-search button { flex: 1 1 100%; }
  .ly-detail .ly-actions .ly-btn { width: 100%; }
  .ly-detail .ly-gallery-main { height: min(300px, 75vw); }
  .ly-search .ly-filter-form { grid-template-columns: minmax(0,1fr); }
  .ly-search .ly-filter-form > * { min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .ly-search-card, .ly-related-card { transition: none !important; }
  .ly-search-card:hover, .ly-related-card:hover { transform: none !important; }
}
