.thanks {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
}

.thanks__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.thanks__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.thanks__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 24px;
  margin: 0 auto;
  padding: 80px 0;
}


.thanks__data {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 480px;
}

.thanks__field {
  background: #EAEFF8;
  border: 1px solid #2F353B;
  padding: 19px 24px;
  text-align: left;
}

.thanks__btn {
  max-width: 340px;
  width: 100%;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .thanks__btn {
    max-width: 100%;
  }
}

/* Design system color override */
.thanks__field {
  background: var(--background-2);
  border-color: var(--border);
}


/* ═══════════════════════════════════════════════════════════════
   PROMO — Архив акций (template-promotions.php) + одна акция (single.php)
   ═══════════════════════════════════════════════════════════════ */

.prom-title {
  margin: 32px 0 40px;
}

/* Archive list */
.prom-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-bottom: 80px;
}

/* promotion-slide внутри prom-grid — <a> должен быть block */
a.prom-card {
  display: block;
  width: 100%;
}

/* Single promo layout */
.prom-layout {
  display: flex;
  gap: 60px;
  align-items: center;
  margin-bottom: 80px;
}

.prom__img {
  position: relative;
  flex: 0 0 420px;
  height: 380px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

.prom__img-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Рамка с товарным изображением — аналог .promotion-slide__img */
.prom__img-wrapper {
  position: absolute;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  background-color: #FAF6E3;
  padding: 14px 16px;
  z-index: 2;
}
.prom__img-wrapper img {
  height: 200px;
  width: auto;
  border: 3px solid #57212E;
  display: block;
}

.prom__content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.prom__content h2 {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 28px;
  line-height: 1.3;
}
.prom__content div {
  font-size: 15px;
  line-height: 1.65;
}
.prom__content div p { margin-bottom: 12px; }
.prom__content div p:last-child { margin-bottom: 0; }
.prom__content .btn {
  width: 100%;
  max-width: 280px;
}

@media (max-width: 1080px) {
  .prom__img {
    flex: 0 0 340px;
    height: 320px;
  }
  .prom-layout {
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .prom-layout {
    flex-direction: column;
    gap: 0;
    margin-bottom: 48px;
  }
  .prom__img {
    flex: none;
    width: 100%;
    height: 300px;
  }
  .prom__img-wrapper {
    right: 50%;
    transform: translate(50%, -50%);
  }
  .prom__content .btn {
    max-width: 100%;
  }
}


/* ═══════════════════════════════════════════════════════════════
   FORM — Страница индивидуального заказа (template-form.php)
   ═══════════════════════════════════════════════════════════════ */

.form-title {
  margin: 32px 0 32px;
}

.form-description {
  font-size: 16px;
  line-height: 1.5;
  margin-bottom: 24px;
  opacity: 0.8;
}

.main-form {
  background: #D7D7D7;
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 80px;
  border: 1px solid #9F0505;
  box-shadow: 0px 4px 4px 0px #00000040;

}

/* Custom file upload: скрытый input + иконка + текст */
.input-file {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 16px;
  height: 53px;
  background: var(--text);
  border: 1px solid #35291E;
  cursor: pointer;
}
.input-file input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.input-file svg {
  width: 44px;
  height:44px;
  flex-shrink: 0;
}
.input-file span {
  font-size: 18px;
  color: var(--background);
}

/* 3-column row: имя / телефон / почта */
.main-form__group {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

/* Submit button full width */
.main-form > .btn {
  width: 100%;
}

/* ── Validation errors ── */
.field--error .field__input {
  border-color: var(--accent);
}
.check--error .check__input ~ .check__mark {
  border-color: var(--accent) !important;
}
.field__error {
  display: block;
  font-size: 12px;
  color: var(--accent);
  margin-top: 4px;
}

@media (max-width: 768px) {
  .main-form {
    padding: 20px;
  }
  .main-form__group {
    grid-template-columns: 1fr;
  }
}


/* ═══════════════════════════════════════════════════════════════
   CONTACTS — Страница контактов (template-contacts.php)
   ═══════════════════════════════════════════════════════════════ */

.contacts-title {
  margin: 32px 0 40px;
}

.contacts-layout {
  display: flex;
  gap: 60px;
  align-items: flex-start;
  padding-bottom: 80px;
}

.contacts-info {
  flex: 0 0 380px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.contacts-map {
  flex: 1;
  min-height: 420px;
  border-radius: 12px;
  overflow: hidden;
}

.contacts-map iframe {
  width: 100%;
  height: 100%;
  min-height: 420px;
  border: 0;
  display: block;
}

@media (max-width: 1080px) {
  .contacts-layout {
    gap: 40px;
  }
  .contacts-info {
    flex: 0 0 300px;
  }
}

@media (max-width: 768px) {
  .contacts-layout {
    flex-direction: column;
    gap: 32px;
  }
  .contacts-info {
    flex: none;
    width: 100%;
  }
  .contacts-map {
    width: 100%;
    height: 460px;
  }
  .contacts-map iframe {
    height: 460px;
  }
}


/* ═══════════════════════════════════════════════════════════════
   RITUAL — Ритуальные услуги (template-ritual.php)
   ═══════════════════════════════════════════════════════════════ */

/* ── 1. Intro ── */
.ritual-title { margin: 32px 0 16px; }

.ritual-text {
  font-size: 15px;
  line-height: 1.65;
  opacity: 0.7;
  margin-bottom: 32px;
}

.ritual-free {
  margin-bottom: 20px;
}

.ritual {
  position: relative;
}

.ritual::before {
  display: block;
  content: '';
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    var(--background) 0%,
    #fff 1%,
    var(--background) 20%,
    #aaaaaa 70%,
    var(--background) 100%
  );
  filter: blur(451px);
  top: 0;
  left: 0;
  position: absolute;
}

.ritual > * {
  position: relative;
  z-index: 2;
}

.ritual-free__title {
  font-family: var(--font-heading);
font-weight: 400;
font-size: 26px;
line-height: 100%;

  margin-bottom: 40px;
}

.ritual-free__list {
  list-style: decimal;
  display: flex;
  flex-direction: column;
  list-style-position: inside;
  gap: 8px;
}

.ritual-free__list li { 
font-weight: 400;
font-size: 18px;
line-height: 100%;
 list-style: decimal; list-style-position: inside; }

/* ── 2. Services / Catalog (gray sections) ── */
.ritual-services {
  padding: 60px 0;
}

/* Верхний градиент — первая секция */
.ritual > .container + .ritual-services {
  padding-top: 80px;
}

.ritual-services__title { margin-bottom: 40px; }

.ritual-services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.ritual-services__card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ritual-services__card img {
  width: 100%;
  height: 318px;
  object-fit: cover;
  display: block;
}

.ritual-services__card-title {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 26px;
  line-height: 100%;
  margin-bottom: 20px;
  margin-top: 40px;
}

.ritual-services__card-text {
font-weight: 400;
font-size: 18px;
line-height: 100%;

}

/* ── 3. Advantages ── */
.ritual-advantages {
  display: flex;
  gap: 40px;
  justify-content: space-between;
  padding: 60px 0;
}

.ritual-advantage {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1;
  max-width: 310px;
  min-width: 310px;
}

.ritual-advantage img { width: auto; height: 143px; }

.ritual-advantage__title {
  font-family: var(--font-heading);
font-weight: 400;
font-size: 20px;
line-height: 100%;
text-align: center;
  margin-top: 20px;
  margin-bottom: 10px;
}

.ritual-advantage__text {
font-weight: 400;
font-size: 16px;
line-height: 100%;
text-align: center;
}

/* ── 4. About ── */
.ritual-about {
  padding: 60px 0 120px;
}


.ritual-about__title { margin-bottom: 40px; }

.ritual-about__layout {
  display: flex;
  gap: 60px;
  align-items: center;
}

.ritual-about__content {
  flex: 1;
 font-family: var(--font-heading);
font-weight: 400;
font-size: 26px;
line-height: 150%;
letter-spacing: 0%;

  display: flex;
  flex-direction: column;
  gap: 20px;
}

.ritual-about__content p { margin: 0; }

.ritual-about__img {
  flex: 0 0 380px;
  flex-shrink: 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 8px;
}

.ritual-about__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── 5. Contacts ── */
.ritual-contacts {
  padding: 80px 0 0;
  text-align: center;
}

.ritual-contacts__title {
  font-family: var(--font-heading);
font-weight: 500;
font-size: 40px;
line-height: 100%;
text-align: center;
  margin: 0 auto 40px;
}

.ritual-contacts__phones {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-bottom: 80px;
}

.ritual-contacts__phone {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
font-weight: 400;
font-size: 26px;
line-height: 100%;

}

.ritual-contacts__map iframe {
  width: 100%;
  height: 500px;
  border: 0;
  display: block;
}

/* ── Media ── */
@media (max-width: 1080px) {
  .ritual-services__grid { grid-template-columns: repeat(2, 1fr); }
  .ritual-about__img { flex: 0 0 300px; }
  .ritual-about__layout { gap: 40px; }

  .ritual-advantages {
    overflow-x: auto;
    scrollbar-width: none;
    scroll-snap-type: x mandatory;
  }

  .ritual-advantage {
    scroll-snap-align: start;
  }

  .ritual-advantage img {
    height: 72px;
  }
}

@media (max-width: 768px) {
  .ritual-services__grid { grid-template-columns: 1fr; }
  .ritual-advantages {  gap: 20px; }
  .ritual-about__layout { flex-direction: column; gap: 20px; }
  .ritual-about__img { flex: none; width: 100%; }
  .ritual-contacts__title { font-size: 28px; }
  .ritual-contacts__phones { flex-direction: column; align-items: center; gap: 20px; }
  .ritual-contacts__map iframe { height: 450px; }
}
