/* =============================================
   ROOT VARIABLES
   ============================================= */
:root {
  --color-primary: #F5C800;
  --color-secondary: #E8650A;
  --color-dark: #1A1A1A;
  --color-blue-light: #87CEEB;
  --color-green: #3A8A4A;
  --color-white: #FFFFFF;
  --color-bg: #FFFDF0;
  --color-accent: #E63946;
  --color-text: #2D2D2D;
  --color-text-muted: #6B6B6B;
  --color-border: #E8E0C8;
  --radius: 16px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0,0,0,0.10);
  --shadow-hover: 0 8px 36px rgba(0,0,0,0.16);
  --transition: 0.25s ease;
  --max-width: 1200px;
  --font-heading: 'Russo One', sans-serif;
  --font-body: 'Nunito', sans-serif;
}

/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
  scroll-padding-top: 60px;
  overflow-x: hidden; /* запобігаємо горизонтальному скролу */
}

body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.65;
  overflow-x: hidden;
  padding-top: 60px; /* висота фіксованого nav */
}

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-decoration: none; }

button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* =============================================
   UTILITIES
   ============================================= */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.section { padding: 64px 0; }

.section__title {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  color: var(--color-dark);
  text-align: center;
  margin-bottom: 48px;
  position: relative;
}

.section__title::after {
  content: '';
  display: block;
  width: 64px;
  height: 4px;
  background: var(--color-primary);
  border-radius: 2px;
  margin: 12px auto 0;
}

/* =============================================
   STICKY NAV
   ============================================= */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  height: 60px;
  background: rgba(255, 253, 240, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--color-border);
  box-shadow: 0 2px 16px rgba(0,0,0,0.08);
}

.site-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
}

.site-nav__brand {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  line-height: 1.25;
  color: var(--color-dark);
  transition: color var(--transition);
  flex-shrink: 0;
}

.site-nav__brand:hover { color: var(--color-secondary); }

.site-nav__links {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
}

.site-nav__link {
  font-family: var(--font-heading);
  font-size: 0.88rem;
  color: var(--color-dark);
  padding: 7px 14px;
  border-radius: 20px;
  transition: color var(--transition), background var(--transition);
}

.site-nav__link:hover {
  color: var(--color-secondary);
  background: rgba(232,101,10,0.09);
}

.site-nav__order {
  font-size: 0.85rem;
  padding: 9px 20px;
  box-shadow: 0 3px 10px rgba(230,57,70,0.30);
}

/* Мобайл: бренд ховається, 3 пункти рівномірно на всю ширину */
@media (max-width: 540px) {
  .site-nav__brand { display: none; }
  .site-nav__links {
    width: 100%;
    justify-content: space-evenly;
    gap: 0;
  }
  .site-nav__link {
    font-size: 0.82rem;
    padding: 7px 10px;
  }
  .site-nav__order {
    font-size: 0.82rem;
    padding: 8px 14px;
  }
}

/* =============================================
   BUTTONS
   ============================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 1rem;
  padding: 14px 28px;
  border-radius: 50px;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  white-space: nowrap;
}

.btn--accent {
  background: var(--color-accent);
  color: var(--color-white);
  box-shadow: 0 4px 16px rgba(230,57,70,0.35);
}

.btn--accent:hover {
  background: #c62b36;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(230,57,70,0.45);
}

.btn--accent:active { transform: translateY(0); }

.btn--hero {
  font-size: 1.15rem;
  padding: 18px 40px;
}

/* =============================================
   SCROLL REVEAL
   ============================================= */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* =============================================
   HERO & STATIC COVER IMAGE
   ============================================= */
.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--color-dark);
  /* Висота визначається пропорціями зображення 1670×600 */
  aspect-ratio: 1670 / 600;
  max-height: 600px;  /* не вище оригінального розміру */
  width: 100%;        /* запобігаємо розтягуванню при min-height */
  max-width: 100%;
}

/* Фонове зображення hero */
.hero__bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

.slider {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.slider__track {
  display: flex;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.slider__slide {
  min-width: 100%;
  height: 100%;
  flex-shrink: 0;
}

.slider__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.slider__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.85);
  color: var(--color-dark);
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background var(--transition), transform var(--transition);
  box-shadow: var(--shadow);
}

.slider__btn:hover { background: var(--color-white); transform: translateY(-50%) scale(1.08); }
.slider__btn--prev { left: 16px; }
.slider__btn--next { right: 16px; }

.slider__dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.slider__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  border: none;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
  padding: 0;
}

.slider__dot.active,
.slider__dot:hover {
  background: var(--color-primary);
  transform: scale(1.3);
}

/* Hero overlay gradient */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(10,10,10,0.92) 0%,
    rgba(10,10,10,0.58) 40%,
    rgba(10,10,10,0.22) 70%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 1;
}

.hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 60px 20px 40px;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.hero__title {
  display: none; /* назва вже видна на обкладинці */
  font-family: var(--font-heading);
  font-size: clamp(2.4rem, 8vw, 5rem);
  color: var(--color-primary);
  text-shadow:
    -3px -3px 0 var(--color-dark),
     3px -3px 0 var(--color-dark),
    -3px  3px 0 var(--color-dark),
     3px  3px 0 var(--color-dark),
     0    4px 0 rgba(0,0,0,0.5);
  line-height: 1.1;
  margin-bottom: 16px;
  letter-spacing: 0.01em;
}

.hero__subtitle {
  font-family: var(--font-heading);
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  color: var(--color-white);
  margin-top: 14px;
  margin-bottom: 0;
  text-shadow: 0 2px 8px rgba(0,0,0,0.7);
}

/* Текстовий блок під hero, над прикладами задач */
.hero-desc-block {
  background: var(--color-bg);
  padding: 28px 0 0;
}

.hero-desc-text {
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  color: var(--color-text);
  line-height: 1.75;
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

/* =============================================
   PRODUCTS
   ============================================= */
.products { background: var(--color-white); }

.products__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  margin-bottom: 48px;
}

.product-card {
  background: var(--color-bg);
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: var(--shadow);
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.product-card__img-wrap {
  aspect-ratio: 3/4;
  overflow: hidden;
  background: #f0f0e8;
}

.product-card__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.product-card:hover .product-card__img-wrap img { transform: scale(1.04); }

.product-card__body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.product-card__title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--color-dark);
  line-height: 1.3;
}

.product-card__desc {
  font-size: 0.92rem;
  color: var(--color-text-muted);
  flex: 1;
}

.product-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.product-card__price {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--color-secondary);
}

/* =============================================
   BUNDLES
   ============================================= */
.bundles {
  background: linear-gradient(135deg, var(--color-green) 0%, #2a6a38 100%);
  border-radius: var(--radius);
  padding: 40px 28px;
  color: var(--color-white);
}

.bundles__title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  text-align: center;
  margin-bottom: 28px;
  color: var(--color-primary);
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.bundles__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.bundle-card {
  background: rgba(255,255,255,0.12);
  border: 1.5px solid rgba(255,255,255,0.25);
  border-radius: var(--radius-sm);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  backdrop-filter: blur(4px);
}

.bundle-card--featured {
  background: rgba(245,200,0,0.18);
  border-color: var(--color-primary);
}

.bundle-card__icon { font-size: 2rem; flex-shrink: 0; }

.bundle-card__info { flex: 1; min-width: 120px; }

.bundle-card__name {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 4px;
}

.bundle-card__pricing {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.bundle-card__price {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--color-primary);
}

.bundle-card__old {
  font-size: 0.9rem;
  text-decoration: line-through;
  opacity: 0.65;
}

.bundles__bulk-note {
  margin-top: 20px;
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  color: rgba(255,255,255,0.95);
  line-height: 1.55;
  border-top: 1px solid rgba(255,255,255,0.2);
  padding-top: 16px;
}

.bundles__bulk-note strong {
  color: var(--color-primary);
}

.bundle-card__save {
  font-size: 0.8rem;
  background: var(--color-accent);
  color: var(--color-white);
  border-radius: 20px;
  padding: 2px 8px;
  font-weight: 700;
}

/* =============================================
   WHY SECTION
   ============================================= */
.why { background: var(--color-bg); }

.why__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.why-card {
  background: var(--color-white);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
  border: 2px solid var(--color-border);
  transition: transform var(--transition), box-shadow var(--transition);
}

.why-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.why-card__icon {
  font-size: 2.4rem;
  margin-bottom: 12px;
  display: block;
}

.why-card__title {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--color-dark);
  margin-bottom: 8px;
  line-height: 1.3;
}

.why-card__text {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* =============================================
   AUTHOR
   ============================================= */
.author {
  background: linear-gradient(135deg, #FFF8E0 0%, var(--color-bg) 100%);
}

.author__inner {
  display: flex;
  flex-direction: column;
  gap: 36px;
  align-items: center;
}

.author__photo {
  flex-shrink: 0;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  overflow: hidden;
  border: 5px solid var(--color-primary);
  box-shadow: 0 8px 32px rgba(245,200,0,0.3);
}

.author__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author__content { max-width: 640px; text-align: center; }

.author__name {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 4vw, 2rem);
  color: var(--color-dark);
  margin-bottom: 4px;
}

.author__role {
  font-size: 0.95rem;
  color: var(--color-secondary);
  font-weight: 700;
  margin-bottom: 20px;
}

.author__text {
  font-size: 0.98rem;
  color: var(--color-text);
  margin-bottom: 14px;
  line-height: 1.7;
}

.author__instagram {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--color-secondary);
  font-size: 1rem;
  transition: color var(--transition);
  margin-top: 8px;
}

.author__instagram:hover { color: var(--color-accent); }

/* =============================================
   REVIEWS — MASONRY
   ============================================= */
.reviews { background: var(--color-white); }

.reviews__masonry {
  columns: 2;
  column-gap: 16px;
}

.review-item {
  break-inside: avoid;
  margin-bottom: 16px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

.review-item:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: var(--shadow-hover);
}

.review-item img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-sm);
}

/* =============================================
   STORY
   ============================================= */
.story {
  background: linear-gradient(135deg, var(--color-blue-light) 0%, #b8e4f9 100%);
}

.story__inner {
  max-width: 720px;
  margin: 0 auto;
}

.story .section__title { color: var(--color-dark); }
.story .section__title::after { background: var(--color-secondary); }

/* ---- TIMELINE ---- */
.timeline {
  position: relative;
}

/* Вертикальна лінія — малюється через ::before кожного item,
   що з'єднує крапку поточного блоку з крапкою наступного */
.timeline__item {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  position: relative;
}

.timeline__item:last-child {
  margin-bottom: 0;
}

/* Лінія від низу крапки до верху наступної крапки */
.timeline__item:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 21px;           /* горизонтальний центр крапки (44px / 2 = 22, -1 для 2px лінії) */
  top: 44px;            /* одразу під крапкою */
  bottom: -20px;        /* до початку наступного блоку (= margin-bottom) */
  width: 2px;
  background: linear-gradient(to bottom, var(--color-primary), var(--color-secondary));
  border-radius: 2px;
}

/* Крапка з emoji */
.timeline__dot {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-white);
  border: 2.5px solid var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 3px 12px rgba(245,200,0,0.28);
  position: relative; /* над лінією */
  z-index: 1;
  margin-top: 2px;    /* візуально вирівнюємо з заголовком */
}

/* Картка-тіло */
.timeline__body {
  flex: 1;
  background: var(--color-white);
  border-radius: var(--radius);
  padding: 18px 22px;
  box-shadow: 0 3px 16px rgba(0,0,0,0.08);
  border-left: 3px solid var(--color-primary);
}

.timeline__title {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--color-dark);
  margin-bottom: 8px;
  line-height: 1.3;
}

.timeline__text {
  font-size: 0.95rem;
  color: var(--color-text);
  line-height: 1.75;
  margin: 0;
}

/* =============================================
   INLINE CTA (кнопки між секціями)
   ============================================= */
.inline-cta {
  background: var(--color-bg);
  padding: 32px 0;
  text-align: center;
}

/* Підказка про доставку — під кнопкою форми і на success.html */
.delivery-note {
  text-align: center;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: 6px;
}

/* =============================================
   FINAL CTA
   ============================================= */
.cta {
  background: linear-gradient(135deg, var(--color-dark) 0%, #2d2d2d 100%);
  text-align: center;
  padding: 80px 20px;
}

.cta__title {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  color: var(--color-primary);
  margin-bottom: 16px;
  line-height: 1.2;
  text-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

.cta__sub {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.8);
  margin-bottom: 36px;
}

/* =============================================
   FOOTER
   ============================================= */
.footer {
  background: var(--color-dark);
  border-top: 3px solid var(--color-primary);
  padding: 28px 20px;
}

.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.footer__brand {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--color-primary);
}

.footer__instagram {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.75);
  font-weight: 600;
  transition: color var(--transition);
}

.footer__instagram:hover { color: var(--color-primary); }

.footer__author-info {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.55);
  line-height: 1.7;
  text-align: center;
}

.footer__tel {
  color: rgba(255,255,255,0.55);
  transition: color var(--transition);
}

.footer__tel:hover { color: var(--color-primary); }

.footer__copy {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.45);
}

/* =============================================
   MODAL
   ============================================= */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal[hidden] { display: none; }

.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(10,10,10,0.65);
  backdrop-filter: blur(4px);
  cursor: pointer;
}

.modal__dialog {
  position: relative;
  background: var(--color-white);
  border-radius: var(--radius);
  width: 100%;
  max-width: 560px;
  max-height: calc(100svh - 32px);
  overflow-y: auto;
  padding: 12px 20px 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  z-index: 1;
  animation: modal-in 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modal-in {
  from { opacity: 0; transform: scale(0.92) translateY(20px); }
  to   { opacity: 1; transform: none; }
}

.modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-bg);
  color: var(--color-dark);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
  flex-shrink: 0;
}

.modal__close:hover { background: var(--color-border); }

.modal__title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--color-dark);
  margin-bottom: 7px;
  padding-right: 40px;
}

/* =============================================
   ORDER FORM
   ============================================= */
.form-group {
  margin-bottom: 6px;
}

.form-label {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: var(--color-dark);
}

.form-label span { color: var(--color-accent); }

.form-input {
  width: 100%;
  padding: 9px 14px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-text);
  background: var(--color-bg);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(245,200,0,0.2);
}

.form-input.invalid {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(230,57,70,0.15);
}

.form-error {
  display: block;
  font-size: 0.78rem;
  color: var(--color-accent);
  margin-top: 3px;
  min-height: 0;
}

.form-hint {
  display: block;
  font-size: 0.78rem;
  color: var(--color-text-muted);
  margin-top: 4px;
  line-height: 1.4;
}

/* Product selection */
.product-select {
  border: none;
  padding: 0;
  margin-bottom: 6px;
}

.product-select__legend {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--color-dark);
  margin-bottom: 7px;
}

.product-select__legend span { color: var(--color-accent); }

.product-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--color-border);
  margin-bottom: 4px;
  background: var(--color-bg);
  transition: border-color var(--transition), background var(--transition);
  flex-wrap: wrap;
}

.product-row:has(.product-row__radio:checked) {
  border-color: var(--color-primary);
  background: #FFFBE6;
}

.product-row__label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  flex: 1;
  min-width: 0;
}

.product-row__radio {
  width: 18px;
  height: 18px;
  accent-color: var(--color-secondary);
  flex-shrink: 0;
  cursor: pointer;
}

.product-row__name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-dark);
  flex: 1;
}

.product-row__price {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  color: var(--color-secondary);
  white-space: nowrap;
}

/* Quantity control */
.qty-control {
  display: flex;
  align-items: center;
  gap: 4px;
}

.qty-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-dark);
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), opacity var(--transition);
  flex-shrink: 0;
}

.qty-btn:hover { background: #ddb000; }
.qty-btn:disabled { opacity: 0.3; cursor: not-allowed; }

.qty-input {
  width: 44px;
  text-align: center;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  padding: 4px;
  background: var(--color-white);
  color: var(--color-dark);
  -moz-appearance: textfield;
}

.qty-input::-webkit-inner-spin-button,
.qty-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.qty-input:disabled {
  opacity: 0.35;
  background: #f0f0e8;
}

/* Підказка про знижку за об'єм */
.discount-notice {
  background: #FFFBE6;
  border: 1.5px solid var(--color-primary);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  margin-bottom: 6px;
  font-size: 0.82rem;
  color: var(--color-dark);
  line-height: 1.55;
}

/* Total & submit */
.order-total {
  text-align: center;
  font-size: 1rem;
  color: var(--color-dark);
  margin-bottom: 6px;
  padding: 6px 14px;
  background: #FFFBE6;
  border-radius: var(--radius-sm);
  border: 2px solid var(--color-primary);
}

.order-total strong {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--color-secondary);
}

.order-total__original {
  font-size: 1rem;
  color: var(--color-text-muted);
  text-decoration: line-through;
  margin-right: 6px;
}

.btn--submit {
  width: 100%;
  font-size: 1rem;
  padding: 14px;
  border-radius: var(--radius-sm);
  position: relative;
}

/* Блок підсумку помилок перед кнопкою */
.form-errors-summary {
  background: #FFF0F0;
  border: 1.5px solid var(--color-accent);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 10px;
  font-size: 0.85rem;
  color: var(--color-accent);
}

.form-errors-summary strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.88rem;
}

.form-errors-summary ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.form-errors-summary ul li::before {
  content: '→ ';
  font-weight: 700;
}

.submit-loader {
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255,255,255,0.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* =============================================
   LIGHTBOX
   ============================================= */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(10,10,10,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  cursor: zoom-out;
  animation: fade-in 0.2s ease;
}

.lightbox[hidden] { display: none; }

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.lightbox__img {
  max-width: 100%;
  max-height: 90svh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  cursor: default;
  animation: zoom-in 0.25s cubic-bezier(0.4,0,0.2,1);
}

@keyframes zoom-in { from { transform: scale(0.88); } to { transform: none; } }

.lightbox__close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  color: var(--color-white);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}

.lightbox__close:hover { background: rgba(255,255,255,0.3); }

/* =============================================
   EXAMPLES SLIDER
   ============================================= */
.examples-section { background: var(--color-bg); }

/* Центруємо слайдер і ширина 80% */
.examples-wrap {
  display: flex;
  justify-content: center;
}

.examples-slider {
  position: relative;
  width: 80%;
  /* Фіксуємо пропорції 1150×850 — висота рахується автоматично від ширини */
  aspect-ratio: 1150 / 850;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow-hover);
  background: #f0f0e8;
}

.examples-track {
  display: flex;
  height: 100%;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.examples-slide {
  min-width: 100%;
  height: 100%;
  flex-shrink: 0;
  line-height: 0;
}

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

/* Кнопки слайдера */
.ex-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.88);
  color: var(--color-dark);
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: background var(--transition), transform var(--transition);
}

.ex-btn:hover {
  background: var(--color-white);
  transform: translateY(-50%) scale(1.08);
}

.ex-btn--prev { left: 12px; }
.ex-btn--next { right: 12px; }

/* Точки навігації */
.ex-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.ex-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.55);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background var(--transition), transform var(--transition);
}

.ex-dot.active,
.ex-dot:hover {
  background: var(--color-primary);
  transform: scale(1.3);
}

/* На мобайлі ширина до 95% */
@media (max-width: 767px) {
  .examples-slider { width: 95%; }
  .ex-btn { width: 36px; height: 36px; font-size: 1.1rem; }
}

/* =============================================
   RESPONSIVE — 480px
   ============================================= */
@media (min-width: 480px) {
  .reviews__masonry { columns: 2; column-gap: 16px; }
}

/* =============================================
   RESPONSIVE — 768px
   ============================================= */
@media (min-width: 768px) {
  .products__grid { grid-template-columns: repeat(2, 1fr); }
  .bundles__grid { grid-template-columns: repeat(2, 1fr); }
  .reviews__masonry { columns: 3; column-gap: 16px; }

  .author__inner {
    flex-direction: row;
    align-items: flex-start;
    gap: 48px;
  }

  .author__content { text-align: left; }

  .slider__btn--prev { left: 24px; }
  .slider__btn--next { right: 24px; }
}

/* =============================================
   RESPONSIVE — 1024px
   ============================================= */
@media (min-width: 1024px) {
  .products__grid { grid-template-columns: repeat(3, 1fr); }
  .reviews__masonry { columns: 4; column-gap: 20px; }
  .review-item { margin-bottom: 20px; }

  .hero__content { padding: 80px 40px 56px; }

  .author__photo {
    width: 280px;
    height: 280px;
  }
}

/* =============================================
   SCROLLBAR
   ============================================= */
.modal__dialog::-webkit-scrollbar { width: 6px; }
.modal__dialog::-webkit-scrollbar-track { background: transparent; }
.modal__dialog::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 3px; }

/* =============================================
   MOBILE OVERRIDES — max 767px
   (767 щоб не перетинатись з min-width: 768px)
   ============================================= */
@media (max-width: 767px) {

  /* --- Hero: прибираємо aspect-ratio, щоб не розтягувало ширину
         (aspect-ratio + min-height = ширина ~723px на 375px екрані) --- */
  .hero {
    aspect-ratio: unset;
    height: 280px;
  }

  /* --- ПРАВКА 2: Картки задачників --- */

  /* Зменшуємо секцію продуктів зверху/знизу */
  .products.section { padding: 40px 0; }

  /* Знімаємо фіксований aspect-ratio та обмежуємо висоту зображення —
     на 390px екрані 3/4 ratio дає 520px, тепер не більше 200px */
  .product-card__img-wrap {
    aspect-ratio: unset;
    max-height: 200px;
  }

  /* object-fit: contain щоб обкладинка не обрізалась */
  .product-card__img-wrap img {
    height: 200px;
    object-fit: contain;
  }

  /* Зменшуємо внутрішні відступи картки */
  .product-card__body {
    padding: 14px 16px;
    gap: 8px;
  }

  /* Менший текст опису */
  .product-card__desc {
    font-size: 0.875rem; /* ~14px */
    line-height: 1.5;
  }

  /* .product-card__footer вже display:flex + space-between в базових стилях,
     кнопка вже без width:100% — додаткових змін не потрібно */

  /* --- ПРАВКА 3: Заголовки --- */

  /* Загальна секція — менше вертикальних відступів */
  .section { padding: 48px 0; }
  .section__title {
    /* clamp(1.6rem,...) не дає впасти нижче 1.6rem — перекриваємо явно */
    font-size: 1.3rem; /* ~21px */
    line-height: 1.3;
    margin-bottom: 28px;
  }

  /* Hero — головний заголовок */
  .hero__title {
    /* clamp(2.4rem, 8vw, 5rem) → мінімум 2.4rem = 38px — надто велике */
    font-size: 2rem; /* 32px */
    line-height: 1.1;
  }

  /* Hero — підзаголовок */
  .hero__subtitle {
    font-size: 1rem;
  }

  /* Hero — опис */
  .hero__desc {
    font-size: 0.9rem;
    margin-bottom: 24px;
  }

  /* CTA заголовок — "Подаруй дитині математику, яку хочеться вирішувати" */
  .cta__title {
    /* clamp(1.6rem, 4vw, 2.6rem) → мінімум 1.6rem = 25.6px на довгому тексті */
    font-size: 1.35rem;
    line-height: 1.3;
  }

  /* Назви карток товарів */
  .product-card__title {
    font-size: 0.95rem;
  }

  /* Ім'я авторки */
  .author__name {
    font-size: 1.4rem;
  }

  /* Заголовок бандлів */
  .bundles__title {
    font-size: 1.2rem;
  }
}
