﻿/*
 * Р“Р»Р°РІРЅР°СЏ Dimevs Shop РїРѕ СЂРµС„РµСЂРµРЅСЃСѓ С‚РµРјР°1.png.
 *
 * Р¤Р°Р№Р» РїРѕРґРєР»СЋС‡Р°РµС‚СЃСЏ С‚РѕР»СЊРєРѕ РїСЂРё is_front_page().
 */

.home-container {
  width: min(100% - 2rem, var(--dimevs-container));
  margin-inline: auto;
}

.home-section {
  padding-block: clamp(2.5rem, 6vw, 5rem);
}

.home-section-heading {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.home-section-heading h2,
.home-why-us h2 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.home-section-heading > a {
  color: var(--dimevs-accent);
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
}

.home-button {
  display: inline-flex;
  min-height: 2.75rem;
  padding-inline: 1.25rem;
  align-items: center;
  justify-content: center;
  border-radius: var(--dimevs-radius-sm);
  font-weight: 700;
  text-decoration: none;
}

.home-button--accent {
  background: var(--dimevs-accent);
  color: #fff;
}

/* РџРµСЂРІС‹Р№ СЌРєСЂР°РЅ: РєР°С‚РµРіРѕСЂРёРё СЃР»РµРІР°, СЂРµРєР»Р°РјРЅС‹Р№ Р±Р»РѕРє СЃРїСЂР°РІР° (Р±Р»РѕРє-2). */
.home-hero-section {
  padding-block: 1.25rem 0.5rem;
}

.home-hero-layout {
  display: grid;
  grid-template-columns: minmax(14rem, 17rem) minmax(0, 1fr);
  gap: 1rem;
  align-items: stretch;
}

.home-category-menu {
  display: flex;
  flex-direction: column;
  padding: 0.85rem 0.85rem 1rem;
  border: 1px solid var(--dimevs-line);
  border-radius: var(--dimevs-radius-md);
  background: var(--dimevs-surface);
}

.home-category-menu__list {
  margin: 0;
  padding: 0;
  list-style: none;
  flex: 1;
}

.home-category-menu__list a {
  display: grid;
  grid-template-columns: 1.5rem 1fr auto;
  gap: 0.55rem;
  align-items: center;
  min-height: 2.45rem;
  padding-inline: 0.25rem;
  border-bottom: 1px solid var(--dimevs-line);
  color: var(--dimevs-ink);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
}

.home-category-menu__list li:last-child a {
  border-bottom: 0;
}

.home-category-menu__list a:hover {
  color: var(--dimevs-accent);
}

.home-category-menu__icon {
  font-size: 1rem;
  line-height: 1;
  text-align: center;
  opacity: 0.85;
}

.home-category-menu__chevron {
  color: var(--dimevs-muted);
  font-size: 1.1rem;
}

.home-category-menu__all {
  display: block;
  margin-top: 0.85rem;
  padding: 0.7rem;
  border: 1px solid var(--dimevs-line);
  border-radius: var(--dimevs-radius-sm);
  color: var(--dimevs-ink);
  font-size: 0.85rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

.home-category-menu__all:hover {
  border-color: var(--dimevs-ink);
}

.home-hero-slider {
  position: relative;
  min-width: 0;
  min-height: clamp(22rem, 42vw, 28rem);
  overflow: hidden;
  border-radius: var(--dimevs-radius-lg);
  background: #ece8e2;
}

.home-hero-slider__slides {
  position: relative;
  min-height: inherit;
}

.home-hero-slide {
  min-height: clamp(22rem, 42vw, 28rem);
  padding: clamp(1.75rem, 4vw, 3.5rem);
  background-color: #ece8e2;
  background-image:
    linear-gradient(90deg, rgb(247 247 245 / 92%) 0%, rgb(247 247 245 / 72%) 38%, rgb(247 247 245 / 18%) 62%, transparent 78%),
    var(--hero-image);
  background-position: center right;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

.home-hero-slide.is-active,
.home-hero-slide:not([hidden]) {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.home-hero-slide[hidden] {
  display: block !important;
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.home-hero-slide.is-active {
  position: relative;
}

.home-hero-slide__content {
  max-width: 22rem;
}

.home-hero-slide h1,
.home-hero-slide__title {
  max-width: 12ch;
  margin: 0;
  color: var(--dimevs-ink);
  font-family: var(--dimevs-font-display);
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  font-weight: 900;
  line-height: 1.05;
}

.home-hero-slide p {
  max-width: 26rem;
  margin-block: 1rem 1.5rem;
  color: var(--dimevs-ink);
  font-size: clamp(0.95rem, 1.6vw, 1.1rem);
  line-height: 1.45;
}

.home-hero-slider__controls {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.75rem;
  pointer-events: none;
}

.home-hero-slider__dots,
.home-hero-slider__arrows {
  pointer-events: auto;
}

.home-hero-slider__dots {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
}

.home-hero-slider__arrows {
  display: flex;
  gap: 0.5rem;
}

.home-hero-slider__arrows button {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: var(--dimevs-ink);
  box-shadow: 0 4px 14px rgb(16 26 52 / 12%);
  cursor: pointer;
  font-size: 1.35rem;
  line-height: 1;
  justify-content: center;
}

.home-hero-slider__arrows button span {
  line-height: 0;
  font-size: 2em;
  width: 10px;
  height: 17px;
}

.home-hero-slider__dots button {
  width: 0.55rem;
  height: 0.55rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 4px rgb(16 26 52 / 20%);
  cursor: pointer;
}

.home-hero-slider__dots button[aria-current="true"] {
  width: 1.55rem;
  background: #e89a3c;
}

/* РџРѕР»РѕСЃР° РїСЂРµРёРјСѓС‰РµСЃС‚РІ РїРѕРґ hero. */
.home-benefits {
  padding-block: 1rem;
}

.home-benefits__list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 1.25rem;
  border: 1px solid var(--dimevs-line);
  border-radius: var(--dimevs-radius-md);
  background: var(--dimevs-surface);
  list-style: none;
}

.home-benefit {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding-inline: 1rem;
  border-right: 1px solid var(--dimevs-line);
}

.home-benefit:last-child {
  border-right: 0;
}

.home-benefit__icon {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--dimevs-line);
  border-radius: 999px;
  background: var(--dimevs-bg);
}

.home-benefit strong,
.home-benefit small {
  display: block;
}

.home-benefit small {
  margin-top: 0.15rem;
  color: var(--dimevs-muted);
}

/* РљР°СЂС‚РѕС‡РєРё РєР°С‚РµРіРѕСЂРёР№. */
.home-category-cards {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-category-card {
  min-width: 0;
}

.home-category-card > a {
  display: block;
  height: 100%;
  padding: 0.75rem;
  border: 1px solid var(--dimevs-line);
  border-radius: var(--dimevs-radius-md);
  background: var(--dimevs-surface);
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.home-category-card > a:hover {
  box-shadow: 0 0.75rem 2rem rgb(16 26 52 / 10%);
  transform: translateY(-3px);
}

.home-category-card__image {
  display: grid;
  aspect-ratio: 1;
  overflow: hidden;
  place-items: center;
  border-radius: 0.6rem;
  background: #f0f1f3;
  color: var(--dimevs-muted);
  font-size: 0.75rem;
  font-weight: 800;
}

.home-category-card__image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.home-category-card h3 {
  margin: 0.75rem 0 0;
  font-size: 0.95rem;
  text-align: center;
}

.home-category-card p {
  margin: 0.15rem 0 0;
  color: var(--dimevs-muted);
  font-size: 0.75rem;
  text-align: center;
}

/* Категории над товарами пока являются обычными ссылками. */
.home-products__heading {
  flex-wrap: wrap;
}

.home-product-tabs {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
  justify-content: center;
}

.home-product-tabs a {
  border-bottom: 2px solid transparent;
  color: var(--dimevs-muted);
  font-size: 0.8rem;
  text-decoration: none;
}

.home-product-tabs a:hover,
.home-product-tabs .is-current {
  border-bottom-color: var(--dimevs-accent);
  color: var(--dimevs-ink);
}

.home-products__viewport {
  position: relative;
  display: block;
}

.home-products__panels {
  min-width: 0;
  width: 100%;
}

.home-products__track {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  container-type: inline-size;
  container-name: home-products;
}

.home-products__track::-webkit-scrollbar {
  display: none;
}

.home-products__nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: var(--dimevs-ink);
  box-shadow: 0 4px 14px rgb(16 26 52 / 12%);
  cursor: pointer;
  font-size: 1.35rem;
  line-height: 1;
  transform: translateY(-50%);
  justify-content: center;
}

.home-products__nav--prev {
  left: 0.5rem;
}

.home-products__nav--next {
  right: 0.5rem;
}

.home-products__nav span {
  line-height: 0;
  height: 15px;
    font-size: 2em;
}

/* Переопределяем только раскладку списка, сохраняя разметку WC. */
.home-products ul.products {
  display: flex;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
  width: max-content;
  min-width: 100%;
}

.home-products ul.products::before,
.home-products ul.products::after {
  display: none;
}

.home-products ul.products li.product {
  float: none;
  box-sizing: border-box;
  flex: 0 0 calc((100cqi - 4rem) / 5);
  width: calc((100cqi - 4rem) / 5);
  max-width: calc((100cqi - 4rem) / 5);
  margin: 0;
  padding: 0.8rem;
  border: 1px solid var(--dimevs-line);
  border-radius: var(--dimevs-radius-md);
  background: var(--dimevs-surface);
  scroll-snap-align: start;
}

.home-products ul.products li.product img {
  aspect-ratio: 1;
  object-fit: contain;
}

.home-products ul.products .woocommerce-loop-product__title {
  min-height: 3em;
  color: var(--dimevs-ink);
  font-size: 0.9rem;
}

.home-products ul.products .price {
  color: var(--dimevs-ink);
  font-weight: 800;
}

.home-products ul.products .button {
  width: 100%;
  margin-top: 0.75rem;
  border-radius: var(--dimevs-radius-sm);
  background: var(--dimevs-ink);
  color: #fff;
  text-align: center;
}

/* Компактная форма скидки как на референсе. */
.home-discount {
  padding-block: 1rem;
}

.home-discount__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(20rem, 1fr);
  gap: 2rem;
  align-items: center;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border-radius: var(--dimevs-radius-lg);
  background: var(--dimevs-ink);
  color: #fff;
}

.home-discount h2,
.home-discount p {
  margin: 0;
}

.home-discount p {
  margin-top: 0.35rem;
  color: rgb(255 255 255 / 75%);
}

/* Ряд: e-mail (~3/4) + кнопка (~1/4) на всю ширину правой колонки. */
.home-discount .wpcf7-form,
.home-discount .wpcf7,
.home-discount .discount-form,
.home-discount__form {
  width: 100%;
  margin: 0;
}

.home-discount .discount-form__fields {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(10.5rem, 1fr);
  gap: 0.75rem;
  align-items: stretch;
  width: 100%;
}

/* CF7 оборачивает теги в <p> — каждый <p> = одна ячейка сетки. */
.home-discount .discount-form__fields > p {
  margin: 0;
  min-width: 0;
}

.home-discount .discount-form__fields .wpcf7-form-control-wrap {
  display: block;
  width: 100%;
}

.home-discount .discount-form__consent {
  margin-top: 0.75rem;
}

.home-discount input[type="email"] {
  box-sizing: border-box;
  width: 100%;
  min-height: 2.75rem;
  padding-inline: 1rem;
  border: 0;
  border-radius: var(--dimevs-radius-sm);
}

.home-discount input[type="submit"] {
  box-sizing: border-box;
  width: 100%;
  min-height: 2.75rem;
  padding-inline: 1rem;
  border: 0;
  border-radius: var(--dimevs-radius-sm);
  background: var(--dimevs-accent);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.home-discount .discount-form__consent,
.home-discount .wpcf7-acceptance,
.home-discount .wpcf7-response-output {
  font-size: 0.75rem;
}

.home-discount .wpcf7-acceptance,
.home-discount .wpcf7-list-item-label {
  color: rgb(255 255 255 / 70%);
}

.home-discount .wpcf7-not-valid-tip {
  color: #ffb4b0;
}

.home-discount .wpcf7-response-output {
  margin: 0.5rem 0 0;
  color: #fff;
}

/* РћСЃРЅРѕРІРЅР°СЏ С„РѕСЂРјР° РєРѕРЅСЃСѓР»СЊС‚Р°С†РёРё РѕС‚РґРµР»РµРЅР° РѕС‚ РєРѕСЂРѕС‚РєРѕР№ РїРѕРґРїРёСЃРєРё. */
.home-consultation {
  background: var(--dimevs-surface);
}

.home-consultation__layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(20rem, 1.1fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
}

.home-eyebrow {
  margin: 0 0 0.5rem;
  color: var(--dimevs-accent);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-consultation h2 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1;
}

.home-consultation__content ul {
  padding-left: 1.25rem;
}

.home-consultation__form {
  padding: clamp(1.25rem, 4vw, 2rem);
  border: 1px solid var(--dimevs-line);
  border-radius: var(--dimevs-radius-lg);
  background: var(--dimevs-bg);
}

.home-consultation__form .wpcf7-form {
  display: grid;
  gap: 1rem;
}

.home-consultation__form .wpcf7-form > p {
  margin: 0;
}

.home-consultation__form input:not([type="checkbox"], [type="submit"]),
.home-consultation__form textarea {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--dimevs-line);
  border-radius: var(--dimevs-radius-sm);
  background: #fff;
}

.home-consultation__form textarea {
  min-height: 8rem;
  resize: vertical;
}

.home-consultation__form input[type="submit"] {
  min-height: 2.75rem;
  padding-inline: 1.25rem;
  border: 0;
  border-radius: 999px;
  background: var(--dimevs-accent);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

/* Р‘Р»РѕРє РґРѕРІРµСЂРёСЏ РїРµСЂРµРґ footer. */
.home-reasons {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.home-reason {
  padding: 1rem;
  border-top: 2px solid var(--dimevs-line);
}

.home-reason__number {
  color: var(--dimevs-accent);
  font-size: 0.75rem;
  font-weight: 800;
}

.home-reason h3 {
  margin: 0.5rem 0 0;
  font-size: 1rem;
}

.home-reason p {
  margin: 0.35rem 0 0;
  color: var(--dimevs-muted);
  font-size: 0.8rem;
}

@media (max-width: 64rem) {
  .home-hero-layout {
    grid-template-columns: 1fr;
  }

  /* РќР° РїР»Р°РЅС€РµС‚Рµ РєР°С‚РµРіРѕСЂРёРё РѕСЃС‚Р°СЋС‚СЃСЏ РіРѕСЂРёР·РѕРЅС‚Р°Р»СЊРЅС‹Рј СЃРїРёСЃРєРѕРј. */
  .home-category-menu__list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 1rem;
  }

  .home-benefits__list,
  .home-category-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .home-benefit:nth-child(2) {
    border-right: 0;
  }

  .home-products ul.products li.product {
    flex-basis: calc((100cqi - 2rem) / 3);
    width: calc((100cqi - 2rem) / 3);
    max-width: calc((100cqi - 2rem) / 3);
  }

  .home-reasons {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 48rem) {
  .home-section-heading {
    align-items: flex-start;
  }

  .home-category-menu__list {
    grid-template-columns: 1fr 1fr;
  }

  .home-hero-slide {
    min-height: 25rem;
    padding: 2rem 1.25rem 5rem;
    background-image:
      linear-gradient(90deg, rgb(232 225 217 / 96%) 0%, rgb(232 225 217 / 72%) 70%, transparent),
      var(--hero-image);
    background-position: 60% center;
  }

  .home-benefits__list {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  .home-benefit {
    padding: 0;
    border-right: 0;
  }

  .home-category-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-product-tabs {
    order: 3;
    flex-basis: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.5rem;
  }

  .home-product-tabs a {
    flex: 0 0 auto;
  }

  .home-products ul.products li.product {
    flex-basis: calc((100cqi - 1rem) / 2);
    width: calc((100cqi - 1rem) / 2);
    max-width: calc((100cqi - 1rem) / 2);
  }

  .home-discount__inner,
  .home-consultation__layout {
    grid-template-columns: 1fr;
  }

  .home-discount .discount-form__fields {
    grid-template-columns: 1fr;
  }

  .home-reasons {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 30rem) {
  .home-category-menu__list,
  .home-benefits__list,
  .home-reasons {
    grid-template-columns: 1fr;
  }

  .home-products__viewport {
    display: block;
  }

  .home-products__nav {
    display: none;
  }

  .home-products ul.products li.product {
    flex-basis: min(85cqi, 16rem);
    width: min(85cqi, 16rem);
    max-width: min(85cqi, 16rem);
  }
}

