/* ============================================================
   03 — Main Service: E-com card (.se-)
   Значения — из Figma-фреймов Main Service / 1:
   1600 (109:62868), 1200 (109:62870), 1024 (109:62866),
   768 (109:62877), 430 (109:62876), 375 (109:62874)
   ============================================================ */

.se-section *,
.se-section *::before,
.se-section *::after { box-sizing: border-box; }

/* ---------- База = 1600 ---------- */

.se-section { padding: 0 24px; } /* решение Alexa: поля страницы 24 на 1600 (в макете 30) */

.se-card {
  position: relative;
  height: 756px;
  background: #EAEAEA;
  border-radius: 20px;
  overflow: hidden;
}

/* Текстовый блок: заголовок + чипсы + описание */
.se-text {
  position: absolute;
  left: 20px;
  top: 20px;
  width: 532px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.se-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.se-title {
  margin: 0;
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: 36px;
  line-height: 36px;
  letter-spacing: -0.72px;
  text-transform: uppercase;
  color: #171719;
}

/* Чипсы стоят впритык (капсулы r23 касаются), при нехватке ширины переносятся с зазором строк 8 */
.se-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px 0;
}

.se-chips-mobile { display: none; }

.se-chip {
  border: 1px solid #171719;
  border-radius: 23px;
  padding: 8px 14px;
  font-family: "Inter", sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 20px;
  text-align: center;
  text-transform: uppercase;
  color: #171719;
  white-space: nowrap;
}

.se-desc {
  margin: 0;
  padding-right: 88px;
  font-family: "Inter", sans-serif;
  font-weight: 400;
  font-size: 20px;
  line-height: 28px;
  letter-spacing: -0.168px;
  color: #171719;
}

/* Перки — плашки над ценой */
.se-perks {
  position: absolute;
  left: 0;
  bottom: 76px;
  width: 576px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 16px 6px;
}

.se-perk {
  position: relative;
  flex: 1 0 0;
  min-width: 1px;
  height: 60px;
  background: #171719;
  border-radius: 20px;
  overflow: hidden;
}

.se-perk-label {
  position: absolute;
  left: 16px;
  top: calc(50% - 20px);
  width: 137px;
  font-family: "Inter", sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 20px;
  letter-spacing: -0.16px;
  text-transform: uppercase;
  color: #D9D9D9;
}

.se-perk-label-mobile { display: none; }

.se-perk-icon {
  position: absolute;
  top: 6px;
  right: 6px;
  bottom: 6px;
  width: 72px;
  background: #393939;
  border-radius: 16px;
  overflow: hidden;
}

.se-perk-icon img {
  position: absolute;
  top: 14.29%;
  left: 50%;
  transform: translateX(-50%);
  height: 71.42%; /* = 100% − 2×14.29%, ширина по квадратному соотношению исходника */
}

/* Тёмная панель с таймлайном и айфоном */
.se-frame {
  position: absolute;
  top: 4px;
  right: 4px;
  bottom: 4px;
  left: 576px;
  background: #171719;
  border-radius: 16px;
  overflow: hidden;
}

.se-timeline {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 20px;
  background: rgba(23, 23, 25, 0.72);
  border-radius: 20px;
}

.se-seg {
  position: relative;
  flex: 1 0 0;
  min-width: 1px;
  height: 6px;
  border-radius: 12px;
  background: #818181;
  overflow: hidden;
}

.se-seg-full { background: #FFFFFF; }

.se-seg-active i {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 25px;
  border-radius: 12px;
  background: #EAEAEA;
}

/* Айфон: на 1600/1200 позиция задана процентными инсетами панели + фиксированным сдвигом
   (замерено по рендеру 1200: left 213 = 10.17%*580 + 154, top 130 = 14.9%*580 + 44) */
.se-iphone {
  position: absolute;
  left: calc(10.17% + 154px);
  top: calc(14.9% + 44px);
  width: 481px;
  height: 475px;
}

.se-iphone img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Плашка цены */
.se-price {
  position: absolute;
  left: 4px;
  bottom: 4px;
  width: 568px;
  height: 72px;
  background: #171719;
  border-radius: 16px;
}

.se-price-text {
  margin: 0;
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  gap: 6px;
  font-family: "Iwona Bold", serif;
  font-size: 24px;
  line-height: 32px;
  letter-spacing: -0.48px;
  color: #EAEAEA;
  white-space: nowrap;
}

.se-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 232px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 40px;
  background: #F7F7F7;
  border-radius: 12px;
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: 16px;
  line-height: 20px;
  text-transform: uppercase;
  color: #171719;
  text-decoration: none;
  white-space: nowrap;
}

/* ---------- 1200: та же компоновка, ниже карточка, айфон меньше ---------- */
@media (max-width: 1200px) {
  .se-section { padding: 0 20px; }
  .se-card { height: 588px; }
  .se-text { width: 533px; }
  .se-iphone { width: 429px; height: 424px; }
}

/* ---------- 1024: вертикальный стек (текст → перки → панель → цена) ---------- */
@media (max-width: 1024px) {
  .se-section { padding: 0 16px; }
  .se-card { height: 994px; }

  .se-text {
    left: 16px;
    right: 44px;
    width: auto;
    padding-right: 150px;
    gap: 20px;
  }
  .se-head { gap: 16px; }
  .se-title { font-size: 32px; line-height: 32px; letter-spacing: -0.64px; }
  .se-desc { padding-right: 0; }

  .se-perks {
    top: 208px;
    bottom: auto;
    left: 0;
    right: 0;
    width: auto;
    gap: 4px;
    padding: 4px 12px 6px;
  }

  .se-frame {
    top: 274px;
    left: 4px;
    right: 4px;
    bottom: auto;
    height: 640px;
    border-radius: 20px;
  }
  .se-timeline { border-radius: 13px; }

  /* айфон прижат к низу панели, центр смещён вправо (обрезка справа за панелью — по макету) */
  .se-iphone {
    left: calc(50% - 117px);
    top: auto;
    bottom: 40px;
  }

  .se-price { left: 4px; right: 4px; width: auto; }
  .se-btn { width: 370px; border-radius: 14px; }
}

/* ---------- 768 ---------- */
@media (max-width: 768px) {
  .se-section { padding: 0 12px; }
  .se-card { height: 1018px; }
  .se-text { padding-right: 0; }
  .se-perks { top: 228px; }
  .se-frame { top: 298px; }
  .se-btn { width: 232px; }
}

/* ---------- 430: мобильные перки, цена в две строки ---------- */
@media (max-width: 719px) {
  .se-section { padding: 0 8px; }

  /* Карточка собирается потоком, а не абсолютными top. При жёстком top
     описание на узких ширинах вырастало на строку и перки садились на него:
     замер давал −10 на 540–600 и до −116 на 441. В потоке высота текстовой
     части определяется содержимым, и наезд перестаёт быть возможным.
     Отступы — из кадра 430: текст 16 от кромки при паддинге карточки 4,
     зазор описание → перки 14, перки прилегают к медиа, цена через 2. */
  .se-card {
    height: auto;
    display: flex;
    flex-direction: column;
    padding: 16px 4px 4px;
  }

  .se-text {
    position: static;
    left: auto;
    right: auto;
    top: auto;
    width: auto;
    margin-left: 12px;
    padding-right: 42px;
    gap: 16px;
  }
  .se-head { gap: 12px; }
  .se-chips-desktop { display: none; }
  .se-chips-mobile { display: flex; }
  .se-chip { padding: 6px 8px; font-size: 14px; line-height: 16px; }
  .se-desc { font-size: 14px; line-height: 18px; letter-spacing: -0.1176px; }

  .se-perks {
    position: static;
    left: auto;
    bottom: auto;
    width: auto;
    margin-top: 14px;
    gap: 2px;
    padding: 0 8px;
    justify-content: center;
  }
  .se-perk { height: 38px; border-radius: 12px; }
  .se-perk-label-desktop { display: none; }
  .se-perk-label-mobile {
    display: block;
    left: 10px;
    top: calc(50% - 12px);
    width: 80px;
    font-size: 10px;
    line-height: 12px;
    letter-spacing: -0.1px;
  }
  .se-perk-icon { top: 3px; right: 3px; bottom: 3px; width: 48px; border-radius: 10px; }

  .se-frame {
    /* relative, а не static: рамка остаётся в потоке, но не теряет роль точки
       отсчёта для своих абсолютных детей — хрома галереи (полоса, стрелки,
       счётчик) и айфона. При static они цеплялись к карточке и уезжали. */
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    height: 600px;
    margin-top: 14px;
  }

  .se-price {
    /* relative по той же причине: внутри абсолютная кнопка .se-btn. */
    position: relative;
    /* right тоже сбрасывается: при left:auto и заданном right браузер уводит
       левый край на -right, и блок цены терял отступ слева, набирая лишний
       справа. Кромки должны совпадать с рамкой — по 4 от края карточки. */
    left: auto;
    right: auto;
    bottom: auto;
    width: auto;
    height: 124px;
    margin-top: 2px;
    flex: none;
  }
  .se-price-text {
    left: 16px;
    top: 12px;
    transform: none;
    font-size: 20px;
    letter-spacing: -0.4px;
  }
  .se-btn {
    top: auto;
    left: 8px;
    right: 8px;
    bottom: 8px;
    width: auto;
    height: 60px;
    border-radius: 10px;
    transform: none;
  }
}

/* Ширина текстовой колонки 348 — число кадра 430. На 540–719 (кадр 640
   Framer) описание идёт во всю ширину карточки, поэтому предел только тут. */
@media (max-width: 539px) {
  .se-text { max-width: 348px; }
}

/* ---------- 375 ---------- */
@media (max-width: 375px) {
  .se-section { padding: 0 6px; }

  .se-text { width: 295px; padding-right: 0; gap: 20px; }
  .se-head { gap: 8px; }
  .se-title { font-size: 24px; line-height: 28px; letter-spacing: -0.48px; }
  .se-desc { font-size: 12px; line-height: 16px; letter-spacing: -0.1008px; padding-right: 29px; }



  .se-price { height: 112px; }
  .se-btn { height: 48px; }
}
