/* MODX / miniShop2 hooks on top of the new theme */
.ms2_form { margin: 0; }
#msMiniCart .icon-btn__badge:empty,
#msMiniCart:not(.full) .icon-btn__badge { display: none; }
.product-card__actions.ms2_form,
.buybox__actions.ms2_form {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.content-typo img { max-width: 100%; height: auto; }
.content-typo table { width: 100%; overflow-x: auto; display: block; }
.g-recaptcha { margin: 12px 0; }
.ajax_form .error,
.form-field.is-error .form-error { display: block; }
.ms2_product_link { color: inherit; }
.cart-item form.ms2_form { display: inline; }
.header__cart-sum .ms2_total_cost::after { content: " ₽"; }
.modal.is-success .modal__form,
.modal.is-success .modal__state--error { display: none; }
.modal.is-success .modal__state--success { display: block; }
.modal.is-error .modal__state--error { display: block; }
.modal__state { display: none; }
.is-hidden { display: none !important; }
.seo-block { margin-top: 48px; }
#msCart:empty + .cart-checkout { display: none; }
.mega--simple {
  display: none;
  grid-template-columns: 1fr;
  width: max-content;
  min-width: 220px;
}
.nav__item:hover .mega--simple,
.nav__item:focus-within .mega--simple {
  display: flex;
  flex-direction: column;
}
@media (min-width: 1024px) {
  .nav__list {
    flex-wrap: nowrap;
  }
}
.checkout { display: grid; grid-template-columns: 1fr minmax(260px, 360px); gap: 24px; align-items: start; }
@media (max-width: 900px) { .checkout { grid-template-columns: 1fr; } }
.checkout__card { background: #fff; border-radius: 16px; padding: 20px; margin-bottom: 16px; }
.buybox__chars { display: grid; gap: 8px; margin: 16px 0; }

.footer__menu {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}
.footer__menu a {
  display: block;
  color: var(--color-footer-muted, #9aa3ab);
  font-size: 14px;
  line-height: 1.4;
}

/* TinyMCE / old avl-* content → new theme */
.home-article .content-typo {
  max-width: none;
  color: var(--color-text);
  font-size: 16px;
}
.home-article .content-typo > p,
.home-article .content-typo > h2,
.home-article .content-typo > h3,
.home-article .content-typo > h4 {
  max-width: 860px;
}
.home-article__cta { margin-top: 40px; }

.content-typo .avl-icon-list,
.content-typo .content-links {
  list-style: none;
  padding: 0;
  margin: 0 0 1.6em;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}
.content-typo .avl-icon-list li,
.content-typo .content-links li {
  margin: 0;
  padding: 14px 16px;
  background: var(--color-bg, #f4f7fb);
  border: 1px solid var(--color-border, #e6eaee);
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.45;
}
.content-typo .avl-icon-list a,
.content-typo .content-links a {
  font-weight: 700;
  text-decoration: none;
}
.content-typo .avl-icon-list a:hover,
.content-typo .content-links a:hover {
  text-decoration: underline;
}

.content-typo .avl-box,
.content-typo .note {
  margin: 1.4em 0;
  padding: 16px 20px;
  border-radius: 12px;
  background: var(--color-bg, #f4f7fb);
  border-left: 3px solid var(--color-primary, #ed3b3a);
  max-width: 860px;
}
.content-typo .note--tip,
.content-typo .avl-box-tip {
  background: #fff6f0;
}
.content-typo .note--info,
.content-typo .avl-box-info {
  background: #f4f7fb;
}
.content-typo .note__title,
.content-typo .avl-box-title {
  display: block;
  font-weight: 800;
  color: var(--color-dark, #1a1a1a);
  margin-bottom: 6px;
}
.content-typo .note u,
.content-typo .note [style*="text-decoration"] {
  text-decoration: none !important;
}

.content-typo .avl-gallery,
.content-typo .content-gallery {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  justify-content: stretch;
  gap: 16px;
  margin: 22px 0;
  float: none;
  width: 100%;
  max-width: none;
}
.content-typo .avl-gallery-item,
.content-typo .content-gallery__item {
  flex: none;
  max-width: none;
  text-align: center;
  font-size: 13px;
  color: var(--color-muted, #6b7280);
}
.content-typo .avl-gallery img,
.content-typo .content-gallery img,
.content-typo .avl-float-r img,
.content-typo .content-media img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  margin: 0 0 8px;
  display: block;
}

.content-typo .avl-float-r,
.content-typo .content-media--right {
  float: right;
  width: 260px;
  max-width: 38%;
  margin: 0 0 16px 24px;
  text-align: center;
  font-size: 13px;
  color: var(--color-muted, #6b7280);
}
@media (max-width: 700px) {
  .content-typo .avl-float-r,
  .content-typo .content-media--right {
    float: none;
    width: 100%;
    max-width: 100%;
    margin: 0 0 16px;
  }
}
.content-typo::after {
  content: "";
  display: table;
  clear: both;
}

.faq-intro { max-width: 860px; margin-bottom: 28px; }
.faq-outro { max-width: 860px; margin-top: 28px; }
.faq-page-cta { margin-top: 32px; max-width: 860px; }
.faq-content .accordion { max-width: none; }

.contacts-schema {
  font-weight: 700;
  color: var(--color-primary, #ed3b3a);
}
.contacts-access {
  margin: 48px 0 32px;
  max-width: none;
  padding: 20px 24px;
  background: #f4f7fb;
  border-left: 3px solid var(--color-primary, #ed3b3a);
  border-radius: 12px;
}
@media (min-width: 1024px) {
  .contacts-access {
    margin-top: 56px;
    margin-bottom: 32px;
  }
}
.contacts-hours {
  display: grid;
  gap: 24px;
  margin: 0 0 48px;
  align-items: stretch;
}
.contacts-hours .contacts-layout__card {
  min-width: 0;
  height: 100%;
}
.contacts-hours h2,
.contacts-requisites h2 {
  font-size: 20px;
  margin: 0 0 12px;
}
@media (min-width: 768px) {
  .contacts-hours {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
}
@media (min-width: 1100px) {
  .contacts-hours {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 28px;
  }
}
.contacts-layout__map script,
.contacts-layout__map > div,
.contacts-layout__map iframe,
.contacts-layout__map ymaps {
  display: block;
  width: 100% !important;
  min-height: 360px;
}

.certs-slider { margin: 48px 0 16px; }
.certs-slider .section-head { margin-bottom: 20px; }
.certs-slider .swiper { padding-bottom: 8px; }
.certs-slider .swiper-wrapper { align-items: stretch; }
.certs-slider .swiper-slide {
  height: auto;
  display: flex;
}
.certs-slider__nav {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 12px;
}
.certs-slider__card {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 100%;
  background: #fff;
  border: 1px solid var(--color-border, #e6eaee);
  border-radius: 16px;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
}
.certs-slider__card img {
  width: 100%;
  height: 280px;
  object-fit: contain;
  background: #f4f7fb;
  flex-shrink: 0;
}
.certs-slider__title {
  display: block;
  padding: 12px 14px 16px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  min-height: 4.2em;
  flex-grow: 1;
}
.about-gallery { margin: 40px 0; }
.about-gallery h2 { margin: 0 0 16px; font-size: 22px; }
.about-gallery__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (min-width: 768px) {
  .about-gallery__grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
}
@media (min-width: 1100px) {
  .about-gallery__grid { grid-template-columns: repeat(4, 1fr); gap: 18px; }
}
.about-gallery__item {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  background: #f4f7fb;
}
.about-gallery__item img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}
.lb {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: rgba(18, 32, 47, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 72px 24px 24px;
}
.lb[hidden] { display: none; }
.lb__img {
  max-width: min(1100px, 100%);
  max-height: calc(100vh - 96px);
  object-fit: contain;
  border-radius: 8px;
}
.lb__close {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 401;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.header__about {
  font-size: 14px;
}
.header__about strong {
  white-space: nowrap;
  display: inline-block;
}
@media (min-width: 1024px) {
  .header__about { max-width: 250px; }
}

.header:has(.search.is-open) .header__top,
.header__top:has(.search.is-open) {
  overflow: visible;
}
.header:has(.search.is-open) {
  z-index: 500;
}

.search-backdrop {
  position: fixed;
  inset: 0;
  z-index: 450;
  background: rgba(18, 32, 47, 0.48);
}
.search-backdrop[hidden] { display: none; }
body.search-overlay-open { overflow: hidden; }

.search.is-open .search__results {
  display: block;
  position: fixed;
  left: 50%;
  top: 96px;
  right: auto;
  transform: translateX(-50%);
  width: min(720px, calc(100vw - 24px));
  max-height: min(70vh, 560px);
  overflow: auto;
  z-index: 500;
}
@media (max-width: 1023px) {
  .search.is-open .search__results { top: 64px; }
}
.form-check.is-error { color: var(--color-primary, #ed3b3a); }
.search__more {
  display: block;
  margin: 4px 8px 4px;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  color: var(--color-primary, #ed3b3a);
}
.content-typo .content-gallery {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  width: 100%;
  max-width: none;
  justify-content: stretch;
}
.content-typo .content-gallery__item {
  flex: none;
  max-width: none;
  margin: 0;
}
.content-typo .content-gallery img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  margin: 0;
  display: block;
  border-radius: 12px;
}
.content-typo--nashe_proizvodstvo {
  max-width: none;
}
.content-typo--nashe_proizvodstvo > p.g-align-center {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.content-typo--nashe_proizvodstvo > p.g-align-center br { display: none; }
.content-typo--nashe_proizvodstvo > p.g-align-center a,
.content-typo--nashe_proizvodstvo > p.g-align-center img {
  display: block;
  margin: 0;
}
.content-typo--nashe_proizvodstvo > p.g-align-center img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

#msCart:has([data-cart-empty]) + .cart-checkout { display: none; }
.order-done ~ #msCart,
.order-done ~ .cart-checkout { display: none; }
.cart-checkout { max-width: 860px; }

.article-layout {
  padding-top: 28px;
}
.article-layout > aside,
.article-related {
  align-self: start;
  position: sticky;
  top: 96px;
  background: #fff;
  border: 1px solid var(--color-border, #e6eaee);
  border-radius: 16px;
  padding: 20px 20px 8px;
}
.article-related .h3,
.article-layout > aside .h3 {
  margin: 0 0 8px;
  font-size: 18px;
}
.article-related__list,
.article-layout aside ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.article-related__list li,
.article-layout aside p {
  margin: 0;
  border-top: 1px solid var(--color-border, #e6eaee);
}
.article-related__list a,
.article-layout aside p a {
  display: block;
  padding: 12px 0;
  color: var(--color-dark, #1a1a1a);
  text-decoration: none;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 600;
}
.article-related__list a:hover,
.article-layout aside p a:hover {
  color: var(--color-primary, #ed3b3a);
}

.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 620;
  background: #fff;
  border-top: 1px solid var(--color-border, #e6eaee);
  box-shadow: 0 -10px 32px rgba(18, 32, 47, 0.14);
  padding: 16px 0 calc(16px + env(safe-area-inset-bottom, 0px));
}
.cookie-banner[hidden] { display: none !important; }
.cookie-banner__inner {
  display: flex;
  gap: 16px 24px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}
.cookie-banner__copy {
  flex: 1 1 280px;
  min-width: 0;
}
.cookie-banner__title {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 800;
  color: var(--color-dark, #1a1a1a);
}
.cookie-banner__text {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--color-muted, #6b7280);
}
.cookie-banner__text a {
  color: var(--color-primary, #ed3b3a);
}
.cookie-banner__btn {
  flex: 0 0 auto;
  min-width: 140px;
}
