/* Ladder — основні стилі лендінгу.
 *
 * Натхнення: структура класів з babushkalet/css/main.css,
 * але без жорстко зашитого дизайну (мінімалістичний, легко
 * змінюваний каркас).
 */

/* Базове скидання та типографіка */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  line-height: 1.5;
}

p {
  margin: 0 0 0.5rem;
  font-size: 15px;
}

/* Контейнер та основний контент,
 * за аналогією до babushkalet .wrapper/main
 */
.wrapper {
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
  padding: 16px;
}

main {
  width: 100%;
}

section {
  width: 100%;
  margin-top: 0px;
}

/* Вертикальний ритм: лише margin-bottom 20px між блоками (фото / текст) */
.landing-block {
  margin-bottom: 20px;
}

.landing-block--flush-next {
  margin-bottom: 0;
}

/* Заголовки секцій (мінімальний каркас) */
section h2 {
  font-size: 22px;
  font-weight: 900;
  text-transform: uppercase;
  margin: 0 0 10px;
}

.section-title--red {
  border-left: 4px solid #ff0000;
  padding-left: 8px;
  color: #ff0000;
}

.section-title--black {
  color: #000;
}

/* Зображення шапки та основні секційні зображення */
.header-image,
.section-image {
  width: 100%;
  max-width: 480px;
  height: auto;
  display: block;
  margin: 0 auto;
}

.specs-image-wrapper {
  position: relative;
  display: inline-block;
  width: 100%;
  max-width: 480px;
}

.specs-image-wrapper .section-image {
  display: block;
  width: 100%;
}

.specs-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 22%;
  max-width: 120px;
  z-index: 2;
  pointer-events: none;
  transform-origin: top left;
  animation: specs-swing 4.5s ease-in-out infinite;
}

.specs-overlay-4x3 {
  animation-delay: 0s;
}

.specs-overlay-4x4 {
  animation-duration: 5.3s;
  animation-delay: 1.2s;
}

/* Характеристики: pos1–pos4 поверх characteristics.jpg, fade */
.characteristics-image-wrapper {
  position: relative;
  display: block;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
}

.characteristics-image-wrapper .section-image {
  display: block;
  width: 100%;
  height: auto;
}

.characteristics-overlay-stack {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, calc(-50% + 20px));
  z-index: 2;
  pointer-events: none;
  width: min(105px, 22%);
  max-width: min(105px, 22%);
  display: grid;
  place-items: center;
}

.characteristics-overlay-stack .characteristics-overlay {
  grid-area: 1 / 1;
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
}

.characteristics-overlay--a {
  animation: characteristics-crossfade-a 16s ease-in-out infinite;
  transform: scale(1.18);
  transform-origin: center center;
}

.characteristics-overlay--b {
  animation: characteristics-crossfade-b 16s ease-in-out infinite;
  transform: translateY(3px);
}

.characteristics-overlay--c {
  animation: characteristics-crossfade-c 16s ease-in-out infinite;
  transform: translateY(3px) scale(1.28);
  transform-origin: center center;
}

.characteristics-overlay--d {
  animation: characteristics-crossfade-d 16s ease-in-out infinite;
  transform: translateY(3px) rotate(30deg) scale(1.28);
  transform-origin: center center;
}

@keyframes characteristics-crossfade-a {
  0%,
  18% {
    opacity: 1;
  }
  23% {
    opacity: 0;
  }
  23%,
  92% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes characteristics-crossfade-b {
  0%,
  18% {
    opacity: 0;
  }
  23%,
  43% {
    opacity: 1;
  }
  48%,
  100% {
    opacity: 0;
  }
}

@keyframes characteristics-crossfade-c {
  0%,
  43% {
    opacity: 0;
  }
  48%,
  68% {
    opacity: 1;
  }
  73%,
  100% {
    opacity: 0;
  }
}

@keyframes characteristics-crossfade-d {
  0%,
  68% {
    opacity: 0;
  }
  73%,
  93% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .characteristics-overlay--a,
  .characteristics-overlay--b,
  .characteristics-overlay--c,
  .characteristics-overlay--d {
    animation: none;
  }

  .characteristics-overlay--a {
    opacity: 1;
  }

  .characteristics-overlay--b,
  .characteristics-overlay--c,
  .characteristics-overlay--d {
    opacity: 0;
  }
}

/* Два блоки характеристик у межах однієї секції — відступ лише знизу першого */
#specs .section-title {
  margin: 0 0 20px;
}

#specs .specs-image-wrapper:not(:last-child) {
  margin-bottom: 20px;
}

@keyframes specs-swing {
  0% {
    transform: rotate(0deg) translateY(0);
  }
  25% {
    transform: rotate(-2deg) translateY(1px);
  }
  50% {
    transform: rotate(1.5deg) translateY(-1px);
  }
  75% {
    transform: rotate(-1deg) translateY(0.5px);
  }
  100% {
    transform: rotate(0deg) translateY(0);
  }
}

.text-frame {
  width: 100%;
  max-width: calc(100% - 1cm);
  box-sizing: border-box;
  margin: 0 auto;
}

.text-frame p {
  margin-bottom: 0;
  font-size: 15px;
}

/* Вступний рядок + маркований список (як на макеті) */
.text-frame--intro-list .text-frame-intro {
  margin-bottom: 0.6em;
  text-align: left;
}

.text-frame--intro-list .text-frame-bullet-list {
  margin: 0;
  padding-left: 1.35em;
  font-size: 15px;
  list-style-type: disc;
  list-style-position: outside;
  text-align: left;
}

.text-frame--intro-list .text-frame-bullet-list li {
  margin-bottom: 0.35em;
  padding-left: 0.15em;
}

.text-frame--intro-list .text-frame-bullet-list li:last-child {
  margin-bottom: 0;
}

.mt-20 {
  margin-top: 0px;
}

.mt-24 {
  margin-top: 0px;
}

.mt-48 {
  margin-top: 0px;
}

/* Центруючі обгортки для кнопок/елементів */
.center-btn {
  text-align: center;
  margin-top: 16px;
}

/* Базовий стиль для кнопок замовлення (каркас, без складних ефектів) */
.btn-order {
  display: inline-block;
  padding: 12px 20px;
  text-align: center;
  text-decoration: none;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid currentColor;
  cursor: pointer;
  width: 100%;
  box-sizing: border-box;
}

.btn-order.btn_first {
  /* Місце для майбутніх ефектів (анімація, градієнти тощо) */
}

/* Форми (як у babushkalet, але спрощено) */
form {
  width: 100%;
  box-sizing: border-box;
  margin-top: 12px;
}

.form-group {
  margin-bottom: 10px;
}

.form-label {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
}

.form-input,
.form-select {
  width: 100%;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 14px;
  box-sizing: border-box;
}

input,
textarea,
select {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

button {
  border: none;
  background: none;
}

/* Відео/медіа-каркас — на випадок майбутніх секцій */
.video-wrap {
  margin: 20px 0;
  position: relative;
  width: 100%;
}

video {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

.video-play-btn {
  /* Каркас для кнопки програвання поверх відео */
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Rectangle 9 — блок наявності та цін */
.availability-box {
  margin: 24px auto 0;
  padding: 12px 16px;
  background: rgba(250, 0, 0, 0.19);
  border-radius: 24px;
  display: inline-block;
}

.availability-title {
  margin: 0 0 10px;
  font-size: 28px;
  font-weight: 900;
  line-height: 1.3;
  text-transform: uppercase;
  text-align: center;
  background: linear-gradient(90deg, #ff0000 0%, #990000 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-fill-color: transparent;
  text-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
}

.availability-list {
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: center;
}

.availability-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 15px;
}

.availability-list li + li {
  margin-top: 6px;
}

.availability-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: currentColor;
  margin-top: 6px;
  flex-shrink: 0;
}

.availability-text strong {
  font-weight: 700;
}

/* Секція форми замовлення (як на макеті) */
.order-section {
  margin-top: 0;
}

.order-frame {
  border: 4px solid #ff0000;
  border-radius: 12px;
  padding: 24px 16px 32px;
  background: #ffffff;
}

.order-stock {
  font-size: 16px;
  font-weight: 900;
  text-align: center;
  color: #ff0000;
  margin: 0;
  white-space: nowrap;
}

.order-stock-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  margin: 0 4px;
  padding: 0 8px;
  font-size: 18px;
  font-weight: 900;
  color: #ffffff;
  background: linear-gradient(180deg, #000000 0%, #666666 100%);
  border-radius: 10px;
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
}

.order-divider {
  margin: 16px auto 24px;
  width: 80%;
  height: 1px;
  background: #000000;
}

.order-subtitle {
  font-size: 16px;
  font-weight: 200;
  line-height: 1.4;
  text-align: center;
  margin: 0 0 24px;
}

#order-bottom .order-subtitle {
  font-weight: 300;
}

.order-form .form-group {
  margin-bottom: 16px;
}

@keyframes btn-pulse {
  0% {
    transform: scale(0.95);
  }
  70% {
    transform: scale(1);
  }
  100% {
    transform: scale(0.95);
  }
}

.order-btn {
  display: block;
  width: 90%;
  max-width: 90%;
  margin-left: auto;
  margin-right: auto;
  margin-top: 32px;
  padding: 14px 20px;
  border-radius: 20px;
  background: linear-gradient(
    90deg,
    rgba(255, 0, 0, 1) 0%,
    rgba(180, 0, 0, 1) 100%
  );
  color: rgba(255, 255, 255, 1);
  font-weight: 800;
  font-size: 18px;
  text-align: center;
  box-shadow:
    0 0 30px 8px rgba(255, 0, 0, 0.45),
    0 4px 10px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  animation: btn-pulse 1.5s ease-in-out infinite;
}

a.order-btn {
  text-decoration: none;
}

/* Більший відступ кнопки від зображень зверху й знизу */
#universal-cta {
  padding-top: 32px;
  padding-bottom: 32px;
}

#universal-cta .order-btn {
  margin-top: 0;
  margin-bottom: 0;
}

.cf-turnstile {
  margin: 0 auto;
}

.purchase-popup {
  position: fixed;
  bottom: 32px;
  left: 20px;
  z-index: 1000;
  max-width: 260px;
  padding: 10px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.16);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.2);
  font-size: 0.8rem;
  color: #111827;
  font-weight: 500;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  opacity: 0;
  transform: translateX(120%) translateZ(0);
  transition: opacity 0.5s ease, transform 0.5s ease;
  pointer-events: none;
}

.purchase-popup.show {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.purchase-popup img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border: 1px solid rgba(209, 213, 219, 0.9);
  flex-shrink: 0;
}

.purchase-popup-text {
  flex: 1;
  line-height: 1.3;
}

.purchase-main {
  font-size: 0.8rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 2px;
  white-space: pre-line;
}

.purchase-time {
  font-size: 0.7rem;
  color: #6b7280;
}

.order-btn:hover {
  animation: none;
}

@media (min-width: 480px) {
  .order-frame {
    padding: 28px 24px 36px;
  }

  .order-stock {
    font-size: 18px;
  }

  .order-subtitle {
    font-size: 18px;
  }

  .order-btn {
    font-size: 20px;
  }
}

/* Футер */
footer {
  padding: 16px 8px 8px;
  font-size: 12px;
  text-align: center;
}

footer a {
  font-size: 12px;
  text-decoration: underline;
  margin: 0 4px;
}

.footer-links {
  margin-top: 4px;
}

.cookie {
  margin-top: 4px;
  font-size: 11px;
}

/* Карусель відгуків */
.reviews-section {
  width: 100%;
}

.reviews-section > .section-title.section-title--red {
  margin-bottom: 20px;
  border-left: none;
  padding-left: 0;
  text-align: center;
  color: #000000;
  font-family: "Montserrat", system-ui, sans-serif;
  font-weight: 800;
}

.reviews-section .reviews-title-accent {
  color: #fe3f00;
}

.reviews-section .reviews-title-rest {
  color: #000000;
}

#how-to-order .section-title {
  margin-bottom: 20px;
}

.reviews-carousel {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
}

.reviews-carousel img {
  width: 100%;
  display: block;
}

.carousel-controls {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transform: translateY(-50%);
  pointer-events: none;
  padding: 0 4px;
}

.carousel-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(220, 0, 0, 0.92);
  color: rgba(255, 255, 255, 1);
  font-weight: 700;
  cursor: pointer;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px rgba(255, 0, 0, 0.35);
  pointer-events: auto;
}

.carousel-btn:active {
  background: rgba(150, 0, 0, 0.95);
}

/* Адаптація під мобільні екрани, як у babushkalet */
@media (max-width: 600px) {
  .wrapper {
    padding: 10px;
  }

  input,
  textarea,
  select {
    font-size: 16px;
  }
}

/* Клас для гнучкого використання Inter з різною вагою */
.inter-base {
  font-family: "Inter", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
}
