/* Hand-written replacement for design_template/867 (never archived by
   Wayback — see scripts/fix-missing-stylesheets.mjs). Targets the "b-"
   prefixed markup used by 306 restored pages, matching the same brand
   colors/type as the surviving 645/lightred template (#ef5b5b accent). */

.b-page {
  font: 14px/1.5 Arial, Helvetica, sans-serif;
  color: #313131;
  background: #fff;
}

.b-page__wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.b-page__main-content {
  padding: 24px 0 48px;
}

.b-page__row {
  margin-bottom: 24px;
}

/* header */

.b-header {
  border-bottom: 1px solid #eaeaea;
}

.b-header__top {
  background: #f2f2f2;
  font-size: 13px;
  color: #696969;
}

.b-header__top .b-header__wrapper {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.b-header-phones__info {
  display: flex;
  gap: 16px;
}

.b-header-phones__part {
  color: #313131;
  font-weight: bold;
}

.b-schedule-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #696969;
  font: inherit;
}

.b-header__middle .b-header__wrapper {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-top: 16px;
  padding-bottom: 16px;
}

.b-header-company-name {
  display: flex;
  align-items: center;
  gap: 12px;
}

.b-header-company-name__img {
  display: block;
  max-height: 60px;
  width: auto;
}

.b-header-company-name__title {
  font-size: 13px;
  color: #888;
  max-width: 320px;
  display: block;
}

.b-header__search {
  flex: 1;
  max-width: 480px;
  min-width: 0;
}

.b-search {
  position: relative;
  display: flex;
}

.b-search__field {
  flex: 1;
  padding: 10px 40px 10px 14px;
  border: 1px solid #dedede;
  border-radius: 3px;
  font: inherit;
  color: #313131;
}

.b-search__field:focus {
  outline: none;
  border-color: #ef5b5b;
}

.b-search__button {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border: none;
  background: transparent;
  cursor: pointer;
  opacity: 0.6;
}

.b-header__cart {
  margin-left: auto;
}

.b-cart-button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid #ef5b5b;
  border-radius: 3px;
  color: #ef5b5b;
  cursor: pointer;
  white-space: nowrap;
}

.b-cart-button:hover {
  background: #ef5b5b;
  color: #fff;
}

/* nav menu */

.b-header__nav-part {
  background: #313131;
}

.b-menu__holder {
  display: flex;
  flex-wrap: wrap;
}

.b-menu__item {
  position: relative;
}

.b-menu__link {
  display: block;
  padding: 12px 16px;
  color: #fff;
  text-decoration: none;
  font-size: 14px;
}

.b-menu__item:hover > .b-menu__link-wrap > .b-menu__link,
.b-menu__item_state_active .b-menu__link {
  background: #ef5b5b;
  color: #fff;
}

.b-menu__sub-nav {
  display: none;
  position: absolute;
  left: 0;
  top: 100%;
  min-width: 240px;
  background: #fff;
  border: 1px solid #eaeaea;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 50;
}

.b-menu__item:hover .b-menu__sub-nav {
  display: block;
}

.b-sub-menu__link {
  display: block;
  padding: 10px 16px;
  color: #313131;
  text-decoration: none;
}

.b-sub-menu__link:hover,
.b-sub-menu__item_state_active .b-sub-menu__link {
  background: #f2f2f2;
  color: #ef5b5b;
}

/* breadcrumbs / title */

.b-breadcrumb {
  font-size: 13px;
  color: #888;
}

.b-title {
  font-size: 26px;
  font-weight: bold;
  color: #313131;
  margin: 8px 0 16px;
}

.b-user-content {
  color: #696969;
  line-height: 1.6;
}

.b-social-links {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.b-social-links__item img {
  display: block;
  width: 24px;
  height: 24px;
}

/* subcategory cards */

.b-product-groups-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.b-product-groups-gallery__item {
  border: 1px solid #eaeaea;
  border-radius: 4px;
  overflow: hidden;
  text-align: center;
  transition: box-shadow 0.2s ease;
}

.b-product-groups-gallery__item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.b-product-groups-gallery__image-link {
  display: block;
}

.b-product-groups-gallery__image {
  display: block;
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.b-product-groups-gallery__header {
  padding: 10px;
}

.b-product-groups-gallery__title {
  color: #313131;
  text-decoration: none;
  font-size: 14px;
}

.b-product-groups-gallery__title:hover {
  color: #ef5b5b;
}

/* product grid */

.b-product-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.b-product-gallery__item {
  border: 1px solid #eaeaea;
  border-radius: 4px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s ease;
}

.b-product-gallery__item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.b-product-gallery__image-link {
  display: block;
  margin-bottom: 10px;
}

.b-product-gallery__image {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 3px;
}

.b-product-gallery__title {
  color: #313131;
  text-decoration: none;
  font-size: 14px;
  line-height: 1.4;
  display: block;
  min-height: 2.8em;
}

.b-product-gallery__title:hover {
  color: #ef5b5b;
}

.b-product-gallery__sku {
  display: block;
  font-size: 12px;
  color: #a0a0a0;
  margin-top: 4px;
}

.b-product-gallery__prices {
  margin: 10px 0;
}

.b-product-gallery__current-price {
  font-size: 18px;
  font-weight: bold;
  color: #ef5b5b;
}

.b-product-gallery__data {
  font-size: 13px;
  color: #696969;
  margin-bottom: 10px;
}

.b-product-gallery__state_val_avail {
  color: #4caf50;
}

.b-product-gallery__buttons {
  margin-top: auto;
}

.b-custom-button {
  display: inline-block;
  padding: 10px 28px;
  border: none;
  border-radius: 3px;
  background: #ef5b5b;
  color: #fff;
  font: inherit;
  font-weight: bold;
  cursor: pointer;
  text-align: center;
}

.b-custom-button:hover {
  background: #d94b4b;
}

/* only the category-card buy button should stretch full width */
.b-product-gallery__buttons .b-custom-button {
  display: block;
  width: 100%;
}

/* footer */

.b-footer {
  background: #313131;
  color: #b0b0b0;
  font-size: 13px;
  padding: 20px 0;
  margin-top: 40px;
}

.b-footer__row {
  max-width: 1200px;
  margin: 0 auto;
  padding: 6px 20px;
}

.b-footer a {
  color: #d0cccc;
}

.b-footer a:hover {
  color: #ef5b5b;
}

/* two-column layout: product grid + sidebar (filters/contacts) */

.b-page__content-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 32px;
}

.b-page__content {
  flex: 1;
  min-width: 0;
}

.b-sidebar {
  flex: 0 0 260px;
  width: 260px;
}

.b-caption {
  display: block;
  font-size: 16px;
  font-weight: bold;
  color: #313131;
  margin-bottom: 10px;
}

.b-sidebar__container {
  background: #f8f8f8;
  border: 1px solid #eaeaea;
  border-radius: 4px;
  padding: 16px;
  margin-bottom: 24px;
}

/* filters */

.b-filter__title {
  display: block;
  font-size: 13px;
  font-weight: bold;
  color: #696969;
  margin: 16px 0 8px;
}

.b-filter__title:first-child {
  margin-top: 0;
}

.b-range-filter {
  display: flex;
  align-items: center;
  gap: 6px;
}

.b-range-filter__input {
  width: 0;
  flex: 1;
  padding: 7px 8px;
  border: 1px solid #dedede;
  border-radius: 3px;
  font: inherit;
  font-size: 13px;
  color: #313131;
}

.b-range-filter__button {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border: 1px solid #ef5b5b;
  border-radius: 3px;
  background: #ef5b5b url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center/16px no-repeat;
  cursor: pointer;
}

.b-filter-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.b-filter-list__item {
  margin-bottom: 6px;
}

.b-filter-list__label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #313131;
}

.b-filter-list__link {
  display: flex;
  align-items: center;
  gap: 6px;
}

.b-filter-list__label:hover .b-filter-list__link {
  color: #ef5b5b;
}

.b-filter-list__count {
  color: #a0a0a0;
  font-size: 12px;
}

/* contacts */

.b-sidebar-contacts__list {
  margin-bottom: 12px;
  font-size: 13px;
  line-height: 1.5;
}

.b-sidebar-contacts__company-name {
  color: #313131;
  font-weight: bold;
}

.b-sidebar-contacts__person {
  color: #696969;
}

.b-sidebar-contacts__address {
  color: #696969;
}

.b-sidebar-contacts__phone {
  margin-bottom: 6px;
}

.b-sidebar-contacts__phones-single {
  color: #ef5b5b;
  font-weight: bold;
}

.b-sidebar-contacts__description {
  display: block;
  color: #a0a0a0;
  font-size: 12px;
}

/* feedback banner (bottom of page) */

.b-feedback-banner__container {
  margin-top: 24px;
  padding: 16px;
  background: #f2f2f2;
  border-radius: 4px;
  text-align: center;
}

.b-feedback-banner__text {
  color: #696969;
  margin-bottom: 8px;
}

.b-feedback__button {
  display: inline-block;
  padding: 8px 20px;
  border-radius: 3px;
  background: #ef5b5b;
  color: #fff;
  text-decoration: none;
}

.b-feedback__button:hover {
  background: #d94b4b;
}

@media (max-width: 900px) {
  .b-page__content-wrapper {
    flex-direction: column;
  }
  .b-sidebar {
    width: 100%;
    flex-basis: auto;
  }
}

@media (max-width: 640px) {
  .b-header__middle .b-header__wrapper {
    flex-wrap: wrap;
  }
  .b-header__search {
    order: 3;
    max-width: none;
    flex-basis: 100%;
  }
}

/* product detail page (b-product / cs-image-holder gallery) */

.b-product__container {
  display: flex;
  align-items: flex-start;
  gap: 32px;
  margin-bottom: 32px;
}

.b-product__image-panel {
  flex: 0 0 420px;
  width: 420px;
}

.b-product__info-holder {
  flex: 1;
  min-width: 0;
}

.cs-product__image {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1px solid #eaeaea;
  border-radius: 4px;
}

.cs-image-holder__image-link {
  display: block;
  width: 100%;
  height: 100%;
}

.cs-product__image .cs-image-holder__image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cs-image-holder__image-slider {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  min-width: 0;
}

.cs-images {
  display: flex;
  gap: 8px;
  overflow: hidden;
  flex: 1;
  /* a flex item's default min-width is auto (its content's min-content
     size), NOT 0 - overflow:hidden above only clips how overflowing
     thumbnails are painted, it does nothing to this sizing rule. With 5+
     thumbnails at 64px + flex:0 0 (each refusing to shrink), this item's
     min-content width was ~400px+, which it refused to shrink below -
     forcing .b-product__image-panel and everything above it wider than
     the viewport on mobile (visible elsewhere as unrelated text getting
     clipped by the page-wide overflow-x:hidden safety net). */
  min-width: 0;
}

.cs-images__item {
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  border: 1px solid #eaeaea;
  border-radius: 3px;
  overflow: hidden;
  cursor: pointer;
}

.cs-images__item_active {
  border-color: #ef5b5b;
}

.cs-images__item .cs-image-holder__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cs-images__button {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  border: 1px solid #dedede;
  border-radius: 50%;
  cursor: pointer;
  position: relative;
}

.cs-images__button_prev::before,
.cs-images__button_next::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  border-right: 2px solid #696969;
  border-bottom: 2px solid #696969;
}

.cs-images__button_prev::before {
  transform: translate(-30%, -50%) rotate(135deg);
}

.cs-images__button_next::before {
  transform: translate(-70%, -50%) rotate(-45deg);
}

.b-product-cost {
  margin: 12px 0;
}

.b-product-cost__price {
  font-size: 28px;
  font-weight: bold;
  color: #ef5b5b;
  margin-bottom: 4px;
}

.b-product-cost__more {
  display: inline-block;
  font-size: 13px;
  color: #696969;
  text-decoration: underline;
  cursor: pointer;
  margin-bottom: 8px;
}

.b-product-cost__list {
  list-style: none;
  margin: 8px 0;
  padding: 10px;
  background: #f8f8f8;
  border-radius: 4px;
  font-size: 13px;
}

.b-data-list__row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
}

.b-product-data {
  list-style: none;
  margin: 12px 0;
  padding: 0;
  font-size: 13px;
  color: #696969;
}

.b-product-data__item {
  padding: 3px 0;
}

.b-product-data__item_type_available {
  color: #4caf50;
  font-weight: bold;
}

.b-product__info-line {
  margin: 14px 0;
}

.b-product__info-line_type_button {
  display: flex;
  gap: 10px;
}

/* the sticky "buy" bar duplicates the main buy button; its show/hide is
   driven by JS scroll listeners we don't ship, so keep it off rather than
   let it render inline as a second full-width button. */
.b-sticky-panel {
  display: none;
}

.b-product-info {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 13px;
}

.b-product-info__header {
  text-align: left;
  padding: 8px 0;
  font-size: 15px;
  font-weight: bold;
  color: #313131;
  border-bottom: 1px solid #eaeaea;
}

.b-product-info__cell {
  padding: 8px 0;
  border-bottom: 1px solid #f2f2f2;
  color: #696969;
}

.b-product-info__cell:nth-child(odd) {
  color: #313131;
  width: 40%;
}

.b-sundry {
  list-style: none;
  margin: 14px 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
}

.b-return-policy {
  font-size: 13px;
  color: #696969;
  margin: 10px 0;
}

.b-order-info {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 13px;
}

.b-contacts__row {
  margin-bottom: 10px;
  font-size: 13px;
}

.b-drop-phones__toggle {
  display: inline-block;
  padding: 10px 20px;
  border: 1px solid #ef5b5b;
  border-radius: 3px;
  color: #ef5b5b;
  cursor: pointer;
  font-size: 13px;
}

.b-drop-phones__list {
  display: none;
  margin-top: 8px;
  font-size: 13px;
}

.b-drop-phones_state_active .b-drop-phones__list {
  display: block;
}

@media (max-width: 900px) {
  .b-product__container {
    flex-direction: column;
  }
  .b-product__image-panel {
    width: 100%;
    flex-basis: auto;
  }
}
