.legacy-dialog { border: 0; border-radius: 4px; padding: 28px; width: min(460px, calc(100% - 32px)); max-height: 90vh; overflow: auto; box-shadow: 0 12px 45px #0004; }
.legacy-dialog::backdrop { background: #0009; }
.legacy-dialog h2 { margin: 0 30px 20px 0; }
.legacy-dialog-close { float: right; border: 0; background: transparent; font-size: 28px; cursor: pointer; }
.legacy-dialog label:not(.legacy-consent) { display: block; margin: 12px 0; }
.legacy-dialog input:not([type=checkbox]), .legacy-dialog textarea { box-sizing: border-box; width: 100%; padding: 10px; border: 1px solid #ccc; font: inherit; }
.legacy-consent { display: flex; align-items: flex-start; gap: 8px; margin: 14px 0; }
.legacy-dialog button[type=submit] { cursor: pointer; padding: 10px 20px; }
.legacy-status { margin-top: 12px; }
.legacy-results { list-style: none; padding: 0; }
.legacy-results li { padding: 8px 0; border-bottom: 1px solid #ddd; }
.legacy-dialog :focus-visible { outline: 2px solid #176b9b; outline-offset: 2px; }
.owl-carousel:not(.owl-loaded) { display: block; }
.legacy-slider-controls { display: flex; justify-content: center; gap: 12px; }
.legacy-slider-controls button { border: 1px solid #ddd; background: #fff; cursor: pointer; padding: 2px 12px; font-size: 24px; }
.legacy-preview-banner { position: fixed; z-index: 10000; right: 12px; bottom: 12px; max-width: calc(100vw - 24px); padding: 7px 11px; border: 1px solid #d5c58f; border-radius: 3px; background: #fff8df; color: #40381e; font: 12px/1.3 Arial, sans-serif; box-shadow: 0 2px 8px #0002; }
.c-menu-horizontal-1 .menu-item:hover > .menu-submenu, .c-menu-horizontal-1 .menu-item:focus-within > .menu-submenu, .c-menu-horizontal-1 .menu-submenu-item:hover > .menu-submenu, .c-menu-horizontal-1 .menu-submenu-item:focus-within > .menu-submenu { display: block !important; opacity: 1 !important; }
.legacy-map-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; box-sizing: border-box; text-align: center; }
[data-role="gallery.previews"]:not(.owl-loaded) { display: flex; gap: 10px; overflow-x: auto; }
[data-role="gallery.previews"]:not(.owl-loaded) [data-role="gallery.preview"] { flex: 0 0 70px; cursor: pointer; }
.legacy-unavailable { max-width: 1000px; margin: 60px auto; padding: 0 24px; min-height: 45vh; }
.legacy-catalog-note { padding: 10px 12px; font-size: 13px; color: #555; background: #f5f5f5; }
.catalog-section-items[data-local-view="list"] > .catalog-section-item, .catalog-section-items[data-local-view="text"] > .catalog-section-item { flex-basis: 100%; max-width: 100%; width: 100%; }
.catalog-section-items[data-local-view="text"] .catalog-section-item-image-block { display: none; }
.legacy-svg-icon { display: inline-flex; width: 1em; height: 1em; vertical-align: -0.1em; font-style: normal; }
.legacy-svg-icon svg { display: block; width: 100%; height: 100%; }
.legacy-svg-icon::before { content: none !important; }
.c-slider-template-1 .legacy-slider-dots { position: absolute; bottom: 25px; left: 0; right: 0; display: flex; justify-content: center; gap: 16px; z-index: 4; }
.c-slider-template-1 .legacy-slider-dots .owl-dot { border: 0; padding: 0 !important; flex: 0 0 9px; width: 9px; height: 9px; margin: 0 !important; background: transparent; cursor: pointer; }
.c-slider-template-1 .legacy-slider-dots .owl-dot span { display: block; width: 9px; height: 9px; border: 1px solid #bdbdbd; background: #ddd; border-radius: 50%; }
.c-slider-template-1 .legacy-slider-dots .owl-dot.active span { border-color: #0065ff; background: #0065ff; }
.legacy-slider-dots button:focus-visible { outline: 2px solid #0065ff; outline-offset: 2px; }
.legacy-comparison { padding: 24px 0 60px; min-height: 40vh; }
.legacy-comparison-tools { display: flex; gap: 14px; align-items: end; flex-wrap: wrap; }
.legacy-comparison-tools label { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.legacy-comparison-tools select { max-width: min(480px, 85vw); }
.legacy-comparison button, .legacy-comparison select, .legacy-comparison-button { border: 1px solid #ddd; background: white; padding: 10px 14px; color: #333; border-radius: 3px; font: inherit; }
.legacy-comparison button, .legacy-comparison-button { cursor: pointer; }
.legacy-comparison button:hover, .legacy-comparison-button:hover { border-color: #0065ff; color: #0065ff; }
.legacy-comparison :focus-visible, .legacy-comparison-button:focus-visible { outline: 2px solid #0065ff; outline-offset: 2px; }
.legacy-comparison-button { margin: 0 0 20px; }
.legacy-comparison-scroll { overflow-x: auto; }
.legacy-comparison table { border-collapse: collapse; width: 100%; }
.legacy-comparison caption { text-align: left; margin: 16px 0; font-size: 18px; }
.legacy-comparison th, .legacy-comparison td { border: 1px solid #eee; padding: 16px; text-align: left; min-width: 220px; max-width: 360px; vertical-align: top; overflow-wrap: anywhere; }
.legacy-comparison th:first-child { min-width: 160px; }
.legacy-comparison th img { display: block; width: 160px; height: 140px; object-fit: contain; margin: 16px 0; }
.legacy-comparison th button { display: block; margin-top: 12px; }
.legacy-comparison-toast { position: fixed; z-index: 10001; top: 100px; right: 20px; max-width: min(420px, calc(100vw - 40px)); padding: 12px; background: #fff; border: 1px solid #ccc; box-shadow: 0 4px 16px #0002; }
.legacy-comparison-toast:empty { display: none; }
/* Keep native compare controls below the order row, clear of the fixed rail. */
.ns-bitrix.c-catalog-element .catalog-element-purchase-buttons { display: block !important; }
html.legacy-menu-open { overflow: hidden; height: 100%; }
.c-breadcrumb-default .breadcrumb-wrapper-2 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
}
.c-breadcrumb-default .breadcrumb-wrapper-2 > .breadcrumb-item {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.c-breadcrumb-default .breadcrumb-wrapper-2 > .breadcrumb-separator { display: none; }
.c-breadcrumb-default .breadcrumb-separator + .breadcrumb-item::before { content: "/\00a0\00a0"; }
.c-breadcrumb-default .breadcrumb-link { display: inline; }
html.legacy-menu-open .legacy-preview-banner { display: none; }
@media (max-width: 768px) {
  .c-slider-template-1 [data-mobile-separated="true"] .legacy-slider-dots { top: 275px; bottom: auto; }
  .legacy-preview-banner { bottom: 68px; }
}

/* Imported product descriptions can contain fixed-width rules and wide tables. */
@media (max-width: 768px) {
  .catalog-description hr, .catalog-description img, .catalog-description iframe { max-width: 100%; }
  .catalog-description table { display: block; max-width: 100%; overflow-x: auto; }
}
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, [role="button"]:focus-visible, .catalog-description table:focus-visible { outline: 2px solid #0065ff; outline-offset: 2px; }

/* Reserve the gallery geometry before JavaScript and fonts become available. */
.ns-bitrix.c-catalog-element.c-catalog-element-catalog-default-1 [data-role="gallery.previews"]:not(.owl-loaded) {
  display: flex; gap: 10px; overflow-x: auto; align-items: flex-start;
}
.ns-bitrix.c-catalog-element.c-catalog-element-catalog-default-1 [data-role="gallery.preview"] {
  flex: 0 0 70px; width: 70px; min-width: 70px;
}
.ns-bitrix.c-catalog-element.c-catalog-element-catalog-default-1 [data-role="gallery.picture"]:not([data-active="true"]) { display: none; }
.catalog-description img { max-width: 100%; height: auto; }

/* Keep catalog tile photos inside the reserved square, even before JS runs. */
.catalog-section-item-image-slider { height: 100%; overflow: hidden; }
.catalog-section-item-image-slider > .catalog-section-item-image-element { height: 100%; width: 100%; }
.catalog-section-item-image-slider > .catalog-section-item-image-element[hidden],
.catalog-section-item-image-slider > .catalog-section-item-image-element:not(:first-of-type):not([data-active="true"]) { display: none !important; }
.catalog-section-item-image-slider > .catalog-section-item-image-element img { max-height: 100%; max-width: 100%; object-fit: contain; }
.legacy-tile-gallery-controls { position: absolute; bottom: 0; left: 0; right: 0; z-index: 2; display: flex; justify-content: space-between; pointer-events: none; }
.legacy-tile-gallery-controls button { pointer-events: auto; border: 1px solid #ddd; border-radius: 3px; background: #fff; color: #333; width: 30px; height: 30px; font-size: 24px; line-height: 1; cursor: pointer; }
.legacy-tile-gallery-controls button:hover { color: #0065ff; border-color: #0065ff; }
