/* Стандарт Рольставни39: отступ фотографий в карточках и фотоблоках — 12px на всех экранах. */
/* Новая дверная страница. Общие и оконные CSS не изменяются. */
body:has(#rd-shell) #sidebar { display: none; }
body:has(#rd-shell) #main-content { width: 100%; min-width: 0; }

#rd-shell {
  max-width: 921px;
  margin: 0 auto;
  --rd-blue: #096bd4;
  --rd-blue-dark: #075bb9;
  --rd-ink: #102545;
  --rd-text: #33455f;
  --rd-muted: #53647b;
  --rd-line: #dbe5f1;
  --rd-soft: #f5f9fe;
  --rd-shadow: 0 10px 30px rgba(18, 49, 86, .09);
  color: var(--rd-text);
  line-height: 1.6;
}
#rd-shell *, #rd-shell *::before, #rd-shell *::after { box-sizing: border-box; }
#rd-shell p { margin: 0 0 14px; color: var(--rd-text); line-height: 1.6; }
#rd-shell h2, #rd-shell h3 { color: var(--rd-ink); line-height: 1.25; }
#rd-shell .rd-page > section { margin-top: 64px; scroll-margin-top: 110px; }
#rd-shell .rd-page > section > h2 { position: relative; margin: 0 0 28px; padding: 0 0 14px; border: 0; font-size: clamp(25px, 3vw, 34px); }
#rd-shell .rd-page > section > h2::after { position: absolute; left: 0; bottom: 0; width: 58px; height: 3px; border-radius: 4px; background: var(--rd-blue); content: ""; }
#rd-shell h3 { margin: 0 0 12px; font-size: 20px; }
#rd-shell a:not(.rd-btn) { color: var(--rd-blue); text-decoration: underline; text-underline-offset: 3px; }
#rd-shell :focus-visible { outline: 3px solid #075bb9; outline-offset: 4px; }
#rd-shell .rd-hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 0; margin-bottom: 28px; overflow: hidden; border: 1px solid var(--rd-line); border-radius: 16px; background: #fff; box-shadow: var(--rd-shadow); }
#rd-shell .rd-hero__figure { display: flex; flex-direction: column; justify-content: center; min-width: 0; margin: 0; background: #f5f7fa; }
#rd-shell .rd-hero__figure > img { position: static; display: block; width: 100%; height: auto; max-height: none; object-fit: contain; }
#rd-shell .rd-hero__figure > figcaption { padding: 12px 16px; color: var(--rd-muted); font-size: 13px; line-height: 1.45; }
#rd-shell .rd-hero__form { min-width: 0; min-height: 0; padding: 26px; background: var(--rd-soft); }
#rd-shell #rd-calc { scroll-margin-top: 120px; }
#rd-shell .rd-form-title { margin: 0 0 18px; padding: 0; border: 0; font-size: 25px; }
#rd-shell .feedback-garant__label { color: #33455f; line-height: 1.5; }
#rd-shell .feedback-garant__label a { color: #075bb9; text-decoration: underline; text-underline-offset: 2px; }
#rd-shell .form-service-top__input { max-width: 100%; }
#rd-shell .rd-lead { max-width: 100%; font-size: 19px; }
#rd-shell .rd-lead > p { color: #43546c; }
#rd-shell .rd-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 0; }
#rd-shell .rd-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; max-width: 100%; padding: 12px 22px; border: 1px solid var(--rd-blue); border-radius: 9px; background: var(--rd-blue); color: #fff; font-size: 16px; font-weight: 700; line-height: 1.4; text-align: center; text-decoration: none; }
#rd-shell .rd-btn:hover { border-color: var(--rd-blue-dark); background: var(--rd-blue-dark); }
#rd-shell .rd-btn--secondary { background: #fff; color: var(--rd-blue); }
#rd-shell .rd-btn--secondary:hover { background: #eef6ff; color: var(--rd-blue-dark); }
#rd-shell .rd-grid { display: grid; gap: 22px; margin: 22px 0; }
#rd-shell .rd-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#rd-shell .rd-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#rd-shell .rd-card { min-width: 0; overflow: hidden; border: 1px solid #e2e8f0; border-radius: 16px; background: #fff; box-shadow: var(--rd-shadow); }
#rd-shell .rd-card--text, #rd-shell .rd-card__body { padding: 22px; }
#rd-shell .rd-card p:last-child, #rd-shell .rd-note p:last-child { margin-bottom: 0; }
#rd-shell .rd-product { display: flex; flex-direction: column; }
#rd-shell .rd-product__media { display: flex; align-items: center; justify-content: center; min-width: 0; margin: 12px 12px 0; padding: 14px; border-radius: 11px; background: #f5f7fa; }
#rd-shell .rd-product__media img { display: block; width: 100%; height: auto; object-fit: contain; }
#rd-shell .rd-boxes .rd-product__media { position: relative; display: block; overflow: hidden; aspect-ratio: 4 / 3; padding: 0; background: #f5f8fc; }
#rd-shell .rd-boxes .rd-product__media img { width: 100%; max-width: none; height: 100%; object-fit: cover; object-position: center; }
#rd-shell .rd-tag { display: inline-flex; align-items: center; min-height: 30px; margin: 0 0 12px; padding: 5px 12px; border-radius: 999px; background: #eaf4ff; color: #075bb9; font-size: 14px; font-weight: 700; line-height: 1.3; }
#rd-shell .rd-tag--muted { background: #f1f3f6; color: #4b5768; }
#rd-shell .rd-note { margin-top: 22px; padding: 22px; border: 1px solid #d5e5f8; border-radius: 13px; background: #f7fbff; }
#rd-shell .rd-note--accent { border-left: 4px solid var(--rd-blue); }
#rd-shell .rd-smart { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 44%); align-items: start; gap: 24px; }
#rd-shell .rd-smart__body { min-width: 0; padding: 6px; }
#rd-shell .rd-smart__media { display: block; width: 100%; min-width: 0; margin: 0; overflow: hidden; border-radius: 11px; background: #fff; }
#rd-shell .rd-smart__media img { display: block; width: 100%; max-width: 100%; height: auto; margin: 0; }
@media (max-width: 767px) {
  #rd-shell .rd-smart { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  #rd-shell .rd-smart__body { padding: 4px; }
  #rd-shell .rd-smart__media { max-width: none; justify-self: stretch; }
}
#rd-shell .rd-emergency { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 34%); align-items: start; gap: 24px; }
#rd-shell .rd-emergency__body { min-width: 0; padding: 6px; }
#rd-shell .rd-emergency__media { display: block; width: 100%; min-width: 0; margin: 0; overflow: hidden; border-radius: 11px; background: #fff; }
#rd-shell .rd-emergency__media img { display: block; width: 100%; max-width: 100%; height: auto; margin: 0; }
@media (max-width: 767px) {
  #rd-shell .rd-emergency { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  #rd-shell .rd-emergency__body { padding: 4px; }
  #rd-shell .rd-emergency__media { max-width: none; justify-self: stretch; }
}
#rd-shell .rd-controls { align-items: stretch; }
#rd-shell .rd-control__media { display: block; width: auto; height: auto; aspect-ratio: 2 / 1; margin: 12px 12px 0; padding: 0; overflow: hidden; border-radius: 11px; background: #fff; }
#rd-shell .rd-control__media img { display: block; width: 100%; max-width: 100%; height: auto; max-height: none; margin: 0; object-fit: contain; }
#rd-shell .rd-note.rd-smart, #rd-shell .rd-note.rd-emergency { padding: 12px; }
#rd-shell .rd-use > .rd-card > picture { margin: 12px 12px 0; overflow: hidden; border-radius: 11px; }
#rd-shell #rd-size .rd-card > picture { margin: 12px; overflow: hidden; border-radius: 11px; }
/* Варианты монтажа: утверждённые изображения, отступ 12px, без кадрирования. */
#rd-shell .rd-mounting__media { display: block; width: auto; margin: 12px 12px 0; overflow: hidden; border-radius: 11px; background: #f5f7fa; }
#rd-shell .rd-mounting__media img { display: block; width: 100%; max-width: 100%; height: auto; margin: 0; }
#rd-shell ul.rd-checks { display: grid; gap: 10px; margin: 18px 0; padding: 0; color: var(--rd-text); list-style: none; }
#rd-shell ul.rd-checks > li { position: relative; display: block; margin: 0; padding: 0 0 0 29px; line-height: 1.6; list-style: none; }
#rd-shell ul.rd-checks > li::marker { content: ""; }
#rd-shell ul.rd-checks > li::before { position: absolute; top: .15em; left: 0; width: 20px; height: 20px; border: 1px solid #6babea; border-radius: 50%; color: #075bb9; content: "✓"; font-size: 13px; font-weight: 700; line-height: 18px; text-align: center; }
#rd-shell .rd-palette { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
#rd-shell .rd-palette--stock { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#rd-shell .rd-swatch { min-width: 0; margin: 0; overflow: hidden; border: 1px solid var(--rd-line); border-radius: 12px; background: #fff; }
#rd-shell .rd-swatch img { display: block; width: 100%; height: auto; }
#rd-shell .rd-swatch figcaption { padding: 11px 12px; color: var(--rd-ink); font-size: 15px; font-weight: 600; line-height: 1.35; overflow-wrap: break-word; }
#rd-shell .rd-palette-more { margin: 22px 0 14px; padding: 18px; border: 1px solid var(--rd-line); border-radius: 13px; background: var(--rd-soft); }
#rd-shell summary { cursor: pointer; color: var(--rd-ink); font-weight: 600; line-height: 1.45; }
#rd-shell summary::marker { color: var(--rd-blue); }
#rd-shell .rd-palette-more .rd-palette { margin-bottom: 0; }
#rd-shell .rd-caption { color: var(--rd-muted); font-size: 14px; }
#rd-shell .rd-subtitle { margin-top: 30px; }
#rd-shell ol.rd-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin: 22px 0; padding: 0; color: var(--rd-text); counter-reset: rd-step; list-style: none; }
#rd-shell ol.rd-steps > li { min-width: 0; margin: 0; padding: 20px; border: 1px solid var(--rd-line); border-radius: 14px; background: var(--rd-soft); counter-increment: rd-step; line-height: 1.55; list-style: none; }
#rd-shell ol.rd-steps > li::before { display: block; width: 34px; height: 34px; margin-bottom: 12px; border-radius: 50%; background: var(--rd-blue); color: #fff; content: counter(rd-step); font-weight: 700; line-height: 34px; text-align: center; }
#rd-shell .rd-faq-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 22px; align-items: start; }
#rd-shell .rd-faq { min-width: 0; padding: 20px; border: 1px solid var(--rd-line); border-radius: 13px; background: #fff; }
#rd-shell .rd-faq__answer { margin-top: 14px; }
#rd-shell .rd-faq__answer p:last-child { margin-bottom: 0; }

@media (max-width: 991px) {
  #rd-shell .rd-hero { grid-template-columns: minmax(0, 1fr); }
  #rd-shell .rd-hero__figure > img { max-width: 720px; margin: 0 auto; }
  #rd-shell .rd-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #rd-shell .rd-palette { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #rd-shell ol.rd-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  #rd-shell .rd-page > section { margin-top: 42px; }
  #rd-shell .rd-page > section > h2 { margin-bottom: 22px; font-size: 26px; }
  #rd-shell .rd-grid--2, #rd-shell .rd-grid--3, #rd-shell .rd-faq-grid, #rd-shell ol.rd-steps { grid-template-columns: minmax(0, 1fr); }
  #rd-shell .rd-use { grid-template-columns: minmax(0, 1fr); }
  #rd-shell .rd-hero__form, #rd-shell .rd-card--text, #rd-shell .rd-card__body, #rd-shell .rd-note { padding: 20px; }
  #rd-shell .rd-lead { font-size: 17px; }
  #rd-shell .rd-btn { flex: 1 1 210px; padding: 12px 18px; }
  #rd-shell .rd-palette, #rd-shell .rd-palette--stock { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  #rd-shell .rd-palette-more { padding: 14px; }
  #rd-shell .rd-product__media img { max-width: 460px; }
  #rd-shell .rd-form-title { font-size: 24px; }
  #rd-shell .rd-faq { padding: 18px; }
}

/* Стоимость: фотография слева, существующий список справа; отступ 12px. */
#rd-shell .rd-price-factors {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  align-items: center;
  gap: 12px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--rd-shadow);
}
#rd-shell .rd-price-factors__media {
  display: block;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border-radius: 11px;
}
#rd-shell .rd-price-factors__media img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0;
}
#rd-shell .rd-price-factors__body { min-width: 0; }
#rd-shell .rd-price-factors__body > p { margin: 0 0 12px; }
#rd-shell .rd-price-factors__body > ul.rd-checks { margin: 0; }
@media (max-width: 767px) {
  #rd-shell .rd-price-factors {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }
}


/* Six ordering stages: approved window-page layout, door-specific photographs. */
#rd-shell #rd-order .rd-order-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  counter-reset: rd-order-step;
}
#rd-shell #rd-order .rd-order-card {
  position: relative;
  min-width: 0;
  min-height: 316px;
  padding: 20px;
  border: 1px solid #e2e8f0;
  border-radius: 15px;
  background: #fff;
  box-shadow: var(--rd-shadow);
  counter-increment: rd-order-step;
  text-align: center;
}
#rd-shell #rd-order .rd-order-card::before {
  position: absolute;
  top: 15px;
  left: 16px;
  color: var(--rd-blue);
  content: counter(rd-order-step) ".";
  font-size: 22px;
  font-weight: 800;
}
#rd-shell #rd-order .rd-order-card__media {
  display: block;
  width: 145px;
  height: 145px;
  margin: 8px auto 10px;
  overflow: hidden;
  border-radius: 50%;
  background: #f3f8ff;
}
#rd-shell #rd-order .rd-order-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
}
#rd-shell #rd-order .rd-order-card h3 {
  margin: 0 0 10px;
  font-size: 20px;
  line-height: 1.2;
}
#rd-shell #rd-order .rd-order-card p {
  margin: 0;
  font-size: 15px;
}
#rd-shell #rd-order .rd-order-grid + p {
  margin-top: 22px;
}
@media (max-width: 991px) {
  #rd-shell #rd-order .rd-order-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 767px) {
  #rd-shell #rd-order .rd-order-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  #rd-shell #rd-order .rd-order-card {
    min-height: 0;
  }
}


/* Final calculation block, copied from the window page. */
#rd-shell .rd-final { padding: 28px; border-radius: 18px; background: linear-gradient(135deg, #f4f9ff 0%, #fff 70%); border: 1px solid #cfe3fb; }
#rd-shell .rd-final h2 { margin-top: 0; }
@media (max-width: 767px) {
  #rd-shell .rd-final .rd-actions .rd-btn {
    width: 100%;
    flex-basis: 100%;
  }
}

/* Roller grilles: unchanged original images and 12px inner spacing. */
#rd-shell #rd-grilles { padding: 12px; }
#rd-shell #rd-grilles .rd-grilles__image {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0;
  border-radius: 11px;
}
#rd-shell #rd-grilles > h2 { margin-top: 12px; margin-bottom: 12px; }
#rd-shell #rd-grilles > h3 { margin-top: 12px; }
#rd-shell #rd-grilles > p { margin-bottom: 12px; }
#rd-shell #rd-grilles > ul.rd-checks { margin: 12px 0; }
#rd-shell #rd-grilles > p:last-child { margin-bottom: 0; }
