/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
  --clr-text: #1a1a1a;
  --clr-bg: #fff;
  --clr-accent: #e90d67;
  --clr-accent-hover: #c70857;
  --clr-muted: #666;
  --clr-border: #e5e5e5;
  --radius: 12px;
  --space: 16px;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --transition: 0.15s ease;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Manrope', system-ui, -apple-system, sans-serif;
  font-size: 16px; line-height: 1.5; color: var(--clr-text); background: var(--clr-bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; transition: color var(--transition); }
button { font: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; }

/* =========================================
   2. FONTS & TYPOGRAPHY
   ========================================= */
@font-face {
  font-family: 'OktyabrinaScript';
  src: url('/fonts/OktyabrinaScript.woff2') format('woff2'),
       url('/fonts/OktyabrinaScript.woff') format('woff');
  font-weight: 400; font-style: normal; font-display: swap;
}

/* =========================================
   3. LAYOUT & UTILITIES
   ========================================= */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--space); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* =========================================
   4. HEADER & LOGO
   ========================================= */
.header {
  position: sticky; top: 0; z-index: 100;
  background: var(--clr-bg); box-shadow: 0 1px 0 rgba(0,0,0,.06);
}
.header__inner { display: flex; align-items: center; justify-content: space-between; min-height: 64px; padding: 8px 0; }

.logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none;
  color: var(--clr-accent);
  font-family: 'OktyabrinaScript', 'Brush Script MT', 'Pacifico', cursive, sans-serif;
  line-height: 1; transition: opacity var(--transition);
  padding-left: 8px;
}
.logo:hover { opacity: 0.85; }
.logo__text { font-size: 1.6rem; font-weight: 400; letter-spacing: -0.02em; white-space: nowrap; }
.logo img { width: 40px; height: 40px; flex-shrink: 0; }

/* =========================================
   5. HERO SECTION
   ========================================= */
.hero { padding: 40px 0 32px; background: linear-gradient(135deg, #fff5f5 0%, #fff 100%); }
.hero__grid { display: grid; gap: 24px; grid-template-columns: 1fr; }
.hero__content h1 { font-size: 1.75rem; font-weight: 700; line-height: 1.2; margin-bottom: 12px; }
.hero__content p { font-size: 1.125rem; color: var(--clr-muted); margin-bottom: 24px; }
.hero__image { aspect-ratio: 4/3; border-radius: 16px; overflow: hidden; background: #f5f5f5; contain: layout; }

/* =========================================
   6. FEATURES
   ========================================= */
.features { padding: 32px 0; }
.features__grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
.feature { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border-radius: var(--radius); background: #fafafa; }
.feature__icon {
  width: 40px; height: 40px; min-width: 40px; background: var(--clr-accent);
  border-radius: 10px; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.25rem;
}

/* =========================================
   7. BUTTONS
   ========================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 14px 24px;
  border-radius: 8px; background: var(--clr-accent); color: #fff; font-weight: 600;
  transition: transform var(--transition), background var(--transition);
}
.btn:hover { background: var(--clr-accent-hover); }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* =========================================
   8. FORM & CHECKBOXES
   ========================================= */
.order-form { background: #fff; border: 1px solid var(--clr-border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.form__title { font-size: 1.25rem; font-weight: 600; margin-bottom: 16px; }
.form__group { margin-bottom: 16px; }
.form__label { display: block; font-size: .875rem; font-weight: 500; margin-bottom: 6px; }
.form__input, .form__textarea {
  width: 100%; padding: 12px 14px; border: 1px solid #ddd; border-radius: 8px;
  font-size: 1rem; transition: border-color var(--transition), box-shadow var(--transition);
}
.form__input:focus, .form__textarea:focus {
  outline: none; border-color: var(--clr-accent); box-shadow: 0 0 0 3px rgba(233, 13, 103, 0.15);
}
.form__hint { font-size: .75rem; color: var(--clr-muted); margin-top: 4px; }
.form__file { display: flex; align-items: center; gap: 12px; padding: 12px; border: 2px dashed #ddd; border-radius: 8px; cursor: pointer; transition: border-color var(--transition); }
.form__file:hover { border-color: var(--clr-accent); }
.form__preview { margin-top: 12px; display: none; }
.form__preview img { max-height: 120px; border-radius: 8px; }
.form__error { color: #c0392b; font-size: .875rem; margin-top: 4px; display: none; }
.form__success { background: #d4edda; color: #155724; padding: 12px; border-radius: 8px; margin-bottom: 16px; display: none; }

/* Checkbox Custom UI */
.checkbox-group { display: flex; flex-direction: column; gap: 12px; }
.checkbox-label {
  display: flex; align-items: flex-start; gap: 10px; cursor: pointer;
  font-size: 0.875rem; line-height: 1.4; color: #444; padding: 4px 0;
}
.checkbox-label input[type="checkbox"] {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); border: 0;
}
.checkbox-custom {
  width: 22px; height: 22px; min-width: 22px; border: 2px solid #ccc; border-radius: 6px;
  background: #fff; display: flex; align-items: center; justify-content: center;
  transition: all var(--transition); margin-top: 1px; flex-shrink: 0;
}
.checkbox-label input:checked + .checkbox-custom { background: var(--clr-accent); border-color: var(--clr-accent); }
.checkbox-custom::after {
  content: '✓'; color: #fff; font-size: 14px; font-weight: 700;
  opacity: 0; transform: scale(0.6); transition: all var(--transition);
}
.checkbox-label input:checked + .checkbox-custom::after { opacity: 1; transform: scale(1); }
.checkbox-label input:focus-visible + .checkbox-custom { outline: 2px solid var(--clr-accent); outline-offset: 2px; }
.checkbox-label a { color: var(--clr-accent); text-decoration: underline; text-decoration-style: dotted; }
.checkbox-label a:hover { text-decoration-style: solid; }
#checkboxError { display: none; margin-top: 8px; color: #c0392b; font-size: 0.8rem; }

/* =========================================
   9. TODAY'S DISPLAY
   ========================================= */
.display-header { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.display-header h2 { font-size: 1.5rem; font-weight: 700; margin: 0; }
.update-date { font-size: 0.875rem; color: var(--clr-muted); }
.display-image { position: relative; border-radius: 16px; overflow: hidden; background: #f5f5f5; aspect-ratio: 16/9; }
.display-cta {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, transparent 100%);
  color: #fff; padding: 24px 20px 20px; display: flex; flex-direction: column; gap: 10px;
}
.display-cta p { margin: 0; font-size: 0.95rem; line-height: 1.4; }
.display-cta .btn { align-self: flex-start; background: #fff; color: var(--clr-accent); }
.display-cta .btn:hover { background: #f5f5f5; }

/* =========================================
   10. GALLERY & LIGHTBOX
   ========================================= */
.gallery-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
.gallery-item { margin: 0; position: relative; border-radius: 12px; overflow: hidden; background: #f9f9f9; cursor: zoom-in; aspect-ratio: 1 / 1; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform var(--transition); }
.gallery-item:hover img { transform: scale(1.03); }
.gallery-item figcaption {
  position: absolute; bottom: 0; left: 0; right: 0; padding: 10px 12px;
  background: rgba(0,0,0,0.6); color: #fff; font-size: 0.8rem;
  transform: translateY(100%); transition: transform var(--transition);
}
.gallery-item:hover figcaption { transform: translateY(0); }

.lightbox { border: none; padding: 0; background: rgba(0,0,0,0.92); max-width: 95vw; max-height: 90vh; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
.lightbox::backdrop { background: rgba(0,0,0,0.4); }
.lightbox-close { position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; border-radius: 50%; border: none; background: rgba(255,255,255,0.2); color: #fff; font-size: 1.5rem; cursor: pointer; transition: background var(--transition); }
.lightbox-close:hover { background: rgba(255,255,255,0.35); }
.lightbox-img { max-width: 90vw; max-height: 70vh; object-fit: contain; border-radius: 8px; }
.lightbox-caption { color: #fff; margin: 0; font-size: 0.9rem; text-align: center; }

/* =========================================
   11. FAQ
   ========================================= */
details { border-bottom: 1px solid #eee; padding-bottom: 12px; margin-bottom: 12px; }
details summary { font-weight: 500; cursor: pointer; padding: 8px 0; list-style: none; position: relative; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: '+'; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-size: 1.25rem; color: var(--clr-accent); transition: transform var(--transition); }
details[open] summary::after { content: '−'; }
details p { margin-top: 8px; color: #555; line-height: 1.6; }

/* =========================================
   12. SUCCESS MESSAGE
   ========================================= */
.order-success { text-align: center; padding: 40px 20px; background: #fff; border: 1px solid #e5e5e5; border-radius: 12px; box-shadow: var(--shadow); animation: fadeInUp 0.3s ease forwards; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.order-success__icon { width: 64px; height: 64px; background: #d4edda; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; font-size: 2rem; }
.order-success__title { font-size: 1.5rem; font-weight: 700; margin-bottom: 8px; color: var(--clr-text); }
.order-success__meta { color: var(--clr-muted); margin-bottom: 8px; font-size: 1rem; }
.order-success__text { color: #555; line-height: 1.6; margin-bottom: 24px; max-width: 480px; margin-left: auto; margin-right: auto; }
.order-success__btn { min-width: 200px; margin-bottom: 24px; display: inline-flex; }
.order-success__footer { padding-top: 16px; border-top: 1px solid #eee; font-size: 0.875rem; color: #888; }
.order-success__phone { display: inline-block; margin-top: 6px; color: var(--clr-accent); font-weight: 500; text-decoration: none; border-bottom: 1px dashed var(--clr-accent); }
.order-success__phone:hover { border-bottom-style: solid; }

/* =========================================
   13. FOOTER
   ========================================= */
.footer { padding: 32px 0 24px; background: #1a1a1a; color: #fff; }
.footer__contacts p { margin-bottom: 8px; }
.footer__contacts a { color: var(--clr-accent); text-decoration: underline; text-decoration-style: dotted; }
.footer__contacts a:hover { text-decoration-style: solid; }
.footer__copy { margin-top: 16px; font-size: .875rem; opacity: .8; }

/* =========================================
   14. MEDIA QUERIES (Mobile-First)
   ========================================= */
@media (min-width: 480px) {
  .logo__text { font-size: 1.8rem; }
  .hero__content h1 { font-size: 2rem; }
}
@media (min-width: 768px) {
  body { font-size: 18px; }
  .hero { padding: 64px 0 48px; }
  .hero__grid { grid-template-columns: 1.2fr 1fr; align-items: center; }
  .hero__content h1 { font-size: 2.5rem; }
  .features__grid { grid-template-columns: repeat(3, 1fr); }
  .order-form { padding: 28px; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .order-success { padding: 48px 32px; }
  .order-success__title { font-size: 1.75rem; }
}
@media (min-width: 900px) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
}

/* =========================================
   15. PRINT & ACCESSIBILITY
   ========================================= */
@media print {
  .header, .footer, .btn, .lightbox, details summary::after { display: none !important; }
  body { font-size: 12pt; color: #000; }
  .hero, .order-form, .order-success { box-shadow: none; border: 1px solid #ccc; }
}
:focus-visible { outline: 2px solid var(--clr-accent); outline-offset: 2px; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible { outline-offset: 2px; }

/* Кнопки действий на витрине */
.display-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.btn-outline {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.7);
  backdrop-filter: blur(4px);
  transition: background 0.15s, border-color 0.15s;
}
.btn-outline:hover {
  background: rgba(255,255,255,0.3);
  border-color: #fff;
}
@media (max-width: 480px) {
  .display-actions { flex-direction: column; }
  .display-actions .btn { width: 100%; justify-content: center; }
}
/* === Виджеты карт === */
.map-widget {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
}

.widget-2gis, .widget-yandex {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,.04);
}

.widget-2gis .dg-widget-link {
  display: block;
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: var(--accent);
  text-decoration: none;
}
.widget-2gis .dg-widget-link:hover { text-decoration: underline; }
.widget-2gis .dg-widget-link + .dg-widget-link { margin-top: 4px; }

.map-container {
  width: 100%;
  aspect-ratio: 4/3;
  background: #f5f5f5;
  border-radius: 8px;
  overflow: hidden;
  margin-top: 12px;
  position: relative;
}

/* Адаптация 2GIS iframe внутри виджета */
.map-container iframe,
.map-container .dg-map {
  width: 100% !important;
  height: 100% !important;
  border: none !important;
  display: block;
}

.map-container--reviews {
  aspect-ratio: 7/9; /* Более высокий блок для отзывов */
}

.yandex-attribution {
  display: block;
  text-align: center;
  font-size: 0.75rem;
  color: #b3b3b3;
  margin-top: 8px;
  text-decoration: none;
  padding: 0 8px;
}
.yandex-attribution:hover { color: var(--accent); }

/* Контакты текстом */
.contacts-text {
  background: #fafafa;
  border-radius: var(--radius);
  padding: 20px;
  line-height: 1.8;
}
.contacts-text p { margin: 4px 0; }
.contacts-text a { text-decoration: none; border-bottom: 1px dashed var(--accent); }
.contacts-text a:hover { border-bottom-style: solid; }

/* Desktop */
@media (min-width: 768px) {
  .map-widget {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
  .contacts-text {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px 32px;
    text-align: left;
  }
}
.footer {
  padding: 32px 0 24px;
  background: #1a1a1a;
  color: #fff;
  margin-top: 40px;
}
.footer__inner {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
  margin-bottom: 24px;
}
.footer__brand p,
.footer__contacts p {
  margin: 4px 0;
  line-height: 1.6;
}
.footer__contacts a {
  color: var(--accent);
  transition: opacity .15s;
  border-bottom: 1px dashed var(--accent);
}
.footer__contacts a:hover {
  opacity: .85;
  border-bottom-style: solid;
}

/* Соцсети */
.footer__social { margin-top: 8px; }
.social-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.social-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(255,255,255,.1);
  border-radius: 8px;
  color: #fff;
  font-size: .9rem;
  text-decoration: none;
  transition: background .15s, transform .15s;
}
.social-link:hover {
  background: rgba(255,255,255,.2);
  transform: translateY(-2px);
}
.social-link svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Цвета брендов при наведении */
.social-link--tg:hover { background: #229ED9; }
.social-link--max:hover { background: #0077FF; }

/* Нижняя строка футера */
.footer__bottom {
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,.15);
  text-align: center;
  font-size: .875rem;
  opacity: .8;
}
.footer__bottom a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dashed currentColor;
}
.footer__bottom a:hover { border-bottom-style: solid; }

/* Desktop */
@media (min-width: 768px) {
  .footer__inner {
    grid-template-columns: 1.2fr 1fr 1fr;
    align-items: start;
  }
  .footer__social { justify-self: end; text-align: right; }
  .social-links { justify-content: flex-end; }
  .footer__bottom { text-align: left; }
}
/* =========================================
10. SWIPEABLE GALLERY (CSS Scroll Snap)
========================================= */
.gallery-slider {
  position: relative;
  max-width: 100%;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 16px;
  background: #f9f9f9;
  touch-action: pan-y pinch-zoom; /* Разрешаем скролл страницы, но не внутри */
}

.gallery-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch; /* Инерция на iOS */
  scrollbar-width: none; /* Скрыть скроллбар в Firefox */
  -ms-overflow-style: none; /* Скрыть в IE/Edge */
}
.gallery-track::-webkit-scrollbar { display: none; } /* Скрыть в Chrome/Safari/Yandex */

.gallery-slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
}

.gallery-slide img {
  width: 100%;
  max-width: 600px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 12px;
  display: block;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
  transition: transform .2s ease;
  will-change: transform;
}
.gallery-slide img:active { transform: scale(1.01); }

/* Кнопки навигации */
.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px; height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.9);
  color: var(--accent);
  font-size: 1.5rem;
  font-weight: 300;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
  transition: background .15s, transform .15s;
  z-index: 10;
  -webkit-tap-highlight-color: transparent;
}
.slider-btn:hover { background: #fff; transform: translateY(-50%) scale(1.05); }
.slider-btn:active { transform: translateY(-50%) scale(.95); }
.slider-btn--prev { left: 12px; }
.slider-btn--next { right: 12px; }

/* Скрываем кнопки на мобильных — там удобнее свайпать */
@media (max-width: 767px) {
  .slider-btn { display: none; }
}

/* Индикаторы (точки) */
.slider-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 12px 0 8px;
  position: absolute;
  bottom: 8px;
  left: 0; right: 0;
  z-index: 5;
}
.slider-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,.5);
  border: 2px solid rgba(0,0,0,.2);
  cursor: pointer;
  transition: background .15s, transform .15s;
  -webkit-tap-highlight-color: transparent;
}
.slider-dot.active {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.1);
}
.slider-dot:hover { background: rgba(233,13,103,.7); }

/* Desktop: показываем по 1.2 слайда для намёка на свайп */
@media (min-width: 768px) {
  .gallery-slide { flex: 0 0 90%; }
  .gallery-slide + .gallery-slide { margin-left: -10%; }
}