.core-hero-carousel {
  --hero-dark: var(--color-surface-strong, #101826);
  --hero-red: var(--color-primary, #f28a2e);
  --hero-blue: var(--color-accent, #1f5eff);
  --hero-yellow: var(--color-primary, #f28a2e);
  --hero-backdrop:
    linear-gradient(180deg, rgba(0, 10, 24, 0.6) 0%, rgba(0, 13, 28, 0.82) 100%),
    radial-gradient(circle at top, rgba(31, 94, 255, 0.26) 0%, var(--hero-dark) 58%);
  position: relative;
  padding-top: 32px;
  padding-bottom: 72px;
  overflow: hidden;
  background: var(--hero-backdrop);
  background-position: center;
  background-size: cover;
}

.core-hero-carousel__top {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 140px 1fr auto;
  align-items: center;
  gap: 20px;
  width: min(1320px, calc(100% - 40px));
  margin: 0 auto;
  padding: 18px 24px;
  color: #fff;
  background: var(--hero-red);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

.core-hero-carousel__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 24px;
  font-weight: 700;
}

.core-hero-carousel__brand img {
  width: 68px;
  height: 68px;
  object-fit: contain;
}

.core-hero-carousel__supplier {
  margin: 0;
  font-size: 28px;
  text-align: center;
}

.core-hero-carousel__phone {
  color: var(--hero-yellow);
  font-size: 28px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.core-hero-carousel.is-top-hidden {
  padding-top: 118px;
}

.core-hero-carousel.is-top-hidden .core-hero-carousel__top {
  display: none;
}

.core-hero-carousel.is-cta-hidden .core-hero-carousel__cta,
.core-hero-carousel.is-popup-hidden .core-hero-carousel__popup {
  display: none !important;
}

.core-hero-carousel.is-scene-hidden {
  padding-top: 0;
  padding-bottom: 0;
  min-height: 0;
}

.core-hero-carousel.is-scene-hidden .core-hero-carousel__scene,
.core-hero-carousel.is-scene-hidden .core-hero-carousel__caption,
.core-hero-carousel.is-scene-hidden .core-hero-carousel__ground {
  display: none !important;
}

.core-hero-carousel__scene {
  width: 100%;
  height: 740px;
  display: grid;
  place-items: center;
  perspective: 2600px;
  transform-style: preserve-3d;
  touch-action: none;
}

.core-hero-carousel__drag {
  position: relative;
  width: min(56vw, 900px);
  aspect-ratio: 5 / 3;
  transform-style: preserve-3d;
  transform: rotateX(-8deg) rotateY(0deg);
}

.core-hero-carousel__track {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  cursor: grab;
}

.core-hero-carousel__track.is-dragging {
  cursor: grabbing;
}

.core-hero-carousel__slide {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 8px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  transform-style: preserve-3d;
  will-change: transform;
}

.core-hero-carousel__slide,
.core-hero-carousel__slide img,
.core-hero-carousel__card {
  backface-visibility: visible;
}

.core-hero-carousel__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.98);
}

.core-hero-carousel__caption {
  position: absolute;
  top: calc(100% + 42px);
  left: 50%;
  z-index: 2;
  margin: 0;
  max-width: min(72vw, 760px);
  overflow: hidden;
  color: rgba(255, 255, 255, 0.96);
  font-family: Verdana, sans-serif;
  font-size: clamp(24px, 2.2vw, 36px);
  font-weight: 700;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  text-overflow: ellipsis;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  transform: translate(-50%, -50%) rotateX(90deg);
  transform-style: preserve-3d;
  pointer-events: none;
}

.core-hero-carousel__ground {
  position: absolute;
  top: 100%;
  left: 50%;
  width: 1680px;
  height: 1680px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 58%);
  transform: translate(-50%, -50%) rotateX(90deg);
  transform-style: preserve-3d;
  pointer-events: none;
}

.core-hero-carousel__card {
  position: absolute;
  top: 7%;
  left: 4%;
  width: min(290px, 34%);
  padding: 14px 15px 15px;
  color: var(--color-on-dark, #fff);
  background:
    linear-gradient(180deg, rgba(14, 23, 36, 0.76) 0%, rgba(12, 20, 31, 0.82) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  font-family: inherit;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(16px);
}

.core-hero-carousel__card-kicker {
  margin: 0 0 6px;
  color: rgba(242, 138, 46, 0.96);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.core-hero-carousel__card-title,
.core-hero-carousel__card h2 {
  display: block;
  margin: 0 0 10px;
  max-width: 12ch;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.core-hero-carousel__card ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 7px;
  font-size: 13px;
  line-height: 1.34;
  color: rgba(243, 246, 251, 0.84);
}

.core-hero-carousel__card li {
  position: relative;
  padding-left: 14px;
}

.core-hero-carousel__card li::before {
  content: "";
  position: absolute;
  top: 0.46em;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 0 0 4px rgba(242, 138, 46, 0.12);
}

.core-hero-carousel__price {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  margin-top: 12px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(242, 138, 46, 0.14);
  border: 1px solid rgba(242, 138, 46, 0.22);
  font-size: 15px;
  font-weight: 700;
  color: var(--hero-yellow);
  letter-spacing: -0.01em;
}

.core-hero-carousel__cta {
  position: fixed;
  top: 50%;
  right: 12px;
  z-index: 6;
  width: 96px;
  min-height: 132px;
  border: 0;
  border-radius: 16px 0 0 16px;
  background: linear-gradient(180deg, #b00000, #870000);
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.core-hero-carousel__popup {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 14, 27, 0.76);
}

.core-hero-carousel__popup-dialog {
  position: relative;
  width: min(100%, 460px);
  padding: 28px;
  border-radius: 24px;
  background: #fff;
  color: #102033;
}

.core-hero-carousel__popup-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: rgba(16, 32, 51, 0.08);
  font-size: 22px;
  cursor: pointer;
}

.core-hero-carousel__popup-eyebrow {
  margin: 0 0 8px;
  color: var(--hero-red);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.core-hero-carousel__popup-title,
.core-hero-carousel__popup-dialog h3 {
  margin: 0 0 10px;
  font-size: 30px;
  font-weight: 800;
  line-height: 1.16;
}

.core-hero-carousel__popup-subtitle {
  margin: 0 0 18px;
  color: var(--color-muted, #5f6b7c);
  line-height: 1.5;
}

.core-hero-carousel__input,
.core-hero-carousel__textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(16, 32, 51, 0.14);
  border-radius: 14px;
}

.core-hero-carousel__input + .core-hero-carousel__input,
.core-hero-carousel__input + .core-hero-carousel__textarea,
.core-hero-carousel__policy,
.core-hero-carousel__submit {
  margin-top: 12px;
}

.core-hero-carousel__textarea {
  min-height: 110px;
  resize: vertical;
}

.core-hero-carousel__policy {
  display: flex;
  gap: 10px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-muted, #5f6b7c);
}

.core-hero-carousel__policy a {
  color: var(--hero-red);
}

.core-hero-carousel__submit {
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--hero-red), var(--color-primary-strong, #d96a11));
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
}

body.hero-carousel-popup-open {
  overflow: hidden;
}

@media (max-width: 480px) {
  .core-hero-carousel {
    padding-top: 16px;
    padding-bottom: 32px;
  }

  .core-hero-carousel.is-top-hidden {
    padding-top: 88px;
  }

  .core-hero-carousel__top {
    grid-template-columns: 1fr;
    width: calc(100% - 16px);
    padding: 12px 14px;
    gap: 12px;
  }

  .core-hero-carousel__brand {
    justify-content: center;
    font-size: 18px;
  }

  .core-hero-carousel__brand img {
    width: 48px;
    height: 48px;
  }

  .core-hero-carousel__supplier,
  .core-hero-carousel__phone {
    font-size: 18px;
  }

  .core-hero-carousel__scene {
    height: 420px;
    padding: 0 8px;
  }

  .core-hero-carousel__drag {
    width: min(84vw, 300px);
  }

  .core-hero-carousel__slide {
    border-width: 4px;
  }

  .core-hero-carousel__card {
    top: 6%;
    left: 4%;
    width: 72%;
    padding: 10px 11px 11px;
    border-radius: 16px;
  }

  .core-hero-carousel__card-title,
  .core-hero-carousel__card h2 {
    margin-bottom: 7px;
    font-size: 15px;
  }

  .core-hero-carousel__card ul {
    gap: 4px;
    font-size: 10px;
  }

  .core-hero-carousel__price {
    min-height: 26px;
    margin-top: 8px;
    padding: 0 9px;
    font-size: 11px;
  }

  .core-hero-carousel__caption {
    top: calc(100% + 22px);
    font-size: 22px;
  }

  .core-hero-carousel__ground {
    width: 540px;
    height: 540px;
  }

  .core-hero-carousel__cta {
    top: auto;
    bottom: 16px;
    right: 12px;
    width: auto;
    min-height: 58px;
    padding: 0 18px;
    border-radius: 999px;
    font-size: 18px;
  }

  .core-hero-carousel__popup {
    padding: 12px;
  }

  .core-hero-carousel__popup-dialog {
    padding: 22px 18px;
  }

  .core-hero-carousel__popup-title,
  .core-hero-carousel__popup-dialog h3 {
    font-size: 24px;
  }
}

@media (max-width: 900px) {
  .core-hero-carousel {
    padding-bottom: 52px;
  }

  .core-hero-carousel__scene {
    height: 500px;
  }

  .core-hero-carousel__drag {
    width: min(66vw, 640px);
  }

  .core-hero-carousel__card {
    width: min(250px, 42%);
    padding: 12px 13px 13px;
  }

  .core-hero-carousel__card-title,
  .core-hero-carousel__card h2 {
    font-size: 15px;
  }

  .core-hero-carousel__card ul {
    font-size: 12px;
  }

  .core-hero-carousel__card-kicker {
    font-size: 10px;
  }
}

@media (max-width: 640px) {
  .core-hero-carousel__scene {
    height: 380px;
    min-height: 0;
  }

  .core-hero-carousel__drag {
    width: min(84vw, 308px);
  }

  .core-hero-carousel__card {
    width: 72%;
  }

  .core-hero-carousel__caption {
    top: calc(100% + 10px);
    width: min(84vw, 250px);
    font-size: 18px;
    line-height: 1.04;
    white-space: normal;
  }
}

@media (max-width: 480px) {
  .core-hero-carousel {
    padding-top: 10px;
    padding-bottom: 18px;
  }

  .core-hero-carousel__scene {
    height: 350px;
    min-height: 0;
  }

  .core-hero-carousel__drag {
    width: min(88vw, 292px);
  }

  .core-hero-carousel__card {
    top: 7%;
    left: 4%;
    width: 60%;
    padding: 8px 8px 9px;
    border-radius: 14px;
  }

  .core-hero-carousel__card-title,
  .core-hero-carousel__card h2 {
    margin-bottom: 5px;
    max-width: 11ch;
    font-size: 11px;
    line-height: 1.08;
  }

  .core-hero-carousel__card-kicker {
    margin-bottom: 4px;
    font-size: 6px;
  }

  .core-hero-carousel__card ul {
    gap: 3px;
    font-size: 7px;
    line-height: 1.24;
  }

  .core-hero-carousel__card li {
    padding-left: 10px;
  }

  .core-hero-carousel__card li::before {
    top: 0.42em;
    width: 4px;
    height: 4px;
  }

  .core-hero-carousel__price {
    min-height: 20px;
    margin-top: 6px;
    padding: 0 6px;
    font-size: 8px;
  }
}

@media (max-width: 480px) and (max-height: 600px) {
  .core-hero-carousel__caption {
    top: calc(100% + 4px);
    width: min(82vw, 220px);
    font-size: 15px;
  }
}
