/* ================================
   CSS-ПЕРЕМЕННЫЕ ДЛЯ ОТСТУПОВ
   ================================ */
:root {
  /* ШАПКА */
  --header-padding: 0.75rem;

  /* ОСНОВНОЙ КОНТЕЙНЕР */
  --container-min-height: 100vh;
  --container-padding-bottom: 5rem; /* Отступ под кнопками внизу */

  /* БЛОК СОДЕРЖИМОГО */
  --content-max-width: 433px;
  --content-padding: 0.75rem;

  /* HERO */
  --hero-border-radius: 1rem;
  --hero-box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);

  /* КАРТОЧКА (card) */
  --card-background: #fff;
  --card-border-radius: 0.75rem;
  --card-padding: 0.75rem;
  --card-margin-top: 0.5rem;
  --card-box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);

  /* ОСНОВНОЙ РАЗДЕЛ (section) */
  --section-padding-y: 0.55rem;
  --section-margin-y: 0.15rem;
  --section-gap: 0.3rem;

  /* СПИСОК (li) */
  --list-item-gap: 0.5rem;
  --list-item-margin: 0.25rem 0;

  /* КНОПКИ ВНИЗУ */
  --buttons-gap: 0.5rem;
  --buttons-padding: 0.75rem;
  --buttons-border-radius: 0.75rem 0.75rem 0 0;
  --btn-padding: 0.75rem 1rem;
}

/* Сбросы и запрет горизонтального скролла */
html, body {
  margin: 0; 
  padding: 0;
  overflow-x: hidden;
  height: 100%;
}
*, ::before, ::after { box-sizing: border-box; }
html { line-height: 1.15; -webkit-text-size-adjust: 100%; }

body {
  font-family: system-ui, -apple-system, sans-serif;
  background: linear-gradient(to bottom, #4e54c8, #8f94fb);
  margin: 0;
  padding: 0;
  overflow: hidden;
}

/* ================================
   ТЁМНАЯ ТЕМА
   ================================ */
body.dark-theme {
  background: linear-gradient(to bottom, #000, #333);
  color: #fff;
}
body.dark-theme .card {
  background: #2a2a2a;
  color: #f5f5f5;
}
body.dark-theme .header {
  background: rgba(255,255,255,0.15);
}
body.dark-theme .buttons {
  background: #333;
}

/* ================================
   СТИЛИЗАЦИЯ ССЫЛОК
   ================================ */
a {
  color: #007aff;
  text-decoration: none;
}
a:visited {
  text-decoration: none;
}
body.dark-theme a {
  color: #ffffff;
}
body.dark-theme a:visited {
  text-decoration: none;
}

/* ================================
   КОНТЕЙНЕР
   ================================ */
.container {
  min-height: var(--container-min-height);
  padding-bottom: var(--container-padding-bottom);
}

/* ================================
   ШАПКА
   ================================ */
.header {
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(8px);
  padding: var(--header-padding);
  position: sticky;
  top: 0;
  z-index: 40;
}
.header h1 {
  color: #fff;
  font-size: 1.5rem;
  font-weight: bold;
  text-align: center;
  margin: 0;
}

/* ================================
   ОСНОВНОЙ КОНТЕНТ
   ================================ */
.content {
  width: 100%;
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: var(--content-padding);
}

/* ================================
   HERO-БЛОК
   ================================ */
.hero-container {
  position: relative;
  width: 100%;
  border-radius: var(--hero-border-radius);
  overflow: hidden;
  background: #f3f4f6;
  box-shadow: var(--hero-box-shadow);
}
.hero-image,
.hero-video {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  cursor: pointer;
}
.hero-video {
  display: none;
}

/* Иконка "Play" по центру изображения */
.play-button {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  background: rgba(0,0,0,0.5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.play-button svg {
  width: 30px;
  height: 30px;
  fill: #fff;
}

/* ================================
   КАРТОЧКА (card)
   ================================ */
.card {
  background: var(--card-background);
  border-radius: var(--card-border-radius);
  padding: var(--card-padding);
  margin-top: var(--card-margin-top);
  box-shadow: var(--card-box-shadow);
  font-family: ui-monospace, monospace;
  background: #fff;
  color: #000;
}

/* Бейджи и скидки */
.badge {
  background: #198754;
  color: #fff;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  display: inline-block;
  font-weight: bold;
}
.discount {
  color: #d32f2f;
  font-weight: bold;
  margin-left: 0.4rem;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}
.delivery {
  font-size: 0.85rem;
  margin-left: 0.4rem;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
  background: #ffcc00;
  color: #000;
  font-weight: bold;
}

/* ================================
   Блок преимуществ + QR
   ================================ */
.section {
  border-top: 1px dashed #e5e7eb;
  border-bottom: 1px dashed #e5e7eb;
  padding: var(--section-padding-y) 0;
  margin: var(--section-margin-y) 0;
  display: flex;
  align-items: flex-start;
  gap: var(--section-gap);
}
.section-title {
  text-align: center;
  margin: 0 0 0.2rem;
  font-weight: bold;
}
.list {
  padding: 0;
  margin: 0;
  list-style: none;
}
.list li {
  display: flex;
  align-items: center;
  gap: var(--list-item-gap);
  margin: var(--list-item-margin);
}
.check-icon {
  color: #22c55e;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}

.section-left {
  flex: 1;
}
.section-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.3rem;
  margin-top: 0.3rem;
}

/* QR-анимация */
.scan-box {
  margin: 0 auto;
  max-width: 150px;
  text-align: center;
}
.qr-wrapper {
  position: relative;
  width: 150px;
  height: 150px;
  margin: 0 auto;
  box-shadow: 0 0 10px rgba(255,255,255,0.2);
}
.qr-color,
.qr-gray {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
}
.qr-gray {
  filter: grayscale(100%);
}
.scanner {
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: #007aff;
  box-shadow: 0 0 8px 2px #007aff;
}
.option3 .qr-gray {
  animation: reveal3 4s infinite linear alternate;
}
.option3 .scanner {
  animation: line3 4s infinite linear alternate;
}
@keyframes reveal3 {
  0% { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }
  100% { clip-path: polygon(0 100%, 100% 100%, 100% 100%, 0 100%); }
}
@keyframes line3 {
  0% { top: 0%; }
  100% { top: 100%; }
}

@keyframes smoothBlink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.3; }
}
.qr-title {
  margin: 0;
  font-size: 1rem;
  text-align: center;
  font-weight: bold;
  color: #000;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.4);
}
body.dark-theme .qr-title {
  color: #ffffff;
}

/* ================================
   КНОПКИ ВНИЗУ
   ================================ */
.buttons {
  position: fixed;
  bottom: 0; 
  left: 0; 
  right: 0;
  max-width: 409px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--buttons-gap);
  background: #fff;
  padding: var(--buttons-padding);
  border-radius: var(--buttons-border-radius);
  box-shadow: 0 -4px 6px rgba(0,0,0,0.1);
  z-index: 50;
}
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: var(--btn-padding);
  border-radius: 0.5rem;
  font-weight: bold;
  color: #fff;
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: opacity 0.2s;
}
.btn:hover {
  opacity: 0.9;
}
.btn-whatsapp {
  background: #25D366;
  color: #000;
  font-weight: bold;
  font-size: 1.1rem;
}
.btn-call {
  background: #0056b3;
}
.phone-number {
  font-size: 0.875rem;
}

/* Анимация "блика" */
.shine {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.3);
  transform: translateX(-100%) rotate(45deg);
  will-change: transform;
}
@media (prefers-reduced-motion: no-preference) {
  .qr-shine {
    animation: shine 6s infinite 0s;
  }
  .btn-whatsapp .shine {
    animation: shine 6s infinite 3s;
  }
  .btn-call .shine {
    animation: shine 6s infinite 6s;
  }
  @keyframes shine {
    from { transform: translateX(-100%) rotate(45deg); }
    to   { transform: translateX(200%) rotate(45deg); }
  }
}
@media (prefers-reduced-motion: reduce) {
  .shine { display: none; }
}
