/* =====================================================
   HOMEPAGE MODULES
   ===================================================== */

/* --- Hero banner --- */
.cs-hero {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 16px 0 24px;
}
.cs-hero-card {
  display: block;
  position: relative;
  border-radius: var(--cs-radius, 12px);
  overflow: hidden;
  min-height: 420px;
  background-size: cover;
  background-position: center bottom;
  background-repeat: no-repeat;
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.cs-hero-card:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}
.cs-hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 28px 24px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}
.cs-hero-brand {
  font-family: "Inter", sans-serif;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cs-green, #32a850);
  margin-bottom: 10px;
}
.cs-hero-title {
  font-family: "Inter", sans-serif;
  font-size: 26px;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--cs-text, #212121);
  margin: 0 0 12px;
}
.cs-hero-sub {
  font-family: "Inter", sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--cs-text-light, #666);
  margin: 0 0 auto;
  line-height: 1.4;
}
.cs-hero-btn {
  display: inline-block;
  font-family: "Inter", sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  background: var(--cs-green, #32a850);
  padding: 12px 24px;
  border-radius: 8px;
  transition: background 0.2s, transform 0.2s;
}
.cs-hero-card:hover .cs-hero-btn {
  background: #2a9244;
}
.cs-hero-overlay--light .cs-hero-brand {
  color: #4cdf72;
}
.cs-hero-overlay--light .cs-hero-title {
  color: #fff;
}
.cs-hero-overlay--light .cs-hero-sub {
  color: rgba(255,255,255,0.7);
}
.cs-hero-overlay--light .cs-hero-btn {
  background: #4cdf72;
  color: #1a1a1a;
}
.cs-hero-card:hover .cs-hero-overlay--light .cs-hero-btn {
  background: #3ccf62;
}


.cs-hero .splide__pagination {
  position: absolute;
  bottom: -28px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 0;
  margin: 0;
}
.cs-hero .splide__pagination__page {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cs-border, #e0e0e0);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.2s;
}
.cs-hero .splide__pagination__page.is-active {
  background: var(--cs-green, #32a850);
}

/* --- GEO визитка --- */
.cs-geo {
  margin: 24px 0;
  padding: 20px 0;
  text-align: center;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  line-height: 1.75;
  color: var(--cs-text-light, #666);
  text-align: center;
  background: var(--cs-bg, #f7f7f7);
  border-radius: var(--cs-radius, 12px);
}
.cs-geo strong {
  color: var(--cs-green, #32a850);
  font-weight: 600;
}

/* --- USP иконки --- */
.cs-usp {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 28px auto;
  padding: 0;
  width: 100%;
  font-family: "Inter", sans-serif;
}
.cs-usp-item {
  text-align: center;
  padding: 20px 12px;
  background: #fff;
  border: 1px solid var(--cs-border, #e8e8e8);
  border-radius: var(--cs-radius, 12px);
  transition: box-shadow 0.2s, transform 0.2s;
}
.cs-usp-item:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  transform: translateY(-2px);
}
.cs-usp-item svg {
  display: block;
  margin: 0 auto 12px;
  width: 40px;
  height: 40px;
  fill: var(--cs-green, #32a850);
}
.cs-usp-item p {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--cs-text, #212121);
  line-height: 1.4;
}

/* --- Категории вентиляции --- */
.cs-vent-title {
  font-family: "Inter", sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--cs-text, #212121);
  text-align: center;
  margin: 36px 0 20px;
}
.cs-vent-cats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  width: 100%;
}
.cs-vent-item {
  min-height: 200px;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  border-radius: var(--cs-radius, 12px);
  overflow: hidden;
  position: relative;
  width: 100%;
}
.cs-vent-item a {
  color: var(--cs-text, #212121);
  display: flex;
  align-items: flex-end;
  height: 100%;
  text-decoration: none;

}
.cs-vent-item {
  transition: box-shadow 0.25s ease;
}
.cs-vent-item:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}
.cs-vent-item span {
  display: block;
  width: 100%;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  font-weight: 600;
  background: linear-gradient(to right, rgba(255,255,255,0.92) 65%, rgba(255,255,255,0));
  padding: 12px 14px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.cs-vi-kanalnye { background-image: url(/image/catalog/index/kanalnye.jpg); }
.cs-vi-centrobezhnye { background-image: url(/image/catalog/index/centrobezhnye.jpg); }
.cs-vi-bytovye { background-image: url(/image/catalog/index/bytovye.jpg); }
.cs-vi-osevye { background-image: url(/image/catalog/index/osevye.jpg); }
.cs-vi-rekuperatory { background-image: url(/image/catalog/index/rekuperatory.jpg); }
.cs-vi-kryshnye { background-image: url(/image/catalog/index/kryshnye.jpg); }
.cs-vi-shumoizolirovannye { background-image: url(/image/catalog/index/shumoizolirovannye.jpg); }
.cs-vi-komplektuyushchie { background-image: url(/image/catalog/index/komplektuyushchie.jpg); }

/* --- SEO текст вентиляция --- */
.cs-seo-vent {
  margin: 28px 0;
  padding: 0;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  line-height: 1.75;
  color: var(--cs-text-light, #666);
}
.cs-seo-vent h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--cs-text, #212121);
  margin: 24px 0 12px;
}
.cs-seo-vent p {
  margin: 0 0 12px;
}
.cs-seo-vent ul {
  padding-left: 20px;
  margin: 12px 0;
  line-height: 1.8;
}
.cs-seo-vent li {
  margin-bottom: 4px;
}
.cs-seo-vent a {
  color: var(--cs-green, #32a850);
  text-decoration: none;
  font-weight: 500;
}
.cs-seo-vent a:hover {
  text-decoration: underline;
}

/* --- SEO тексты РУ/УКР (modules 34/41) --- */
.cs-seo-main {
  margin: 28px 0;
  padding: 0;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  line-height: 1.75;
  color: var(--cs-text-light, #666);
  position: relative;
  max-height: 200px;
  overflow: hidden;
  transition: max-height 0.4s ease;
}
.cs-seo-main.expanded {
  max-height: none;
  overflow: visible;
}
.cs-seo-main-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,1));
  pointer-events: none;
}
.cs-seo-main.expanded .cs-seo-main-fade {
  display: none;
}
.cs-seo-toggle {
  display: block;
  margin: 12px 0 0;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--cs-green, #32a850);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 12px;
}
.cs-seo-toggle:hover {
  text-decoration: underline;
}
.cs-seo-main h1,
.cs-seo-main h2 {
  font-family: "Inter", sans-serif;
  color: var(--cs-text, #212121);
  font-weight: 700;
  line-height: 1.3;
}
.cs-seo-main h1 {
  font-size: 22px;
  margin: 0 0 16px;
}
.cs-seo-main h2 {
  font-size: 18px;
  margin: 20px 0 10px;
}
.cs-seo-main p {
  margin: 0 0 12px;
}
.cs-seo-main ul {
  padding-left: 20px;
  margin: 12px 0;
}
.cs-seo-main li {
  margin-bottom: 6px;
}
.cs-seo-main a {
  color: var(--cs-green, #32a850);
  font-weight: 500;
}

/* --- Карусель производителей (Splide) --- */
.cs-brands {
  margin: 32px 0;
  padding: 0;
  position: relative;
}
.cs-brands-title {
  font-family: "Inter", sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--cs-text, #212121);
  text-align: center;
  margin-bottom: 20px;
}
.cs-brands .splide__slide {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
}
.cs-brands .splide__slide img {
  max-height: 50px;
  max-width: 120px;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.6;
  transition: filter 0.3s, opacity 0.3s;
}
.cs-brands .splide__slide:hover img {
  filter: grayscale(0%);
  opacity: 1;
}
.cs-brands .splide__slide a {
  display: flex;
  align-items: center;
  justify-content: center;
}
.cs-brands .splide {
  overflow: visible;
}
.cs-brands .splide__arrow {
  position: absolute;
  z-index: 2;
  background: #fff;
  border: 1px solid var(--cs-border, #e8e8e8);
  width: 36px;
  height: 36px;
  opacity: 0.7;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  top: 50%;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cs-brands .splide__arrow--prev {
  left: -18px;
  transform: translateY(-50%) scaleX(-1);
}
.cs-brands .splide__arrow--next {
  right: -18px;
  transform: translateY(-50%);
}
.cs-brands .splide__arrow:hover {
  opacity: 1;
}
.cs-brands .splide__arrow svg {
  fill: var(--cs-text, #212121);
  width: 14px;
  height: 14px;
}
.cs-brands .splide__pagination__page {
  background: var(--cs-border, #e8e8e8);
}
.cs-brands .splide__pagination__page.is-active {
  background: var(--cs-green, #32a850);
}

/* --- Slideshow (keep but restyle) --- */
#slideshow0 {
  border-radius: var(--cs-radius, 12px);
  overflow: hidden;
  margin-bottom: 8px;
}


/* --- Vent section backdrop --- */
.cs-vent-section {
  background: var(--cs-bg, #f7f7f7);
  border-radius: var(--cs-radius, 12px);
  padding: 4px 20px 20px;
  margin: 28px 0;
}
.cs-vent-section .cs-vent-title {
  margin-top: 20px;
}
.cs-vent-section .cs-vent-cats {
  gap: 10px;
}


/* --- HTML module wrapper centering --- */
.cs-hw {
  text-align: center;
}
.cs-geo {
  display: inline-block;
  text-align: center;
  padding: 20px 28px;
}
.cs-usp {
  text-align: center;
}
.cs-vent-section,
.cs-seo-vent,
.cs-seo-main,
.cs-brands {
  text-align: left;
}


/* --- Product slider (Splide) --- */
.cs-featured {
  margin: 28px 0;
}
.cs-featured-title {
  font-family: "Inter", sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--cs-text, #212121);
  margin: 0 0 16px;
}
.cs-product-slider {
  position: relative;
}
.cs-product-slider .splide__arrow {
  position: absolute;
  z-index: 2;
  background: #fff;
  border: 1px solid var(--cs-border, #e8e8e8);
  width: 36px;
  height: 36px;
  opacity: 0.7;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  top: 35%;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cs-product-slider .splide__arrow--prev {
  left: -18px;
  transform: scaleX(-1);
}
.cs-product-slider .splide__arrow--next {
  right: -18px;
}
.cs-product-slider .splide__arrow:hover {
  opacity: 1;
}
.cs-product-slider .splide__arrow svg {
  fill: var(--cs-text, #212121);
  width: 14px;
  height: 14px;
}
.cs-product-slider .splide__slide {
  padding: 4px;
}
.cs-product-slider .cs-card {
  height: 100%;
}

/* --- Mobile responsive --- */
@media (max-width: 767px) {
  .cs-usp {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .cs-usp-item {
    padding: 14px 8px;
  }
  .cs-usp-item svg {
    width: 32px;
    height: 32px;
  }
  .cs-usp-item p {
    font-size: 12px;
  }


  .cs-hero {
    gap: 8px;
  }
  .cs-hero-card {
    min-height: 280px;
  }
  .cs-hero-overlay {
    padding: 20px 18px;
  }
  .cs-hero-title {
    font-size: 20px;
  }
  .cs-hero-brand {
    font-size: 13px;
  }
  .cs-hero-sub {
    font-size: 12px;
  }
  .cs-hero-btn {
    font-size: 10px;
    padding: 10px 18px;
  }

  .cs-featured-title {
    font-size: 18px;
    margin: 0 0 12px;
  }
  .cs-product-slider .splide__arrow {
    width: 28px;
    height: 28px;
  }
  .cs-product-slider .splide__arrow--prev { left: -6px; }
  .cs-product-slider .splide__arrow--next { right: -6px; }
  .cs-vent-title {
    font-size: 20px;
    margin: 24px 0 14px;
  }
  .cs-vent-cats {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }
  .cs-vent-item {
    min-height: 140px;
  }
  .cs-vent-item span {
    font-size: 12px;
    padding: 8px 10px;
  }

  .cs-seo-main h1 { font-size: 18px; }
  .cs-seo-main h2 { font-size: 16px; }
  .cs-geo {
    padding: 14px 18px;
    font-size: 13px;
  }
}

@media (max-width: 576px) {
  .cs-hero {
    display: block;
  }
  .cs-hero-card {
    min-height: 340px;
    margin-bottom: 8px;
  }
  .cs-hero-dots {
    display: none;
  }
  .cs-hero .splide__pagination {
    position: static;
    margin-top: 12px;
  }
}
