/* ===== НПП Дана — общие стили ===== */
/* Источник: извлечено из inline <style> в index.html и products.html */

/* Стили из index.html */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-dark: #FFFFFF;
  --bg-darker: #F4F6F9;
  --bg-medium: #EAEDF3;
  --accent: #FB5B1E;
  --accent-hover: #FF7040;
  --accent-cyan: #00C7FF;
  --text: #0F1923;
  --text-muted: #6B7A8D;
  --border: rgba(15, 25, 35, 0.1);
}

html {
  scroll-behavior: smooth;
}

/* Sticky .header is 76px tall — let anchored targets butt up against it.
   The section's own padding-top (96px) provides the visual breathing room.
   Applied to the target itself (not scroll-padding on html) so it never stacks
   with another scroll-padding rule and overshoots. */
section[id],
footer[id] {
  scroll-margin-top: 76px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px;
}

.section {
  padding: 96px 0;
}

.section--alt {
  background-color: var(--bg-darker);
}

.label {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 20px;
}

.h2 {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 24px;
}

.lead {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 720px;
  margin-bottom: 56px;
}


.btn {
  display: inline-block;
  padding: 16px 32px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  border-radius: 2px;
  font-family: inherit;
}

.btn--primary {
  background-color: var(--accent);
  color: var(--bg-dark);
}

.btn--primary:hover {
  background-color: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(251, 91, 30, 0.3);
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}


.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 1px 0 var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo__icon {
  height: 40px;
  width: auto;
  flex-shrink: 0;
}

.logo__text {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text);
  line-height: 1;
}

.logo__text em {
  font-style: normal;
  color: var(--accent);
}

.footer .logo__icon {
  height: 36px;
}

.footer__col a.logo {
  display: flex;
  margin-bottom: 16px;
}

.nav {
  display: flex;
  gap: 36px;
  align-items: center;
}

.nav a {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

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

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.burger span {
  width: 26px;
  height: 2px;
  background-color: var(--text);
  transition: 0.3s;
}


.hero {
  position: relative;
  min-height: calc(100vh - 76px);
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background-image: url('/img/hero.jpg');
  background-size: cover;
  background-position: center 40%;
  z-index: 0;
}

.hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.9) 0%,
    rgba(255, 255, 255, 0.86) 50%,
    rgba(255, 255, 255, 0.55) 100%
  );
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 880px;
  padding: 80px 0;
}

.hero h1 {
  font-size: clamp(36px, 6vw, 68px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin-bottom: 28px;
}

.hero h1 .accent {
  color: var(--accent);
}

.hero__sub {
  font-size: clamp(16px, 1.6vw, 20px);
  color: var(--text-muted);
  max-width: 640px;
  margin-bottom: 44px;
}

.hero__meta {
  margin-top: 56px;
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero__meta span::before {
  content: "—";
  color: var(--accent);
  margin-right: 10px;
}


.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.stat-card {
  padding: 36px 28px;
  background-color: var(--bg-medium);
  border: 1px solid var(--border);
  border-radius: 4px;
  transition: all 0.3s ease;
  min-width: 0;
}

.stat-card:hover {
  border-color: var(--accent-cyan);
  transform: translateY(-4px);
}

.stat-card__num {
  font-size: 44px;
  font-weight: 800;
  color: var(--accent-cyan);
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 12px;
}

.stat-card__label {
  font-size: 14px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}


.about__grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 80px;
  align-items: start;
}

.about__text p {
  margin-bottom: 20px;
  color: var(--text);
  font-size: 17px;
  line-height: 1.7;
}

.about__text p:last-child {
  color: var(--text-muted);
}


.products-gallery {
  position: relative;
  padding: 0 56px;
}
@media (max-width: 900px) {
  .products-gallery { padding: 0; }
}
.products {
  display: flex;
  gap: 28px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-behavior: smooth;
  scroll-padding-left: 60px;
  padding: 36px 60px 84px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  /* Плавный fade по краям — тени крайних карточек смягчаются у границ
     и одновременно скрывается возможный 1-2px край соседней карточки */
  -webkit-mask-image: linear-gradient(to right,
    transparent 0,
    #000 28px,
    #000 calc(100% - 28px),
    transparent 100%);
          mask-image: linear-gradient(to right,
    transparent 0,
    #000 28px,
    #000 calc(100% - 28px),
    transparent 100%);
}
@media (max-width: 900px) {
  .products {
    padding: 24px 16px 64px;
    scroll-padding-left: 16px;
  }
}
.products::-webkit-scrollbar { display: none; }
.products .product-card {
  scroll-snap-align: start;
  /* 100% = content area (clientWidth - 2*padding-x). Чтобы card4 не вылезала из viewport:
     padding-left + 3*card + 3*gap = clientWidth ⇒ card = (100% - 24px) / 3
     (с учётом padding-x=60, gap=28, clientWidth = 100% + 120). */
  flex: 0 0 calc((100% - 24px) / 3);
  min-width: 0;
}
@media (max-width: 900px) {
  /* padding-x=16, gap=28: padding-left + 2*card + 2*gap = clientWidth ⇒ card = (100% - 40px)/2 */
  .products .product-card { flex-basis: calc((100% - 40px) / 2); }
}
@media (max-width: 600px) {
  .products .product-card { flex-basis: 85%; }
}

.products-gallery__nav {
  position: absolute;
  top: 32%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-medium);
  color: var(--text);
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}
.products-gallery__nav svg {
  width: 18px;
  height: 18px;
  display: block;
}
.products-gallery__nav:hover {
  background: var(--bg-light, var(--bg-medium));
  border-color: var(--accent);
  color: var(--accent);
}
.products-gallery__nav:disabled {
  opacity: 0.3;
  cursor: default;
}
.products-gallery__nav--prev { left: 8px; }
.products-gallery__nav--next { right: 8px; }
@media (max-width: 900px) {
  .products-gallery__nav { display: none; }
}

.products-gallery__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: -36px;
}
.products-gallery__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  background: var(--border);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}
.products-gallery__dot.is-active {
  background: var(--accent);
  transform: scale(1.3);
}

.product-card {
  background-color: var(--bg-medium);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  min-width: 0;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.product-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4);
}

.product-card__img {
  aspect-ratio: 4 / 3;
  width: 100%;
  object-fit: cover;
  display: block;
  border-bottom: 1px solid var(--border);
}

.product-card__body {
  padding: 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-card h3 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.product-card p {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 24px;
  flex: 1;
}

.product-card__link {
  align-self: flex-start;
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.product-card:hover .product-card__link {
  border-bottom-color: var(--accent);
}


.clients {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}


.client-logo {
  aspect-ratio: 16 / 7;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  min-width: 0;
  word-break: break-word;
  overflow: hidden;
}

.client-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}


.nss-map-wrap {
  position: relative;
  width: 100%;
  min-height: 600px;
  margin-top: 56px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background-color: var(--bg-medium);
  overflow: hidden;
}

.nss-map-wrap iframe,
.nss-map-wrap > div {
  width: 100% !important;
  height: 600px !important;
  border: 0;
  display: block;
}

.nss-map-overlay {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
}

.nss-map-overlay__hint {
  background: rgba(255, 255, 255, 0.93);
  padding: 12px 24px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  letter-spacing: 0.02em;
}

.nss-map-note {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 14px;
  text-align: right;
}

@media (max-width: 720px) {
  .nss-map-wrap {
    min-height: 420px;
    margin-top: 36px;
  }
  .nss-map-wrap iframe,
  .nss-map-wrap > div {
    height: 420px !important;
  }
}


.production__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.production__text p {
  color: var(--text-muted);
  font-size: 16px;
  margin-bottom: 18px;
}

.production__features {
  list-style: none;
  margin-top: 28px;
}

.production__features li {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.production__features li::before {
  content: "";
  width: 6px;
  height: 6px;
  background-color: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
}

.production__photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 180px 180px;
  gap: 12px;
}

.production__photo {
  width: 100%;
  object-fit: cover;
  display: block;
  border-radius: 2px;
}

.production__photo--tall {
  grid-row: span 2;
  height: 372px;
}

.production__photo:not(.production__photo--tall) {
  height: 180px;
}


#form.section {
  padding: 48px 0;
}

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

.form-wrap .h2 {
  margin-bottom: 12px;
}

.form-wrap .lead {
  margin-bottom: 24px !important;
}

.form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form__field {
  display: flex;
  flex-direction: column;
}

.form__field--full {
  grid-column: span 2;
}

.form label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.form input,
.form textarea {
  background-color: var(--bg-medium);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 16px 18px;
  font-size: 15px;
  font-family: inherit;
  border-radius: 2px;
  transition: border-color 0.2s ease;
  outline: none;
  width: 100%;
}

.form input:focus,
.form textarea:focus {
  border-color: var(--accent);
}

.form textarea {
  min-height: 90px;
  resize: vertical;
}

.form__submit {
  grid-column: span 2;
  justify-self: start;
  margin-top: 8px;
  position: relative;
}

.form__submit.is-loading {
  color: transparent !important;
  pointer-events: none;
  opacity: 0.85;
}

.form__submit.is-loading::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: formSpin 0.7s linear infinite;
}

@keyframes formSpin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.form__note {
  grid-column: span 2;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}


.form input.is-invalid,
.form textarea.is-invalid {
  border-color: #E53935;
  background-color: rgba(229, 57, 53, 0.04);
}

.form__field-error {
  font-size: 12px;
  color: #E53935;
  margin-top: 6px;
}


.form__send-error {
  display: none;
  grid-column: span 2;
  padding: 14px 18px;
  background: rgba(251, 91, 30, 0.06);
  border: 1px solid rgba(251, 91, 30, 0.3);
  border-radius: 4px;
  font-size: 14px;
  color: var(--accent);
  line-height: 1.6;
}

.form__send-error.is-visible {
  display: block;
}


.form__success {
  display: none;
  text-align: center;
  padding: 56px 32px;
  border: 1px solid rgba(0, 199, 255, 0.25);
  border-radius: 4px;
  background: rgba(0, 199, 255, 0.04);
}

.form__success.is-visible {
  display: block;
}

.form__success__icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}

.form__success h3 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.form__success p {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.6;
}


.footer {
  background-color: var(--bg-darker);
  border-top: 1px solid var(--border);
  padding: 64px 0 32px;
}

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

.footer__col h4 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.footer__col p,
.footer__col a {
  font-size: 14px;
  color: var(--text);
  margin-bottom: 10px;
  display: block;
  transition: color 0.2s ease;
}

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

.footer__about {
  color: var(--text-muted) !important;
  font-size: 14px;
  line-height: 1.6;
  margin-top: 16px;
}

.footer__bottom {
  padding-top: 32px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted);
}


@media (max-width: 1024px) {
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .about__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .production__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .products {
    grid-template-columns: repeat(2, 1fr);
  }

  .clients {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 860px) {
  .container {
    padding: 0 24px;
  }

  .products {
    grid-template-columns: 1fr;
  }

  .footer__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .container {
    padding: 0 20px;
  }

  .section {
    padding: 64px 0;
  }

  .nav {
    display: none;
    position: fixed;
    top: 76px;
    left: 0;
    right: 0;
    z-index: 999;
    background-color: rgba(255, 255, 255, 0.98);
    flex-direction: column;
    padding: 24px 20px;
    border-bottom: 1px solid var(--border);
    gap: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  }

  .nav.is-open {
    display: flex;
  }

  .nav a {
    font-size: 16px;
    color: var(--text);
    padding: 4px 0;
  }

  .burger {
    display: flex;
  }

  .stats {
    grid-template-columns: 1fr;
  }

  .products {
    grid-template-columns: 1fr;
  }

  .clients {
    grid-template-columns: 1fr;
  }

  .form {
    grid-template-columns: 1fr;
  }

  .form__field--full,
  .form__submit,
  .form__note {
    grid-column: span 1;
  }

  .footer__grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .hero__meta {
    flex-direction: column;
    gap: 14px;
  }

  .production__photos {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .production__photo--tall {
    grid-row: auto;
    height: 220px;
    min-height: unset;
  }
}

/* Стили из products.html — каталог, таблицы плотов */

.page-banner {
  padding: 64px 0 48px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-darker);
}
.page-banner .label { color: var(--text-muted); }
.page-banner h1 {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 16px;
}
.page-banner p { font-size: 17px; color: var(--text-muted); max-width: 600px; }


.catalog-nav {
  position: sticky;
  top: 76px;
  z-index: 90;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.catalog-nav__inner {
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.catalog-nav__inner::-webkit-scrollbar { display: none; }
.catalog-tab {
  padding: 18px 24px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  cursor: pointer;
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  white-space: nowrap;
  font-family: inherit;
}
.catalog-tab:hover { color: var(--text); }
.catalog-tab.is-active { color: var(--accent); border-bottom-color: var(--accent); }


.catalog-section { padding: 72px 0; border-bottom: 1px solid var(--border); }
.catalog-section:last-of-type { border-bottom: none; }
.catalog-section.is-hidden { display: none; }

.section-header { margin-bottom: 40px; }
.section-header .cert-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}


.subsection { margin-bottom: 48px; }
.subsection:last-child { margin-bottom: 0; }
.subsection__title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  letter-spacing: -0.01em;
}
.subsection__desc {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
  max-width: 680px;
  line-height: 1.65;
}


.table-wrap { overflow-x: auto; border-radius: 4px; border: 1px solid var(--border); }

.catalog-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.catalog-table thead th {
  background: var(--text);
  color: rgba(255,255,255,0.75);
  padding: 12px 16px;
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  white-space: nowrap;
}
.catalog-table thead th:first-child { border-radius: 4px 0 0 0; }
.catalog-table thead th:last-child { border-radius: 0 4px 0 0; }
.catalog-table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.catalog-table tbody tr:last-child td { border-bottom: none; }
.catalog-table tbody tr:hover td { background: var(--bg-medium); }

#river .catalog-table th,
#river .catalog-table td {
  text-align: center;
}
#river .catalog-table .rrr-classes {
  display: inline-flex;
}

.model-name {
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.02em;
  color: var(--text);
}
.capacity {
  font-size: 22px;
  font-weight: 800;
  color: var(--accent-cyan);
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.capacity span { font-size: 12px; font-weight: 500; color: var(--text-muted); margin-left: 2px; }


.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 2px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin: 2px 2px 2px 0;
  white-space: nowrap;
}
.badge--a     { background: rgba(0,199,255,0.14); color: #0088bb; }
.badge--b     { background: rgba(0,199,255,0.07); color: #0099cc; border: 1px solid rgba(0,199,255,0.25); }
.badge--rrsk  { background: rgba(251,91,30,0.1); color: var(--accent); }
.badge--rrr   { background: rgba(15,25,35,0.06); color: var(--text-muted); }
.badge--polar { background: rgba(90,110,200,0.1); color: #5a6ec8; }


.rrr-classes { display: flex; flex-wrap: wrap; gap: 4px; }


.cta-strip {
  margin-top: 40px;
  padding: 32px 36px;
  background: var(--bg-darker);
  border-radius: 4px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.cta-strip p { font-size: 15px; color: var(--text-muted); }
.cta-strip strong { color: var(--text); }


.page-cta {
  padding: 96px 0;
  background: var(--bg-darker);
  text-align: center;
}
.page-cta h2 { font-size: clamp(24px, 3vw, 36px); font-weight: 700; margin-bottom: 16px; letter-spacing: -0.02em; }
.page-cta p { color: var(--text-muted); font-size: 17px; margin-bottom: 36px; }


@media (max-width: 1024px) {
  .cta-strip { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 720px) {
  .catalog-section { padding: 48px 0; }
  .catalog-tab { padding: 14px 16px; font-size: 12px; }
}

/* products.html stacks a sticky .catalog-nav (~54px) under the header. */
html:has(.catalog-nav) section[id],
html:has(.catalog-nav) footer[id] {
  scroll-margin-top: 130px;
}

/* ===== Страница сертификатов ===== */
.cert-group__title {
  font-size: 18px;
  font-weight: 600;
  margin: 48px 0 0;
  color: var(--text);
}
.cert-group__title:first-of-type { margin-top: 0; }

.cert-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 20px;
}
@media (max-width: 900px) {
  .cert-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .cert-grid { grid-template-columns: 1fr; }
}
.cert-card {
  aspect-ratio: 1 / 1.41;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #f8f8f6;
  display: block;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
a.cert-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -16px rgba(0, 0, 0, .45);
}
.cert-card__preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  background: #fff;
  display: block;
}
.cert-card__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 14px 14px 12px;
  background: linear-gradient(to top,
    rgba(0, 0, 0, .85) 0%,
    rgba(0, 0, 0, .65) 60%,
    rgba(0, 0, 0, 0) 100%);
  color: #fff;
  text-align: left;
}
.cert-card__title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  margin: 0;
  color: #fff;
}
.cert-card__meta {
  display: block;
  font-size: 11.5px;
  line-height: 1.4;
  margin-top: 4px;
  color: rgba(255, 255, 255, .78);
}


/* ===== Страницы плотов ===== */

/* Ограничиваем ширину контейнера, чтобы страница не растягивалась на больших мониторах */
.product-page .container,
.product-page-banner .container {
  max-width: 960px;
}

.breadcrumbs {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.5;
}
@media (max-width: 560px) {
  .breadcrumbs { font-size: 14px; }
}
.breadcrumbs a {
  color: var(--text-muted);
  text-decoration: none;
}
.breadcrumbs a:hover {
  color: var(--accent);
}
.breadcrumbs span {
  color: var(--text);
}

/* Лид-абзац под H1 (полное название) — мягче, чем дефолтный <p> */
.product-page-banner h1 + p,
.product-banner-lead {
  color: var(--text-muted);
  font-size: 16px;
  max-width: 720px;
  margin: 0;
  line-height: 1.55;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.product-detail {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 48px;
  align-items: start;
}
@media (max-width: 760px) {
  .product-detail { grid-template-columns: 1fr; gap: 28px; }
}

.product-photo {
  aspect-ratio: 4 / 3;
  background: var(--bg-darker);
  border-radius: 6px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: sticky;
  top: 96px;
}
@media (max-width: 760px) {
  .product-photo { position: static; }
}
.product-photo__placeholder {
  color: var(--text-muted);
  text-align: center;
  opacity: 0.35;
}
.product-photo__placeholder svg {
  width: 56px;
  height: 56px;
}
.product-photo__placeholder p {
  margin: 10px 0 0;
  font-size: 13px;
}
.product-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Multi-photo gallery: main image keeps the sticky behaviour from .product-photo,
   thumbnails sit below the card and stay in flow (so they scroll with the page). */
.product-photo-gallery {
  position: sticky;
  top: 96px;
}
@media (max-width: 760px) {
  .product-photo-gallery { position: static; }
}
.product-photo-gallery .product-photo {
  position: static;
}
.product-photo__thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(64px, 1fr));
  gap: 6px;
  margin-top: 8px;
}
.product-photo__thumb {
  aspect-ratio: 1 / 1;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  overflow: hidden;
  transition: border-color .15s ease, transform .15s ease;
}
.product-photo__thumb:hover { transform: translateY(-1px); }
.product-photo__thumb.is-active {
  border-color: var(--accent);
  border-width: 2px;
}
.product-photo__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-specs h2 {
  margin: 0 0 18px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.5;
}
.spec-table thead th {
  font-weight: 600;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  background: var(--bg-darker);
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.spec-table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.spec-table tbody tr:nth-child(odd) td {
  background: rgba(244, 246, 249, 0.4);
}
.spec-table tbody tr:last-child td {
  border-bottom: none;
}
.spec-table tbody td:first-child {
  width: 44%;
  color: var(--text-muted);
  padding-right: 8px;
}
.spec-table tbody td:last-child {
  color: var(--text);
  font-weight: 500;
}
.spec-table sup { font-size: 0.8em; }

.product-notes {
  margin-top: 48px;
  padding: 28px 32px;
  background: var(--bg-darker);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
}
.product-notes h2 {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.product-notes p {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
}
.product-notes p:last-child {
  margin-bottom: 0;
}


/* ===== Кликабельные строки каталога ===== */
.catalog-table tbody tr[data-href] {
  cursor: pointer;
  position: relative;
}
.catalog-table tbody tr[data-href]:hover td {
  background: var(--bg-medium);
}
.catalog-table tbody tr[data-href] td:first-child a.model-link {
  color: var(--text);
  text-decoration: none;
}
.catalog-table tbody tr[data-href]:hover td:first-child a.model-link {
  color: var(--accent);
}
.catalog-table tbody tr[data-href]::after {
  content: '';
  position: absolute;
  right: 16px;
  top: 50%;
  width: 12px;
  height: 12px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'><polyline points='9 18 15 12 9 6'/></svg>") no-repeat center;
  transform: translateY(-50%);
  opacity: 0;
  transition: opacity 0.2s, right 0.2s;
  pointer-events: none;
}
.catalog-table tbody tr[data-href]:hover::after {
  opacity: 1;
  right: 12px;
}

.catalog-table tbody tr.is-disabled td {
  opacity: 0.5;
  cursor: default;
}
.catalog-table tbody tr.is-disabled td:first-child::after {
  content: ' (скоро)';
  font-size: 11px;
  color: var(--text-muted);
  margin-left: 6px;
}

/* Lightbox для увеличения фотографий продуктов */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 40px;
  cursor: zoom-out;
}
.lightbox.is-open { display: flex; }
.lightbox__img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 12px 60px rgba(0, 0, 0, 0.6);
  border-radius: 4px;
  cursor: default;
}
.lightbox__close {
  position: absolute;
  top: 16px;
  right: 20px;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}
.lightbox__close svg {
  width: 20px;
  height: 20px;
  display: block;
}
.lightbox__close:hover { background: rgba(255, 255, 255, 0.22); }
@media (max-width: 640px) {
  .lightbox { padding: 16px; }
  .lightbox__close { top: 8px; right: 8px; width: 40px; height: 40px; }
  .lightbox__close svg { width: 18px; height: 18px; }
}
