/* ============================================================
   Страница «Доставка» (/delivery/) — ts-дизайн.
   Всё скоупится под .dlv; содержимое приходит из моделей
   приложения stroykerbox.apps.delivery (правится в админке).
   Палитра и приёмы — как в product-detail-ts.css / cart-simple-ts.css.
   ============================================================ */
.dlv {
  --ink: #2b2622; --ink2: #5b544c; --ink3: #8a8178; --ink4: #a79c92;
  --green: #4f6e5c; --green-d: #41594b; --green-l: #5c7a68; --sale: #c9584a;
  --panel: #faf1ee; --panel2: #f3f7f4; --line: #f1e7e1; --line2: #e4d9d2;
  --serif: 'Playfair Display', Georgia, serif;
  /* внутри страницы синий акцент темы переводим в ts-зелёный */
  --accent-color-400: #4f6e5c; --accent-color-500: #41594b;
  --color-button-primary-background: #4f6e5c; --color-button-primary-border: #4f6e5c;
  --main-elements-color: #4f6e5c; --custom-accent-color-400: #4f6e5c;
  max-width: 1200px; margin: 0 auto; padding: 8px 0 40px;
  color: var(--ink); font-family: 'Inter', 'Lato', sans-serif;
}
.dlv * { box-sizing: border-box; }

/* розово-белый фон на всю ширину, как на детальной и в корзине */
body.dlv-page main { background: linear-gradient(180deg, #fdf1f2 0%, #fdf6f4 50%, #ffffff 100%) !important; }
.dlv-section { background: transparent !important; }
.dlv-section > .container { padding-top: 0; padding-bottom: 0; }

/* ===== хлебные крошки ===== */
.dlv .page-head { margin: 8px 0 0; }
.dlv .breadcrumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--ink3); }
.dlv .breadcrumbs a { color: var(--ink3); text-decoration: none; transition: color .15s; }
.dlv .breadcrumbs a:hover { color: var(--ink); }
.dlv .breadcrumbs__sep { width: 12px; height: 12px; opacity: .5; }

/* ===== типографика ===== */
.dlv .dlv__h1 {
  font-family: var(--serif) !important; font-weight: 500; font-size: 26px; line-height: 1.15;
  letter-spacing: -.01em; color: var(--ink); margin: 0; padding: 0;
}
.dlv .dlv__h2 {
  font-family: var(--serif) !important; font-weight: 500; font-size: 24px !important; line-height: 1.2;
  color: var(--ink); margin: 0 0 6px; padding: 0;
}
.dlv .dlv__h2_sm { font-size: 20px !important; }
.dlv .dlv__h3 { font-family: var(--serif) !important; font-weight: 500; font-size: 20px; color: var(--ink); margin: 6px 0 0; }
@media (min-width: 700px){
  .dlv .dlv__h1 { font-size: 32px; }
  .dlv .dlv__h2 { font-size: 30px !important; }
  .dlv .dlv__h2_sm { font-size: 24px !important; }
  .dlv .dlv__h3 { font-size: 24px; }
}
.dlv__label {
  font-size: 12px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  color: var(--green); margin: 0 0 8px;
}
.dlv__section { margin-top: 56px; }
.dlv__section-head { text-align: center; margin-bottom: 28px; }
.dlv__section-sub { font-size: 14px; line-height: 1.6; color: var(--ink3); margin: 12px auto 0; max-width: 640px; }
.dlv__section-sub_left { text-align: left; margin-left: 0; }
.dlv__center { display: flex; justify-content: center; margin-top: 28px; }

/* текст из редактора */
.dlv__prose { font-size: 14px; line-height: 1.7; color: var(--ink2); }
.dlv__prose p { margin: 0 0 12px; }
.dlv__prose p:last-child { margin-bottom: 0; }
.dlv__prose ul, .dlv__prose ol { margin: 0 0 12px; padding-left: 20px; }
.dlv__prose li { margin-bottom: 6px; }
.dlv__prose a { color: var(--green) !important; text-decoration: underline; text-underline-offset: 2px; }

/* ===== кнопки ===== */
.dlv .dlv__btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 999px; background: var(--green); color: #fff !important;
  font-size: 14px; font-weight: 500; text-decoration: none;
  padding: 16px 32px; border: 1px solid var(--green); transition: background .2s, border-color .2s, color .2s;
}
.dlv .dlv__btn:hover { background: var(--green-d); border-color: var(--green-d); color: #fff !important; }
.dlv .dlv__btn_ghost { background: transparent; color: var(--green) !important; padding: 14px 40px; }
.dlv .dlv__btn_ghost:hover { background: var(--panel2); color: var(--green-d) !important; border-color: var(--green-d); }

/* ============================================================
   БЛОК 1 — условия доставки
   ============================================================ */
.dlv__hero {
  margin-top: 18px; background: #fff; border-radius: 24px; overflow: hidden;
  box-shadow: 0 20px 60px -30px rgba(60,40,30,.18);
  display: grid; grid-template-columns: 1fr;
}
@media (min-width: 1000px){
  .dlv__hero { grid-template-columns: 1fr 420px; }
  .dlv__hero_noimg { grid-template-columns: 1fr; }
}
.dlv__hero-body { padding: 26px; }
@media (min-width: 700px){ .dlv__hero-body { padding: 40px; } }
.dlv__hero-sub { font-size: 14px; line-height: 1.6; color: var(--ink3); margin: 10px 0 0; }
.dlv__hero-img { min-height: 260px; overflow: hidden; }
.dlv .dlv__hero-img img { width: 100%; height: 100%; min-height: 260px; object-fit: cover; border-radius: 0 !important; display: block; }
@media (min-width: 1000px){ .dlv .dlv__hero-img img { min-height: 100%; } }

.dlv__tariffs { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 16px; }
.dlv__tariff { display: flex; align-items: flex-start; gap: 12px; }
.dlv__tariff-ico { flex: 0 0 auto; color: var(--green); margin-top: 1px; }
.dlv__tariff-ico svg, .dlv__tariff-ico img { width: 20px; height: 20px; display: block; }
.dlv__tariff-body { display: block; }
.dlv__tariff-title { display: block; font-size: 14px; font-weight: 600; color: var(--green); }
.dlv__tariff-text { display: block; font-size: 12px; line-height: 1.6; color: var(--ink3); margin-top: 2px; }

.dlv__badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.dlv__badge {
  display: inline-flex; align-items: center; gap: 6px; border-radius: 999px;
  background: var(--panel2); color: var(--green); font-size: 12px; font-weight: 500;
  padding: 7px 14px;
}
.dlv__badge svg, .dlv__badge img { width: 14px; height: 14px; }

/* ============================================================
   БЛОК 2 — преимущества
   ============================================================ */
.dlv__features { display: grid; gap: 16px; margin-top: 24px; }
@media (min-width: 700px){ .dlv__features { grid-template-columns: repeat(3, 1fr); } }
.dlv__feature { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 24px; }
.dlv__feature-ico {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 999px;
  background: var(--panel2); color: var(--green);
}
.dlv__feature-ico svg, .dlv__feature-ico img { width: 20px; height: 20px; }
.dlv__feature-title {
  font-size: 12px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  color: var(--green); margin: 16px 0 0;
}
.dlv__feature-text { font-size: 14px; line-height: 1.65; color: var(--ink2); margin: 8px 0 0; }

/* ============================================================
   БЛОК 3 — карточки с картинками
   ============================================================ */
.dlv__cards { display: grid; gap: 32px; }
.dlv__card {
  background: #fff; border-radius: 24px; overflow: hidden;
  box-shadow: 0 8px 40px -20px rgba(60,40,30,.13);
  display: flex; flex-direction: column;
}
@media (min-width: 1000px){
  .dlv__card { flex-direction: row; }
  .dlv__card_rev { flex-direction: row-reverse; }
  .dlv__card-img { width: 45%; flex: 0 0 45%; }
}
.dlv__card-img { overflow: hidden; aspect-ratio: 4 / 3; }
@media (min-width: 1000px){ .dlv__card-img { aspect-ratio: auto; } }
.dlv .dlv__card-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 0 !important; display: block; }
.dlv__card-body { display: flex; flex-direction: column; justify-content: center; padding: 26px; }
@media (min-width: 700px){ .dlv__card-body { padding: 44px; } }
.dlv__card-body .dlv__prose { margin-top: 16px; }

/* ============================================================
   БЛОК 4 — частые вопросы
   ============================================================ */
.dlv__faq { display: grid; gap: 8px; margin-top: 22px; }
.dlv__faq-item {
  background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
  transition: box-shadow .2s;
}
.dlv__faq-item:hover { box-shadow: 0 4px 20px -8px rgba(60,40,30,.12); }
.dlv__faq-q {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 24px; cursor: pointer; list-style: none;
  font-size: 14px; font-weight: 500; color: var(--ink);
}
.dlv__faq-q::-webkit-details-marker { display: none; }
.dlv__faq-ico {
  flex: 0 0 auto; display: inline-grid; place-items: center; width: 28px; height: 28px;
  border-radius: 999px; background: var(--panel2); color: var(--green); transition: transform .25s, background .2s;
}
.dlv__faq-ico svg { width: 14px; height: 14px; }
.dlv__faq-item[open] .dlv__faq-ico { transform: rotate(45deg); background: var(--green); color: #fff; }
.dlv__faq-a { border-top: 1px solid var(--line); padding: 18px 24px; }

/* ============================================================
   БЛОК 5 — текстовый блок
   ============================================================ */
.dlv__article {
  background: #fff; border-radius: 24px; padding: 26px;
  box-shadow: 0 8px 32px -16px rgba(60,40,30,.12);
}
@media (min-width: 700px){ .dlv__article { padding: 40px; } }
.dlv__article .dlv__prose { margin-top: 18px; }
.dlv__article-part { margin-top: 22px; }

/* ============================================================
   БЛОК 6 — хиты продаж
   ============================================================ */
.dlv__hits { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 24px; }
@media (min-width: 900px){ .dlv__hits { grid-template-columns: repeat(4, 1fr); } }
.dlv__hits .product-card-v2 { width: 100%; margin: 0; }

/* ============================================================
   БЛОК 7 — связаться с нами
   ============================================================ */
.dlv__contact {
  background: #fff; border-radius: 24px; overflow: hidden;
  box-shadow: 0 8px 40px -20px rgba(60,40,30,.15);
  display: grid; grid-template-columns: 1fr;
}
@media (min-width: 1000px){ .dlv__contact { grid-template-columns: 1fr 1fr; } }
.dlv__contact-info { background: #fdf6f4; padding: 26px; display: flex; flex-direction: column; justify-content: center; }
@media (min-width: 700px){ .dlv__contact-info { padding: 44px; } }
.dlv__contact-text { font-size: 14px; line-height: 1.65; color: var(--ink3); margin: 14px 0 0; }
.dlv .dlv__contact-phone {
  display: inline-block; margin-top: 22px; font-size: 17px; font-weight: 500;
  color: var(--ink) !important; text-decoration: none; width: fit-content;
}
.dlv .dlv__contact-phone:hover { color: var(--green) !important; }
.dlv .dlv__contact-tg {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; width: fit-content;
  font-size: 14px; color: var(--green-l) !important; text-decoration: none;
}
.dlv .dlv__contact-tg:hover { text-decoration: underline; }
.dlv__contact-tg svg { width: 16px; height: 16px; }
.dlv__contact-list { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 8px; }
.dlv__contact-list li { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink3); }
.dlv__contact-list svg, .dlv__contact-list img { width: 14px; height: 14px; color: var(--green); flex: 0 0 auto; }
.dlv__contact-form { padding: 26px; }
@media (min-width: 700px){ .dlv__contact-form { padding: 44px; } }

/* ---- форма обратной связи (custom_forms) в ts-виде ---- */
.dlv__contact-form .custom-form-instance { padding: 0; box-shadow: none; background: transparent; }
/* обычные поля: подпись сверху, поле снизу (у согласия на ПД своя раскладка) */
.dlv__contact-form .form-group:not(.privacy-policy) {
  display: flex; flex-direction: column-reverse;
  margin: 0 0 16px; position: static;
}
.dlv__contact-form .label-name {
  position: static !important; display: block !important; margin: 0 0 8px !important;
  transform: none !important; pointer-events: auto; height: auto !important; opacity: 1 !important;
}
.dlv__contact-form .content-name {
  color: var(--ink3) !important; font-size: 12px !important; font-weight: 500;
  letter-spacing: .04em; text-transform: uppercase; opacity: 1 !important;
  background: none !important; padding: 0 !important;
}
.dlv__contact-form .form-control,
.dlv__contact-form input[type="text"],
.dlv__contact-form input[type="tel"],
.dlv__contact-form input[type="email"],
.dlv__contact-form textarea {
  width: 100%; border: 1px solid var(--line2) !important; border-radius: 12px !important;
  background: #fff !important; padding: 13px 16px !important; font-size: 14px; color: var(--ink) !important;
  font-family: 'Inter', 'Lato', sans-serif; box-shadow: none !important; transition: border-color .2s;
}
.dlv__contact-form textarea { min-height: 96px; resize: vertical; }
.dlv__contact-form .form-control:focus { border-color: var(--green) !important; outline: none; }
.dlv__contact-form .form-control::placeholder { color: var(--ink4) !important; }
.dlv__contact-form .privacy-policy { display: block; margin: 14px 0 0; }
.dlv__contact-form .privacy-policy .checkbox { display: flex; align-items: flex-start; gap: 8px; }
.dlv__contact-form .privacy-policy input { margin-top: 3px; accent-color: var(--green); flex: 0 0 auto; }
.dlv__contact-form .privacy-policy label { font-size: 11px; line-height: 1.5; color: var(--ink4); }
.dlv__contact-form .privacy-policy label a { color: var(--ink3) !important; text-decoration: underline; }
.dlv__contact-form .form-group-inline { margin-top: 20px; }
.dlv__contact-form button,
.dlv__contact-form .btn {
  width: 100%; border-radius: 999px !important; background: var(--green) !important;
  border: 1px solid var(--green) !important; color: #fff !important;
  font-family: 'Inter', 'Lato', sans-serif; font-size: 14px; font-weight: 500;
  padding: 16px 24px !important; cursor: pointer; transition: background .2s;
}
.dlv__contact-form button:hover, .dlv__contact-form .btn:hover { background: var(--green-d) !important; border-color: var(--green-d) !important; }
.dlv__contact-form .error-text { display: block; margin-top: 6px; font-size: 12px; color: var(--sale); }

/* ---- согласие на обработку ПД ----
   тема прячет настоящий input за экран и рисует квадрат через label::before,
   картинку-галочку тянет с прод-домена — поэтому рисуем свою в ts-палитре */
.dlv .dlv__contact-form .privacy-policy { margin: 18px 0 0; padding: 0; display: block; }
.dlv .dlv__contact-form .privacy-policy .checkbox { position: relative; display: block; padding: 0 0 0 28px; }
.dlv .dlv__contact-form .privacy-policy label { display: block; margin: 0; cursor: pointer; }
.dlv .dlv__contact-form .privacy-policy label::before {
  /* left не задаём — координату по горизонтали даёт правило темы (-25px),
     иначе квадрат наезжает на текст согласия */
  content: ''; position: absolute; top: 0; width: 18px; height: 18px;
  background: #fff !important; border: 1px solid var(--line2) !important; border-radius: 5px !important;
  transition: background .15s, border-color .15s;
}
.dlv .dlv__contact-form .privacy-policy label::after {
  content: ''; position: absolute; left: 6px; top: 4px; width: 5px; height: 9px;
  background: none !important; border: solid #fff !important; border-width: 0 2px 2px 0 !important;
  border-radius: 0 !important; transform: rotate(45deg) !important; opacity: 0 !important;
  transition: opacity .15s;
}
.dlv .dlv__contact-form .privacy-policy input:checked + label::before,
.dlv .dlv__contact-form .privacy-policy .checkbox:has(input:checked) label::before {
  background: var(--green) !important; border-color: var(--green) !important;
}
.dlv .dlv__contact-form .privacy-policy input:checked + label::after,
.dlv .dlv__contact-form .privacy-policy .checkbox:has(input:checked) label::after { opacity: 1 !important; }
.dlv .dlv__contact-form .privacy-policy input:focus-visible + label::before {
  outline: 2px solid var(--green); outline-offset: 2px;
}
.dlv .dlv__contact-form .privacy-policy .form-text,
.dlv .dlv__contact-form .form-text {
  display: block; margin: 0 !important; font-size: 11px !important;
  line-height: 1.5 !important; color: var(--ink4) !important;
}
.dlv .dlv__contact-form .form-text a { color: var(--ink3) !important; text-decoration: underline; text-underline-offset: 2px; }

/* ============================================================
   защита от глобальной темы (style.min.css + custom-styles.css).
   Тема раздаёт `font-size`/`color` с !important на p/span/li,
   поэтому весь текстовый уровень страницы фиксируем жёстко.
   ============================================================ */
.dlv img { border-radius: 0; }
.dlv .dlv__h1, .dlv .dlv__h2, .dlv .dlv__h3 { text-transform: none !important; }
.dlv a { transition: color .15s; }
.dlv__section > .dlv__h2 { margin-bottom: 0; }

/* заголовки */
.dlv .dlv__h1 { font-size: 26px !important; }
.dlv .dlv__h3 { font-size: 20px !important; }
@media (min-width: 700px){
  .dlv .dlv__h1 { font-size: 32px !important; }
  .dlv .dlv__h3 { font-size: 24px !important; }
}

/* блок 1 */
.dlv .dlv__hero-sub { font-size: 14px !important; color: var(--ink3) !important; }
.dlv .dlv__tariff-title { font-size: 14px !important; color: var(--green) !important; }
.dlv .dlv__tariff-text { font-size: 12px !important; color: var(--ink3) !important; line-height: 1.6 !important; }
.dlv .dlv__badge { font-size: 12px !important; color: var(--green) !important; }

/* надзаголовки и карточки */
.dlv .dlv__label { font-size: 12px !important; color: var(--green) !important; }
.dlv .dlv__feature-title { font-size: 12px !important; color: var(--green) !important; }
.dlv .dlv__feature-text { font-size: 14px !important; color: var(--ink2) !important; line-height: 1.65 !important; }
.dlv .dlv__section-sub { font-size: 14px !important; color: var(--ink3) !important; line-height: 1.6 !important; }

/* тексты из редактора */
.dlv .dlv__prose, .dlv .dlv__prose p, .dlv .dlv__prose li, .dlv .dlv__prose span {
  font-size: 14px !important; color: var(--ink2) !important; line-height: 1.7 !important;
}

/* блок 7 */
.dlv .dlv__contact-text { font-size: 14px !important; color: var(--ink3) !important; line-height: 1.65 !important; }
.dlv .dlv__contact-phone { font-size: 17px !important; }
.dlv .dlv__contact-tg { font-size: 14px !important; color: var(--green-l) !important; }
.dlv .dlv__contact-list li { font-size: 12px !important; color: var(--ink3) !important; }
.dlv .dlv__contact-form .form-control,
.dlv .dlv__contact-form input,
.dlv .dlv__contact-form textarea,
.dlv .dlv__contact-form button,
.dlv .dlv__contact-form .btn { font-size: 14px !important; }
/* плавающая подпись темы позиционируется абсолютно — нам нужна обычная строка */
.dlv .dlv__contact-form .content-name { position: static !important; display: inline !important; }
.dlv .dlv__contact-form .privacy-policy label { font-size: 11px !important; color: var(--ink4) !important; }
.dlv .dlv__contact-form .error-text { font-size: 12px !important; color: var(--sale) !important; }
