* {
  box-sizing: border-box;
}

.product-page {
  margin: 0;
  color: #fff;
  font-family: var(--ff-inter, Inter, Arial, sans-serif);
  background: linear-gradient(
    155.4deg,
    #000000 19.93%,
    #0b001d 52.7%,
    #170040 100.87%,
    #1d0050 126.67%,
    #5526a7 185.56%,
    #6022ff 265.4%
  );
}

.product {
  width: 100%;
}

.product-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 120px;
  position: relative;
}

.product-section {
  position: relative;
  overflow: hidden;
}

.product-section.product-section--2,
.product-section.product-section--3,
.product-section.product-section--4 {
  background: radial-gradient(
    34.16% 44.16% at 54.62% 55.84%,
    #44247f 0%,
    rgba(1, 1, 1, 0) 100%
  );
  background-size: 100%;
}

/* header */
.product-header {
  z-index: 10;
  padding: 59px 0;
}

.product-back {
  font-family: var(--ff-manrope);
  gap: 4px;
  display: flex;
  align-items: center;
  color: #fdfdfd99;
  text-decoration: none;
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

/* =========================
   GRID -> FLEX (MAIN CHANGE)
   ========================= */
.product-grid {
  position: relative;
  min-height: 758px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
}

/* columns sizing */
.product-text {
  flex: 0 1 560px;
}

.product-media {
  flex: 0 1 560px;
  position: relative;

  /* IMPORTANT: now media is a “box” that centers phone inside */
  display: flex;
  align-items: center;
  justify-content: center;

  /* give stable height for glow/halo */
  min-height: 640px;

  overflow: visible;
  isolation: isolate;
  z-index: 1;
}

.product-accent {
  background-image: linear-gradient(94.76deg, #c092ff -1.24%, #844ef4 82.17%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  text-decoration: none;
  font-weight: 600;
}

.product-white {
  color: #ffffff;
  font-weight: 500;
}

.product-title {
  font-family: var(--ff-manrope, Manrope, Arial, sans-serif);
  font-size: 59px;
  line-height: 52px;
  margin: 0;
}

.product-subtitle {
  font-family: var(--ff-manrope, Manrope, Arial, sans-serif);
  font-weight: 600;
  font-size: 56px;
  line-height: 56px;
  letter-spacing: -0.02em;
  margin: 0;
}

.product-title::before,
.product-subtitle::before {
  position: absolute;
  content: "";
  background: url(/images/scatteringOfStars.png);
  background-size: contain;
  background-repeat: no-repeat;
  width: 620px;
  height: 427px;
  z-index: 2;
  pointer-events: none;
  opacity: 0.9;
}

.product-title::before {
  bottom: 120px;
  left: -320px;
}

.product-subtitle::before {
  top: -150px;
  right: -80px;
}

.product-stores {
  margin-top: 60px;
  display: flex;
  gap: 18px;
  align-items: center;
}

.product-stores .store_download {
  align-items: center;
}

.product-stores .store-btn {
  background: var(--accent-gradient);
}

.product-stores .store-btn::before {
  background: #6c38ec;
}

/* ====== GLOW ====== */
.product-glow {
  position: absolute;
  z-index: 0;
  pointer-events: none;
}

.product-section--1 .product-glow {
  width: 1500px;
  height: 1000px;
  top: -140px;
  right: -500px;
  background: radial-gradient(
    43.71% 70.03% at 49.58% 17.87%,
    #943cff 0%,
    rgba(90, 36, 255, 0) 100%
  );
  background-blend-mode: screen;
  opacity: 0.9;
}

/* ====== PHONE WRAPPER (CHANGED: no absolute/top hacks) ====== */
.product-phone-wrap {
  position: relative; /* was absolute */
  overflow: visible;
  z-index: 2;
  isolation: isolate;
}

/* сам телефон */
.product-phone {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  z-index: 2; /* выше halo */
}

/* sizes + small offsets to match layout (instead of top:) */
.product-phone-wrap--1 {
  width: 420px;
  transform: translateY(-10px);
}

.product-phone-wrap--2 {
  width: 430px;
  transform: translateY(10px);
}

.product-phone-wrap--3 {
  width: 450px;
  transform: translateY(15px);
}

.product-phone-wrap--4 {
  width: 470px;
  transform: translateY(10px);
}

/* text blocks (removed justify-self; it’s grid-only) */
.product-text--1 {
  max-width: 560px;
}

.product-text--2 {
  max-width: 520px;
}

.product-text--3 {
  max-width: 520px;
}

.product-text--4 {
  max-width: 520px;
}

/* ====== glow inside blocks 2/3/4 ====== */
.product-media--2 .product-glow {
  left: -320px;
  top: 40px;
  width: 920px;
  height: 920px;
}

.product-media--3 .product-glow {
  right: -260px;
  top: 120px;
  width: 920px;
  height: 920px;
}

.product-media--4 .product-glow {
  left: -320px;
  top: 120px;
  width: 920px;
  height: 920px;
}

.product-text--3 .product-subtitle::before {
  top: 0;
  left: -260px;
}

/* ====== HALO (4 circles) — unchanged ====== */
.halo {
  position: absolute;
  left: 50%;
  top: 58%;
  transform: translate(-50%, -50%);
  width: 720px;
  height: 720px;

  z-index: 0;
  pointer-events: none;
}

.halo-dot {
  position: absolute;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  opacity: 0.6;
  filter: blur(40px);
  z-index: 1;
}

.halo-dot.dot1 {
  background: #3838ff;
  left: 210px;
  top: 150px;
}
.halo-dot.dot2 {
  background: #3a89fb;
  left: 330px;
  top: 210px;
}
.halo-dot.dot3 {
  background: #630eff;
  left: 180px;
  top: 300px;
}
.halo-dot.dot4 {
  background: #aa4cff;
  left: 320px;
  top: 330px;
}

/* under-phone variant */
.halo--under {
  top: 30%;
}

/* ====== FOOTER ====== */
.product-footer {
  text-align: center;
  padding: 110px 0 0 0;
}

.product-footer__icon-wrap {
  position: relative;
  width: 360px;
  height: 395px;
  margin: 0 auto;
  overflow: visible;
  z-index: 2;
}

.halo--footer {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -45%);
  z-index: 1;
}

.product-footer__icon {
  position: relative;
  z-index: 3;
  width: 100%;
  height: auto;
  display: block;
}

.product-footer__overlay {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 130%;
  height: 100px;
  border-radius: 0 0 260px 260px;
  background: radial-gradient(
    120% 120% at 50% 0%,
    rgba(33, 15, 118, 0.95) 0%,
    rgba(33, 15, 118, 0.85) 32%,
    rgba(33, 15, 118, 0.6) 55%,
    rgba(33, 15, 118, 0) 80%
  );

  background-color: rgba(255, 255, 255, 0.001);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);

  transform: translateX(-50%) translateZ(0);
  -webkit-transform: translateX(-50%) translateZ(0);
  will-change: backdrop-filter;

  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 -20px 60px rgba(70, 90, 255, 0.35);
  z-index: 4;
  pointer-events: none;
}

.product-footer__panel {
  position: relative;
  z-index: 5;
  margin-top: -100px;
  padding: 0 24px;

  background-color: rgba(255, 255, 255, 0.001);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);

  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  will-change: backdrop-filter;

  padding-bottom: 200px;
}

.product-footer__panel::before {
  position: absolute;
  content: "";
  background: url(/images/scatteringOfStars.png);
  background-size: contain;
  background-repeat: no-repeat;
  width: 620px;
  height: 427px;
  bottom: 0;
  right: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.9;
}

.product-footer__panel::after {
  position: absolute;
  content: "";
  background: url(/images/scatteringOfStars.png);
  background-size: contain;
  background-repeat: no-repeat;
  width: 620px;
  height: 427px;
  bottom: 0;
  left: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.9;
}

.product-footer__title {
  font-family: var(--ff-manrope, Manrope, Arial, sans-serif);
  font-size: 70px;
  line-height: 72px;
  letter-spacing: -0.015em;
  margin: 0;
  padding-top: 70px;
  margin-bottom: 46px;
}

.product-footer__accent {
  font-weight: 700;
  background: var(--accent-gradient);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.product-footer__title2 {
  font-weight: 400;
  color: rgba(255, 255, 255, 0.92);
}

.product-footer__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 22px;
  border-radius: 20px;
  text-decoration: none;
  color: #fff;
  box-shadow: 0px 4.12px 6.86px 0px #4712c440;

  background: radial-gradient(
    84.98% 344.42% at 42.21% -69.48%,
    #b6a9ff 0%,
    #aa8cf9 46.47%,
    #8d5cf3 100%
  );
  border: 1px solid #6c38ec;

  font-family: var(--ff-inter, Inter, Arial, sans-serif);
  font-weight: 500;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: -0.01em;
}

.product-footer__note {
  margin: 50px auto 0;
  max-width: 420px;
  color: rgba(181, 181, 181, 0.95);
  font-family: var(--ff-inter);
  font-weight: 400;
  font-size: 15.5px;
  line-height: 100%;
  letter-spacing: 0;
}

/* =========================
   ADAPTIVE
   ========================= */
@media (max-width: 1100px) {
  .product-container {
    padding: 0 30px;
  }

  .product-grid {
    flex-direction: column;
    align-items: center;
    justify-content: center;

    min-height: auto;
    padding-top: 120px;
    padding-bottom: 40px;
    gap: 28px;
  }

  /* mobile order: always text first, then phone */
  .product-text {
    order: 1;
    flex: none;
    max-width: 720px;
    text-align: center;
  }

  .product-stores {
    justify-content: center;
  }

  .product-media {
    order: 2;
    flex: none;
    width: 100%;
    min-height: 520px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* phone sizes on mobile */
  .product-phone-wrap--1,
  .product-phone-wrap--2,
  .product-phone-wrap--3,
  .product-phone-wrap--4 {
    width: 320px;
    transform: translateY(0);
  }

  /* glow center on mobile */
  .product-media--2 .product-glow,
  .product-media--3 .product-glow,
  .product-media--4 .product-glow {
    left: 50%;
    top: 10px;
    transform: translateX(-50%);
    width: 820px;
    height: 820px;
  }

  /* keep your spacing for those texts */
  .product-text--2,
  .product-text--4 {
    padding-top: 40px;
  }

  .halo {
    width: 620px;
    height: 620px;
  }
}

@media (max-width: 480px) {
  .product-container {
    padding: 0 16px;
  }

  .product-back {
    font-size: 16px;
  }

  .product-back img {
    width: 24px;
    height: 24px;
  }

  .product-section--1 .product-glow {
    width: 500px;
    height: 469px;
    top: -100px;
    right: -180px;
  }

  .product-grid {
    padding-top: 90px;
  }

  .product-title {
    font-size: 36px;
    line-height: 32px;
  }

  .product-subtitle {
    font-size: 31px;
    line-height: 32px;
  }

  .product-stores {
    display: none;
  }

  .product-phone-wrap--1,
  .product-phone-wrap--2,
  .product-phone-wrap--3,
  .product-phone-wrap--4 {
    width: 260px;
  }

  .product-footer__icon-wrap {
    width: 254px;
    height: 291px;
  }

  .halo--footer {
    display: none;
  }

  .halo--under {
    width: 351px;
    height: 400px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
  }

  .halo--under .halo-dot {
    width: 175.5px;
    height: 200px;
    border-radius: 999px;
    opacity: 0.6;
    filter: blur(28px);
  }

  /* TOP: 630EFF */
  .halo--under .halo-dot.dot3 {
    background: #630eff;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
  }

  /* BOTTOM: 3838FF */
  .halo--under .halo-dot.dot1 {
    background: #3838ff;
    left: 50%;
    bottom: 0;
    top: auto;
    transform: translateX(-50%);
  }

  /* LEFT: AA4CFF */
  .halo--under .halo-dot.dot4 {
    background: #aa4cff;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
  }

  /* RIGHT: 3A89FB */
  .halo--under .halo-dot.dot2 {
    background: #3a89fb;
    right: 0;
    left: auto;
    top: 50%;
    transform: translateY(-50%);
  }

  .product-footer__overlay {
    display: none;
  }

  .product-footer__panel {
    margin-top: -80px;
  }

  .product-footer__title {
    font-size: 36px;
    line-height: 42px;
    padding-top: 46px;
    margin-bottom: 22px;
  }

  .product-footer__note {
    max-width: 280px;
  }
}
