/* СТРАТ — Codex concept: modern precision-industrial catalog */
html[data-theme="codex"] {
  color-scheme: light;
  --bg: #f3f6f2;
  --surface: #ffffff;
  --ink: #101713;
  --muted: #647069;
  --line: #dce4de;
  --brand: #0d1712;
  --accent: #168354;
  --accent-strong: #0f6841;
  --topbar-bg: #0d1712;
  --topbar-ink: #9fb0a7;
  --topbar-link: #f5faf7;
  --header-bg: rgba(249, 251, 249, 0.94);
  --nav-ink: #26322b;
  --hero-fallback: #0d1712;
  --hero-overlay: linear-gradient(90deg, rgba(8, 17, 12, 0.98) 0%, rgba(8, 17, 12, 0.91) 37%, rgba(8, 17, 12, 0.42) 69%, rgba(8, 17, 12, 0.1) 100%);
  --btn-solid-bg: #168354;
  --btn-solid-hover: #0f6841;
  --btn-solid-ink: #ffffff;
  --btn-ghost-ink: #17211b;
  --btn-ghost-border: #c7d2cb;
  --btn-ghost-hover: #edf4ef;
  --btn-dark-bg: #111b15;
  --btn-dark-ink: #ffffff;
  --sidebar-bg: transparent;
  --sidebar-active: #e7f1eb;
  --card-shadow: 0 18px 50px rgba(19, 40, 28, 0.07);
  --img-bg: #eef3ef;
  --panel-bg: #132019;
  --panel-border: #132019;
  --price: #ffffff;
  --stock: #7fe0ac;
  --spec-bg: #ffffff;
  --spec-head: #142019;
  --spec-head-ink: #ffffff;
  --spec-alt: #f4f7f5;
  --cta-bg: #132019;
  --cta-border: #132019;
  --cta-ink: #eff8f2;
  --footer-bg: #0d1712;
  --footer-ink: #aebdb5;
  --footer-link: #dceae1;
  --footer-label: #ffffff;
  --max: 1320px;
  --sidebar: 232px;
  --radius: 14px;
  --font-display: "Manrope", sans-serif;
  --font-body: "Manrope", sans-serif;
}

html[data-theme="codex"] body {
  background:
    linear-gradient(rgba(19, 49, 32, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(19, 49, 32, 0.025) 1px, transparent 1px),
    var(--bg);
  background-size: 40px 40px;
  color: var(--ink);
  font-size: 0.98rem;
  letter-spacing: -0.018em;
}

html[data-theme="codex"] .wrap {
  width: min(100% - 3rem, var(--max));
}

/* Compact industrial header */
html[data-theme="codex"] .topbar {
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  font-size: 0.76rem;
}

html[data-theme="codex"] .topbar .wrap {
  min-height: 34px;
  padding-block: 0.36rem;
}

html[data-theme="codex"] .topbar__phones {
  gap: 1.25rem;
  font-variant-numeric: tabular-nums;
}

html[data-theme="codex"] .site-header {
  border: 0;
  background: var(--header-bg);
  box-shadow: 0 1px 0 rgba(16, 34, 23, 0.09);
  backdrop-filter: blur(18px) saturate(135%);
}

html[data-theme="codex"] .site-header .wrap {
  min-height: 82px;
  padding-block: 0.8rem;
}

html[data-theme="codex"] .brand {
  position: relative;
  min-width: 200px;
  padding-left: 20px;
}

html[data-theme="codex"] .brand::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 8px;
  height: 36px;
  background: var(--accent);
  border-radius: 999px;
}

html[data-theme="codex"] .brand__name {
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.055em;
}

html[data-theme="codex"] .brand__tag {
  margin-top: 0.25rem;
  font-size: 0.68rem;
  line-height: 1.25;
  letter-spacing: 0.01em;
}

html[data-theme="codex"] .site-nav ul {
  align-items: center;
  gap: 0.18rem;
}

html[data-theme="codex"] .site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0.5rem 0.72rem;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

html[data-theme="codex"] .site-nav a:hover,
html[data-theme="codex"] .site-nav a[aria-current="page"] {
  color: var(--accent-strong);
  background: #e8f0eb;
}

html[data-theme="codex"] .site-nav a[aria-current="page"]::after {
  display: none;
}

html[data-theme="codex"] .site-nav > ul > .has-submenu {
  position: relative;
}

html[data-theme="codex"] .nav-catalog-toggle::after {
  content: "";
  width: 0.42rem;
  height: 0.42rem;
  margin: -0.18rem 0 0 0.48rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
}

html[data-theme="codex"] .site-nav .is-section-current > .nav-catalog-toggle {
  color: var(--accent-strong);
  background: #e8f0eb;
}

html[data-theme="codex"] .site-nav__submenu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 30;
  display: grid;
  width: 226px;
  margin: 0;
  padding: 0.45rem;
  border: 1px solid #dce4de;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 20px 46px rgba(18, 39, 25, 0.16);
  opacity: 0;
  visibility: hidden;
  transform: translateY(7px);
  transition: opacity 0.18s var(--ease), transform 0.18s var(--ease), visibility 0.18s;
}

html[data-theme="codex"] .site-nav__submenu li {
  width: 100%;
}

html[data-theme="codex"] .site-nav__submenu a {
  display: flex;
  width: 100%;
  min-height: 40px;
  padding: 0.62rem 0.72rem;
  font-size: 0.8rem;
}

html[data-theme="codex"] .site-nav .has-submenu:hover > .site-nav__submenu,
html[data-theme="codex"] .site-nav .has-submenu:focus-within > .site-nav__submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

html[data-theme="codex"] .nav-toggle {
  min-height: 42px;
  padding-inline: 1rem;
  border: 0;
  background: #152019;
  color: #ffffff;
  border-radius: 10px;
}

/* Homepage hero: product-first, editorial, no template feel */
html[data-theme="codex"] .hero {
  min-height: clamp(500px, 54vw, 690px);
  margin: 0 0 3.8rem;
  isolation: isolate;
  align-items: center;
  background: #0d1712;
}

html[data-theme="codex"] .hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(90deg, #000 0%, rgba(0, 0, 0, 0.55) 48%, transparent 82%);
}

html[data-theme="codex"] .hero__media {
  left: 37%;
}

html[data-theme="codex"] .hero__media img {
  object-position: center 10%;
  filter: saturate(0.72) contrast(1.08) brightness(0.88);
  transform: none;
  animation: none;
}

html[data-theme="codex"] .hero__media::after {
  background: var(--hero-overlay);
}

html[data-theme="codex"] .hero__overlay {
  z-index: 2;
  width: 100%;
  padding-block: clamp(4rem, 9vw, 7.5rem);
}

html[data-theme="codex"] .hero__overlay .wrap {
  position: relative;
}

html[data-theme="codex"] .hero__overlay .wrap::before {
  content: "01 / ПРОИЗВОДСТВО";
  display: block;
  margin-bottom: 1.15rem;
  color: #7fe0ac;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

html[data-theme="codex"] .hero__brand {
  max-width: 7ch;
  margin-bottom: 1.1rem;
  font-size: clamp(4.6rem, 10vw, 8.2rem);
  line-height: 0.82;
  letter-spacing: -0.075em;
  color: #ffffff;
  animation: none;
}

html[data-theme="codex"] .hero__lead {
  max-width: 37ch;
  color: rgba(243, 249, 245, 0.76);
  font-size: clamp(1.05rem, 1.7vw, 1.32rem);
  line-height: 1.5;
  animation: none;
}

html[data-theme="codex"] .hero__actions {
  margin-top: 1.8rem;
  gap: 0.65rem;
  animation: none;
}

html[data-theme="codex"] .hero .btn--solid {
  background: #65d394;
  border-color: #65d394;
  color: #0b1a11;
}

html[data-theme="codex"] .hero .btn--solid:hover {
  background: #8be0ae;
  border-color: #8be0ae;
  color: #0b1a11;
}

html[data-theme="codex"] .hero .btn--ghost {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.34);
}

html[data-theme="codex"] .btn {
  min-height: 46px;
  padding: 0.7rem 1.1rem;
  border-width: 1px;
  border-radius: 11px;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* Main shell and navigation rail */
html[data-theme="codex"] .site-main {
  padding-bottom: 3.5rem;
}

html[data-theme="codex"] body:not(.page-home) .site-main > .wrap {
  padding-top: clamp(1.25rem, 2.6vw, 2.15rem);
}

html[data-theme="codex"] .page-layout {
  gap: 2.2rem;
  align-items: start;
}

html[data-theme="codex"] .page-layout--with-sidebar {
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
}

html[data-theme="codex"] .side-nav {
  top: 6.4rem;
  border: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}

html[data-theme="codex"] .side-nav__inner {
  padding: 0;
}

html[data-theme="codex"] .side-nav .moduletable,
html[data-theme="codex"] .side-nav .moduletable_menu {
  margin-bottom: 1.25rem;
  padding: 0 0 1.25rem;
  border-bottom: 1px solid var(--line);
}

html[data-theme="codex"] .side-nav h3 {
  margin-bottom: 0.6rem;
  color: var(--accent-strong);
  font-size: 0.7rem;
  line-height: 1.35;
  letter-spacing: 0.095em;
  text-transform: uppercase;
}

html[data-theme="codex"] .side-nav a {
  padding: 0.4rem 0.5rem;
  border-radius: 7px;
  color: #39443d;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.3;
}

html[data-theme="codex"] .side-nav a:hover,
html[data-theme="codex"] .side-nav .active > a,
html[data-theme="codex"] .side-nav li.active > a,
html[data-theme="codex"] .side-nav a[aria-current="page"] {
  background: var(--sidebar-active);
  color: var(--accent-strong);
  box-shadow: inset 2px 0 0 var(--accent);
}

html[data-theme="codex"] .side-nav__toggle {
  border-radius: 12px;
  font-size: 0.86rem;
}

html[data-theme="codex"] .content-card {
  padding: clamp(1.25rem, 2.6vw, 2.6rem);
  border: 1px solid rgba(18, 47, 29, 0.09);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.93);
  box-shadow: var(--card-shadow);
}

html[data-theme="codex"] .legacy-content {
  color: #222d26;
  font-size: 0.96rem;
}

html[data-theme="codex"] .legacy-content .contentheading,
html[data-theme="codex"] .legacy-content h1,
html[data-theme="codex"] .legacy-content h2,
html[data-theme="codex"] .legacy-content h3,
html[data-theme="codex"] .page-title {
  color: #101713;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

html[data-theme="codex"] .legacy-content h1,
html[data-theme="codex"] .legacy-content .componentheading,
html[data-theme="codex"] .page-title {
  margin-bottom: 1.7rem;
  font-size: clamp(2.25rem, 4.4vw, 4rem);
  line-height: 0.98;
}

html[data-theme="codex"] .legacy-content h2 {
  margin-top: 2rem;
  font-size: clamp(1.45rem, 2.5vw, 2.05rem);
  line-height: 1.1;
}

html[data-theme="codex"] .legacy-content h3 {
  margin-top: 1.75rem;
  font-size: clamp(1.18rem, 2vw, 1.55rem);
  line-height: 1.15;
}

html[data-theme="codex"] .content-meta {
  color: var(--muted);
  font-size: 0.74rem;
}

/* Home: dense two-column editorial catalog */
html[data-theme="codex"] .page-home .content-card {
  border: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

html[data-theme="codex"] .page-home .legacy-content .componentheading {
  max-width: 14ch;
  margin-bottom: 2rem;
}

html[data-theme="codex"] .page-home .legacy-content .componentheading::before {
  content: "Каталог / в наличии";
  display: block;
  margin-bottom: 0.75rem;
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

html[data-theme="codex"] .page-home .legacy-content .blog {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

html[data-theme="codex"] .page-home .legacy-content .catalog-item {
  min-width: 0;
}

html[data-theme="codex"] .page-home .legacy-content .article-content,
html[data-theme="codex"] .page-home .legacy-content .article-content.catalog-row {
  height: 100%;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 1.15rem;
  padding: 1.2rem;
  border: 1px solid #dfe6e1;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 32px rgba(20, 46, 31, 0.045);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}

html[data-theme="codex"] .page-home .legacy-content .article-content:hover {
  transform: translateY(-3px);
  border-color: #cbd9d0;
  box-shadow: 0 18px 44px rgba(20, 46, 31, 0.09);
}

html[data-theme="codex"] .page-home .legacy-content .catalog-media {
  width: 128px !important;
  height: 160px !important;
  max-width: 128px !important;
  max-height: 160px !important;
  padding: 0.65rem;
  border: 0;
  border-radius: 12px;
  background: #f0f4f1;
}

html[data-theme="codex"] .page-home .legacy-content .catalog-media img,
html[data-theme="codex"] .page-home .legacy-content .catalog-media .content-img,
html[data-theme="codex"] .page-home .legacy-content .catalog-media .content-figure .content-img {
  width: 108px !important;
  height: 140px !important;
  max-width: 108px !important;
  max-height: 140px !important;
  object-fit: contain !important;
}

html[data-theme="codex"] .page-home .legacy-content .catalog-body {
  gap: 0.5rem;
}

html[data-theme="codex"] .page-home .legacy-content h2.contentheading {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.22;
}

html[data-theme="codex"] .page-home .legacy-content .catalog-body p {
  color: #4a554e;
  font-size: 0.82rem;
  line-height: 1.5;
}

html[data-theme="codex"] .page-home .legacy-content .catalog-body h2:not(.contentheading),
html[data-theme="codex"] .page-home .legacy-content .catalog-body h3 {
  margin: 0.2rem 0 0.35rem;
  font-size: 1rem;
  line-height: 1.2;
}

html[data-theme="codex"] .page-home .legacy-content .buy-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.55rem 0.8rem;
  max-width: none;
  margin: auto 0 0;
  padding: 0.8rem 0 0;
  border: 0;
  border-top: 1px solid #e4e9e6;
  border-radius: 0;
  background: transparent;
}

html[data-theme="codex"] .page-home .legacy-content .buy-panel__price {
  grid-column: 1;
  grid-row: 1;
  color: #152019;
  font-size: 1rem;
  line-height: 1.15;
}

html[data-theme="codex"] .page-home .legacy-content .buy-panel__actions {
  grid-column: 2;
  grid-row: 1 / span 2;
  justify-content: flex-end;
}

html[data-theme="codex"] .page-home .legacy-content .buy-panel .btn {
  min-height: 36px;
  padding: 0.45rem 0.72rem;
  border-radius: 8px;
  font-size: 0.74rem;
}

html[data-theme="codex"] .page-home .legacy-content .stock-badge {
  grid-column: 1;
  grid-row: 2;
  color: var(--accent-strong);
  font-size: 0.72rem;
}

/* Product pages: image stage + focused information column */
html[data-theme="codex"] .page-product .content-card {
  padding: clamp(1.25rem, 2.8vw, 2.8rem);
}

html[data-theme="codex"] .page-product .legacy-content > div > .contentheading {
  margin: 0 0 1.65rem;
  font-size: clamp(2rem, 4.1vw, 3.6rem);
  line-height: 1;
}

html[data-theme="codex"] .page-product .legacy-content .blog {
  gap: 0;
}

html[data-theme="codex"] .page-product .legacy-content .article-content,
html[data-theme="codex"] .page-product .legacy-content .article-content.catalog-row {
  grid-template-columns: minmax(230px, 0.72fr) minmax(0, 1.28fr);
  gap: 0 2.6rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

html[data-theme="codex"] .page-product .legacy-content .catalog-media {
  position: sticky;
  top: 7rem;
  width: 100% !important;
  height: auto !important;
  max-width: 330px !important;
  max-height: none !important;
  aspect-ratio: 1 / 1.04;
  padding: 1.5rem;
  border: 1px solid #dfe6e1;
  border-radius: 18px;
  background:
    linear-gradient(rgba(19, 49, 32, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(19, 49, 32, 0.035) 1px, transparent 1px),
    #f0f4f1;
  background-size: 28px 28px;
}

html[data-theme="codex"] .page-product .legacy-content .catalog-media img,
html[data-theme="codex"] .page-product .legacy-content .catalog-media .content-img,
html[data-theme="codex"] .page-product .legacy-content .catalog-media .content-figure .content-img {
  width: 100% !important;
  height: 100% !important;
  max-width: 270px !important;
  max-height: 270px !important;
  object-fit: contain !important;
  mix-blend-mode: multiply;
}

html[data-theme="codex"] .page-product .legacy-content .catalog-body {
  display: block;
  grid-column: 2;
}

html[data-theme="codex"] .page-product .legacy-content .catalog-body > p:first-child {
  margin-top: 0;
  color: #26312a;
  font-size: 1.05rem;
  line-height: 1.7;
}

html[data-theme="codex"] .page-product .legacy-content .buy-panel {
  max-width: none;
  margin: 1.4rem 0 2rem;
  padding: 1.35rem;
  border: 0;
  border-radius: 16px;
  background:
    radial-gradient(circle at 100% 0%, rgba(101, 211, 148, 0.2), transparent 44%),
    #132019;
}

html[data-theme="codex"] .page-product .legacy-content .buy-panel__price {
  font-size: clamp(1.8rem, 3.5vw, 2.75rem);
}

html[data-theme="codex"] .page-product .legacy-content .buy-panel .btn--solid {
  background: #65d394;
  border-color: #65d394;
  color: #0b1a11;
}

html[data-theme="codex"] .page-product .legacy-content .buy-panel .btn--ghost {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.27);
  background: rgba(255, 255, 255, 0.035);
}

html[data-theme="codex"] .buy-panel__note {
  margin: 0;
  color: #c4d2ca;
  font-size: 0.78rem;
}

html[data-theme="codex"] .stock-badge {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

html[data-theme="codex"] .stock-badge:has(.icon-img)::before {
  display: none;
}

html[data-theme="codex"] .stock-badge .icon-img {
  width: 16px !important;
  height: 16px !important;
  margin: 0 !important;
  border-radius: 50%;
}

html[data-theme="codex"] .page-product .legacy-content table,
html[data-theme="codex"] .page-price .legacy-content table {
  margin-block: 1.4rem 2rem;
  border: 1px solid #dfe5e1;
  border-radius: 12px;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  background: #ffffff;
}

html[data-theme="codex"] .page-product .legacy-content table th,
html[data-theme="codex"] .page-price .legacy-content table th {
  background: #142019;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

html[data-theme="codex"] .page-product .legacy-content table td,
html[data-theme="codex"] .page-product .legacy-content table th,
html[data-theme="codex"] .page-price .legacy-content table td,
html[data-theme="codex"] .page-price .legacy-content table th {
  padding: 0.78rem 0.9rem;
  border-bottom: 1px solid #e4e9e6;
}

html[data-theme="codex"] .page-product .legacy-content table tr:last-child > td,
html[data-theme="codex"] .page-price .legacy-content table tr:last-child > td {
  border-bottom: 0;
}

html[data-theme="codex"] .page-product .legacy-content table h1,
html[data-theme="codex"] .page-product .legacy-content table h2,
html[data-theme="codex"] .page-product .legacy-content table h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.3;
  letter-spacing: -0.025em;
}

html[data-theme="codex"] .page-product .legacy-content .content-figure:not(.catalog-media .content-figure) {
  display: inline-flex;
  vertical-align: top;
  margin: 1rem 0.65rem 1rem 0;
}

/* Native catalog pages already contain semantic cards; make them deliberate */
html[data-theme="codex"] .page-catalog .content-card {
  padding: clamp(1.25rem, 2.8vw, 2.8rem);
}

html[data-theme="codex"] .page-catalog .legacy-content .article-content.catalog-row {
  grid-template-columns: minmax(0, 1fr);
  padding: 0;
  border: 0;
  background: transparent;
}

html[data-theme="codex"] .page-catalog .legacy-content .catalog-body {
  grid-column: 1;
}

html[data-theme="codex"] .page-catalog :is(.galvanic-sources, .anodizing-sources) .container {
  width: 100%;
}

html[data-theme="codex"] .page-catalog :is(.galvanic-sources, .anodizing-sources) .grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin: 1rem 0 2.5rem;
}

html[data-theme="codex"] .page-catalog :is(.galvanic-sources, .anodizing-sources) .card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 1rem;
  border: 1px solid #dfe6e1;
  border-radius: 16px;
  background: #ffffff;
  transition: transform 0.22s var(--ease), border-color 0.22s var(--ease), box-shadow 0.22s var(--ease);
}

html[data-theme="codex"] .page-catalog :is(.galvanic-sources, .anodizing-sources) .card:hover {
  transform: translateY(-3px);
  border-color: #bed1c4;
  box-shadow: 0 14px 34px rgba(19, 43, 28, 0.08);
}

html[data-theme="codex"] .page-catalog .card__figure {
  display: grid;
  place-items: center;
  min-height: 176px;
  margin: 0 0 1rem;
  padding: 1rem;
  border-radius: 12px;
  background: #eef3ef;
}

html[data-theme="codex"] .page-catalog .card__img {
  width: auto !important;
  height: 148px !important;
  max-width: 100% !important;
  margin: 0 !important;
  object-fit: contain;
  mix-blend-mode: multiply;
  background: transparent;
}

html[data-theme="codex"] .page-catalog .card__title {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
  letter-spacing: -0.035em;
}

html[data-theme="codex"] .page-catalog .card__meta {
  margin: 0.15rem 0;
  color: #5c6861;
  font-size: 0.8rem;
  line-height: 1.45;
}

html[data-theme="codex"] .page-catalog .lead {
  padding: 1rem 1.1rem;
  border-left: 3px solid var(--accent);
  background: #edf4ef;
  color: #233027;
}

html[data-theme="codex"] .page-catalog .catalog .container {
  width: 100%;
}

html[data-theme="codex"] .page-catalog .catalog .product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin: 1rem 0 2.5rem;
}

html[data-theme="codex"] .page-catalog .catalog .product-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 1rem;
  border: 1px solid #dfe6e1;
  border-radius: 16px;
  background: #ffffff;
  overflow: hidden;
  transition: transform 0.22s var(--ease), border-color 0.22s var(--ease), box-shadow 0.22s var(--ease);
}

html[data-theme="codex"] .page-catalog .catalog .product-card:hover {
  transform: translateY(-3px);
  border-color: #bed1c4;
  box-shadow: 0 14px 34px rgba(19, 43, 28, 0.08);
}

html[data-theme="codex"] .page-catalog .catalog .product-card > a {
  display: flex;
  flex: 1;
  flex-direction: column;
  color: #183021;
}

html[data-theme="codex"] .page-catalog .catalog .product-card img {
  display: block;
  width: 100% !important;
  height: 176px !important;
  max-width: 100% !important;
  margin: 0 0 1rem !important;
  padding: 1rem;
  border-radius: 12px;
  background: #eef3ef;
  object-fit: contain;
  mix-blend-mode: multiply;
}

html[data-theme="codex"] .page-catalog .catalog .product-card h3 {
  margin: auto 0 0;
  color: #183021;
  font-size: 1.05rem;
  line-height: 1.35;
  letter-spacing: -0.035em;
}

html[data-theme="codex"] .page-catalog .catalog .product-card.wide {
  max-width: none;
  margin: 1rem 0 2.5rem;
}

html[data-theme="codex"] .page-catalog .catalog .product-card.wide > a {
  display: grid;
  grid-template-columns: minmax(180px, 0.38fr) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: center;
}

html[data-theme="codex"] .page-catalog .catalog .product-card.wide img {
  height: 210px !important;
  margin: 0 !important;
}

html[data-theme="codex"] .page-catalog .catalog .product-card.wide h3 {
  margin: 0;
  font-size: clamp(1.35rem, 2.4vw, 2rem);
}

html[data-theme="codex"] .page-catalog .catalog .info-block,
html[data-theme="codex"] .page-catalog .anodizing-sources .seo-text {
  max-width: 78ch;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #dfe6e1;
  color: #4d5a52;
  line-height: 1.75;
}

html[data-theme="codex"] .page-catalog .catalog .info-block p,
html[data-theme="codex"] .page-catalog .anodizing-sources .seo-text p {
  margin-bottom: 1rem;
}

html[data-theme="codex"] .page-catalog .catalog .voltage-guide {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0.8rem 0 1.2rem;
}

html[data-theme="codex"] .page-catalog .catalog .voltage-guide p {
  margin: 0;
  padding: 1rem;
  border: 1px solid #dfe6e1;
  border-radius: 12px;
  background: #f7faf8;
  font-size: 0.9rem;
  line-height: 1.65;
}

/* Catalog hub */
html[data-theme="codex"] .catalog-hub .contentheading {
  max-width: 24ch;
  margin-bottom: 1.4rem;
  font-size: clamp(2.2rem, 4.4vw, 4.15rem);
  line-height: 0.98;
  letter-spacing: -0.065em;
}

html[data-theme="codex"] .catalog-hub__status {
  display: inline-flex;
  margin: 0 0 2rem;
  padding: 0.7rem 0.9rem;
  border-radius: 999px;
  background: #e7f3eb;
  color: #17613d;
  font-size: 0.72rem;
  line-height: 1.35;
  letter-spacing: 0.02em;
}

html[data-theme="codex"] .catalog-hub__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 2.8rem;
}

html[data-theme="codex"] .catalog-hub__card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #dfe6e1;
  border-radius: 20px;
  background: #f8faf8;
  color: #14271b;
  transition: transform 0.22s var(--ease), border-color 0.22s var(--ease), box-shadow 0.22s var(--ease);
}

html[data-theme="codex"] .catalog-hub__card:hover {
  transform: translateY(-4px);
  border-color: #b9d0c1;
  box-shadow: 0 18px 42px rgba(19, 43, 28, 0.1);
}

html[data-theme="codex"] .catalog-hub__media {
  display: grid;
  place-items: center;
  height: 290px;
  padding: 1.4rem;
  background: #eef3ef;
}

html[data-theme="codex"] .catalog-hub__media .content-img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  margin: 0 !important;
  object-fit: contain;
  mix-blend-mode: multiply;
}

html[data-theme="codex"] .catalog-hub__title {
  display: flex;
  align-items: center;
  min-height: 94px;
  padding: 1.25rem 1.35rem;
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.04em;
}

html[data-theme="codex"] .catalog-hub__about {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.75fr);
  gap: 1rem 2.5rem;
  padding: clamp(1.4rem, 3vw, 2.4rem);
  border-radius: 20px;
  background: #142019;
  color: #dce9e1;
}

html[data-theme="codex"] .catalog-hub__about > p:first-child {
  margin: 0;
  color: #eef7f1;
  font-size: 1.02rem;
  line-height: 1.75;
}

html[data-theme="codex"] .catalog-hub__about > p:nth-child(2) {
  margin: 0 0 -0.2rem;
  color: #7fe0ac;
  font-weight: 800;
}

html[data-theme="codex"] .catalog-hub__about ul {
  grid-column: 2;
  grid-row: 1 / span 2;
  margin: 0;
  padding-left: 1.2rem;
}

html[data-theme="codex"] .catalog-hub__about li {
  margin-bottom: 0.55rem;
  line-height: 1.5;
}

html[data-theme="codex"] .catalog-hub__contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.55rem 1.5rem;
  align-items: center;
  margin-top: 1rem;
  padding: 1.35rem 1.5rem;
  border: 1px solid #dfe6e1;
  border-radius: 18px;
  background: #ffffff;
}

html[data-theme="codex"] .catalog-hub__contact p {
  margin: 0;
  color: #4e5d54;
}

html[data-theme="codex"] .catalog-hub__contact > p:last-child {
  grid-column: 2;
  color: #68756d;
  font-size: 0.78rem;
  text-align: right;
}

html[data-theme="codex"] .catalog-hub__phones {
  display: flex;
  grid-column: 2;
  grid-row: 1;
  gap: 1rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Galvanic catalog editorial galleries */
html[data-theme="codex"] .page-catalog .galvanic-sources > .container {
  padding: 0;
}

html[data-theme="codex"] .page-catalog .galvanic-sources .reverse-block-img {
  display: grid;
  place-items: center;
  min-height: 290px;
  margin: 1rem 0;
  padding: 1rem;
  border-radius: 16px;
  background: #eef3ef;
}

html[data-theme="codex"] .page-catalog .galvanic-sources .reverse-block-img img {
  width: auto !important;
  height: 260px !important;
  max-width: 100% !important;
  margin: 0 !important;
  object-fit: contain;
}

html[data-theme="codex"] .page-catalog .ip65-section,
html[data-theme="codex"] .page-catalog .remotes {
  margin: 2.5rem 0;
  padding: clamp(1rem, 2.5vw, 1.8rem);
  border: 1px solid #dfe6e1;
  border-radius: 20px;
  background: #f8faf8;
}

html[data-theme="codex"] .page-catalog .ip65-header p {
  margin-top: 0;
  font-size: 1.02rem;
  line-height: 1.6;
}

html[data-theme="codex"] .page-catalog .ip65-variants {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 1.4rem;
  padding: 0;
  list-style: none;
}

html[data-theme="codex"] .page-catalog .ip65-variants li {
  padding: 0.55rem 0.75rem;
  border: 1px solid #d7e3db;
  border-radius: 999px;
  background: #ffffff;
  font-size: 0.78rem;
}

html[data-theme="codex"] .page-catalog .ip65-variants u,
html[data-theme="codex"] .page-catalog .ip65-title u {
  text-decoration: none;
}

html[data-theme="codex"] .page-catalog .ip65-grid {
  display: grid;
  gap: 1rem;
}

html[data-theme="codex"] .page-catalog .ip65-media {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

html[data-theme="codex"] .page-catalog .ip65-mainpic,
html[data-theme="codex"] .page-catalog .ip65-thumbrow figure,
html[data-theme="codex"] .page-catalog .remote-grid figure {
  margin: 0;
}

html[data-theme="codex"] .page-catalog .ip65-thumbrow {
  display: contents;
}

html[data-theme="codex"] .page-catalog .ip65-media img,
html[data-theme="codex"] .page-catalog .remote-grid img {
  display: block;
  width: 100% !important;
  height: 220px !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0.75rem;
  border-radius: 14px;
  background: #ffffff;
  object-fit: contain;
}

html[data-theme="codex"] .page-catalog .ip65-content {
  padding: clamp(1rem, 2.2vw, 1.6rem);
  border-radius: 16px;
  background: #142019;
  color: #dce9e1;
}

html[data-theme="codex"] .page-catalog .ip65-title {
  margin-top: 0;
  color: #ffffff;
}

html[data-theme="codex"] .page-catalog .ip65-benefits,
html[data-theme="codex"] .page-catalog .ip65-price-list {
  padding-left: 1.2rem;
}

html[data-theme="codex"] .page-catalog .ip65-benefits li,
html[data-theme="codex"] .page-catalog .ip65-price-list li {
  margin-bottom: 0.5rem;
  line-height: 1.55;
}

html[data-theme="codex"] .page-catalog .ip65-pricing {
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

html[data-theme="codex"] .page-catalog .ip65-price-title {
  color: #7fe0ac;
  font-weight: 800;
}

html[data-theme="codex"] .page-catalog .remote-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1rem 0;
}

html[data-theme="codex"] .page-catalog .remotes > p:first-child {
  margin-top: 0;
  font-size: 1.05rem;
  font-weight: 800;
}

html[data-theme="codex"] .page-catalog .remote-prices {
  display: inline-block;
  margin: 0.25rem 1.2rem 0.25rem 0;
  color: #445149;
  font-size: 0.82rem;
}

html[data-theme="codex"] .page-catalog .video__wrap {
  position: relative;
  overflow: hidden;
  padding-top: 56.25%;
  border-radius: 18px;
  background: #142019;
}

html[data-theme="codex"] .page-catalog .video__wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Compact category links on the source-selection guide */
html[data-theme="codex"] .page-catalog .catalog-section-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0 0 2rem;
  padding: 0;
  list-style: none;
}

html[data-theme="codex"] .page-catalog .catalog-section-links > li {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 176px;
  padding: 0.85rem;
  border: 1px solid #dfe6e1;
  border-radius: 15px;
  background: #f8faf8;
}

html[data-theme="codex"] .page-catalog .catalog-section-links .category {
  display: block;
  min-height: 3.9em;
  color: #173221;
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.3;
}

html[data-theme="codex"] .page-catalog .catalog-section-links br {
  display: none;
}

html[data-theme="codex"] .page-catalog .catalog-section-links p {
  display: flex;
  flex: 1;
  margin: 0.7rem 0 0;
}

html[data-theme="codex"] .page-catalog .catalog-section-links p a {
  display: grid;
  flex: 1;
  place-items: center;
  min-height: 90px;
  border-radius: 11px;
  background: #eef3ef;
}

html[data-theme="codex"] .page-catalog .catalog-section-links img {
  display: block;
  width: 100% !important;
  height: 94px !important;
  max-width: 100% !important;
  margin: 0 !important;
  object-fit: contain;
  mix-blend-mode: multiply;
}

/* Site-wide photo viewer */
html[data-theme="codex"] .legacy-content img.is-zoomable {
  cursor: zoom-in;
}

html[data-theme="codex"] .legacy-content img.is-zoomable:focus-visible {
  outline: 3px solid rgba(22, 131, 84, 0.38);
  outline-offset: 4px;
}

html[data-theme="codex"] body.lightbox-open {
  overflow: hidden;
}

html[data-theme="codex"] .image-lightbox[hidden] {
  display: none;
}

html[data-theme="codex"] .image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 3rem);
  background: rgba(7, 13, 9, 0.88);
  backdrop-filter: blur(14px);
}

html[data-theme="codex"] .image-lightbox__frame {
  position: relative;
  display: grid;
  place-items: center;
  max-width: 100%;
  max-height: 100%;
}

html[data-theme="codex"] .image-lightbox__image {
  display: block;
  width: auto;
  height: auto;
  max-width: calc(100vw - clamp(2rem, 8vw, 6rem));
  max-height: calc(100vh - clamp(2rem, 8vw, 6rem));
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
  object-fit: contain;
}

html[data-theme="codex"] .image-lightbox__close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 999px;
  background: rgba(10, 20, 14, 0.76);
  color: #ffffff;
  font: 400 1.8rem/1 var(--font-body);
  cursor: pointer;
}

html[data-theme="codex"] .image-lightbox__caption {
  position: absolute;
  right: 0.65rem;
  bottom: 0.65rem;
  left: 0.65rem;
  margin: 0;
  padding: 0.55rem 0.75rem;
  border-radius: 9px;
  background: rgba(10, 20, 14, 0.76);
  color: #ffffff;
  font-size: 0.78rem;
  line-height: 1.35;
  text-align: center;
}

/* Price and text pages */
html[data-theme="codex"] .page-price .content-card,
html[data-theme="codex"] .page-standard .content-card {
  max-width: 960px;
}

html[data-theme="codex"] .page-layout--with-sidebar .page-layout__main,
html[data-theme="codex"] .page-layout--with-sidebar .content-card {
  width: 100%;
  max-width: none;
}

html[data-theme="codex"] .page-price .legacy-content table {
  width: 100%;
  font-variant-numeric: tabular-nums;
}

html[data-theme="codex"] .page-price .legacy-content .content-figure .content-img,
html[data-theme="codex"] .page-price .legacy-content > img.content-img {
  max-width: min(42%, 280px) !important;
}

html[data-theme="codex"] .page-price .legacy-content table tr:nth-child(even) td {
  background: #f7f9f7;
}

/* Repeated photos stay on one responsive row instead of forming a tall column. */
html[data-theme="codex"] .legacy-content :is(.thumbs-row, .image-strip) {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr));
  gap: 0.8rem;
  margin: 1rem 0 2rem;
}

html[data-theme="codex"] .legacy-content .image-strip > .content-figure {
  display: grid;
  place-items: center;
  margin: 0;
}

html[data-theme="codex"] .legacy-content :is(.thumbs-row, .image-strip) img,
html[data-theme="codex"] .legacy-content .image-strip .content-img,
html[data-theme="codex"] .legacy-content .image-strip .content-figure .content-img {
  display: block;
  width: 100% !important;
  height: 220px !important;
  max-width: 100% !important;
  max-height: 220px !important;
  margin: 0 !important;
  padding: 0.85rem;
  border: 1px solid #dfe6e1;
  border-radius: 14px;
  background: #eef3ef;
  object-fit: contain;
  mix-blend-mode: multiply;
}

html[data-theme="codex"] .legacy-content .image-card-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(125px, 100%), 1fr));
  gap: 0.8rem;
  margin: 1rem 0 2rem;
  padding: 0;
  list-style: none;
}

html[data-theme="codex"] .legacy-content .image-card-row > li {
  min-width: 0;
  padding: 0.9rem;
  border: 1px solid #dfe6e1;
  border-radius: 14px;
  background: #f8faf8;
}

html[data-theme="codex"] .legacy-content .image-card-row .content-figure {
  display: grid;
  place-items: center;
  margin: 0.75rem 0 0;
}

html[data-theme="codex"] .legacy-content .image-card-row .content-img {
  width: 100% !important;
  height: 145px !important;
  max-width: 100% !important;
  max-height: 145px !important;
  margin: 0 !important;
  object-fit: contain;
}

html[data-theme="codex"] .page-standard .legacy-content p,
html[data-theme="codex"] .page-standard .legacy-content li {
  max-width: 70ch;
}

/* Order, contacts and delivery */
html[data-theme="codex"] .page-order .content-card,
html[data-theme="codex"] .page-contact .content-card,
html[data-theme="codex"] .page-delivery .content-card {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding: clamp(1.3rem, 3.4vw, 3rem);
}

html[data-theme="codex"] .info-page .contentheading {
  max-width: 15ch;
  margin: 0 0 clamp(1.6rem, 3vw, 2.5rem);
  font-size: clamp(2.3rem, 5vw, 4.8rem);
  line-height: 0.98;
  letter-spacing: -0.07em;
  color: #122218;
}

html[data-theme="codex"] .info-page .info-intro {
  max-width: 68ch;
  margin-bottom: 1.5rem;
  color: #526057;
  font-size: 1.04rem;
  line-height: 1.75;
}

html[data-theme="codex"] .info-label {
  margin: 0 0 1rem;
  color: #718078;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

html[data-theme="codex"] .order-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(270px, 0.75fr);
  gap: 1rem;
  align-items: stretch;
}

html[data-theme="codex"] .order-form,
html[data-theme="codex"] .order-contacts {
  min-width: 0;
  border-radius: 20px;
}

html[data-theme="codex"] .order-form {
  position: relative;
  display: grid;
  gap: 0.8rem;
  padding: clamp(1rem, 2.5vw, 1.7rem);
  background: #eef4f0;
  border: 1px solid #d8e3dc;
}

html[data-theme="codex"] .legacy-content .order-form input[type="text"],
html[data-theme="codex"] .legacy-content .order-form input[type="tel"],
html[data-theme="codex"] .legacy-content .order-form textarea {
  width: 100%;
  min-height: 56px;
  padding: 0.95rem 1rem;
  border: 1px solid #cad7cf;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 1px 0 rgba(11, 32, 20, 0.04);
}

html[data-theme="codex"] .legacy-content .order-form textarea {
  min-height: 160px;
  resize: vertical;
}

html[data-theme="codex"] .legacy-content .order-form input:focus,
html[data-theme="codex"] .legacy-content .order-form textarea:focus {
  outline: 3px solid rgba(43, 132, 83, 0.14);
  border-color: #2b8453;
}

html[data-theme="codex"] .legacy-content .order-form .btn {
  min-height: 56px;
  border: 0;
  border-radius: 12px;
  background: #177345;
  color: #ffffff;
  font-size: 0.95rem;
}

html[data-theme="codex"] .form-honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

html[data-theme="codex"] .form-status:empty {
  display: none;
}

html[data-theme="codex"] .form-status {
  padding: 0.85rem 1rem;
  border-radius: 10px;
  font-weight: 700;
}

html[data-theme="codex"] .form-status.is-success {
  background: #dff4e7;
  color: #155f38;
}

html[data-theme="codex"] .form-status.is-error {
  background: #fff0e4;
  color: #91491a;
}

html[data-theme="codex"] .order-contacts {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.4rem, 3vw, 2.2rem);
  background: #14231a;
  color: #eaf4ed;
}

html[data-theme="codex"] .order-contacts .info-label {
  color: #9fb3a7;
}

html[data-theme="codex"] .info-phone,
html[data-theme="codex"] .info-email {
  display: block;
  color: #153e27;
  font-size: clamp(1.25rem, 2.4vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  overflow-wrap: anywhere;
}

html[data-theme="codex"] .order-contacts .info-phone {
  color: #65d394;
}

html[data-theme="codex"] .order-or {
  margin: 1.8rem 0 0.7rem;
  color: #9fb3a7;
}

html[data-theme="codex"] .info-link {
  display: block;
  padding: 0.7rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 0.82rem;
  line-height: 1.45;
}

html[data-theme="codex"] .status-banner,
html[data-theme="codex"] .delivery-highlight {
  margin: 0 0 1.6rem;
  padding: 1rem 1.1rem;
  border-left: 4px solid #2b8453;
  border-radius: 0 12px 12px 0;
  background: #e4f2e8;
  color: #18472c;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.55;
}

html[data-theme="codex"] .contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

html[data-theme="codex"] .info-panel,
html[data-theme="codex"] .pickup-panel,
html[data-theme="codex"] .delivery-summary > section {
  padding: clamp(1.25rem, 2.6vw, 1.8rem);
  border: 1px solid #dbe4de;
  border-radius: 18px;
  background: #f7faf8;
}

html[data-theme="codex"] .info-panel .info-phone {
  margin-bottom: 0.85rem;
  font-size: clamp(1.05rem, 2vw, 1.45rem);
}

html[data-theme="codex"] .info-panel .info-phone small {
  display: block;
  margin-top: 0.2rem;
  color: #748178;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0;
}

html[data-theme="codex"] .pickup-panel {
  margin-bottom: 1rem;
  background: #14231a;
  border-color: #14231a;
  color: #ffffff;
}

html[data-theme="codex"] .pickup-panel h2 {
  margin: 0 0 0.8rem;
  color: #65d394;
  font-size: 1rem;
  letter-spacing: 0;
}

html[data-theme="codex"] .pickup-panel p {
  margin: 0;
  line-height: 1.7;
}

html[data-theme="codex"] .delivery-summary {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 1rem;
  margin-bottom: 1.2rem;
}

html[data-theme="codex"] .delivery-summary__lead {
  display: grid;
  place-items: center;
  background: #e4f2e8 !important;
  color: #17623a;
  font-size: 1.1rem;
}

html[data-theme="codex"] .delivery-summary p:last-child,
html[data-theme="codex"] .delivery-summary ul:last-child {
  margin-bottom: 0;
}

html[data-theme="codex"] .info-note {
  margin: 0;
  padding-top: 1rem;
  color: #536158;
  line-height: 1.75;
}

html[data-theme="codex"] .delivery-steps {
  counter-reset: delivery-step;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1.3rem 0 1rem;
  padding: 0;
  list-style: none;
}

html[data-theme="codex"] .delivery-steps li {
  counter-increment: delivery-step;
  min-height: 180px;
  padding: 1.2rem;
  border: 1px solid #dbe4de;
  border-radius: 16px;
  background: #f7faf8;
  color: #35443a;
  font-size: 0.9rem;
  line-height: 1.55;
}

html[data-theme="codex"] .delivery-steps li::before {
  content: "0" counter(delivery-step);
  display: block;
  margin-bottom: 2rem;
  color: #2b8453;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

html[data-theme="codex"] .delivery-free {
  display: inline-block;
  margin: 0 0 1.2rem;
  padding: 0.65rem 0.8rem;
  border-radius: 9px;
  background: #14231a;
  color: #65d394;
}

html[data-theme="codex"] .delivery-calculator {
  margin: 1.8rem 0;
  padding: clamp(1rem, 2.5vw, 1.5rem);
  border-radius: 18px;
  background: #eef4f0;
}

html[data-theme="codex"] .delivery-calculator iframe {
  display: block;
  width: 100%;
  min-height: 430px;
  border: 0;
  border-radius: 12px;
  background: #ffffff;
}

html[data-theme="codex"] .packing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

html[data-theme="codex"] .packing-grid p {
  margin: 0;
  padding: 1.2rem;
  border: 1px solid #dbe4de;
  border-radius: 14px;
  color: #536158;
  font-size: 0.88rem;
  line-height: 1.65;
}

html[data-theme="codex"] .delivery-contact {
  margin-top: 1rem;
  padding: clamp(1.4rem, 3vw, 2.2rem);
  border-radius: 20px;
  background: #14231a;
  color: #ffffff;
}

html[data-theme="codex"] .delivery-contact h2,
html[data-theme="codex"] .delivery-contact p {
  color: #a9bdb1;
}

html[data-theme="codex"] .delivery-contact h1 {
  margin: 0.4rem 0 1.3rem;
  font-size: clamp(1.55rem, 3.6vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

html[data-theme="codex"] .delivery-contact h1 a,
html[data-theme="codex"] .delivery-contact .info-email {
  color: #65d394;
}

html[data-theme="codex"] .legacy-content input[type="text"],
html[data-theme="codex"] .legacy-content input[type="email"],
html[data-theme="codex"] .legacy-content input[type="tel"],
html[data-theme="codex"] .legacy-content textarea,
html[data-theme="codex"] .legacy-content select {
  min-height: 48px;
  border-radius: 11px;
  border-color: #cfd9d2;
  background: #ffffff;
}

/* Conversion band and footer */
html[data-theme="codex"] .cta-band {
  position: relative;
  margin-top: 1.2rem;
  padding: 1.5rem 1.6rem;
  overflow: hidden;
  border: 0;
  border-radius: 18px;
  background:
    radial-gradient(circle at 90% 0%, rgba(101, 211, 148, 0.2), transparent 42%),
    #132019;
}

html[data-theme="codex"] .cta-band p {
  color: #dbe9e0;
}

html[data-theme="codex"] .cta-band .btn--solid {
  background: #65d394;
  border-color: #65d394;
  color: #0b1a11;
}

html[data-theme="codex"] .cta-band .btn--ghost {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
}

html[data-theme="codex"] .site-footer {
  margin-top: 0;
  padding-block: 3.5rem 2.4rem;
  border: 0;
}

html[data-theme="codex"] .site-footer__grid {
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2rem;
}

html[data-theme="codex"] .footer-label {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

html[data-theme="codex"] .site-footer p,
html[data-theme="codex"] .site-footer li {
  font-size: 0.84rem;
  line-height: 1.6;
}

@media (max-width: 1120px) {
  html[data-theme="codex"] .site-nav a {
    padding-inline: 0.5rem;
    font-size: 0.75rem;
  }

  html[data-theme="codex"] .page-home .legacy-content .blog {
    grid-template-columns: minmax(0, 1fr);
  }

  html[data-theme="codex"] .page-catalog :is(.galvanic-sources, .anodizing-sources) .grid,
  html[data-theme="codex"] .page-catalog .catalog .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  html[data-theme="codex"] .page-catalog .catalog-section-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  html[data-theme="codex"] .wrap {
    width: min(100% - 2rem, var(--max));
  }

  html[data-theme="codex"] .site-header .wrap {
    min-height: 72px;
  }

  html[data-theme="codex"] .site-nav {
    padding: 0.45rem 0 0.75rem;
    border-top: 1px solid var(--line);
  }

  html[data-theme="codex"] .site-nav ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.25rem;
  }

  html[data-theme="codex"] .site-nav > ul > .has-submenu {
    grid-column: 1 / -1;
  }

  html[data-theme="codex"] .site-nav__submenu {
    position: static;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    padding: 0.25rem 0 0 0.65rem;
    border: 0;
    background: transparent;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  html[data-theme="codex"] .site-nav__submenu a {
    min-height: 36px;
    padding: 0.45rem 0.55rem;
    font-size: 0.74rem;
  }

  html[data-theme="codex"] .hero {
    min-height: 560px;
    margin-bottom: 2.2rem;
    align-items: end;
  }

  html[data-theme="codex"] .hero__media {
    left: 0;
  }

  html[data-theme="codex"] .hero__media img {
    object-position: 64% 10%;
    opacity: 0.76;
  }

  html[data-theme="codex"] .hero__media::after {
    background: linear-gradient(0deg, rgba(8, 17, 12, 0.99) 0%, rgba(8, 17, 12, 0.76) 50%, rgba(8, 17, 12, 0.2) 100%);
  }

  html[data-theme="codex"] .hero::before {
    mask-image: linear-gradient(0deg, #000 0%, rgba(0, 0, 0, 0.6) 58%, transparent 100%);
  }

  html[data-theme="codex"] .hero__overlay {
    padding-block: 7rem 2.6rem;
  }

  html[data-theme="codex"] .hero__brand {
    font-size: clamp(4rem, 22vw, 6.2rem);
  }

  html[data-theme="codex"] .page-layout--with-sidebar {
    grid-template-columns: minmax(0, 1fr);
  }

  html[data-theme="codex"] .side-nav {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #ffffff;
  }

  html[data-theme="codex"] .side-nav__toggle {
    padding: 0.9rem 1rem;
    border: 0;
  }

  html[data-theme="codex"] .side-nav__inner {
    padding: 1rem;
  }

  html[data-theme="codex"] .page-product .legacy-content .article-content,
  html[data-theme="codex"] .page-product .legacy-content .article-content.catalog-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
  }

  html[data-theme="codex"] .page-product .legacy-content .catalog-media {
    position: static;
    grid-column: 1;
    max-width: 300px !important;
    margin-inline: auto;
  }

  html[data-theme="codex"] .page-product .legacy-content .catalog-body {
    grid-column: 1;
  }

  html[data-theme="codex"] .page-home .legacy-content .catalog-media {
    grid-column: 1;
    grid-row: 1;
  }

  html[data-theme="codex"] .page-home .legacy-content .catalog-body {
    grid-column: 2;
    grid-row: 1;
  }

  html[data-theme="codex"] .order-grid,
  html[data-theme="codex"] .delivery-summary {
    grid-template-columns: minmax(0, 1fr);
  }

  html[data-theme="codex"] .delivery-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  html[data-theme="codex"] .packing-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  html[data-theme="codex"] .catalog-hub__about,
  html[data-theme="codex"] .catalog-hub__contact {
    grid-template-columns: minmax(0, 1fr);
  }

  html[data-theme="codex"] .catalog-hub__about ul,
  html[data-theme="codex"] .catalog-hub__phones,
  html[data-theme="codex"] .catalog-hub__contact > p:last-child {
    grid-column: 1;
    grid-row: auto;
  }

  html[data-theme="codex"] .catalog-hub__contact > p:last-child {
    text-align: left;
  }
}

@media (max-width: 640px) {
  html[data-theme="codex"] body {
    background-size: 28px 28px;
  }

  html[data-theme="codex"] .wrap {
    width: min(100% - 1.25rem, var(--max));
  }

  html[data-theme="codex"] .topbar .wrap {
    align-items: flex-start;
    gap: 0.25rem;
  }

  html[data-theme="codex"] .topbar__phones {
    width: 100%;
    justify-content: space-between;
    gap: 0.45rem;
  }

  html[data-theme="codex"] .brand {
    min-width: 0;
  }

  html[data-theme="codex"] .brand__name {
    font-size: 1.45rem;
  }

  html[data-theme="codex"] .brand__tag {
    max-width: 21ch;
    font-size: 0.62rem;
  }

  html[data-theme="codex"] .hero {
    min-height: 540px;
  }

  html[data-theme="codex"] .hero__overlay .wrap::before {
    margin-bottom: 0.9rem;
    font-size: 0.62rem;
  }

  html[data-theme="codex"] .hero__brand {
    margin-bottom: 0.85rem;
    font-size: clamp(3.8rem, 23vw, 5.1rem);
  }

  html[data-theme="codex"] .hero__lead {
    font-size: 1rem;
  }

  html[data-theme="codex"] .hero__actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  html[data-theme="codex"] .hero__actions .btn {
    width: 100%;
  }

  html[data-theme="codex"] .content-card {
    padding: 1rem;
    border-radius: 16px;
  }

  html[data-theme="codex"] .info-page .contentheading {
    margin-bottom: 1.35rem;
    font-size: clamp(2.15rem, 13vw, 3.3rem);
  }

  html[data-theme="codex"] .contact-grid,
  html[data-theme="codex"] .delivery-steps {
    grid-template-columns: minmax(0, 1fr);
  }

  html[data-theme="codex"] .delivery-steps li {
    min-height: 0;
  }

  html[data-theme="codex"] .delivery-steps li::before {
    margin-bottom: 0.8rem;
  }

  html[data-theme="codex"] .delivery-calculator {
    margin-inline: -0.35rem;
    padding: 0.6rem;
  }

  html[data-theme="codex"] .delivery-calculator iframe {
    min-height: 520px;
  }

  html[data-theme="codex"] .page-home .legacy-content .componentheading,
  html[data-theme="codex"] .legacy-content h1,
  html[data-theme="codex"] .legacy-content .componentheading,
  html[data-theme="codex"] .page-title {
    font-size: clamp(2rem, 10vw, 2.8rem);
  }

  html[data-theme="codex"] .page-home .legacy-content .article-content,
  html[data-theme="codex"] .page-home .legacy-content .article-content.catalog-row {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 0.9rem;
    padding: 0.9rem;
    border-radius: 14px;
  }

  html[data-theme="codex"] .page-home .legacy-content .catalog-media {
    width: 96px !important;
    height: 124px !important;
    max-width: 96px !important;
    max-height: 124px !important;
  }

  html[data-theme="codex"] .page-home .legacy-content .catalog-media img,
  html[data-theme="codex"] .page-home .legacy-content .catalog-media .content-img,
  html[data-theme="codex"] .page-home .legacy-content .catalog-media .content-figure .content-img {
    width: 78px !important;
    height: 106px !important;
    max-width: 78px !important;
    max-height: 106px !important;
  }

  html[data-theme="codex"] .page-home .legacy-content h2.contentheading {
    font-size: 0.98rem;
  }

  html[data-theme="codex"] .page-home .legacy-content .catalog-body p {
    font-size: 0.77rem;
  }

  html[data-theme="codex"] .page-home .legacy-content .buy-panel {
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr);
  }

  html[data-theme="codex"] .page-home .legacy-content .buy-panel__price {
    grid-column: 1;
    grid-row: 1;
  }

  html[data-theme="codex"] .page-home .legacy-content .buy-panel__actions {
    grid-column: 1;
    grid-row: 2;
    justify-content: flex-start;
  }

  html[data-theme="codex"] .page-home .legacy-content .stock-badge {
    grid-column: 1;
    grid-row: 3;
  }

  html[data-theme="codex"] .page-product .legacy-content > div > .contentheading {
    font-size: clamp(1.8rem, 10vw, 2.55rem);
  }

  html[data-theme="codex"] .page-product .legacy-content .catalog-media {
    max-width: 240px !important;
    padding: 1rem;
  }

  html[data-theme="codex"] .page-product .legacy-content .catalog-media img,
  html[data-theme="codex"] .page-product .legacy-content .catalog-media .content-img,
  html[data-theme="codex"] .page-product .legacy-content .catalog-media .content-figure .content-img {
    max-width: 200px !important;
    max-height: 200px !important;
  }

  html[data-theme="codex"] .page-product .legacy-content .buy-panel {
    padding: 1.1rem;
  }

  html[data-theme="codex"] .page-product .legacy-content .buy-panel__price {
    font-size: 1.75rem;
  }

  html[data-theme="codex"] .page-product .legacy-content table,
  html[data-theme="codex"] .page-price .legacy-content table {
    display: block;
    width: 100%;
    overflow-x: auto;
    border-radius: 10px;
  }

  html[data-theme="codex"] .page-catalog :is(.galvanic-sources, .anodizing-sources) .grid,
  html[data-theme="codex"] .page-catalog .catalog .product-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  html[data-theme="codex"] .page-catalog .catalog .product-card.wide > a {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
  }

  html[data-theme="codex"] .page-catalog .catalog .voltage-guide {
    grid-template-columns: minmax(0, 1fr);
  }

  html[data-theme="codex"] .page-catalog .card__figure {
    min-height: 150px;
  }

  html[data-theme="codex"] .catalog-hub__grid,
  html[data-theme="codex"] .page-catalog .ip65-media,
  html[data-theme="codex"] .page-catalog .remote-grid,
  html[data-theme="codex"] .page-catalog .catalog-section-links {
    grid-template-columns: minmax(0, 1fr);
  }

  html[data-theme="codex"] .site-nav__submenu {
    grid-template-columns: minmax(0, 1fr);
  }

  html[data-theme="codex"] .catalog-hub__media {
    height: 230px;
  }

  html[data-theme="codex"] .catalog-hub__phones {
    flex-direction: column;
    gap: 0.4rem;
    white-space: normal;
  }

  html[data-theme="codex"] .page-catalog .ip65-media img,
  html[data-theme="codex"] .page-catalog .remote-grid img {
    height: min(62vw, 250px) !important;
  }

  html[data-theme="codex"] .legacy-content :is(.thumbs-row, .image-strip) img,
  html[data-theme="codex"] .legacy-content .image-strip .content-img,
  html[data-theme="codex"] .legacy-content .image-strip .content-figure .content-img {
    height: min(58vw, 220px) !important;
    max-height: 220px !important;
  }

  html[data-theme="codex"] .cta-band {
    align-items: stretch;
    padding: 1.2rem;
    border-radius: 14px;
  }

  html[data-theme="codex"] .cta-band__actions {
    width: 100%;
  }

  html[data-theme="codex"] .cta-band__actions .btn {
    flex: 1 1 100%;
  }

  html[data-theme="codex"] .site-footer__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.4rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html[data-theme="codex"] .page-home .legacy-content .article-content,
  html[data-theme="codex"] .page-catalog :is(.galvanic-sources, .anodizing-sources) .card,
  html[data-theme="codex"] .page-catalog .catalog .product-card {
    transition: none;
  }
}
