:root {
  --ink: #182124;
  --muted: #5b666a;
  --line: #dce3e4;
  --paper: #f5f7f6;
  --white: #ffffff;
  --metal: #405158;
  --accent: #c8a846;
  --accent-dark: #846a1d;
  --shadow: 0 18px 48px rgba(24, 33, 36, 0.12);
  --catalog-thumb-w: 96px;
  --catalog-thumb-h: 72px;
  --catalog-photo-ratio: 4 / 3;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.55;
}

a { color: inherit; }

.topbar {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: 170px 1fr auto;
  grid-template-areas:
    "brand actions actions"
    "brand nav cart";
  gap: 8px 28px;
  align-items: center;
  min-height: 92px;
  padding: 14px max(18px, calc((100vw - 1170px) / 2));
  color: #ffffff;
  background: #4c5965;
  border-bottom: none;
}

.brand {
  grid-area: brand;
  display: inline-flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  color: #e59008;
  background: #f5f7f6;
  border: 3px solid #aeb7bf;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px #ffffff;
  font-weight: 800;
  line-height: 1;
}

.brand-mark span,
.brand-mark small {
  display: block;
  color: #e59008 !important;
  line-height: 1;
  text-align: center;
}

.brand-mark span {
  font-size: 16px;
}

.brand-mark small {
  margin-top: -1px;
  font-size: 13px;
  letter-spacing: 0;
}

.brand small,
.eyebrow,
.product-card span,
.footer span {
  display: block;
  color: var(--muted);
}

.topbar .brand small {
  color: #d8e0e6;
}

nav,
.header-actions,
.cart-header,
.actions,
.footer-links {
  display: flex;
  gap: 16px;
  align-items: center;
}

nav {
  grid-area: nav;
  justify-content: start;
}

nav a,
.phone,
.email-link,
.product-card a,
.footer a {
  font-weight: 700;
  text-decoration: none;
}

nav a:hover,
nav a:focus-visible,
.phone:hover,
.phone:focus-visible,
.email-link:hover,
.email-link:focus-visible,
.footer a:hover,
.footer a:focus-visible,
.cart-header:hover,
.cart-header:focus-visible {
  color: #f0a000;
}

.phone,
.email-link {
  color: #ffffff;
  white-space: nowrap;
}

.email-link {
  color: #f3c86b;
}

.header-actions {
  grid-area: actions;
  justify-content: end;
  flex-wrap: wrap;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.cart-header {
  grid-area: cart;
  position: relative;
  justify-self: end;
  width: 38px;
  height: 32px;
  color: #ffffff;
  text-decoration: none;
}

.cart-header svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cart-header span {
  position: absolute;
  top: -6px;
  right: -2px;
  display: grid;
  place-items: center;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  color: #ffffff;
  background: #f0a000;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.city-switcher {
  position: relative;
}

.city-switcher summary {
  display: grid;
  gap: 1px;
  min-width: 148px;
  padding: 8px 12px;
  color: #ffffff;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  cursor: pointer;
  list-style: none;
}

.city-switcher summary::-webkit-details-marker { display: none; }

.city-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  display: grid;
  grid-template-columns: repeat(3, minmax(130px, 1fr));
  gap: 8px;
  width: min(720px, 90vw);
  max-height: 60vh;
  overflow: auto;
  padding: 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.city-pill {
  padding: 7px 9px;
  color: var(--muted);
  text-decoration: none;
  border-radius: 6px;
}

.city-pill.active,
.city-pill:hover {
  color: var(--ink);
  background: #eef1f1;
}

.hero,
.product-hero,
.page-head,
.container {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
}

.hero,
.product-hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(24px, 5vw, 70px);
  align-items: center;
  padding: clamp(34px, 7vw, 86px) 0 32px;
}

.hero img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.product-photo {
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #e9edf0;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.product-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-head {
  padding: clamp(34px, 6vw, 74px) 0 20px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 920px;
  font-size: clamp(34px, 6vw, 66px);
  line-height: 1.02;
  letter-spacing: 0;
  margin-bottom: 18px;
}

h2 {
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.16;
  letter-spacing: 0;
}

.eyebrow {
  margin-bottom: 10px;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--metal);
  border-radius: 6px;
  font-weight: 700;
  text-decoration: none;
}

.button.primary {
  color: var(--white);
  background: var(--metal);
}

.button.ghost {
  background: var(--white);
}

.length-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.length-tab {
  min-width: 96px;
  padding: 10px 16px;
  text-align: center;
  color: var(--metal);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-weight: 700;
  text-decoration: none;
}

.length-tab.active,
.length-tab:hover {
  color: var(--ink);
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 12px 0 34px;
}

.stats div {
  padding: 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.stats strong {
  display: block;
  font-size: 26px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding-bottom: 44px;
}

.catalog-head-page {
  padding-bottom: 36px;
}

.catalog-head-page h1 {
  font-size: clamp(34px, 4vw, 40px);
  font-weight: 500;
}

.catalog-head-page h2,
.catalog-list h2 {
  font-size: 21px;
  margin-bottom: 24px;
}

.catalog-list {
  position: relative;
  padding-bottom: 38px;
}

.diameter-picker-button {
  display: inline-grid;
  place-items: center;
  width: 114px;
  min-height: 31px;
  margin-bottom: 46px;
  color: #df8b00;
  background: #fbf1d5;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.diameter-picker-button:hover,
.diameter-picker-button:focus-visible {
  outline: 0;
  box-shadow: inset 0 0 0 2px #ed9900;
}

.diameter-modal[hidden] {
  display: none;
}

.modal-open {
  overflow: hidden;
}

.diameter-modal {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: start center;
  padding: 112px 16px 24px;
}

.diameter-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(24, 33, 36, 0.42);
}

.diameter-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(1424px, calc(100vw - 480px));
  min-width: min(94vw, 980px);
  max-height: 84vh;
  overflow: auto;
  padding: 38px 42px 42px;
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.diameter-modal-dialog h2 {
  margin: 0 0 22px;
  color: #4f5961;
  font-size: 24px;
  font-weight: 500;
}

.diameter-modal-close {
  position: absolute;
  top: 42px;
  right: 38px;
  width: 32px;
  height: 32px;
  color: #9aa0a6;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
}

.diameter-modal-list {
  display: grid;
  grid-template-columns: repeat(9, minmax(92px, 1fr));
  gap: 6px 12px;
  padding: 0 132px 0 86px;
}

.diameter-modal-list a {
  display: block;
  min-height: 30px;
  padding: 6px 10px;
  color: #df8b00;
  background: #fbf1d5;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  text-decoration: none;
}

.diameter-modal-list a:hover,
.diameter-modal-list a:focus-visible {
  color: var(--ink);
  outline: 0;
  box-shadow: inset 0 0 0 2px #ed9900;
}

.diameter-reset {
  display: inline-block;
  margin-left: 12px;
  color: #df8b00;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.diameter-menu {
  position: absolute;
  z-index: 5;
  top: calc(100% + 8px);
  left: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(70px, 1fr));
  gap: 6px;
  width: min(420px, 86vw);
  max-height: 260px;
  overflow: auto;
  padding: 12px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.diameter-menu a {
  padding: 6px 8px;
  color: var(--metal);
  text-decoration: none;
  border-radius: 4px;
}

.diameter-menu a:hover {
  background: #fbf1d5;
  color: #df8b00;
}

.catalog-table {
  position: relative;
  display: grid;
  gap: 0;
}

.catalog-row {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(300px, 1.8fr) 0.6fr 0.7fr 0.75fr 0.95fr 104px;
  gap: 12px;
  align-items: center;
  min-height: 90px;
  padding: 16px 10px;
  border-bottom: 1px solid #e9edf0;
  border-radius: 6px;
  outline: 1px solid transparent;
  transition: background-color 0.16s ease, outline-color 0.16s ease, box-shadow 0.16s ease;
}

.catalog-row:not(.catalog-head):hover {
  background: #ffffff;
  outline-color: #f0a000;
  box-shadow: 0 8px 22px rgba(24, 33, 36, 0.08);
}

.catalog-row.is-in-cart:not(.catalog-head) {
  background: #fff3c9;
  outline-color: #f0a000;
  box-shadow: inset 0 0 0 1px rgba(240, 160, 0, 0.36);
}

.catalog-row.is-in-cart:not(.catalog-head):hover {
  background: #ffedb3;
  box-shadow: 0 8px 22px rgba(24, 33, 36, 0.08), inset 0 0 0 1px rgba(240, 160, 0, 0.48);
}

.catalog-head {
  min-height: 36px;
  padding: 0 10px 12px;
  color: #7e8aa0;
  font-size: 13px;
  font-weight: 700;
  border-radius: 0;
  outline: 0;
  box-shadow: none;
}

.catalog-head > div:first-child {
  padding-left: 0;
}

.catalog-product {
  display: grid;
  grid-template-columns: var(--catalog-thumb-w) 1fr;
  gap: 16px;
  align-items: center;
}

.catalog-size-spacer {
  width: 30px;
  align-self: stretch;
  background: #fbf1d5;
  border-radius: 6px 6px 0 0;
}

.catalog-img {
  display: block;
  width: var(--catalog-thumb-w);
  height: var(--catalog-thumb-h);
  overflow: hidden;
  background: #e9edf0;
  border-radius: 4px;
}

.catalog-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.catalog-name {
  display: grid;
  gap: 3px;
  color: #e59008;
  text-decoration: none;
}

.catalog-name small,
.catalog-name em {
  color: #7e8aa0;
  font-style: normal;
  font-size: 13px;
}

.catalog-cell,
.catalog-price {
  display: flex;
  gap: 9px;
  align-items: center;
  font-size: 21px;
}

.catalog-price strong {
  font-size: 18px;
}

.old-icon {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  color: #f0a000;
  font-size: 15px;
  line-height: 1;
  flex: 0 0 20px;
}

.old-icon-diameter::before {
  content: "";
  width: 17px;
  height: 17px;
  background: #f0a000;
  -webkit-mask: url("/static/img/icons/diameter-arrow.svg") center / contain no-repeat;
  mask: url("/static/img/icons/diameter-arrow.svg") center / contain no-repeat;
}

.old-icon-length::before {
  content: "";
  width: 17px;
  height: 17px;
  background: #f0a000;
  -webkit-mask: url("/static/img/icons/size-arrow.svg") center / contain no-repeat;
  mask: url("/static/img/icons/size-arrow.svg") center / contain no-repeat;
}

.old-icon-grade {
  background: none;
}

.old-icon-grade::before {
  content: "";
  width: 18px;
  height: 18px;
  background: url("/static/img/icons/stamp-icon.png") center / contain no-repeat;
}

.old-icon-ok::before {
  content: "✓";
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  color: #8fca12;
  border: 1px solid #b6df43;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
}

.grid-size-group {
  display: none;
}

.product-grid.compact {
  grid-template-columns: repeat(3, 1fr);
}

.product-card {
  min-width: 0;
  padding: 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.product-card img {
  display: block;
  width: 100%;
  aspect-ratio: var(--catalog-photo-ratio);
  height: auto;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 12px;
}

.product-card h3 {
  font-size: 19px;
  line-height: 1.2;
  margin-bottom: 8px;
}

.product-card p {
  color: var(--muted);
  min-height: 96px;
}

.card-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.cart-add {
  min-height: 38px;
  padding: 8px 12px;
  color: var(--white);
  background: var(--metal);
  border: 1px solid var(--metal);
  border-radius: 6px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.cart-add.inline {
  min-height: 34px;
  white-space: nowrap;
}

.cart-popup[hidden] {
  display: none;
}

.cart-popup {
  position: fixed;
  z-index: 80;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
}

.cart-popup-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 22, 26, 0.55);
}

.cart-popup-dialog {
  --cart-button-size: 34px;
  --cart-qty-width: 70px;
  position: relative;
  z-index: 1;
  display: grid;
  gap: 18px;
  width: min(560px, 94vw);
  padding: 28px;
  background: var(--white);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(19, 29, 35, 0.25);
}

.cart-popup-dialog h2 {
  margin: 0;
  font-size: 26px;
  line-height: 1.15;
}

.cart-popup-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 34px;
  height: 34px;
  color: var(--muted);
  background: transparent;
  border: 0;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.cart-popup-close:hover,
.cart-popup-close:focus-visible {
  color: var(--orange);
  outline: 0;
}

.cart-popup-product {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 16px;
  align-items: center;
}

.cart-popup-product img {
  width: 112px;
  height: 84px;
  object-fit: cover;
  border-radius: 6px;
}

.cart-popup-product div,
.cart-popup-control,
.cart-popup-total {
  display: grid;
  gap: 6px;
}

.cart-popup-product strong {
  color: var(--ink);
  font-size: 18px;
}

.cart-popup-product span,
.cart-popup-control span,
.cart-popup-total span {
  color: var(--muted);
}

.cart-popup-control {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.cart-popup-control .cart-qty-control {
  grid-template-columns: 34px 70px 34px;
  width: 138px;
  justify-self: end;
}

.cart-popup-control .cart-qty-btn,
.cart-popup-control .cart-qty-input {
  height: 34px;
}

.cart-popup-control .cart-qty-btn {
  width: 34px;
}

.cart-popup-control .cart-qty-input {
  width: 70px;
}

.cart-popup-total {
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.cart-popup-total strong {
  font-size: 20px;
}

.cart-popup-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.cart-panel {
  --cart-thumb-w: clamp(52px, 6vw, 82px);
  --cart-thumb-h: clamp(40px, 4.6vw, 62px);
  --cart-gap: clamp(6px, 1vw, 14px);
  --cart-button-size: 28px;
  --cart-qty-width: 42px;
  --cart-grid: minmax(210px, 1.55fr) minmax(54px, 0.38fr) minmax(66px, 0.44fr) minmax(72px, 0.48fr) minmax(98px, 0.55fr) minmax(84px, 0.52fr) minmax(92px, 0.55fr) 28px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin: 0 0 24px;
  padding: 16px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.cart-panel-head {
  display: flex;
  gap: 8px;
  align-items: baseline;
}

.cart-panel span,
.muted {
  color: var(--muted);
}

.cart-lines {
  display: grid;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
}

.cart-table {
  width: 100%;
  min-width: 0;
}

.cart-table-head,
.cart-line {
  display: grid;
  grid-template-columns: var(--cart-grid);
  gap: var(--cart-gap);
  align-items: center;
  width: 100%;
}

.cart-line > * {
  min-width: 0;
}

.cart-table-head {
  padding: 0 0 12px;
  color: var(--muted);
  font-size: clamp(11px, 1vw, 13px);
  font-weight: 700;
  border-bottom: 1px solid var(--line);
}

.cart-line {
  min-width: 0;
  padding: 14px 0;
  font-size: clamp(12px, 1.05vw, 14px);
  border-bottom: 1px solid rgba(216, 224, 229, 0.75);
}

.cart-line:last-child {
  border-bottom: 0;
}

.cart-line-name {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.cart-line-product {
  display: grid;
  grid-template-columns: var(--cart-thumb-w) minmax(0, 1fr);
  gap: var(--cart-gap);
  align-items: center;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.cart-line-product img {
  display: block;
  width: var(--cart-thumb-w) !important;
  min-width: var(--cart-thumb-w);
  max-width: var(--cart-thumb-w) !important;
  height: var(--cart-thumb-h) !important;
  min-height: var(--cart-thumb-h);
  max-height: var(--cart-thumb-h) !important;
  object-fit: cover !important;
  border-radius: 4px;
}

.cart-line-img {
  display: block;
  width: var(--cart-thumb-w);
  height: var(--cart-thumb-h);
  border-radius: 4px;
  overflow: hidden;
}

.cart-line-img:hover,
.cart-line-name a:hover {
  opacity: 0.86;
}

.cart-line-name strong {
  color: var(--ink);
  overflow-wrap: anywhere;
}

.cart-line-name a {
  color: var(--ink);
  text-decoration: none;
}

.cart-line-name span {
  line-height: 1.45;
}

.cart-qty-control {
  justify-self: start;
  display: grid;
  grid-template-columns: var(--cart-button-size) var(--cart-qty-width) var(--cart-button-size);
  align-items: center;
  width: calc(var(--cart-button-size) * 2 + var(--cart-qty-width));
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}

.cart-qty-btn,
.cart-remove {
  width: var(--cart-button-size);
  height: clamp(28px, 2.8vw, 32px);
  border: 0;
  background: var(--cream);
  color: var(--orange);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.cart-qty-btn:hover,
.cart-remove:hover {
  background: var(--orange);
  color: #fff;
}

.cart-qty-input {
  width: var(--cart-qty-width);
  height: clamp(28px, 2.8vw, 32px);
  min-width: 0;
  border: 0;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  text-align: center;
  font: inherit;
  font-weight: 700;
  -moz-appearance: textfield;
}

.cart-qty-input::-webkit-outer-spin-button,
.cart-qty-input::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.cart-cell {
  display: flex;
  gap: clamp(4px, 0.7vw, 8px);
  align-items: center;
  font-size: clamp(14px, 1.3vw, 18px);
}

.cart-price,
.cart-line-total {
  justify-self: end;
  text-align: right;
  white-space: nowrap;
  font-size: clamp(12px, 1.1vw, 16px);
}

.cart-remove {
  border-radius: 6px;
  background: #f5f0e1;
}

.cart-total {
  display: grid;
  gap: 2px;
}

.cart-panel-footer {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 24px;
  align-items: center;
  padding: 28px;
  color: #ffffff;
  background: var(--metal);
  border-radius: 8px;
}

.cart-panel-footer span,
.cart-panel-footer small {
  color: #ffffff;
}

.cart-panel-footer strong {
  color: #ffffff;
  font-size: 19px;
}

.cart-grand-total {
  justify-items: end;
}

.cart-grand-total small {
  margin-top: 8px;
}

.cart-panel-footer .cart-clear {
  justify-self: end;
  width: auto;
  min-height: 36px;
  padding: 7px 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-color: rgba(255, 255, 255, 0.65);
  border-radius: 6px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.cart-panel-footer .cart-clear:hover,
.cart-panel-footer .cart-clear:focus-visible {
  background: rgba(255, 255, 255, 0.18);
  outline: 0;
}

.delivery-calculator {
  display: grid;
  gap: 16px;
  padding: 18px;
  background: #f8faf9;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.delivery-calculator p {
  max-width: 920px;
  margin: 6px 0 0;
  color: var(--muted);
}

.vozovoz-inline {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  margin-right: 4px;
}

.vozovoz-inline img,
.vozovoz-result img {
  display: block;
  width: 86px;
  height: auto;
}

.delivery-fields {
  display: grid;
  grid-template-columns: minmax(240px, 420px) auto;
  gap: 12px;
  align-items: end;
}

.delivery-city-field {
  position: relative;
}

.delivery-fields label {
  display: grid;
  gap: 6px;
  font-weight: 700;
}

.delivery-fields input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
}

.delivery-suggestions {
  position: absolute;
  z-index: 25;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  display: grid;
  gap: 4px;
  max-height: 280px;
  overflow: auto;
  padding: 8px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.delivery-suggestions[hidden] {
  display: none;
}

.delivery-suggestions button {
  display: grid;
  gap: 2px;
  width: 100%;
  padding: 9px 10px;
  color: var(--ink);
  background: #fbfcfc;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
}

.delivery-suggestions button:hover,
.delivery-suggestions button:focus-visible {
  border-color: var(--accent);
  outline: 0;
}

.delivery-suggestions span,
.delivery-suggestions small {
  color: var(--muted);
  font-size: 13px;
}

.delivery-result {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  color: var(--muted);
  background: #ffffff;
  border: 1px dashed var(--line);
  border-radius: 6px;
}

.delivery-result strong {
  color: var(--ink);
  font-size: 18px;
}

.vozovoz-result {
  display: inline-flex;
  gap: 10px;
  align-items: center;
}

.delivery-result ul {
  margin: 4px 0 0;
  padding-left: 18px;
}

.delivery-result small {
  color: var(--muted);
}

.delivery-result.success {
  border-style: solid;
  border-color: rgba(146, 195, 42, 0.55);
}

.delivery-result.error {
  border-style: solid;
  border-color: rgba(224, 76, 76, 0.55);
}

.delivery-result.loading {
  border-style: solid;
  border-color: rgba(241, 156, 0, 0.55);
}

.table-wrap {
  overflow-x: auto;
  margin-bottom: 36px;
}

.weight-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.weight-table th,
.weight-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.weight-table th {
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
}

.seo-text {
  padding: 28px 0 46px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-top: 24px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumbs a {
  color: var(--muted);
}

.breadcrumbs a:hover,
.breadcrumbs a:focus-visible {
  color: var(--accent);
}

.breadcrumbs b {
  color: #c9d1d6;
  font-weight: 400;
}

.breadcrumbs span {
  color: var(--ink);
}

.faq-block {
  padding: 18px 0 48px;
}

.faq-list {
  display: grid;
  gap: 10px;
}

.faq-list details {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
}

.faq-list summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 700;
}

.faq-list p {
  margin: 10px 0 0;
  color: var(--muted);
}

.sitemap-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  padding-bottom: 56px;
}

.sitemap-grid > div {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
}

.sitemap-grid h2 {
  margin-top: 0;
}

.sitemap-grid ul {
  columns: 2;
  margin: 0;
  padding-left: 18px;
}

.sitemap-grid li {
  break-inside: avoid;
  margin-bottom: 8px;
}

.sitemap-wide {
  grid-column: 1 / -1;
}

.weight-page-table td:first-child {
  font-weight: 700;
}

@media (max-width: 700px) {
  .sitemap-grid {
    grid-template-columns: 1fr;
  }

  .sitemap-grid ul {
    columns: 1;
  }

  .sitemap-wide {
    grid-column: auto;
  }
}

.section-title {
  margin-bottom: 18px;
}

.section-title h2 {
  margin: 0;
}

.media-section {
  padding: 18px 0 48px;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.media-card {
  margin: 0;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.media-card img {
  display: block;
  width: 100%;
  aspect-ratio: var(--catalog-photo-ratio);
  object-fit: cover;
}

.media-card figcaption {
  padding: 12px 14px 14px;
  color: var(--muted);
  font-size: 14px;
}

.grade-media-grid,
.application-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.grade-media-card {
  display: grid;
  grid-template-columns: 190px 1fr;
  align-items: stretch;
}

.grade-media-card img {
  height: 100%;
  min-height: 170px;
}

.grade-media-card div {
  padding: 16px;
}

.grade-media-card h3,
.application-card h3 {
  margin: 0 0 8px;
}

.grade-media-card p,
.application-card p {
  color: var(--muted);
}

.grade-tags {
  color: var(--accent-dark) !important;
  font-weight: 700;
}

.grade-link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.grade-link-list a {
  padding: 8px 12px;
  color: var(--accent-dark);
  background: #fff7dd;
  border: 1px solid #ead99a;
  border-radius: 6px;
  font-weight: 700;
  text-decoration: none;
}

.application-card {
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.application-card img {
  display: block;
  width: 100%;
  aspect-ratio: var(--catalog-photo-ratio);
  object-fit: cover;
}

.application-card h3,
.application-card p {
  padding: 0 16px;
}

.application-card p {
  padding-bottom: 16px;
}

.trust-section {
  padding: 24px 0 48px;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.trust-card {
  display: grid;
  gap: 8px;
  min-height: 150px;
  padding: 16px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.trust-card:hover,
.trust-card:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 10px 24px rgba(24, 33, 36, 0.1);
  outline: 0;
}

.trust-grid strong {
  color: var(--metal);
  font-size: 18px;
}

.trust-grid span,
.grade-table td {
  color: var(--muted);
}

.trust-grid em {
  align-self: end;
  color: var(--accent-dark);
  font-weight: 700;
  font-style: normal;
  text-decoration: none;
}

.requisites-box {
  margin-top: 16px;
  padding: 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.requisites-box h3 {
  margin: 0 0 12px;
}

.requisites-box dl {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 0;
  margin: 0;
}

.requisites-box dt,
.requisites-box dd {
  margin: 0;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.requisites-box dt {
  color: var(--muted);
  font-weight: 700;
}

.requisites-box a {
  color: var(--accent-dark);
  font-weight: 700;
  text-decoration: none;
}

.requisites-box a:hover,
.requisites-box a:focus-visible {
  color: #f0a000;
}

.grade-table td:first-child {
  color: var(--accent-dark);
  font-weight: 700;
}

.video-teaser {
  display: grid;
  grid-template-columns: minmax(240px, 0.75fr) 1fr;
  gap: 22px;
  align-items: center;
  padding: 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.video-teaser img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 6px;
}

.video-teaser h2 {
  margin: 4px 0 8px;
}

.video-teaser p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

.product-position {
  display: grid;
  grid-template-columns: 1fr 330px;
  gap: 24px;
  align-items: start;
  padding-bottom: 44px;
}

.product-specs,
.product-buy-box {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.product-specs {
  padding: 22px;
}

.product-specs h2 {
  margin-top: 0;
}

.product-specs dl {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 0;
  margin: 0;
}

.product-specs dt,
.product-specs dd {
  margin: 0;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.product-specs dt {
  color: var(--muted);
  font-weight: 700;
}

.product-specs dd {
  color: var(--ink);
}

.product-buy-box {
  display: grid;
  gap: 14px;
  padding: 20px;
}

.product-buy-box span,
.product-buy-box label {
  color: var(--muted);
  font-weight: 700;
}

.product-buy-box strong {
  font-size: 30px;
}

.product-live-total {
  display: grid;
  gap: 2px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.product-live-total strong {
  font-size: 20px;
}

.qty-input {
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
}

.product-length-tabs {
  margin-top: 18px;
}

.seo-text p,
.page-head p,
.hero p,
.product-hero p {
  max-width: 760px;
  color: var(--muted);
  font-size: 18px;
}

.split {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 28px;
  align-items: start;
  padding-bottom: 54px;
}

.request-split {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
}

.custom-request-section {
  scroll-margin-top: 28px;
}

.request-example-card,
.request-form {
  display: grid;
  gap: 12px;
  padding: 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.request-example-card {
  grid-template-rows: auto auto 1fr;
  align-content: stretch;
  min-height: 100%;
}

.request-example-card p {
  margin-top: 0;
  color: var(--muted);
}

.request-split .request-form {
  min-height: 100%;
  align-content: start;
}

.request-example-doc {
  display: grid;
  gap: 14px;
  align-self: stretch;
  padding: 18px;
  color: var(--ink);
  background: #fbfcfc;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.request-doc-head {
  display: grid;
  gap: 4px;
}

.request-doc-head strong {
  font-size: 24px;
  line-height: 1.15;
}

.request-doc-head span,
.request-doc-buyer span,
.request-doc-total span,
.request-example-doc p {
  color: var(--muted);
}

.request-doc-buyer,
.request-doc-total {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.request-doc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.request-doc-table th,
.request-doc-table td {
  padding: 10px 8px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.request-doc-table th {
  color: var(--muted);
  font-size: 12px;
}

.request-doc-total strong {
  color: var(--orange);
}

.request-example-doc p {
  align-self: end;
  margin: 0;
  padding: 10px 12px;
  color: #fff;
  font-weight: 700;
  background: var(--accent);
  border-radius: 4px;
}

.request-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-weight: 700;
}

.inn-field {
  position: relative;
}

.company-suggestions {
  position: absolute;
  z-index: 30;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  display: grid;
  gap: 4px;
  max-height: 260px;
  overflow: auto;
  padding: 8px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.company-suggestions[hidden] {
  display: none;
}

.company-suggestions button {
  display: grid;
  gap: 2px;
  width: 100%;
  padding: 9px 10px;
  color: var(--ink);
  background: #fbfcfc;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
}

.company-suggestions button:hover,
.company-suggestions button:focus-visible {
  border-color: var(--accent);
  outline: 0;
}

.company-suggestions span,
.company-suggestions small,
.inn-status {
  color: var(--muted);
  font-size: 13px;
}

.request-form input,
.request-form textarea {
  width: 100%;
  padding: 10px 12px;
  color: var(--ink);
  background: #fbfcfc;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
}

.file-field {
  padding: 10px 12px;
  background: #fbfcfc;
  border: 1px dashed var(--line);
  border-radius: 8px;
}

.file-field input {
  padding: 6px 0 0;
  background: transparent;
  border: 0;
}

.file-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-items: center;
  padding: 26px clamp(18px, 4vw, 54px);
  border-top: 1px solid var(--line);
  background: var(--white);
}

.footer > div:last-child {
  display: grid;
  gap: 4px;
  justify-items: end;
  min-width: 0;
}

.footer-links {
  flex-wrap: wrap;
}

@media (max-width: 960px) {
  .cart-panel {
    --cart-thumb-w: clamp(48px, 9vw, 68px);
    --cart-thumb-h: clamp(36px, 6.8vw, 52px);
    --cart-gap: 6px;
    --cart-button-size: 26px;
    --cart-qty-width: 34px;
    --cart-grid: minmax(160px, 1.4fr) minmax(42px, 0.32fr) minmax(52px, 0.38fr) minmax(58px, 0.4fr) minmax(86px, 0.55fr) minmax(70px, 0.44fr) minmax(74px, 0.45fr) 26px;
  }

  .topbar,
  .hero,
  .product-hero,
  .product-position,
  .split,
  .footer {
    grid-template-columns: 1fr;
  }

  .topbar {
    grid-template-areas:
      "brand"
      "actions"
      "nav"
      "cart";
  }

  nav,
  .header-actions,
  .cart-header {
    justify-content: start;
    flex-wrap: wrap;
  }

  .product-grid,
  .product-grid.compact,
  .stats,
  .media-grid,
  .grade-media-grid,
  .application-grid,
  .trust-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cart-panel-footer {
    grid-template-columns: 1fr 1fr auto;
    justify-content: stretch;
  }

  .delivery-fields {
    grid-template-columns: 1fr;
  }

  .cart-popup-product,
  .cart-popup-total {
    grid-template-columns: 1fr;
  }

  .cart-popup-control {
    grid-template-columns: 1fr auto;
  }

  .cart-popup-actions {
    justify-content: stretch;
  }

  .cart-popup-actions .button {
    width: 100%;
  }

  .grade-media-card {
    grid-template-columns: 1fr;
  }

  .video-teaser {
    grid-template-columns: 1fr;
  }

  .diameter-modal {
    padding-top: 84px;
  }

  .diameter-modal-dialog {
    width: 94vw;
    min-width: 0;
    padding: 28px 24px 32px;
  }

  .diameter-modal-close {
    top: 28px;
    right: 22px;
  }

  .diameter-modal-list {
    grid-template-columns: repeat(4, minmax(70px, 1fr));
    padding: 0;
  }

  .catalog-row {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .catalog-head {
    display: none;
  }

  .catalog-product {
    grid-column: 1 / -1;
    padding-left: 0;
  }

  .catalog-size-spacer {
    display: none;
  }
}

@media (max-width: 640px) {
  .product-grid,
  .product-grid.compact,
  .stats,
  .media-grid,
  .grade-media-grid,
  .application-grid,
  .trust-grid,
  .city-menu {
    grid-template-columns: 1fr;
  }

  .city-menu {
    left: 0;
    right: auto;
    width: min(320px, 86vw);
  }

  .catalog-row {
    grid-template-columns: 1fr;
  }

  .cart-panel-footer {
    grid-template-columns: 1fr;
    justify-content: stretch;
  }

  .cart-line-total {
    justify-self: end;
    text-align: right;
  }

  .requisites-box dl {
    grid-template-columns: 1fr;
  }

  .diameter-modal-list {
    grid-template-columns: repeat(2, minmax(70px, 1fr));
  }

  .catalog-product {
    grid-template-columns: var(--catalog-thumb-w) 1fr;
  }
}
