/**
 * Bitrix / site adaptations over teh-master layout CSS.
 * Keep layout style.css / media-*.css untouched — put site-only fixes here.
 */

/*
 * Layout CTAs are often <a> (no UA chrome). Site uses <button type="button">.
 * normalize.css sets [type=button] { -webkit-appearance: button } (0,1,0),
 * which paints a native grey/white rim even when class CSS has no border.
 * button[type=...] (0,1,1) beats that regardless of stylesheet order.
 * Class rules with an explicit border (1px solid …) still win over this.
 */
button[type="button"],
button[type="submit"],
button[type="reset"],
button:not([type]),
input[type="button"],
input[type="submit"],
input[type="reset"] {
  border: none;
  box-shadow: none;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner {
  border: 0;
  padding: 0;
}

/* Layout designed these as <a> and never set border:none */
.about-banner-btn,
.about-projects-more,
.about-products-more {
  border: none;
  box-shadow: none;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

/* -------------------------------------------------------------------------- */
/* .offers-tasks: layout desktop uses margin-top: -2.78vw and eats the previous block */
/* Do not apply on mobile/tablet — media-mobile is 8.33vw, media-pt is 0. */
/* -------------------------------------------------------------------------- */

@media screen and (min-width: 1279px) {
  .offers-tasks:not(.offers-tasks-service) {
    margin-top: 1.22vw;
  }
}

a.offers-tasks-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-sizing: border-box;
  color: #fff;
}

/* -------------------------------------------------------------------------- */
/* Typical section CTAs — center on mobile. Layout media-mobile left-aligns   */
/* .products-more / .projects-page-btn / .service-catalog-btn (margin-left:0). */
/* -------------------------------------------------------------------------- */

a.products-more,
a.projects-more,
a.projects-page-btn,
a.service-catalog-btn,
a.article-page-detail-btn {
  display: flex;
  text-decoration: none;
  box-sizing: border-box;
  color: #fff;
}

@media screen and (max-width: 767px) {
  .products-more,
  .projects-more,
  .projects-page-btn,
  .service-catalog-btn,
  .about-projects-more,
  .about-products-more {
    margin-left: auto;
    margin-right: auto;
    align-self: center;
  }
}

/* -------------------------------------------------------------------------- */
/* Promo category cards — <a class="promo-box"> must match <p> text color     */
/* -------------------------------------------------------------------------- */

a.promo-box,
a.promo-box:link,
a.promo-box:visited {
  color: #333333;
  text-decoration: none;
}

a.promo-box .promo-text {
  color: #333333;
}

/* Promo hero slider — teh-master uses <a class="promo-main-slide"> for whole slide */
a.promo-main-slide,
a.promo-main-slide:link,
a.promo-main-slide:visited {
  color: #fff;
  text-decoration: none;
}

a.promo-main-slide .hero-title,
a.promo-main-slide .promo-title {
  color: #fff;
}

/* -------------------------------------------------------------------------- */
/* Policy checkboxes — white tick on red fill (broken ../../images/tick.svg)  */
/* -------------------------------------------------------------------------- */

.checkbox__input:checked + .checkbox__label::before {
  background-image: url(/local/media/images/tick.svg);
  background-position: center;
  background-repeat: no-repeat;
}

/* -------------------------------------------------------------------------- */
/* Brands slider — fit large CMS logos inside fixed cards                     */
/* -------------------------------------------------------------------------- */

.brands-slider--static {
  overflow-x: auto;
  overflow-y: hidden;
}

.brands-slider--static .swiper-wrapper {
  display: flex;
  transform: none !important;
}

.brands--no-nav .swiper-button-next-unique-brands,
.brands--no-nav .swiper-button-prev-unique-brands {
  display: none !important;
}

.brands-slide .brands-slide-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 1.11vw;
  box-sizing: border-box;
}

.brands-slide .brands-slide-logo img,
.brands-slide .brands-slide-logo picture {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.brands-slide .brands-slide-logo a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

/* -------------------------------------------------------------------------- */
/* Retail catalog — Bitrix tabs (panels + button nav + <a> cards)             */
/* -------------------------------------------------------------------------- */

/* Only reset button UA styles — do not override layout colors/background */
button.retail-catalog-nav-link {
  border: none;
  outline: none;
  cursor: pointer;
  font: inherit;
  appearance: none;
  -webkit-appearance: none;
}

button.retail-catalog-nav-link:not(.retail-catalog-nav-link-active) {
  background: transparent;
}

.retail-catalog-nav-link > svg,
.retail-catalog-nav-icon {
  width: 1.38vw;
  height: 1.38vw;
  flex-shrink: 0;
}

.retail-catalog-nav-icon {
  display: block;
  background-color: #333333;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

.retail-catalog-nav-link:hover .retail-catalog-nav-icon {
  background-color: #BC1622;
}

.retail-catalog-nav-link-active .retail-catalog-nav-icon,
.retail-catalog-nav-link-active:hover .retail-catalog-nav-icon {
  background-color: #fff;
}

@media screen and (min-width: 768px) and (max-width: 1278px) {
  .retail-catalog-nav-link > svg,
  .retail-catalog-nav-icon {
    width: 2.08vw;
    height: 2.08vw;
  }
}

/* Layout always shows .retail-catalog-flex; Bitrix has multiple panels */
.retail-catalog[data-retail-catalog] .retail-catalog-flex {
  display: none;
}

.retail-catalog[data-retail-catalog] .retail-catalog-flex.is-active {
  display: flex;
}

a.retail-catalog-box {
  display: block;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  flex-shrink: 0;
}

a.retail-catalog-button {
  text-decoration: none;
  box-sizing: border-box;
}

/* CMS images must not stretch inside fixed catalog cards */
.retail-catalog-img {
  pointer-events: none;
}

.retail-catalog-img img {
  object-fit: contain;
  object-position: bottom right;
}

/* -------------------------------------------------------------------------- */
/* Products — Bitrix markup differences vs static layout                      */
/* -------------------------------------------------------------------------- */

a.products-img {
  display: block;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}

/* Empty favourite/compare/share placeholders without SVG icons */
.products-settings-box:empty {
  display: none;
}

.products-settings:not(:has(.products-settings-box:not(:empty))) {
  display: none;
}

/* -------------------------------------------------------------------------- */
/* >= 1440px                                                                  */
/* -------------------------------------------------------------------------- */

@media (min-width: 1440px) {
  .brands-slide .brands-slide-logo {
    padding: 16px;
  }

  .retail-catalog-nav-link > svg,
  .retail-catalog-nav-icon {
    width: 20px;
    height: 20px;
  }

  .retail-catalog[data-retail-catalog] .retail-catalog-flex {
    display: none;
  }

  .retail-catalog[data-retail-catalog] .retail-catalog-flex.is-active {
    display: flex;
  }
}

/* -------------------------------------------------------------------------- */
/* Projects list — 4 cards per row, wrap on «Показать ещё»                    */
/* -------------------------------------------------------------------------- */

section.projects-page .projects-page-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: 1.2vw;
  row-gap: 2.22vw;
  width: 100%;
}

section.projects-page .projects-page-row .projects-page-box {
  width: auto;
  max-width: none;
  flex: none;
}

section.projects-page .projects-page-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (min-width: 1440px) {
  section.projects-page .projects-page-row {
    grid-template-columns: repeat(4, minmax(0, 352px));
    justify-content: space-between;
    column-gap: 10px;
    row-gap: 32px;
  }
}

@media screen and (max-width: 767px) {
  section.projects-page .projects-page-row {
    grid-template-columns: 1fr;
    row-gap: 3.33vw;
  }

  section.projects-page .projects-page-row .projects-page-box {
    width: 100%;
  }

  .brands-slide .brands-slide-logo {
    padding: 1.38vw;
  }

  .brands-slide:hover .brands-slide-logo {
    transform: scale(1);
  }

  .retail-catalog-nav-link > svg,
  .retail-catalog-nav-icon {
    width: 4.44vw;
    height: 4.44vw;
  }

  .retail-catalog[data-retail-catalog] .retail-catalog-flex {
    display: none;
  }

  .retail-catalog[data-retail-catalog] .retail-catalog-flex.is-active {
    display: flex;
  }
}

/* Personal details — city select (Choices, without CDN Select2) */
.personal .city-wrapper {
  position: relative;
  width: 296px;
  max-width: 100%;
}

.personal .city-wrapper .personal-container-settings-success {
  top: 13px;
}

.personal .city-wrapper select.city-choice {
  display: block;
  width: 296px;
  max-width: 100%;
  height: 32px;
  box-sizing: border-box;
  border: 1px solid #E2E2E2;
  border-radius: 4px;
  padding: 0 28px 0 16px;
  font-size: 13px;
  line-height: 32px;
  color: #333;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23333' d='M1 1l4 4 4-4'/%3E%3C/svg%3E") no-repeat right 12px center;
  appearance: none;
  -webkit-appearance: none;
}

.personal .city-wrapper .choices {
  position: relative;
  width: 296px;
  max-width: 100%;
  margin: 0;
  overflow: hidden;
  font-size: 13px;
}

.personal .city-wrapper .choices.is-open {
  overflow: visible;
}

.personal .city-wrapper .choices[data-type*=select-one] {
  cursor: pointer;
}

.personal .city-wrapper .choices[data-type*=select-one]::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  width: 0;
  height: 0;
  margin-top: -2px;
  border-style: solid;
  border-width: 5px 4px 0;
  border-color: #333 transparent transparent;
  pointer-events: none;
  z-index: 1;
}

.personal .city-wrapper .choices[data-type*=select-one].is-open::after {
  margin-top: -7px;
  border-width: 0 4px 5px;
  border-color: transparent transparent #333;
}

.personal .city-wrapper .choices select {
  display: none !important;
}

.personal .city-wrapper .choices__inner {
  display: flex;
  align-items: center;
  min-height: 32px;
  height: 32px;
  width: 296px;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0 28px 0 16px;
  border: 1px solid #E2E2E2;
  border-radius: 4px;
  background: #fff;
}

.personal .city-wrapper .choices__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.personal .city-wrapper .choices__list--single {
  display: block;
  width: 100%;
  padding: 0;
}

.personal .city-wrapper .choices__list--single .choices__item {
  font-size: 13px;
  line-height: 120%;
  color: #333;
}

.personal .city-wrapper .choices__placeholder {
  color: rgba(51, 51, 51, 0.5);
}

.personal .city-wrapper .choices__list--dropdown,
.personal .city-wrapper .choices__list[aria-expanded] {
  display: none;
  position: absolute;
  left: 0;
  top: 100%;
  z-index: 5;
  width: 296px;
  max-width: 100%;
  margin-top: -1px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #CED4DA;
  border-radius: 0 0 4px 4px;
  box-sizing: border-box;
}

.personal .city-wrapper .choices__list--dropdown.is-active,
.personal .city-wrapper .choices__list[aria-expanded].is-active {
  display: block;
}

.personal .city-wrapper .choices__item--selectable {
  cursor: pointer;
  padding: 8px 16px;
}

.personal .city-wrapper .choices__item--selectable.is-highlighted {
  background: #BA1420;
  color: #fff;
}

.personal .city-wrapper .choices__input {
  display: none !important;
}

@media screen and (max-width: 767px) {
  .personal .city-wrapper,
  .personal .city-wrapper .choices,
  .personal .city-wrapper .choices__inner,
  .personal .city-wrapper .choices__list--dropdown,
  .personal .city-wrapper select.city-choice {
    width: 100%;
  }
}

/* Feedback popup — original teh-master/feedback markup + media-pt.css */
#popup-feedback input[type="hidden"] {
  display: none;
}

@media screen and (min-width: 768px) and (max-width: 1278px) {
  #popup-feedback.popup_details_opened {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: none;
    height: 100%;
    margin: 0;
    padding: 2.6vw;
    border-radius: 0;
    box-sizing: border-box;
    background-color: rgba(51, 51, 51, 0.6);
  }

  #popup-feedback .popup-container {
    width: 46.875vw;
    max-width: 46.875vw;
    margin: 0;
    padding: 2.6vw;
    gap: 0;
    border-radius: 1.3vw;
    box-sizing: border-box;
    background: #fff;
  }

  #popup-feedback .popup-container::after {
    top: 7.55vw;
    height: 0.13vw;
    background: #f1f1f1;
  }

  #popup-feedback .popup_details-close {
    top: 2.6vw;
    right: 2.6vw;
    width: 2.6vw;
    height: 2.6vw;
  }

  #popup-feedback .popup-title {
    margin: 0 0 2.6vw;
    width: 100%;
    padding: 0 3.13vw 2.6vw 0;
    color: #0e0e0e;
    font-weight: 700;
    font-size: 2.34vw;
    line-height: 100%;
    letter-spacing: 0;
  }

  #popup-feedback .popup-desc {
    margin: 0 0 2.08vw;
    width: 100%;
    color: rgba(51, 51, 51, 0.8);
    font-weight: 400;
    font-size: 1.56vw;
    line-height: 130%;
    letter-spacing: 0;
  }

  #popup-feedback .popup-input {
    display: block;
    width: 100%;
    height: auto;
    min-height: 5.21vw;
    margin: 0 0 2.08vw;
    padding: 1.56vw 2.08vw;
    border: 1px solid #e2e2e2;
    border-radius: 0.52vw;
    box-sizing: border-box;
    background: #fff;
    color: #333;
    font-weight: 400;
    font-size: 1.56vw;
    line-height: 100%;
    letter-spacing: 0;
  }

  #popup-feedback .popup-input::placeholder {
    color: rgba(51, 51, 51, 0.5);
  }

  #popup-feedback .popup-policy {
    display: flex;
    flex-direction: column;
    gap: 1.04vw;
    width: 100%;
    margin: -0.52vw 0 2.6vw;
    padding-top: 1.04vw;
    box-sizing: border-box;
  }

  #popup-feedback .checkbox-policy {
    display: flex;
    align-items: flex-start;
    gap: 1.04vw;
    margin: 0;
  }

  #popup-feedback .checkbox__input {
    width: 2.6vw;
    height: 2.6vw;
    margin: 0;
    flex-shrink: 0;
  }

  #popup-feedback .checkbox__label {
    color: #333;
    font-weight: 400;
    font-size: 1.56vw;
    line-height: 140%;
    letter-spacing: 0;
  }

  #popup-feedback .checkbox__label::after {
    top: 0;
    left: -3.64vw;
    width: 2.6vw;
    height: 2.6vw;
    border: 1px solid #bc1622;
    border-radius: 0.52vw;
  }

  #popup-feedback .checkbox__input:checked + .checkbox__label::before {
    top: 0;
    left: -3.64vw;
    width: 2.6vw;
    height: 2.6vw;
    border-radius: 0.52vw;
    background-color: #bc1622;
    background-image: url(/local/media/images/tick.svg);
    background-position: center;
    background-repeat: no-repeat;
    background-size: 1.3vw 1.04vw;
  }

  #popup-feedback .checkbox__label a {
    color: #bc1622;
    text-decoration: underline;
  }

  #popup-feedback .popup_details-row {
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    gap: 1.04vw;
    width: 100%;
    margin: 0;
  }

  #popup-feedback .popup_details-btn {
    flex: 1 1 0;
    width: auto;
    height: auto;
    min-height: 5.21vw;
    margin: 0;
    padding: 1.56vw 2.6vw;
    border: none;
    border-radius: 0.65vw;
    box-sizing: border-box;
    font-weight: 500;
    font-size: 1.56vw;
    line-height: 100%;
    letter-spacing: 0;
    cursor: pointer;
  }

  #popup-feedback .popup_details-btn-cancel {
    background: transparent;
    color: #333;
  }

  #popup-feedback .popup_details-btn-accept {
    background: #bc1622;
    color: #fff;
  }

  #popup-feedback .popup_details-btn-accept.disabled {
    background: rgba(170, 170, 170, 0.67);
    color: #fff;
    pointer-events: none;
  }
}

#popup-feedback.is-success .popup-input,
#popup-feedback.is-success .popup-policy,
#popup-feedback.is-success .popup_details-row {
  display: none !important;
}

/* Success modal after form submit (teh-master/success) */
#popup-success .popup-container::after {
  display: none;
}

#popup-success .popup-title {
  display: flex;
  align-items: center;
  gap: 0.69vw;
  box-sizing: border-box;
  border-bottom: 1px solid #f1f1f1;
  margin: 0;
}

#popup-success .popup-success-icon {
  flex-shrink: 0;
  width: 1.66vw;
  height: 1.66vw;
}

#popup-success .popup-desc .bold,
#popup-success .popup-desc a.bold {
  color: #0e0e0e;
  text-decoration: none;
  font-weight: 700 !important;
}

#popup-success .popup_details-row {
  align-items: center;
  justify-content: flex-start;
  gap: 1.11vw;
}

#popup-success .popup_details-btn-accept {
  width: auto;
  min-width: 0;
  padding: 0 1.39vw;
  background: #bc1622;
  color: #fff;
}

#popup-success .popup_details-btn-cancel {
  width: auto;
  min-width: 0;
  padding: 0;
  background: transparent;
  color: #0e0e0e;
}

@media screen and (min-width: 768px) and (max-width: 1278px) {
  #popup-success.popup_details_opened {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: none;
    height: 100%;
    margin: 0;
    padding: 2.6vw;
    border-radius: 0;
    box-sizing: border-box;
    background-color: rgba(51, 51, 51, 0.6);
  }

  #popup-success .popup-container {
    width: 46.875vw;
    max-width: 46.875vw;
    margin: 0;
    padding: 2.6vw;
    gap: 2.08vw;
    border-radius: 1.3vw;
    box-sizing: border-box;
    background: #fff;
  }

  #popup-success .popup-container::after {
    display: none;
  }

  #popup-success .popup_details-close {
    top: 2.6vw;
    right: 2.6vw;
    width: 2.6vw;
    height: 2.6vw;
  }

  #popup-success .popup-title {
    margin: 0;
    width: 100%;
    padding: 0 3.13vw 2.6vw 0;
    gap: 1.3vw;
    color: #0e0e0e;
    font-weight: 700;
    font-size: 2.34vw;
    line-height: 100%;
    border-bottom: 1px solid #f1f1f1;
  }

  #popup-success .popup-success-icon {
    width: 3.13vw;
    height: 3.13vw;
  }

  #popup-success .popup-desc {
    margin: 0;
    width: 100%;
    color: rgba(51, 51, 51, 0.8);
    font-weight: 400;
    font-size: 1.56vw;
    line-height: 130%;
  }

  #popup-success .popup_details-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 2.08vw;
    width: 100%;
    margin: 0;
  }

  #popup-success .popup_details-btn {
    flex: 0 0 auto;
    width: auto;
    height: auto;
    min-height: 5.21vw;
    margin: 0;
    padding: 1.56vw 2.6vw;
    border: none;
    border-radius: 0.65vw;
    box-sizing: border-box;
    font-weight: 500;
    font-size: 1.56vw;
    line-height: 100%;
    cursor: pointer;
  }

  #popup-success .popup_details-btn-cancel {
    padding-left: 0;
    padding-right: 0;
    background: transparent;
    color: #333;
  }

  #popup-success .popup_details-btn-accept {
    background: #bc1622;
    color: #fff;
  }
}

@media screen and (max-width: 767px) {
  #popup-success .popup-title {
    gap: 2.22vw;
    border-bottom: 1px solid #f1f1f1;
  }

  #popup-success .popup-container::after {
    display: none;
  }

  #popup-success .popup-success-icon {
    width: 5.55vw;
    height: 5.55vw;
  }

  #popup-success .popup_details-row {
    gap: 4.44vw;
  }

  #popup-success .popup_details-btn-accept {
    width: auto;
    flex: 1 1 auto;
    padding: 0 4.44vw;
  }

  #popup-success .popup_details-btn-cancel {
    width: auto;
    flex: 0 0 auto;
  }
}

/* Authorized landings: two hero/control CTAs (client + manager) */
.retail-hero-row--auth {
  width: auto;
  justify-content: flex-start;
}

.retail-hero-btns {
  display: flex;
  align-items: center;
  gap: 0.56vw;
}

.retail-hero-btns .retail-hero-btn {
  width: fit-content;
  padding: 0 2.22vw;
  text-decoration: none;
  box-sizing: border-box;
}

.retail-hero-btn-gray {
  background-color: #ffffff26;
}

.retail-hero-btn-gray:hover {
  background: #000;
  color: #fff;
}

/* /professional/ root hero — same CTA behaviour as retail/zakupki */
.prof-hero-row {
  display: flex;
  align-items: center;
  gap: 1.11vw;
  flex-wrap: wrap;
}

.prof-hero-info {
  display: flex;
  align-items: center;
  gap: 0.55vw;
  font-weight: 500;
  font-size: 0.97vw;
  line-height: 100%;
}

.prof-hero-info .promo-text {
  margin: 0;
}

.prof-hero-info svg {
  flex-shrink: 0;
  width: 2.22vw;
  height: 2.22vw;
}

.prof-hero-btns {
  display: flex;
  align-items: center;
  gap: 0.56vw;
  flex-wrap: wrap;
}

.prof-hero-btns .prof-hero-btn {
  width: fit-content;
  padding: 0 2.22vw;
  text-decoration: none;
  box-sizing: border-box;
}

.prof-hero-btn-gray {
  background-color: #ffffff26;
}

.prof-hero-btn-gray:hover {
  background: #000;
  color: #fff;
}

a.prof-hero-btn,
button.prof-hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-sizing: border-box;
}

.retail-control-btns {
  display: flex;
  align-items: center;
  gap: 0.69vw;
}

.retail-control-btns .retail-control-btn {
  width: fit-content;
  padding: 0 2.22vw;
  text-decoration: none;
  box-sizing: border-box;
}

.retail-control-btn-gray {
  background: #f1f1f1;
  color: #333;
}

.retail-control-btn-gray:hover {
  background: #f1f1f1;
  color: #bc1622;
}

@media screen and (max-width: 767px) {
  .retail-hero-row--auth {
    width: 71.11vw;
  }

  .retail-hero-btns {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 2.22vw;
  }

  .retail-hero-btns .retail-hero-btn {
    width: 100%;
    padding: 0;
  }

  .retail-control-btns {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 2.22vw;
  }

  .retail-control-btns .retail-control-btn {
    width: 100%;
    padding: 0;
  }

  .prof-hero-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4.44vw;
    width: 100%;
  }

  .prof-hero-info {
    font-size: 3.33vw;
    gap: 2.22vw;
  }

  .prof-hero-info svg {
    width: 8.88vw;
    height: 8.88vw;
  }

  .prof-hero-btns {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 2.22vw;
  }

  .prof-hero-btns .prof-hero-btn,
  .prof-hero-row .prof-hero-btn {
    width: 100%;
    padding: 0;
    justify-content: center;
  }
}

/* -------------------------------------------------------------------------- */
/* Layout shell — do NOT set .container width globally.                       */
/* style.css 83.33vw | media-pt 94.79vw | media-mobile 88.88vw | 1400: 1440px */
/* A global 83.33vw here overrode mobile (88.88vw) and tablet (94.79vw).      */
/* -------------------------------------------------------------------------- */

@media (min-width: 1440px) {
  .container {
    max-width: none;
  }
}

/*
 * Visibility helpers (.pc / .mobile / .pc-1440) use display:flex|none !important.
 * Applied to <br>, flex breaks line-breaks and creates huge empty gaps (legal gift).
 */
br.pc,
br.mobile,
br.pc-1440 {
  display: inline !important;
}

@media screen and (max-width: 767px) {
  br.pc:not(.mobile),
  br.pc-1440:not(.mobile) {
    display: none !important;
  }
}

@media screen and (min-width: 768px) {
  br.mobile:not(.pc):not(.pc-1440) {
    display: none !important;
  }
}

/* Landing CTAs as <a>/<button>: vertical centering for Rooftop baseline */
a.legal-hero-btn,
a.legal-gift-btn,
a.legal-control-btn,
a.retail-hero-btn,
a.retail-control-btn,
a.retail-gift-btn,
a.retail-gift-bottom-btn,
a.professional-hero-btn,
button.legal-hero-btn,
button.legal-gift-btn,
button.legal-control-btn,
button.retail-hero-btn,
button.retail-control-btn,
button.retail-gift-btn,
button.retail-gift-bottom-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  text-decoration: none;
  padding-top: 0.15em;
  line-height: 1;
  white-space: nowrap;
}

/* -------------------------------------------------------------------------- */
/* Main cards — dynamic IB backgrounds via .main-cards-box__bg                */
/* Template CSS still paints ::after with broken ../../images/cardN.png       */
/* (resolves to /local/images/ which does not exist). Prefer CMS __bg.        */
/* -------------------------------------------------------------------------- */

.main-cards-box > *:not(.main-cards-box__bg) {
  position: relative;
  z-index: 1;
}

.main-cards-box__bg {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 0;
  pointer-events: none;
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
}

.main-cards-box--has-media.main-cards-box::after {
  display: none !important;
  content: none !important;
  background: none !important;
}

.main-cards-box:nth-of-type(1) .main-cards-box__bg {
  width: 19.93vw;
  height: 12.77vw;
}

.main-cards-box:nth-of-type(2) .main-cards-box__bg {
  width: 22.45vw;
  height: 100%;
}

.main-cards-box:nth-of-type(4) .main-cards-box__bg {
  width: 23.84vw;
  height: 100%;
}

@media screen and (min-width: 1440px) {
  .main-cards-box:nth-of-type(1) .main-cards-box__bg {
    width: 287px;
    height: 184px;
  }

  .main-cards-box:nth-of-type(2) .main-cards-box__bg {
    width: 323px;
    height: 100%;
  }

  .main-cards-box:nth-of-type(4) .main-cards-box__bg {
    width: 343px;
    height: 100%;
  }
}

/* Tablet (media-pt): cards 1–2 image at bottom; keep services image off grid */
@media screen and (max-width: 1278px) and (min-width: 768px) {
  main .main-cards-box > .main-cards-box__bg {
    position: absolute;
    z-index: 0;
  }

  main .main-cards-box:nth-of-type(1) .main-cards-box__bg,
  main .main-cards-box:nth-of-type(2) .main-cards-box__bg {
    top: auto;
    bottom: 0;
    right: 0;
    width: 32.55vw;
    height: 20.83vw;
    background-position: right bottom;
  }

  main .main-cards-box:nth-of-type(4) .main-cards-box__bg {
    display: none;
  }
}

@media screen and (max-width: 767px) {
  .main-cards-box:nth-of-type(1) .main-cards-box__bg {
    top: auto;
    bottom: 0;
    width: 69.44vw;
    height: 44.44vw;
  }

  .main-cards-box:nth-of-type(2) .main-cards-box__bg {
    top: auto;
    bottom: -2vw;
    width: 69.44vw;
    height: 44.44vw;
  }

  .main-cards-box:nth-of-type(4) .main-cards-box__bg {
    top: auto;
    right: -2vw;
    bottom: 0;
    width: 69.44vw;
    height: 44.44vw;
  }
}

/* retail-points: allow wrap if long nbsp-chains slip into content */
.retail-points-desc {
  overflow-wrap: break-word;
}

/* -------------------------------------------------------------------------- */
/* List page heroes only — direct child of .about-pages__content in index.php  */
/* NOT .about-brand-detail / .about-partner-detail heroes in components       */
/* -------------------------------------------------------------------------- */

@media screen and (min-width: 769px) {
  .about-pages.about-brands .about-pages__content > .about-hero,
  .about-pages.partners .about-pages__content > .about-hero {
    display: flex !important;
    flex-direction: row;
    justify-content: space-between;
    align-items: stretch;
  }

  .about-pages.about-brands .about-pages__content > .about-hero .about-hero__picture,
  .about-pages.partners .about-pages__content > .about-hero .about-hero__picture {
    position: static !important;
    inset: auto !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    z-index: auto !important;
    display: block;
    order: 2;
    width: 393px !important;
    height: auto !important;
    flex-shrink: 0;
  }

  .about-pages.about-brands .about-pages__content > .about-hero .about-hero__picture img,
  .about-pages.partners .about-pages__content > .about-hero .about-hero__picture img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: fill !important;
    object-position: center !important;
  }

  .about-pages.about-brands .about-pages__content > .about-hero .about-hero__inner,
  .about-pages.partners .about-pages__content > .about-hero .about-hero__inner {
    order: 1;
    align-items: flex-start;
    display: flex;
    flex-direction: column;
    gap: 38px;
    padding: 34px 0 34px 40px !important;
    position: relative;
    width: 600px !important;
    max-width: none !important;
    min-height: 0 !important;
    height: auto !important;
    z-index: 1;
    box-sizing: border-box;
  }
}

@media screen and (max-width: 768px) {
  .about-pages.about-brands .about-pages__content > .about-hero,
  .about-pages.partners .about-pages__content > .about-hero {
    align-items: flex-end !important;
  }

  .about-pages.about-brands .about-pages__content > .about-hero .about-hero__inner,
  .about-pages.partners .about-pages__content > .about-hero .about-hero__inner {
    padding: 24px 20px !important;
    gap: 24px !important;
    max-height: 455px;
    width: 100% !important;
  }

  .about-pages.about-brands .about-pages__content > .about-hero .about-hero__picture,
  .about-pages.partners .about-pages__content > .about-hero .about-hero__picture {
    width: 100% !important;
    height: 240px !important;
    position: absolute !important;
    inset: 0 auto auto 0 !important;
    order: unset;
  }

  .about-pages.about-brands .about-pages__content > .about-hero .about-hero__picture img,
  .about-pages.partners .about-pages__content > .about-hero .about-hero__picture img {
    object-fit: cover !important;
  }
}

/* Brand / partner detail heroes on desktop (>1278px) — rules exist in media-pt for tablet only */
@media screen and (min-width: 1279px) {
  .about-brand-detail .about-hero,
  .about-brand-detail .brand-hero,
  .about-partner-detail .about-hero,
  .about-partner-detail .brand-hero {
    display: block;
    position: relative;
    width: 100%;
    height: 300px;
    min-height: 300px;
    margin: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #333;
  }

  .about-brand-detail .about-hero::after,
  .about-partner-detail .about-hero::after {
    content: none;
    display: none;
  }

  .about-brand-detail .about-hero__picture,
  .about-partner-detail .about-hero__picture {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    width: 400px;
    height: 100%;
    background: #fff;
    overflow: hidden;
    z-index: 0;
  }

  .about-brand-detail .about-hero__picture img,
  .about-partner-detail .about-hero__picture img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center bottom;
    z-index: 0;
  }

  .about-brand-detail .about-hero__inner,
  .about-partner-detail .about-hero__inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    width: 100%;
    max-width: 100%;
    height: 100%;
    min-height: 300px;
    padding: 30px 40px;
    gap: 20px;
    box-sizing: border-box;
  }

  .about-brand-detail .about-hero__info,
  .about-partner-detail .about-hero__info {
    display: flex;
    flex-direction: column;
    max-width: calc(100% - 440px);
    gap: 8px;
    color: #fff;
  }
}

button.retail-gift-example-link {
  border: none;
  background: transparent;
  padding: 0;
  font: inherit;
}

/*
 * Gift gallery popup — same modal shell as #popup-feedback («Заявка»).
 * Desktop inherits .popup_details / .popup-container from style.css.
 * Tablet (768–1278) mirrors #popup-feedback rules from media-pt.css.
 */
#popup-gift-gallery .popup-gift-gallery__viewport {
  position: relative;
  width: 100%;
  margin: 0 0 1.38vw;
  aspect-ratio: 16 / 10;
  max-height: 60vh;
  background: #f5f5f5;
  border-radius: 0.34vw;
  overflow: hidden;
}

#popup-gift-gallery .popup-gift-gallery__slider,
#popup-gift-gallery .popup-gift-gallery__slider .swiper-wrapper,
#popup-gift-gallery .popup-gift-gallery__slider .swiper-slide {
  width: 100%;
  height: 100%;
}

#popup-gift-gallery .popup-gift-gallery__img-wrap {
  width: 100%;
  height: 100%;
}

#popup-gift-gallery .popup-gift-gallery__img-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

#popup-gift-gallery .popup-gift-gallery__counter {
  margin: 0;
}

#popup-gift-gallery .popup-gift-gallery__prev,
#popup-gift-gallery .popup-gift-gallery__next {
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
  background-color: transparent;
  color: transparent;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  width: 1.38vw;
  height: 1.38vw;
  top: 50%;
  margin-top: -0.69vw;
  z-index: 3;
}

#popup-gift-gallery .popup-gift-gallery__prev::after,
#popup-gift-gallery .popup-gift-gallery__next::after {
  display: none;
}

#popup-gift-gallery .popup-gift-gallery__prev {
  left: 0.69vw;
  background-image: url(/local/media/images/arrow-prev-promo-list.svg);
}

#popup-gift-gallery .popup-gift-gallery__prev:hover {
  background-image: url(/local/media/images/arrow-next-promo-list-hover.svg);
  transform: translateY(0) rotate(180deg);
}

#popup-gift-gallery .popup-gift-gallery__next {
  right: 0.69vw;
  background-image: url(/local/media/images/arrow-next-promo-list.svg);
}

#popup-gift-gallery .popup-gift-gallery__next:hover {
  background-image: url(/local/media/images/arrow-next-promo-list-hover.svg);
}

body.popup-gift-gallery-opened {
  overflow: hidden;
}

@media screen and (min-width: 768px) and (max-width: 1278px) {
  #popup-gift-gallery.popup_details,
  #popup-gift-gallery.popup_details_opened {
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: none;
    height: 100%;
    margin: 0;
    padding: 2.6vw;
    border-radius: 0;
    box-sizing: border-box;
    background-color: rgba(51, 51, 51, 0.6);
  }

  #popup-gift-gallery.popup_details_opened {
    display: flex;
  }

  #popup-gift-gallery .popup-container {
    width: 46.875vw;
    max-width: 46.875vw;
    margin: 0;
    padding: 2.6vw;
    gap: 0;
    border-radius: 1.3vw;
    box-sizing: border-box;
    background: #fff;
  }

  #popup-gift-gallery .popup-container::after {
    top: 7.55vw;
    height: 0.13vw;
    background: #f1f1f1;
  }

  #popup-gift-gallery .popup_details-close {
    top: 2.6vw;
    right: 2.6vw;
    width: 2.6vw;
    height: 2.6vw;
  }

  #popup-gift-gallery .popup-title {
    margin: 0 0 2.6vw;
    width: 100%;
    padding: 0 3.13vw 2.6vw 0;
    color: #0e0e0e;
    font-weight: 700;
    font-size: 2.34vw;
    line-height: 100%;
    letter-spacing: 0;
  }

  #popup-gift-gallery .popup-desc {
    margin: 0;
    width: 100%;
    color: rgba(51, 51, 51, 0.8);
    font-weight: 400;
    font-size: 1.56vw;
    line-height: 130%;
  }

  #popup-gift-gallery .popup-gift-gallery__viewport {
    margin: 0 0 2.08vw;
    border-radius: 0.52vw;
    max-height: 55vh;
  }

  #popup-gift-gallery .popup-gift-gallery__prev,
  #popup-gift-gallery .popup-gift-gallery__next {
    width: 2.6vw;
    height: 2.6vw;
    margin-top: -1.3vw;
  }

  #popup-gift-gallery .popup-gift-gallery__prev {
    left: 1.04vw;
  }

  #popup-gift-gallery .popup-gift-gallery__next {
    right: 1.04vw;
  }
}

@media screen and (max-width: 767px) {
  #popup-gift-gallery.popup_details,
  #popup-gift-gallery.popup_details_opened {
    align-items: center;
    justify-content: center;
    padding: 16px;
    background-color: rgba(51, 51, 51, 0.6);
  }

  #popup-gift-gallery .popup-container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 16px;
    gap: 0;
    border-radius: 10px;
  }

  #popup-gift-gallery .popup-container::after {
    top: 48px;
  }

  #popup-gift-gallery .popup_details-close {
    top: 16px;
    right: 16px;
    width: 20px;
    height: 20px;
  }

  #popup-gift-gallery .popup-title {
    margin: 0 0 16px;
    padding: 0 28px 16px 0;
    font-size: 18px;
  }

  #popup-gift-gallery .popup-desc {
    font-size: 13px;
  }

  #popup-gift-gallery .popup-gift-gallery__viewport {
    margin: 0 0 12px;
    border-radius: 5px;
    max-height: 50vh;
  }

  #popup-gift-gallery .popup-gift-gallery__prev,
  #popup-gift-gallery .popup-gift-gallery__next {
    width: 24px;
    height: 24px;
    margin-top: -12px;
  }

  #popup-gift-gallery .popup-gift-gallery__prev {
    left: 8px;
  }

  #popup-gift-gallery .popup-gift-gallery__next {
    right: 8px;
  }
}


section.retail-points{
  margin-top: 1.78vw;
}

/* -------------------------------------------------------------------------- */
/* Чек-лист: динамическая форма — только то, чего нет в teh-master CSS.       */
/* Базовая вёрстка/отступы остаются в style.css / media-*.css как в макете.   */
/* -------------------------------------------------------------------------- */

/* choice-группа: subdesc + row (+ other) участвуют в flex шага как в HTML */
.check-list .df-field {
  display: contents;
}

.check-list .df-field[hidden],
.check-list .df-field.is-hidden,
.check-list .order-main-delivery-step-address-row input[hidden],
.check-list .order-main-delivery-step-address-row input.is-hidden,
.check-list .check-list-square-row input[hidden],
.check-list .check-list-square-row input.is-hidden,
.check-list input.check-list-input[hidden],
.check-list input.check-list-input.is-hidden,
.check-list .checkbox-policy[hidden],
.check-list .checkbox-policy.is-hidden {
  display: none !important;
}

/* при скрытии ИНН (SHOW_IF) ряд контактов остаётся ровным */
.check-list .order-main-delivery-step-address-row {
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
}

.check-list .order-main-delivery-step-address-row .order-main-delivery-step-floor,
.check-list .order-main-delivery-step-address-row .order-main-delivery-step-entry {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.check-list .check-list-square-row .check-list-input {
  width: 100%;
  min-width: 0;
}

button.check-list-submit {
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.check-list-errors {
  margin: 0;
  padding: 0.8vw 1vw 0.8vw 2vw;
  border-radius: 0.3vw;
  background: #FDECEC;
  color: #A0151F;
  font-size: 0.9vw;
  list-style: disc;
}

.check-list-errors[hidden] {
  display: none !important;
}

.check-list-success {
  margin: 0;
  padding: 1.2vw 1.5vw;
  border-radius: 0.3vw;
  background: #EAF7EE;
  color: #1E7A3A;
  font-size: 1.2vw;
}

@media screen and (max-width: 1278px) and (min-width: 768px) {
  .check-list-errors {
    font-size: 1.43vw;
    padding: 1.56vw 2.08vw 1.56vw 3.12vw;
    border-radius: 0.65vw;
  }

  .check-list-success {
    font-size: 1.82vw;
    padding: 2.08vw 2.6vw;
    border-radius: 0.65vw;
  }
}

@media screen and (max-width: 767px) {
  .check-list-errors {
    font-size: 3.05vw;
    padding: 3.33vw 4.44vw 3.33vw 6.66vw;
    border-radius: 1.38vw;
  }

  .check-list-success {
    font-size: 3.88vw;
    padding: 4.44vw 5.55vw;
    border-radius: 1.38vw;
  }
}

/* -------------------------------------------------------------------------- */
/* Press article detail — sticky sidebar (inner wrapper, no JS pin)           */
/* -------------------------------------------------------------------------- */

.article-main {
  padding-bottom: 2.78vw;
}

.article-more {
  position: relative;
  top: auto;
  right: auto;
  display: block;
  height: auto;
  flex-shrink: 0;
  align-self: stretch;
}

.article-more-sticky {
  position: sticky;
  top: 4.44vw;
  display: flex;
  flex-direction: column;
  gap: 0.69vw;
  height: fit-content;
}

@media screen and (max-width: 1278px) and (min-width: 768px) {
  main.article-page .article-more-sticky {
    display: contents;
  }
}

