.mobile-bar, #catalog-category-toggle, .menu-toggle-text { display: none; }
.topbar {
  background: #edf3eb;
  border-color: #dce7dc;
  color: #2d4b3b;
}
.topbar .topbar-inner { min-height: 41px; gap: 10px; }
.topbar .topbar-inner a {
  min-height: 32px;
  gap: 6px;
  padding: 3px 8px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #284737;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}
.topbar .mini-location { padding-inline-start: 0; }
.topbar .ui-icon { width: 15px; height: 15px; flex: none; color: #3c664f; }
.topbar .topbar-nav { display: flex; align-items: center; gap: 5px; }
.topbar .topbar-inner a:hover { background: #e1ece0; color: #1c392b; }
.topbar .topbar-nav a[aria-current="page"] {
  border-color: #c5d8c5;
  background: #e0ebe0;
  color: #1c392b;
}
.header .header-phone {
  display: inline-flex;
  align-items: center;
  flex: none;
  gap: 8px;
  min-height: 46px;
  padding: 5px 10px 5px 5px;
  border: 1px solid #d9e5d8;
  border-radius: 11px;
  background: #f0f5ed;
  color: #1c3d30;
  line-height: 1.2;
}
.header-phone-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #315742;
  color: #fff;
}
.header-phone-icon .ui-icon { width: 18px; height: 18px; }
.header-phone-copy { display: grid; gap: 3px; }
.header-phone-copy strong { font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; }
.header-phone .header-phone-copy small { margin: 0; color: #486054; font-size: 10px; font-weight: 650; }
.header .header-phone:hover { border-color: #adbcac; background: #e5efe4; }
.header-phone:hover .header-phone-icon { background: #234d38; }
.qty-controls button:focus-visible { outline-offset: -3px; }
.detail-quantity .qty-controls { margin-top: 4px; border-radius: 8px; }
.detail-quantity .qty-controls button { display: grid; place-items: center; width: 38px; height: 43px; }
.detail-quantity .qty-controls input { width: 68px; height: 43px; font-size: 14px; }
.detail-quantity .qty-controls svg { width: 15px; height: 15px; }
.detail-purchase .button { min-width: 0; }

@media (max-width: 1100px) {
  .catalog-category-preview { display: none; }
  .catalog-heading .eyebrow { display: none; }
  .catalog-heading h1 { margin-block: 0 7px; }
  .catalog-layout { display: flex; flex-direction: column; gap: 12px; }
  .catalog-layout.has-category-menu > #catalog-category-toggle {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    width: 100%;
    min-height: 48px;
    padding: 8px 13px;
    border: 1px solid #c9d9ca;
    border-radius: 10px;
    background: #eaf2e8;
    color: #214535;
    font-size: 14px;
    font-weight: 750;
  }
  #catalog-category-toggle .ui-icon:last-child { margin-left: auto; transform: rotate(90deg); }
  #catalog-category-toggle[aria-expanded="true"] .ui-icon:last-child { transform: rotate(-90deg); }
  .catalog-layout.has-category-menu .catalog-sidebar:not(.is-open) { display: none; }
  .catalog-layout .catalog-sidebar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 10px;
    margin: 0;
    padding: 10px;
    overflow: visible;
    background: white;
    border: 1px solid var(--line);
  }
  .catalog-sidebar :is(h2,.sidebar-help) { display: none; }
  .catalog-layout .category-filter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 7px 8px;
    min-height: 44px;
    line-height: 1.4;
    border: 1px solid #e5ebe3;
    white-space: normal;
    font-size: 13px;
  }
  .catalog-layout .category-filter.subcategory { padding-inline-start: 12px; }
  .catalog-layout .category-filter.active { border-color: #adc6b2; }
  .catalog-main .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .catalog-main .product-body h3 { font-size: 14px; }
  .catalog-main .product-body > p { font-size: 12px; }
  .quote-add { min-height: 44px; font-size: 13px; }
  .catalog-pagination :is(a,span) { min-width: 44px; min-height: 44px; }
  .header .header-search :is(input,button) { min-height: 44px; }
  .header .header-search button { min-width: 44px; }
  .category-grid .category-card.imported-category { align-items: stretch; min-height: 112px; padding: 12px; }
  .category-grid .imported-category > div:first-child {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    width: 100%;
  }
  .category-grid .imported-category h3 { max-width: none; margin: 0; font-size: clamp(13px, 1.85vw, 16px); }
  .category-grid .imported-category > img { width: 40%; height: 52%; bottom: 4px; object-position: right bottom; }
  .category-grid .imported-category .category-count { margin-top: 13px; }
}

@media (min-width: 768px) and (max-width: 1100px) {
  .header .menu-toggle { width: 44px; height: 44px; flex: 0 0 44px; }
  .header .header-main { gap: 12px; }
  .header .brand img { width: 130px; }
  .header .catalog-button { margin-inline: 0; }
  .header .header-search { display: flex; flex: 1 1 180px; min-width: 0; }
  .header-search input { font-size: 16px; }
  .header .main-nav.open { padding: 12px; }
  .header .main-nav .nav-link { min-height: 44px; }
  .main-nav .nav-categories { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .main-nav .nav-tools { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .modern-benefits strong { font-size: 12px; }
  .modern-benefits p { font-size: 11px; }
  .category-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .product-detail { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 24px; }
  .detail-info h1 { font-size: clamp(24px, 3.35vw, 36px); }
  .service-card h3 { font-size: clamp(21px, 2.8vw, 28px); }
}

@media (min-width: 768px) and (max-width: 880px) {
  .header .header-phone { justify-content: center; width: 46px; padding: 4px; }
  .header .header-phone-copy { display: none; }
}

@media (max-width: 767px) {
  :root { --mobile-bar-height: 60px; }
  html { scroll-padding-bottom: calc(var(--mobile-bar-height) + env(safe-area-inset-bottom) + 8px); }
  body {
    padding-inline: env(safe-area-inset-left) env(safe-area-inset-right);
    padding-bottom: calc(var(--mobile-bar-height) + env(safe-area-inset-bottom));
  }
  .mobile-bar {
    position: fixed;
    z-index: 20;
    inset: auto 0 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    min-height: calc(var(--mobile-bar-height) + env(safe-area-inset-bottom));
    padding: 4px max(5px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(5px, env(safe-area-inset-left));
    border-top: 1px solid #d8e4d8;
    background: #fcfdf9;
    box-shadow: 0 -5px 19px #1b302517;
  }
  .mobile-bar > :is(a,button) {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    min-height: 48px;
    gap: 3px;
    padding: 4px 2px;
    border-radius: 8px;
    color: #234536;
    text-align: center;
    font-size: 11px;
    font-weight: 750;
    line-height: 1.2;
  }
  .mobile-bar > a[aria-current] { color: #1c4330; background: #e6f0e4; }
  .mobile-bar .ui-icon { width: 23px; height: 23px; }
  .mobile-cart-icon { position: relative; display: flex; }
  .mobile-cart-count:not([hidden]) {
    position: absolute;
    inset: -5px auto auto 70%;
    display: grid;
    place-items: center;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border: 1px solid #fff;
    border-radius: 100px;
    color: white;
    background: #a7442a;
    font-size: 9px;
  }
  .toast { bottom: calc(var(--mobile-bar-height) + env(safe-area-inset-bottom) + 9px); }
  .header .header-main {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    min-height: 0;
    gap: 7px 12px;
    padding-block: 5px 9px;
  }
  .header .brand img { width: 114px; }
  .header .header-main > :is(.catalog-button,.basket-button,.header-phone) { display: none; }
  .header .header-search { order: initial; grid-row: 2; grid-column: 1/-1; min-height: 44px; }
  .header .header-search input { font-size: 16px; padding-block: 7px; }
  .header .header-search button { font-size: 19px; }
  .header .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    grid-area: 1 / 3;
    gap: 6px;
    width: auto;
    height: 44px;
    padding-inline: 10px;
  }
  .menu-toggle-text { display: inline; font-size: 12px; font-weight: 750; }
  .header .menu-toggle .ui-icon { width: 23px; height: 23px; }
  .header .main-nav .nav-link { font-size: 12px; }
  .topbar .topbar-inner { min-height: 36px; gap: 4px; }
  .topbar .topbar-inner a { min-height: 30px; padding-inline: 5px; gap: 4px; font-size: 11px; }
  .topbar .topbar-nav { gap: 1px; }
  .topbar .mini-location { padding-inline-start: 0; }
  .topbar .topbar-extra { display: none; }
  .modern-hero { min-height: 0; grid-template-columns: minmax(0, 1fr); }
  .modern-hero .hero-copy { padding: 21px 19px; }
  .modern-hero h1 { font-size: clamp(30px, 7.9vw, 44px); }
  .modern-hero .hero-actions { align-items: center; gap: 7px 12px; }
  .modern-hero .hero-actions :is(.button,.hero-service) { min-height: 44px; }
  .modern-hero-media { min-height: clamp(155px, 48vw, 245px); }
  .modern-benefits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .modern-benefits strong { font-size: 11px; }
  .modern-benefits p { font-size: 10px; }
  .section-heading { gap: 10px; }
  .section-heading .text-link { min-height: 44px; text-align: end; }
  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .breadcrumbs { font-size: 11px; gap: 5px; padding-top: 13px; overflow-wrap: anywhere; }
  .page-heading { padding-block: 13px 17px; }
  .page-heading > p { font-size: 13px; }
  .catalog-heading { padding-block: 8px 12px; }
  .catalog-heading h1 { font-size: clamp(26px, 7.25vw, 33px); }
  .catalog-main .product-grid, .home-products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-body :is(h3,p) { overflow-wrap: anywhere; }
  .product-body h3, .catalog-main .product-body h3 { font-size: 13px; }
  .catalog-main .product-body > p { font-size: 11px; }
  .quote-tools.catalog-tools {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px;
  }
  .quote-tools .catalog-search { grid-area: 1 / 1; min-height: 46px; }
  .quote-tools .catalog-search input { font-size: 16px; padding: 6px; }
  .quote-tools > .button { grid-area: 1 / 2; min-height: 46px; padding-inline: 11px; }
  .quote-tools .sort-label { grid-area: 2 / 1 / 3 / -1; }
  .quote-tools .sort-label select { width: 100%; height: 44px; font-size: 16px; }
  .catalog-meta { min-height: 36px; }
  .catalog-meta :is(p,.text-link) { font-size: 12px; }
  .catalog-pagination { gap: 4px; }
  .product-detail { grid-template-columns: minmax(0, 1fr); gap: 14px; padding-top: 12px; }
  .detail-image { max-height: min(53vw, 330px); }
  .detail-image img { width: 100%; height: 100%; object-fit: contain; }
  .detail-info h1 { font-size: clamp(23px, 6vw, 33px); margin-block: 5px 10px; }
  .detail-info .detail-purchase {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 7px 11px;
    margin-block: 12px;
  }
  .detail-purchase .button { flex: 1 1 156px; min-height: 46px; padding-inline: 8px; }
  .detail-quantity .qty-controls input { width: 56px; font-size: 16px; }
  .detail-quantity .qty-controls button { width: 39px; }
  .detail-quantity .qty-controls :is(input,button) { height: 44px; }
  .detail-links a { min-height: 44px; }
  .service-cards { grid-template-columns: minmax(0, 1fr); }
  .service-card, .service-card > div { min-height: 250px; }
  .service-card h3 { margin-top: 26px; }
  .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .contact-email { overflow-wrap: anywhere; }
  .modern-footer .footer-bottom { display: grid; grid-template-columns: 1fr auto; }
}

@media (max-width: 1100px) {
  .gallery-thumb { min-width: 44px; min-height: 44px; }
  .request-dialog :is(input:not([type=checkbox]),textarea) { font-size: 16px; min-height: 44px; }
  .request-dialog label { font-size: 12px; }
  .request-dialog .consent input { width: 20px; height: 20px; flex: 0 0 20px; }
  .request-dialog .consent { min-height: 44px; align-items: center; }
  .request-dialog .consent-documents a { min-height: 36px; }
  dialog .close-button { flex: 0 0 44px; width: 44px; height: 44px; background: #e9f0e8; border-radius: 10px; }
  .cart-row { grid-template-columns: 54px minmax(0, 1fr) 44px; gap: 8px; }
  .cart-row img { width: 54px; height: 54px; }
  .cart-row h3 { overflow-wrap: anywhere; }
  .cart-row .qty-controls button { width: 44px; height: 44px; }
  .cart-row .qty-controls input { width: 60px; height: 44px; font-size: 16px; }
  .cart-row .remove-item { width: 44px; height: 44px; }
}

@media (max-width: 767px) {
  dialog:is(.cart-dialog,.request-dialog) {
    inset: auto 0 0;
    width: 100%;
    max-width: 100%;
    max-height: calc(100dvh - max(10px, env(safe-area-inset-top)));
    margin: 0;
    padding: 0 max(13px, env(safe-area-inset-right)) max(13px, env(safe-area-inset-bottom)) max(13px, env(safe-area-inset-left));
    border-radius: 17px 17px 0 0;
    overscroll-behavior: contain;
  }
  dialog .dialog-header { padding: 11px 0 9px; margin: 0 0 8px; align-items: center; }
  dialog .dialog-header h2 { font-size: 24px; }
  .request-dialog .dialog-header { position: sticky; z-index: 1; top: 0; background: var(--paper); }
  .cart-dialog[open] { display: grid; grid-template-rows: auto minmax(0,1fr) auto auto; }
  #cart-items { overflow: auto; overscroll-behavior: contain; min-height: 0; }
  .cart-dialog #cart-summary:not([hidden]) { padding-top: 6px; border-top: 1px solid var(--line); }
  #cart-summary .cart-quote-note { margin-top: 4px; }
  #cart-summary #checkout-button { margin-top: 7px; width: 100%; }
  .cart-dialog :is(.cart-actions button,.continue-shopping) { min-height: 40px; margin-top: 2px; }
  .cart-dialog .cart-actions { margin-top: 2px; gap: 5px; }
}

@media (max-width: 359px) {
  .category-grid .imported-category h3 { font-size: 12px; }
  .catalog-layout .catalog-sidebar { grid-template-columns: minmax(0, 1fr); }
  .cart-row { grid-template-columns: 40px minmax(0, 1fr) 44px; }
  .cart-row img { width: 40px; height: 40px; }
}
