/* Мобильная адаптация общих блоков и каталога. */
@media (max-width: 1024px) {
  .catalog-layout { grid-template-columns: minmax(0, 1fr); }
  .catalog-main, #products-grid { width: 100%; }
  .catalog-main, .product-card, .product-card-body { min-width: 0; }
  .catalog-toolbar, .catalog-toolbar-right { flex-wrap: wrap; }
  .filter-sidebar, .catalog-sidebar { max-width: calc(100vw - 20px); height: 100dvh; max-height: 100dvh; }
  .mobile-menu { max-width: 100vw; height: 100dvh; }
}
@media (max-width: 768px) {
  .site-cta-strip { position: static; bottom: auto; z-index: auto; }
  h1, h2, h3, .breadcrumb, .brand-document-link, .catalog-doc-card { overflow-wrap: anywhere; }
  #product-main-grid { grid-template-columns: minmax(0, 1fr) !important; gap: 20px !important; }
  #product-main-grid > *, .product-tabs { min-width: 0; max-width: 100%; }
  .product-action-btns { flex-wrap: wrap; }
  .product-action-btn { min-height: 40px; }
  .tabs-nav { flex-wrap: wrap; }
  .tabs-nav .tab-btn { flex: 1 1 140px; min-width: 0; white-space: normal; min-height: 44px; }
  .site-cta-strip .site-cta-strip-inner { display: flex; flex-wrap: wrap; overflow: visible; }
  .site-cta-strip .site-cta-strip-inner .btn { flex: 1 1 200px; min-width: 0; max-width: 100%; white-space: normal; min-height: 44px; }
  .catalog-toolbar-right { width: 100%; min-width: 0; }
  .catalog-sort { flex: 1 1 230px; min-width: 0; flex-wrap: wrap; }
  .catalog-sort select { flex: 1; min-width: 0; max-width: 100%; min-height: 40px; }
  .products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-card-body { overflow-wrap: anywhere; }
  .product-card-actions { flex-wrap: wrap; position: static; }
  .product-card-actions .btn { min-width: 0; padding: 8px 6px; white-space: normal; min-height: 40px; }
  .product-card-price-row, .product-card-footer { flex-wrap: wrap; gap: 8px; }
  .spec-row { gap: 6px; }
  .spec-value { min-width: 0; overflow-wrap: anywhere; }
  .modal { max-width: calc(100vw - 24px); max-height: calc(100dvh - 24px); overflow-y: auto; }
  .modal input, .modal select, .modal textarea, .b2b-form input, .b2b-form select, .b2b-form textarea { font-size: 16px; max-width: 100%; }
  .hero-buttons { flex-wrap: wrap; }
}
@media (max-width: 480px) {
  .products-grid, .products-grid.list-view { grid-template-columns: minmax(0, 1fr); }
  .products-grid .product-card, .products-grid.list-view .product-card { grid-template-columns: minmax(0, 1fr); }
  .products-grid .product-card-image { height: 150px; border-right: 0; }
  .product-card-actions .btn { flex: 1 1 100px; }
  .catalog-category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery-main { height: 260px; }
}

/* Переносим русский текст по словам, а не по буквам. */
@media (max-width: 768px) {
  body :is(h1,h2,h3,h4,p,a,button,label,span,strong,td,th,li),
  .product-card-body, .breadcrumb, .catalog-category-body h3 {
    word-break: normal;
    overflow-wrap: normal;
    hyphens: none;
  }
  .site-cta-strip { position: static !important; inset: auto; }
}
@media (max-width: 480px) {
  h1, .page-title, #product-header h1 { font-size: 22px !important; }
  .catalog-category-body h3 { font-size: 12px; }
}
@media (max-width: 360px) {
  h1, .page-title, #product-header h1 { font-size: 20px !important; }
}
