/* ===== главная страница (index.html) =====
   Использует переменные палитры и --header-offset из :root в style.css.
   ФИКС: этот блок раньше жил в общем style.css и грузился на КАЖДОЙ
   странице сайта, включая delivery.html, korzina.html, opt.html — там,
   где hero-баннер, карусель и вращающееся колесо товаров вообще не
   используются. Теперь подключается только на главной странице:
   <link rel="stylesheet" href="style.css" />
   <link rel="stylesheet" href="glavnaya.css" /> */

.hero {
  position: relative;
  width: 100%;
  min-height: 100vh;
  background-image: url("../images/index/chemical-production.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(5, 25, 80, 0.04) 0%,
    rgba(7, 35, 100, 0.1) 18%,
    rgba(10, 45, 120, 0.22) 38%,
    rgba(10, 45, 120, 0.38) 60%,
    rgba(8, 32, 92, 0.58) 82%,
    rgba(5, 20, 65, 0.72) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 24px;
  max-width: 1100px;
}

.hero-content h1 {
  font-size: clamp(46px, 7.5vw, 85px);
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-bottom: 26px;
  line-height: 1.1;
  color: #ffffff;
  text-shadow:
    0 3px 10px rgba(0, 0, 0, 0.55),
    0 8px 26px rgba(0, 0, 0, 0.45);
}

.hero-content p {
  font-size: clamp(20px, 3.4vw, 44px);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.2px;
  max-width: 920px;
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.92);
  text-shadow:
    0 2px 6px rgba(0, 0, 0, 0.4),
    0 4px 14px rgba(0, 0, 0, 0.3);
}

.hero-buttons {
  display: flex;
  gap: 48px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 40px;
}

.hero-btn {
  min-width: 220px;
  padding: 24px 34px;
  font-size: 22px;
  font-weight: 700;
  font-family: inherit;
  color: #ffffff;
  text-align: center;
  text-decoration: none;
  cursor: pointer;

  background-color: var(--color-navy);
  background-image: radial-gradient(
    ellipse at center,
    rgba(255, 255, 255, 0.22) 0%,
    rgba(255, 255, 255, 0.08) 45%,
    rgba(255, 255, 255, 0) 75%
  );
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);

  transition:
    transform 0.25s ease,
    background-color 0.25s ease,
    box-shadow 0.25s ease;
}

.hero-btn:hover {
  transform: scale(1.05);
  background-color: rgba(11, 31, 94, 0.85);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
}

.hero-btn:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 3px;
}

@media (max-width: 768px) {
  .hero {
    background-attachment: scroll;
  }

  .hero-content {
    padding: 20px 16px;
  }

  .hero-buttons {
    gap: 24px;
    margin-top: 30px;
  }

  .hero-btn {
    min-width: 180px;
    padding: 18px 26px;
    font-size: 18px;
  }
}

.content {
  padding: 80px 20px 10px;
  max-width: 1100px;
  margin: 0 auto;
  color: #111111;
}

.content h2 {
  font-size: 34px;
  margin-bottom: 20px;
}

.content p {
  font-size: 22px;
  line-height: 1.7;
  margin-bottom: 10px;
}

/* ===== карусель товаров (под "Каталог товаров" на главной) ===== */
.catalog-carousel {
  padding: 4px 20px 90px;
  max-width: 1600px; /* было 1300px — карусели нужно больше пространства под широкие карточки */
  margin: 0 auto;
}

.carousel-viewport {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-track {
  position: relative;
  width: 100%;
  height: 460px; /* было 448px, но карточка теперь ниже за счёт горизонтальной раскладки */
}

.carousel-slide {
  --slide-width: 840px; /* было 320px — карточка стала намного шире */
  --slide-gap: 680px; /* увеличено пропорционально ширине, чтобы prev/next не наезжали */

  position: absolute;
  top: 0;
  left: 50%;
  width: var(--slide-width);
  height: 100%;
  border-radius: 22px;
  overflow: hidden;
  background: var(--color-navy);

  /* новая раскладка: текст слева, картинка справа */
  display: flex;
  flex-direction: row;

  transform: translateX(-50%) scale(0.8);
  opacity: 0;
  z-index: 1;
  pointer-events: none;
  transition:
    transform 0.6s ease,
    opacity 0.6s ease,
    z-index 0.6s;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

.carousel-slide.is-active {
  transform: translateX(-50%) scale(1);
  opacity: 1;
  z-index: 3;
  pointer-events: auto;
}

.carousel-slide.is-prev {
  transform: translateX(calc(-50% - var(--slide-gap))) scale(0.82);
  opacity: 0.55;
  z-index: 2;
}

.carousel-slide.is-next {
  transform: translateX(calc(-50% + var(--slide-gap))) scale(0.82);
  opacity: 0.55;
  z-index: 2;
}

/* Текстовая часть — теперь слева, занимает половину карточки */
.carousel-slide-content {
  position: relative;
  z-index: 2;
  order: 1;
  flex: 1 1 50%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 48px 44px 116px;
  min-width: 0;
  background: var(--color-navy);
}

.carousel-slide-content h3 {
  color: #ffffff;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.25;
  min-height: calc(1.25em * 2);
  margin-bottom: 18px;
}

.carousel-slide-content p {
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: 0;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Блок с изображением — теперь справа, отдельным блоком без затемняющего
   градиента (он больше не подложка под текстом) */
.carousel-slide-img {
  position: relative;
  order: 2;
  flex: 1 1 50%;
  height: 100%;
  background: var(--color-navy);
  overflow: hidden;
}

.carousel-slide-img img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.carousel-cta {
  position: absolute;
  left: 44px;
  bottom: 44px;

  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 13px 30px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.carousel-cta:hover {
  background: rgba(255, 255, 255, 0.2);
}

.carousel-cta:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 2px;
}

.carousel-cta::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(
    115deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.55) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-20deg);
  animation: ctaShine 2.8s ease-in-out infinite;
}

@keyframes ctaShine {
  0% {
    left: -60%;
  }
  60% {
    left: 130%;
  }
  100% {
    left: 130%;
  }
}

.carousel-arrow {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: var(--color-navy);
  color: #ffffff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
  box-shadow: 0 8px 20px rgba(11, 31, 94, 0.3);
}

.carousel-arrow:hover {
  background: var(--color-navy-hover);
  transform: scale(1.08);
}

.carousel-arrow-left {
  margin-right: 16px;
}

.carousel-arrow-right {
  margin-left: 16px;
}

@media (max-width: 1200px) {
  .carousel-slide {
    --slide-width: 680px;
    --slide-gap: 540px;
  }

  .carousel-track {
    height: 420px;
  }
  .carousel-slide-content {
    padding: 40px 36px 104px;
  }
  .carousel-slide-content h3 {
    font-size: 26px;
  }
  .carousel-slide-content p {
    font-size: 17px;
    -webkit-line-clamp: 3;
  }
  .carousel-cta {
    left: 36px;
    bottom: 36px;
  }
}

@media (max-width: 900px) {
  .carousel-slide {
    --slide-width: 480px;
    --slide-gap: 380px;
  }

  .carousel-track {
    height: 540px;
  }

  /* на планшетах текст и картинка уже не помещаются рядом читабельно —
     переключаем карточку на вертикальную раскладку */
  .carousel-slide {
    flex-direction: column;
  }

  .carousel-arrow {
    width: 42px;
    height: 42px;
    font-size: 22px;
  }

  .carousel-slide-content h3 {
    font-size: 22px;
  }

  .carousel-slide-content p {
    font-size: 16px;
  }
  .carousel-slide-content {
    flex: 0 0 58%;
    padding: 28px 28px 90px;
  }
  .carousel-slide-img {
    flex: 1 1 42%;
    height: auto;
  }
  .carousel-slide-content p {
    padding-top: 12px;
    -webkit-line-clamp: 2;
  }
  .carousel-cta {
    left: 28px;
    bottom: 26px;
    padding: 12px 28px;
  }
}

@media (max-width: 620px) {
  .carousel-slide.is-prev,
  .carousel-slide.is-next {
    opacity: 0;
    pointer-events: none;
  }

  .carousel-slide {
    --slide-width: min(90vw, 420px);
    flex-direction: column;
  }

  .carousel-track {
    height: 520px;
  }

  .carousel-slide-content {
    padding: 24px 22px 84px;
  }
  .carousel-cta {
    left: 22px;
    bottom: 22px;
  }
}
.carousel-slide-img img {
  cursor: zoom-in;
  transition: transform 0.3s ease;
}

.carousel-slide.is-active .carousel-slide-img:hover img {
  transform: scale(1.03);
}
/* ===== блок "товары" с вращающимся кругом ===== */
.products-pin-wrapper {
  position: relative;
  height: 400vh;
}

.products-section {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  background: var(--color-bg-light);
  display: flex;
}

.products-inner {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-start;
  padding: 130px 6vw 0;
}

.products-copy-col {
  position: relative;
  z-index: 2;
  flex: 1;
  max-width: 640px;
}

.product-copy-stack {
  position: relative;
  min-height: 720px;
}

.product-copy {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(28px);
  transition:
    opacity 0.55s ease,
    transform 0.55s ease,
    visibility 0.55s;
  pointer-events: none;
}

.product-copy.is-active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.product-copy-icon {
  display: none;
}

.product-copy h2 {
  font-size: 34px;
  line-height: 1.2;
  color: var(--color-navy);
  margin-bottom: 20px;
}

.product-copy p {
  font-size: 22px;
  line-height: 1.6;
  color: #333333;
  max-width: 560px;
}

/* ===== блок "О компании" (ВЕКТОР ПЛЮС) ===== */
.product-copy .company-intro {
  max-width: 600px;
}

.product-copy .company-intro p {
  font-size: 18px;
  line-height: 1.5;
  color: #333333;
  margin-bottom: 12px;
  max-width: 600px;
}

.product-copy .company-intro h4 {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-navy);
  margin: 16px 0 10px;
}

.product-copy .company-intro ul {
  margin: 0 0 6px 20px;
  padding: 0;
}

.product-copy .company-intro ul li {
  font-size: 17px;
  line-height: 1.45;
  color: #333333;
  margin-bottom: 8px;
}

/* ===== блок "Преимущества работы с нами" ===== */
.advantages-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 28px;
  max-width: 600px;
}

.advantage-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.advantage-icon {
  width: 36px;
  height: 36px;
  color: var(--color-navy);
  margin-bottom: 4px;
}

.advantage-item h4 {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-navy);
  line-height: 1.25;
}

.advantage-item p {
  font-size: 16px;
  line-height: 1.4;
  color: var(--color-text-gray);
  max-width: none;
}

/* ===== форма "оставьте свои контактные данные" =====
   Базовые поля/кнопка/чекбокс общие для всех форм сайта и остались в
   style.css (.contact-form, .form-group, .form-submit и т.д.) — здесь
   только то, что специфично именно для расположения формы на главной. */
.product-copy .contact-form-intro {
  font-size: 17px;
  line-height: 1.5;
  color: var(--color-text-gray);
  max-width: 600px;
  margin-bottom: 16px;
}

.product-copy .form-consent {
  font-size: 13px;
  line-height: 1.4;
  color: #7b8aa8;
  max-width: 600px;
  margin-top: 2px;
}

.products-progress {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
  margin-right: 36px;
  align-self: center;
}

.products-progress .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-border-input);
  transition:
    background 0.35s ease,
    transform 0.35s ease;
}

.products-progress .dot.is-active {
  background: var(--color-navy);
  transform: scale(1.3);
}

.wheel-window {
  --wheel-size: clamp(368px, 53vmin, 644px);

  position: absolute;
  right: 0;
  bottom: 0;
  width: var(--wheel-size);
  height: var(--wheel-size);
  overflow: hidden;
  clip-path: circle(var(--wheel-size) at 100% 100%);
  background: radial-gradient(
    circle at 100% 100%,
    #13316a 0%,
    #0b1f5e 55%,
    #071640 100%
  );
  z-index: 1;
}

.product-wheel {
  --wheel-rotation: 0deg;

  position: absolute;
  right: calc(var(--wheel-size) * -1);
  bottom: calc(var(--wheel-size) * -1);
  width: calc(var(--wheel-size) * 2);
  height: calc(var(--wheel-size) * 2);
  transform: rotate(var(--wheel-rotation));
  transition: transform 0.12s ease-out;
}

.wheel-item {
  --item-size: clamp(120px, 15vmin, 190px);
  --orbit-radius: clamp(200px, 26vmin, 310px);

  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--item-size);
  height: var(--item-size);
  margin: calc(var(--item-size) / -2) 0 0 calc(var(--item-size) / -2);
  transform: rotate(var(--base-angle))
    translateY(calc(var(--orbit-radius) * -1))
    rotate(calc(var(--base-angle) * -1));
}

.wheel-item-inner {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  transform: rotate(var(--extra-rotation));
}

.wheel-item-inner img {
  width: 156%;
  height: 156%;
  border-radius: 50%;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
  object-fit: cover;
  position: relative;
  z-index: 1;
}

.wheel-item-inner span {
  color: #ffffff;
  font-size: clamp(12px, 1.3vmin, 15px);
  font-weight: 600;
  line-height: 1.3;
  max-width: 90%;
  position: relative;
  z-index: 2;
}

.products-scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  color: #7b8aa8;
  font-size: 14px;
  letter-spacing: 1px;
  opacity: 1;
  transition: opacity 0.4s ease;
  animation: hintBounce 1.6s ease-in-out infinite;
}

.products-scroll-hint.is-hidden {
  opacity: 0;
}

@keyframes hintBounce {
  0%,
  100% {
    transform: translate(-50%, 0);
  }
  50% {
    transform: translate(-50%, 6px);
  }
}

@media (max-width: 860px) {
  .products-pin-wrapper {
    height: auto;
  }

  .products-section {
    position: relative;
    height: auto;
    padding: 70px 0;
  }

  .products-inner {
    flex-direction: column;
    align-items: stretch;
    padding: 0 6vw;
    gap: 40px;
  }

  .products-copy-col {
    max-width: none;
  }

  .product-copy-stack {
    min-height: auto;
    display: flex;
    flex-direction: column;
    gap: 36px;
  }

  .product-copy {
    position: relative;
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
    display: block;
  }

  .product-copy h2 {
    font-size: 28px;
  }

  .product-copy p {
    font-size: 18px;
  }

  .product-copy-icon {
    display: block;
    width: 84px;
    height: 84px;
    border-radius: 50%;
    margin-bottom: 18px;
    box-shadow: 0 8px 20px rgba(11, 31, 94, 0.25);
  }

  .advantages-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    max-width: none;
  }

  .contact-form,
  .checkout-form,
  .product-copy .form-consent {
    max-width: none;
  }

  .products-progress {
    display: none;
  }

  .wheel-window,
  .products-scroll-hint {
    display: none;
  }
}
