/* Mobile layout shared by every page; desktop positioning remains unchanged. */
@media (max-width:900px) {
  .container, .wide-container, .reviews-layout, .mf-container { width:calc(100% - 40px); }
  .hero-copy { margin-left:0; width:100%; }
  .hc-hero-inner { left:auto; padding-inline:0; }
  .bc-hero-inner { transform:none; padding-inline:0; }
  .hc-form { width:100%; max-width:100%; padding-inline:0; transform:none; translate:none; }
  .hc-form::before { display:none; }
  #order .estimate-form { translate:none; min-width:0; }
  .mf-grid, .mf-column { translate:none; }
  .mf-column { margin-right:0; }
  .mf-appointment { transform:none; min-width:0; white-space:normal; }
  .site-header .logo img { transform:none; }
  .site-header .menu-toggle { width:44px; height:44px; align-items:center; padding:10px; }
  :is(.hc-form,.bc-form,.catalog-lead-form,.estimate-form) input:not([type=checkbox]):not([type=hidden]) { min-width:0; font-size:16px; }
  .in-project-form, .in-order-copy, .hc-order-copy, .bc-order-inner { min-width:0; }
  :is(.hc-consent,.bc-consent,.order-consent,.catalog-consent) > span { min-width:0; overflow-wrap:anywhere; }
  .mf-title { white-space:normal; }
  .slider-prev { left:0; }
  .slider-next { right:0; }
  .testimonials-prev { left:-8px; }
  .testimonials-next { right:-8px; }
}

@media (max-width:600px) {
  :root { --section-space:36px; }
  .container, .wide-container, .reviews-layout, .mf-container { width:calc(100% - 32px); }
  .site-header { --header-height:108px; }
  .site-header .header-inner { display:grid; grid-template-columns:minmax(0,1fr) 44px; gap:10px 16px; width:calc(100% - 32px); min-height:0; padding-block:12px; }
  .site-header .logo { width:160px; max-width:100%; grid-column:1; grid-row:1; }
  .site-header .logo img { width:100%; transform:none; }
  .site-header .menu-toggle { grid-column:2; grid-row:1; margin:0; }
  .site-header .header-phones { grid-column:1/-1; grid-row:2; display:block; min-width:0; }
  .site-header .header-phones > div { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px 12px; }
  .site-header .header-phones a { font-size:14px; line-height:1.4; padding-block:3px; }
  .site-header .header-phones .second-phone { margin:0; }
  .site-header .main-nav { margin:0; padding:8px 16px 16px; }
  .site-header .main-nav > a { min-height:48px; display:flex; align-items:center; }

  body:has(#hero-title) .hero-copy { max-width:none; }
  .hero-actions { flex-direction:column; align-items:stretch; max-width:none; }
  .hero-actions .button { width:100%; min-height:48px; font-size:16px; }
  .hero-benefits { width:100%; max-width:none; gap:16px 12px; padding:14px 12px; }
  .hero-benefits li, .hero-benefits li span { min-width:0; }
  .hero-benefits li { align-items:flex-start; }
  .hero-benefits li span { overflow-wrap:anywhere; }
  .hero-inner { padding-top:28px; }
  .section-heading { flex-wrap:wrap; align-items:center; gap:10px 16px; }
  .section-heading h2 { width:100%; }
  .section-heading .text-link { margin-top:0; min-height:32px; }
  .catalog-row-top, .catalog-row-bottom { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .category-label { gap:6px; }
  body:has(#hero-title) .advantages-grid { grid-template-columns:1fr; gap:12px; }
  body:has(#hero-title) .advantage { display:grid; grid-template-columns:44px minmax(0,1fr); gap:6px 16px; padding:18px; min-height:0; }
  body:has(#hero-title) .advantage-icon { width:44px; height:44px; grid-row:1/3; margin:0; }
  body:has(#hero-title) .advantage h3 { min-height:0; margin:0; font-size:16px; }
  body:has(#hero-title) .advantage p { margin:0; line-height:1.45; font-size:16px; }
  body:has(#hero-title) .advantage br { display:none; }
  .portfolio-track { margin-right:0; padding-right:0; }
  .slider-prev { left:0; }
  .slider-next { right:0; }
  .slider-prev, .slider-next { width:44px; height:44px; }
  .brand-list { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .brand-list li:nth-child(n) { border-left:1px solid #d3ccc7; }
  .brand-list li:nth-child(3n+1) { border-left:0; }
  .testimonials-prev { left:-8px; }
  .testimonials-next { right:-8px; }
  .testimonials-arrow { width:44px; height:44px; }

  .hc-hero-benefits, .bc-hero-benefits { display:grid; grid-template-columns:minmax(0,1fr); gap:16px; }
  .hc-hero-benefits li, .bc-hero-benefits li { flex-direction:row; align-items:center; gap:14px; padding:0; border:0; }
  .hc-hero-benefits br, .bc-hero-benefits br { display:none; }
  .hc-form .hc-button, .bc-form .bc-button, .catalog-lead-form > .catalog-button { white-space:normal; min-height:48px; }
  .hc-form { padding-top:20px; }
  .bc-order-inner { width:100%; }
  .hc-hero-copy > .hc-button { max-width:none; font-size:16px; }
  .bc-hero .bc-button, .catalog-hero .hero-button { width:100%; min-height:48px; font-size:16px; }
  #order .estimate-form { max-width:100%; }
  .consultation-close, .thanks-close { min-width:44px; min-height:44px; }
  #consultation-dialog { scroll-padding-block:20px; }

  .mf-grid { grid-template-columns:repeat(2,minmax(0,1fr)); padding-inline:0; gap:28px 20px; }
  .mf-brand, .mf-contacts, .mf-company { min-width:0; }
  .mebeles-footer .mf-title { white-space:normal; line-height:1.35; }
  .mf-private .mf-title, .mf-business .mf-title { min-height:2.7em; }
  .mf-column ul { gap:4px; margin-top:10px; }
  .mf-column a { min-height:36px; display:inline-flex; align-items:center; padding-block:5px; }
  .mf-column .mf-title a { padding:0; min-height:0; }
  .mf-contacts .mf-appointment { width:100%; max-width:none; min-height:48px; }
  .mf-bottom-grid { gap:16px; }
  .mf-back-top { min-height:44px; }
  .mebeles-footer .mf-legal { overflow-wrap:anywhere; }
  .legacy-main .block-56, .gallery-page { width:calc(100% - 32px); }
  .legacy-main .content { overflow-wrap:anywhere; }
  .legacy-main .content p { margin-block:1em; }
  .legacy-main :is(img,iframe,table) { max-width:100%; }
}

@media (max-width:359px) {
  .hero-benefits { grid-template-columns:1fr; }
  .hero-benefits li span { overflow-wrap:normal; }
  .catalog-row-top, .catalog-row-bottom { grid-template-columns:1fr; }
}
