/**
 * Caserf Yii integration overrides.
 * Not produced by www/markup npm build — edit here only.
 * Copied to www/caserf/css/integration.css by scripts/copy-to-caserf-assets.mjs
 */

/* Phone/email: solid color, no gradient bleed from third-party widgets or footer glow */
#footer__phone,
#footer__email,
.contact__phone,
.contact__email,
.hero-home__contact-link {
  background: none !important;
  background-image: none !important;
  -webkit-background-clip: border-box !important;
  background-clip: border-box !important;
  text-shadow: none !important;
}

#footer__phone,
#footer__email {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

.contact__phone,
.contact__email,
.hero-home__contact-link {
  color: #40403f !important;
  -webkit-text-fill-color: #40403f !important;
}

#footer__gradient {
  display: none !important;
}

#footer__bottom {
  position: relative;
  z-index: 20;
}

#contact {
  position: relative;
  z-index: 5;
  background-color: #f4f4f3;
}

/* Catalog filters aside: Brand Gray instead of absolute black */
#aside-filters,
#aside-filters h1,
#aside-filters h2,
#aside-filters h3,
#aside-filters h4,
#aside-filters h5,
#aside-filters h6,
#aside-filters p,
#aside-filters span,
#aside-filters label,
#aside-filters a,
#aside-filters button:not(.btn-primary),
#aside-filters input,
#aside-filters select,
#aside-filters textarea {
  color: #40403f;
}

#aside-filters .btn-primary {
  color: #fff;
}

#aside-filters .noUi-value,
#aside-filters .noUi-tooltip {
  color: #40403f;
}

/* Catalog filters aside: scroll when content overflows, hide scrollbar */
#aside-filters__header {
  margin-bottom: 2rem;
}

#aside-filters__content {
  min-height: 0;
  overflow-y: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
  padding-inline: 4px;
  padding-top: 0;
}

#aside-filters__content::-webkit-scrollbar {
  display: none;
}

#aside-filters__content .catalog-filter-group {
  margin-bottom: 2rem; /* mb-8 */
}

#aside-filters__content .catalog-filter-group > .mb-3 {
  margin-bottom: 1rem;
}

#aside-filters__content .catalog-filter-extra {
  margin-bottom: 2rem;
}

#aside-filters__content .catalog-filter-field {
  margin-bottom: 1rem; /* mb-4 */
}

#aside-filters__content .catalog-filter-field h4 {
  color: #40403f; /* Brand Gray */
}

/* Inputs row under dimension label (was mb-2 → mb-3) */
#aside-filters__content .catalog-filter-field > .flex.flex-row {
  margin-bottom: 0.75rem;
}

#aside-filters__content .catalog-filter-field .filter-range-slider {
  margin-top: 0.5rem;
}

#aside-filters .input-text {
  color: #40403f;
}

#aside-filters .input-text::placeholder {
  color: #b2b2b0;
  opacity: 1;
}

#aside-filters .filter-range-slider.noUi-target {
  background: #E5E5E2 !important;
}

#aside-filters .filter-range-slider .noUi-base,
#aside-filters .filter-range-slider .noUi-connects {
  border-radius: 999px;
}

/* Aside + calculator: custom checkboxes for extra filters */
#aside-filters .catalog-filter-extra label,
#filter-full .input-checkbox {
  align-items: center;
  gap: 0.5rem;
}

#aside-filters .catalog-filter-extra__checkbox,
#filter-full .catalog-filter-extra__checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 1.125rem;
  height: 1.125rem;
  margin: 0;
  flex-shrink: 0;
  border: 1px solid #e5e5e2;
  border-radius: 4px;
  background-color: #e5e5e2;
  cursor: pointer;
  position: relative;
}

#aside-filters .catalog-filter-extra__checkbox:checked,
#filter-full .catalog-filter-extra__checkbox:checked {
  background-color: #8cc63d;
  border-color: #8cc63d;
}

#aside-filters .catalog-filter-extra__checkbox:checked::after,
#filter-full .catalog-filter-extra__checkbox:checked::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 45%;
  width: 0.3rem;
  height: 0.55rem;
  border: solid #fff;
  border-width: 0 1.5px 1.5px 0;
  transform: translate(-50%, -55%) rotate(45deg);
}

#aside-filters .catalog-filter-extra__checkbox:focus-visible,
#filter-full .catalog-filter-extra__checkbox:focus-visible {
  outline: 2px solid #8cc63d;
  outline-offset: 2px;
}

/* Calculator: spacing + placeholders like aside filters */
#filter-full .filter-button.btn-medium {
  padding: 1rem;
}

#filter-full .catalog-filter-field {
  margin-bottom: 1rem;
}

#filter-full .catalog-filter-field .filter-range-slider {
  margin-top: 0.5rem;
}

#filter-full .filter-label {
  color: #40403f;
}

#filter-full .input-text {
  color: #40403f;
}

#filter-full .input-text::placeholder {
  color: #b2b2b0;
  opacity: 1;
}

/* Aside: reset — серый фон, без hover-эффектов */
#aside-filters__footer .btn-catalog-filters-reset {
  background-color: #ececea !important;
  color: #40403f !important;
  border: none;
  box-shadow: none;
}

#aside-filters__footer .btn-catalog-filters-reset:hover,
#aside-filters__footer .btn-catalog-filters-reset:focus,
#aside-filters__footer .btn-catalog-filters-reset:active {
  background-color: #ececea !important;
  color: #40403f !important;
  border: none;
  box-shadow: none;
}

/* Плавающий островок: категории */
#header__filters.header__filters-bar {
  align-items: center;
  border: 1px solid rgba(72, 72, 74, 0.12);
  overflow: hidden;
  overflow-x: hidden;
}

#header__filters #filters-toggle-header {
  flex-shrink: 0;
}

#header__filters .header__filters-sep {
  display: block;
  width: 1px;
  height: 1.75rem;
  flex-shrink: 0;
  background-color: rgba(72, 72, 74, 0.18);
}

#header__filters .header__filters-chips {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  cursor: grab;
}

#header__filters .header__filters-chips::-webkit-scrollbar {
  display: none;
}

#header__filters .header__filters-chips.is-dragging {
  cursor: grabbing;
  user-select: none;
}

#header__filters .header__filters-chips.is-dragging a {
  pointer-events: none;
}

#header__filters .header__filter-chip {
  background-color: #fff;
  color: #40403f;
  text-decoration: none;
  flex-shrink: 0;
  transition: background-color 0.2s ease, color 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
  #header__filters .header__filter-chip:hover {
    background-color: #8cc63d;
    color: #fff;
  }
}

#header__filters .header__filter-chip--active,
#header__filters .header__filter-chip--active:hover {
  background-color: #8cc63d;
  color: #fff;
}

#header__filters .header__filter-chip--active .property-icon.icon-close {
  display: inline-flex;
  width: 10px;
  height: 10px;
  flex-shrink: 0;
  background-color: #fff;
}

/* Каталог: пустая выдача после фильтрации (#products — grid, блок на всю ширину) */
#products .catalog-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 280px;
  padding: 3rem 1.5rem;
  text-align: center;
}

#products .catalog-empty__title {
  margin: 0 0 0.75rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: #40403f;
}

#products .catalog-empty__text {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 0 1.5rem;
  max-width: 24rem;
}

#products .catalog-empty__line {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #adadad;
}

#products .catalog-empty__line + .catalog-empty__line {
  margin-top: 0.25rem;
}

#products .catalog-empty__reset {
  display: inline-flex;
  min-width: 14rem;
  text-decoration: none;
  background-color: #40403f;
  color: #fff;
  box-shadow: 2px 2px 12px rgba(69, 73, 67, 0.15);
}

#products .catalog-empty__reset:hover {
  background-color: #262626;
  color: #fff;
}

.contact__map-container iframe {
  display: block;
  width: 100% !important;
  height: 100%;
  min-height: 300px;
  border: 0;
  /* Grayscale works on the iframe element as a whole (not inner map UI) */
  filter: grayscale(1);
}

/* Route CTA overlays the map (bottom-right) */
.contact__map {
  position: relative;
}

.contact__map > a.btn-small {
  position: absolute;
  right: 0.8rem;
  bottom: 4.5rem;
  z-index: 2;
  margin: 0;
}

#hero-home .hero-home__contacts {
  position: relative;
  z-index: 2;
}

/* Catalog hero: padding only on left; right fills full section height */
#hero {
  padding: 0;
  gap: 0;
  overflow: hidden;
  align-items: stretch;
}

#hero__left {
  padding: 2rem;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  #hero__left {
    padding: 3rem;
  }
}

#hero__right {
  display: flex;
  align-self: stretch;
  min-height: 200px;
}

@media (min-width: 1024px) {
  #hero__right {
    min-height: 100%;
    max-height: 256px;
  }
}

#hero__right #hero__image,
#hero #hero__image {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  object-fit: contain;
}

/* Built styles.css may reference hashed icon URLs; ensure icons resolve from /caserf/ */
.property-icon.icon-wheel {
  -webkit-mask-image: url("../icon-wheel.svg");
  mask-image: url("../icon-wheel.svg");
}

.property-icon.icon-hand {
  -webkit-mask-image: url("../icon-hand.svg");
  mask-image: url("../icon-hand.svg");
}

.property-icon.icon-dimensions-inner {
  -webkit-mask-image: url("../icon-dimensions-inner.svg");
  mask-image: url("../icon-dimensions-inner.svg");
}

.property-icon.icon-dimensions-outer {
  -webkit-mask-image: url("../icon-dimensions-outer.svg");
  mask-image: url("../icon-dimensions-outer.svg");
}

.property-icon.icon-water-resistance {
  -webkit-mask-image: url("../icon-water-resistance.svg");
  mask-image: url("../icon-water-resistance.svg");
}

.property-icon.icon-weight {
  -webkit-mask-image: url("../icon-weight.svg");
  mask-image: url("../icon-weight.svg");
}

.property-icon.icon-filter {
  -webkit-mask-image: url("../icon-filter.svg");
  mask-image: url("../icon-filter.svg");
}

.property-icon.icon-sort {
  -webkit-mask-image: url("../icon-sort.svg");
  mask-image: url("../icon-sort.svg");
}

.property-icon.icon-download {
  -webkit-mask-image: url("../icon-download.svg");
  mask-image: url("../icon-download.svg");
}

.property-icon.icon-close {
  -webkit-mask-image: url("../icon-close.svg");
  mask-image: url("../icon-close.svg");
}

.input-search {
  background-image: url("../icon-search.svg");
  background-size: 18px 18px;
}

@media (min-width: 48rem) {
  .input-search {
    width: 204px;
    padding-left: calc(var(--spacing) * 9);
  }
}

/* Плавающая кнопка внутри #main: sticky, у футера не перекрывает подвал */
#sticky-buttons {
  position: sticky;
  bottom: 1rem;
  z-index: 100;
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  pointer-events: none;
}

#sticky-buttons #request-a-quote {
  margin-left: auto;
  margin-right: 0;
  pointer-events: auto;
}

@media (min-width: 768px) {
  #sticky-buttons #request-a-quote {
    margin-right: -22px;
  }
}

/* Home: show sticky CTA only when header keeps class "fixed" (no transparent) */
body[data-page="home"] #sticky-buttons {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

body[data-page="home"] #sticky-buttons #request-a-quote {
  pointer-events: none;
}

body[data-page="home"] #sticky-buttons.is-visible {
  opacity: 1;
  visibility: visible;
}

body[data-page="home"] #sticky-buttons.is-visible #request-a-quote {
  pointer-events: auto;
}

/* Hide sticky CTA when scrolled to #contact (any page) */
#sticky-buttons.is-at-contact {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

#sticky-buttons.is-at-contact #request-a-quote {
  pointer-events: none;
}

/* —— Markup overrides: header spacing & transparent colors —— */
#header .wrapper {
  padding: 0.75rem; /* 12px, was p-4 */
}

#header__nav {
  margin-right: 0;
}

#header__nav ul {
  gap: 0.75rem; /* 12px */
}

@media (min-width: 768px) {
  #header.header--transparent .input-text {
    border-color: #fff;
    background-color: transparent;
    color: #fff;
  }

  #header.header--transparent .input-text::placeholder {
    color: #ccccc9;
  }
}

/* —— Markup overrides: category cards —— */
.category {
  position: relative;
  display: flex;
  height: 240px;
  min-height: 0;
  flex-direction: column;
  gap: 1rem;
  overflow: hidden;
  border-radius: 0.5rem;
  background-color: rgba(255, 255, 255, 0.5);
  padding: 0.75rem;
}

.category:hover {
  background-color: #fff;
}

@media (min-width: 768px) {
  .category {
    height: 300px;
    padding: 1.25rem;
  }
}

.category .category__title {
  position: relative;
  z-index: 1;
  max-width: 180px;
  flex-shrink: 0;
}

.category .category__content {
  position: relative;
  z-index: 1;
  margin-top: auto;
  display: flex;
  flex-shrink: 0;
  align-items: flex-end;
  justify-content: space-between;
}

/* 240×240, centered — absolute so it does not affect card size */
.category .category__image {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 240px;
  height: 240px;
  margin: 0;
  flex: none;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  pointer-events: none;
  z-index: 0;
  transition: transform 0.3s ease-out;
}

.category .category__image img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.category:hover .category__image {
  transform: translate(-50%, -50%) scale(1.2);
}

/* —— Markup overrides: news post cards —— */
.posts-container .post {
  display: flex;
  height: 320px;
  min-width: 0;
  flex-shrink: 0;
  flex-grow: 0;
  flex-direction: column;
  gap: 0.5rem;
  border-radius: 0.5rem;
  background-color: #fafafa;
  padding: 1.25rem;
}

.posts-container .post:hover {
  background-color: #fff;
}

@media (min-width: 768px) {
  .posts-container .post {
    height: 340px;
  }
}

.posts-container .post > a {
  display: block;
  width: 100%;
  flex-shrink: 0;
  overflow: hidden;
}

.posts-container .post .post__title {
  flex-shrink: 0;
  min-height: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.posts-container .post .post__date,
.posts-container .post .post__content {
  flex-shrink: 0;
}

.posts-container .post .post__link {
  margin-top: auto;
  width: fit-content;
  height: 24px;
  flex-shrink: 0;
  text-decoration: underline;
  text-underline-offset: 6px;
}

.carousel__item {
  justify-content: space-between;
  height: 150px;
}

/* Category carousel: fade stays fixed while items scroll; hides at end */
.carousel-wrap {
  position: relative;
}

.carousel-wrap .carousel {
  margin-bottom: 0;
}

.carousel-wrap::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 88px;
  height: 100%;
  background: linear-gradient(90deg, #f5f5f500, #f5f5f5);
  pointer-events: none;
  z-index: 1;
  opacity: 1;
  transition: opacity 0.2s ease;
}

@media (min-width: 768px) {
  .carousel-wrap::after {
    display: none;
  }
}

.carousel-wrap.is-at-end::after {
  opacity: 0;
}

.carousel.wrapper::after,
.carousel::after {
  content: none;
  display: none;
}

/* Markup override: no green border on products-in-action carousel */
.carousel-products .carousel-products__item {
  border: none;
}

/* «Оставить заявку» — по левому краю в меню */
#menu__overlay .js-caserf-request-stub {
  align-self: flex-start;
  text-align: left;
  width: fit-content;
}

/* Mobile menu: scroll overlay, lock page body */
body.menu-overlay-open {
  overflow: hidden;
}

#menu__overlay.is-open {
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  align-items: flex-start;
}

@media (min-width: 768px) {
  #menu__overlay.is-open {
    align-items: center;
  }
}

/* Footer contacts: one left-aligned block on the right side of the footer */
#footer__right .footer__contacts {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  text-align: left;
}

#footer__right .footer__contacts #footer__email {
  margin-top: -8px;
}

#footer__quote {
  align-self: flex-start;
  text-align: left;
}

/* Catalog top filters: sort icon gap same as «Фильтры» (gap-2 = 0.5rem) */
.top-filters__item.sort-select {
  gap: 0.5rem;
  cursor: pointer;
}

.top-filters__item.sort-select .icon-sort {
  cursor: pointer;
  flex-shrink: 0;
}

.top-filters__item.sort-select .input-select {
  width: auto;
  min-width: 0;
  max-width: 100%;
  padding: 0;
  margin: 0;
  /* size to selected label so gap to icon matches filters */
  field-sizing: content;
}

/* Mobile: Фильтры + Сортировка в одном ряду, подсказки — ниже */
@media (max-width: 767px) {
  #top-filters {
    flex-wrap: wrap;
    align-items: center;
    row-gap: 2.8rem;
    overflow-x: visible;
  }

  #top-filters #caserf-filters-open {
    order: 1;
  }

  #top-filters .sort-select {
    order: 2;
    margin-left: auto;
  }

  #top-filters .top-filters__hints {
    order: 3;
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
  }
}

/* Non-home pages: solid header (logo + dark nav links), no scroll toggle */
body[data-page]:not([data-page="home"]) #header #header__left {
  visibility: visible;
}

body[data-page]:not([data-page="home"]) #header #header__nav a:not(.text-highlight) {
  color: #40403f;
}

#accessories-list .product,
#related-products .product {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border-radius: 0.5rem;
  background-color: #fafafa;
  padding: 0.75rem;
  text-decoration: none;
  color: inherit;
}

#accessories-list .product:hover,
#related-products .product:hover {
  background-color: #fff;
}

/* Calculator («Подобрать по размеру») */
body[data-page="calculator"] #sticky-buttons {
  display: none !important;
}

/* Product page: no floating «Оставить заявку» */
body[data-page="product"] #sticky-buttons {
  display: none !important;
}

/* Product page: prevent horizontal overflow on mobile */
body[data-page="product"] {
  overflow-x: clip;
}

body[data-page="product"] .wrapper-product,
body[data-page="product"] .product-layout,
body[data-page="product"] .product-layout__right,
body[data-page="product"] .product-content,
body[data-page="product"] .product-sections {
  min-width: 0;
  max-width: 100%;
}

body[data-page="product"] .product-gallery {
  min-width: 0;
  max-width: 100%;
  width: 100%;
}

body[data-page="product"] .product-gallery__thumbs {
  flex-shrink: 0;
}

body[data-page="product"] .product-gallery__main {
  min-width: 0;
  flex: 1 1 0;
  width: auto;
}

body[data-page="product"] .product-gallery__main img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* CTA row: nowrap buttons were expanding the grid past the viewport */
body[data-page="product"] .product-hero__actions {
  flex-wrap: wrap;
  width: 100%;
  min-width: 0;
}

@media (max-width: 767px) {
  body[data-page="product"] .product-hero__actions .btn-medium,
  body[data-page="product"] .product-hero__actions .btn-small {
    flex: unset;
    min-width: 0;
    padding: 8px 12px;
    font-size: 0.8rem;
    white-space: normal;
    text-align: center;
    height: auto;
    min-height: 2.25rem;
  }
}

body[data-page="product"] .product-hero__title {
  overflow-wrap: anywhere;
  word-break: break-word;
}

body[data-page="product"] .breadcrumbs {
  max-width: 100%;
}

body[data-page="product"] .spec-row__value {
  flex-shrink: 0;
  max-width: 45%;
  overflow-wrap: anywhere;
}

/* Lock page scroll only on desktop while waiting for first «Подобрать» */
@media (min-width: 768px) {
  body.calculator-pending {
    overflow: hidden;
    height: 100vh;
  }
}

body[data-page="calculator"] #header__nav a.text-highlight,
body[data-page] #header__nav a.text-highlight {
  color: var(--brand-green, #8cc63d);
}

/* Skeletons: desktop only — hide on mobile to avoid scroll issues */
.calculator-skeletons {
  display: none;
}

@media (min-width: 768px) {
  .calculator-skeletons {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
  }
}

.calculator-skeleton {
  min-height: 220px;
  border-radius: 0.5rem;
  background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: calculator-skeleton-shimmer 1.2s ease-in-out infinite;
}

@keyframes calculator-skeleton-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

#calculator-products.hidden {
  display: none;
}

#calculator-skeletons.hidden {
  display: none;
}

/* Catalog listing */
body[data-page="catalog"] #products.is-loading-more {
  opacity: 0.85;
  pointer-events: none;
}

body[data-page="catalog"] #header__filters a.btn-small {
  text-decoration: none;
}

/* Catalog: mobile — chips island without «Фильтры»; sticky «Фильтры» button; desktop — full island */
body[data-page="catalog"] #catalog-sticky-filters {
  display: flex;
}

body[data-page="catalog"] #header__filters.header__filters-bar {
  display: flex !important;
}

@media (min-width: 768px) {
  body[data-page="catalog"] #catalog-sticky-filters {
    display: none !important;
  }
}

@media (max-width: 767px) {
  body[data-page="catalog"] #header__filters #filters-toggle-header,
  body[data-page="catalog"] #header__filters .header__filters-sep {
    display: none !important;
  }

  body[data-page="catalog"] #header__filters.header__filters-bar {
    gap: 0;
    padding: 0.5rem;
  }

  body[data-page="catalog"] #header__filters .header__filters-chips {
    gap: 0.5rem;
    width: 100%;
  }

  body[data-page="catalog"] #header__filters .header__filter-chip {
    width: auto;
    height: 32px;
    min-height: 32px;
    border-radius: 6px;
    gap: 10px;
    padding: 0 12px;
    font-size: 12px;
    line-height: 1.2;
  }

  body[data-page="catalog"] #header__filters .header__filter-chip--active .property-icon.icon-close {
    width: 8px;
    height: 8px;
  }
}

/* Single sticky «Оставить заявку» from layout — avoid overlap with catalog filters bar */
body[data-page="catalog"] #sticky-buttons {
  justify-content: flex-end;
}

/* News listing — spacing from heading to cards (pb-6 / md:pb-8) */
body[data-page="news"] .heading--sm {
  padding-bottom: 1.5rem; /* pb-6 */
}

@media (min-width: 768px) {
  body[data-page="news"] .heading--sm {
    padding-bottom: 2rem; /* md:pb-8 */
  }
}

/* News listing — grid instead of home carousel */
body[data-page="news"] .posts-container {
  margin-right: 0;
  width: 100%;
  overflow-x: visible;
}

body[data-page="news"] .posts-container.is-loading-more {
  opacity: 0.85;
  pointer-events: none;
}

body[data-page="news"] .posts {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  gap: 1rem;
}

@media (min-width: 768px) {
  body[data-page="news"] .posts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  body[data-page="news"] .posts {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

body[data-page="news"] .post {
  width: auto;
  max-width: none;
}

/* Error page (404 / 5xx) */
body[data-page="error"] #main {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: calc(100vh - 120px);
}

body[data-page="error"] .error-page {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem 5rem;
}

body[data-page="error"] .error-page__inner {
  display: flex;
  max-width: 28rem;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

body[data-page="error"] .error-page__code {
  margin: 0 0 1rem;
  font-size: clamp(5rem, 18vw, 8rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
  color: #adadad;
  user-select: none;
}

body[data-page="error"] .error-page__title {
  margin: 0 0 0.75rem;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.25;
  color: #40403f;
}

@media (min-width: 768px) {
  body[data-page="error"] .error-page__title {
    font-size: 1.75rem;
  }
}

body[data-page="error"] .error-page__text {
  margin: 0 0 2rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: #adadad;
}

body[data-page="error"] .error-page__actions {
  display: flex;
  width: 100%;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 480px) {
  body[data-page="error"] .error-page__actions {
    flex-direction: row;
    justify-content: center;
  }

  body[data-page="error"] .error-page__actions .btn-large {
    min-width: 10rem;
  }
}

/* News article: CMS images without .post__image class */
#main.post .post__content img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  object-fit: cover;
  aspect-ratio: 698 / 491;
}

/* Contacts page (site/contact) */
#main.post .contact-page__content {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

#main.post .contact-page__company {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #40403f;
}

#main.post .contact-page__address,
#main.post .contact-page__schedule {
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
  color: #40403f;
}

#main.post .contact-page__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

#main.post .contact-page__text {
  font-size: 1rem;
  line-height: 1.6;
  color: #40403f;
}

#main.post .contact-page__text img {
  aspect-ratio: auto;
}

#main.post .contact-page__map {
  margin-top: 1rem;
  width: 100%;
  max-width: 100%;
}

#main.post .contact-page__map .contact__map-container {
  min-height: 360px;
  border-radius: 0.5rem;
  overflow: hidden;
}

#main.post .contact-page__map .contact__map-container iframe {
  min-height: 360px;
}

/* Request form modal (Yii integration) */
.request-form__info.is-hidden,
.request-form__topic-row.is-hidden,
.request-form__product-row.is-hidden {
  display: none !important;
}

.request-form__file-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}

.request-form__file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  background: #f5f5f4;
}

.request-form__file-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.request-form__file-remove {
  flex-shrink: 0;
  border: 0;
  background: transparent;
  color: #8cc63d;
  cursor: pointer;
  font: inherit;
  text-decoration: underline;
}

.request-form__form-error,
.request-form__success {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
}

.request-form__form-error {
  background: #fff4f4;
  color: #b42318;
}

.request-form__success {
  background: #f3faeb;
  color: #3f6212;
}

.request-form__form.hidden {
  display: none;
}

#request-form__submit.is-loading {
  opacity: 0.7;
  pointer-events: none;
}
