@media (min-width: 768px) {
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
  .dialog { width: min(900px, calc(100% - 48px)); max-height: 86vh; border-radius: 28px; }
  .overlay { place-items: center; padding: 24px; }
  .product-detail { grid-template-columns: 1.1fr 1fr; align-items: start; }
  .checkout-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .field.wide, fieldset.wide { grid-column: 1/-1; }
  .profile-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
}
@media (min-width: 1024px) {
  .catalog-layout { grid-template-columns: 220px 1fr; align-items: start; }
  .mobile-categories { display: none; }
  .desktop-categories { position: sticky; z-index: var(--z-sticky-content); top: calc(var(--current-header-height, var(--header-height)) + 16px); display: flex; flex-direction: column; align-items: stretch; width: 220px; max-height: calc(100dvh - var(--current-header-height, var(--header-height)) - 32px); overflow-x: hidden; overflow-y: auto; padding: 0 6px 8px 0; background: transparent; overscroll-behavior: contain; }
  .category { text-align: left; border-radius: 12px; }
  .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .header-main { flex-wrap: wrap; padding-block: 10px; }
  .brand { margin-right: auto; }
  .mode-switch { order: 3; width: 100%; }
  .mode-switch button { flex: 1; padding-inline: 8px; font-size: .92rem; }
  .search { order: 4; min-width: 100%; }
}
@media (max-width: 767px) {
  .brand small { display: none; }
  .cart-btn { display: none; }
  .mobile-cart.has-items { display: flex; }
  .chat-toggle { bottom: calc(22px + env(safe-area-inset-bottom)); }
  body.has-cart .chat-toggle { bottom: calc(88px + env(safe-area-inset-bottom)); }
  body.has-cart .chat { bottom: calc(152px + env(safe-area-inset-bottom)); }
  .horizontal-cards { grid-auto-columns: 82vw; }
  .catalog-tools { align-items: stretch; flex-direction: column; }
  .catalog-tools > label { display: grid; gap: 5px; }
  .filter-panel { position: fixed; z-index: var(--z-dropdown); right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); left: 16px; top: auto; min-width: 0; max-height: 72dvh; overflow: auto; }
  .product-badge { font-size: .58rem; padding: 3px 5px; }
  .favorite-btn { top: 12px; right: 12px; width: 38px; height: 38px; }
  .product-card .add-btn { padding-inline: 4px; white-space: nowrap; font-size: .78rem; }
  .drawer { width: 100%; border-radius: 24px 0 0 24px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
