/* Konstal.ru — noble navy / teal theme.
   Fonts: Nunito (logo, rounded) + Manrope (UI). */

:root {
  --bg: #f3f6f8;
  --bg-deep: #e6eef2;
  --surface: #ffffff;
  --ink: #0e1a24;
  --ink-2: #152536;
  --ink-soft: #3a4a57;
  --muted: #6b7c88;
  --line: #d5e0e7;
  --line-strong: #b7c8d4;
  --accent: #1a5f6e;
  --accent-hot: #2a8a9a;
  --accent-2: #0f2a3a;
  --gold: #2a8a9a;
  --gold-soft: #d4ebee;
  --gold-deep: #1a5f6e;
  --gold-ink: #134851;
  --gold-line: linear-gradient(90deg, var(--gold-deep), var(--gold) 50%, var(--gold-deep));
  --danger: #8f2d1f;
  --radius: 0;
  --radius-lg: 2px;
  --shadow: 0 10px 30px rgba(14, 26, 36, .08);
  --shadow-lg: 0 28px 70px rgba(14, 26, 36, .16);
  --font: "Manrope", "Segoe UI", sans-serif;
  --display: "Nunito", "Manrope", "Segoe UI", sans-serif;
  --logo: "Nunito", "Manrope", "Segoe UI", sans-serif;
  --pad: clamp(1.25rem, 4.5vw, 3.5rem);
  --pad-mobile: 0.9rem;
  --sidebar: clamp(240px, 18vw, 290px);
  --header-h: 82px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  width: 100%;
  min-width: 0;
  overflow-x: hidden;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(120% 130% at 12% -8%, rgba(255, 255, 255, .55), transparent 55%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
  background-attachment: fixed;
  line-height: 1.55;
  font-size: 16px;
}

::selection { background: var(--gold-soft); color: var(--ink); }
:focus-visible { outline: 2px solid var(--gold-deep); outline-offset: 2px; }

img, video, canvas, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.12;
  margin: 0 0 .55em;
  letter-spacing: -0.015em;
  overflow-wrap: anywhere;
}
h1 { font-size: clamp(1.9rem, 4.3vw, 3.1rem); }
h2 { font-size: clamp(1.4rem, 2.7vw, 1.95rem); }
p, li, td, th { overflow-wrap: anywhere; }

.container {
  width: 100%;
  max-width: none;
  margin: 0;
  padding-left: max(var(--pad), env(safe-area-inset-left, 0px));
  padding-right: max(var(--pad), env(safe-area-inset-right, 0px));
  box-sizing: border-box;
}

/* —— Header —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  width: 100%;
  background: linear-gradient(180deg, rgba(10, 28, 40, .98), rgba(14, 36, 52, .96));
  color: #eef5f7;
  border-bottom: 1px solid rgba(42, 138, 154, .22);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .28);
  backdrop-filter: blur(14px);
}
.site-header .container { position: relative; }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.15rem;
  min-height: var(--header-h);
  padding-block: .7rem;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: .85rem;
  text-decoration: none;
  line-height: 1.05;
  flex: 0 0 auto;
  color: #eef5f7;
}
.logo__mark {
  width: 6px;
  height: 2.65rem;
  background: linear-gradient(180deg, #7ec8d4, var(--gold) 45%, var(--gold-deep));
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .25);
  flex: 0 0 auto;
  border-radius: 999px;
}
.logo__text {
  display: flex;
  flex-direction: column;
  gap: .22rem;
}
.logo__name {
  display: block;
  font-family: var(--logo);
  font-size: clamp(1.55rem, 2.6vw, 1.95rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: inherit;
  line-height: 1;
}
.logo__dot { color: var(--gold); }
.logo__tag {
  display: block;
  font-family: var(--font);
  font-size: .66rem;
  font-weight: 600;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: inherit;
  opacity: .5;
}
.logo img { display: none; }

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  text-decoration: none;
  color: #eef5f7;
  line-height: 1.05;
  margin-bottom: .55rem;
}
.footer-logo .logo__name { font-size: 1.5rem; }
.footer-logo .logo__tag { font-size: .6rem; color: rgba(238, 245, 247, .55); }
.footer-logo .logo__mark { height: 2.25rem; }

.site-footer {
  position: relative;
  width: 100%;
  margin-top: 2.5rem;
  padding: 2.75rem 0 1.75rem;
  background:
    radial-gradient(700px 280px at 10% 0%, rgba(201, 169, 97, .12), transparent 55%),
    linear-gradient(180deg, #12161a 0%, #0c1014 100%);
  color: rgba(238, 245, 247, .72);
  font-size: .9rem;
  border-top: none;
}
.site-footer::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--gold-line);
  opacity: .75;
}
.site-footer a {
  color: rgba(245, 241, 234, .86);
  text-decoration: none;
  transition: color .2s ease;
}
.site-footer a:hover { color: var(--gold-soft); }

.footer-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.35fr) repeat(3, minmax(140px, 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem);
  width: 100%;
}
.footer-col__title {
  margin: 0 0 .85rem;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #f5f1ea;
}
.footer-about {
  margin: 0 0 1rem;
  max-width: 28ch;
  line-height: 1.55;
  color: rgba(238, 245, 247, .62);
  font-size: .88rem;
}
.footer-contacts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .55rem;
}
.footer-contact {
  display: inline-flex;
  align-items: flex-start;
  gap: .55rem;
  color: #f5f1ea !important;
  font-weight: 600;
  line-height: 1.35;
}
.footer-contact--static {
  color: rgba(238, 245, 247, .7) !important;
  font-weight: 500;
  font-size: .86rem;
}
.footer-ico {
  display: grid;
  place-items: center;
  width: 1.35rem;
  height: 1.35rem;
  margin-top: .05rem;
  color: var(--gold-soft);
  flex-shrink: 0;
}
.footer-social {
  display: flex;
  gap: .5rem;
  margin-top: 1.1rem;
}
.footer-social__link {
  display: grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  border: 1px solid rgba(201, 169, 97, .28);
  background: rgba(255, 255, 255, .04);
  color: var(--gold-soft) !important;
  transition: background .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}
.footer-social__link:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: #fff !important;
  transform: translateY(-2px);
}
.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .48rem;
}
.footer-links a {
  color: rgba(238, 245, 247, .68);
  font-size: .9rem;
  line-height: 1.35;
}
.footer-links a:hover { color: var(--gold-soft); }

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(148, 163, 184, .16);
}
.footer-bottom__row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .75rem 1.5rem;
}
.footer-copy {
  margin: 0;
  font-size: .82rem;
  color: rgba(238, 245, 247, .55);
}
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem 1rem;
  font-size: .82rem;
}
.footer-legal a { color: rgba(238, 245, 247, .62); }
.footer-legal a:hover { color: var(--gold-soft); }
.footer-counters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem .75rem;
  margin-top: .9rem;
  min-height: 0;
}
.footer-counters a,
.footer-counters img {
  display: inline-block;
  vertical-align: middle;
  max-height: 31px;
  width: auto;
}
.footer-counters noscript div {
  position: static;
  display: inline;
}
.footer-counters noscript img {
  position: static !important;
  left: auto !important;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}
.footer-disclaimer {
  margin: .85rem 0 0;
  max-width: 70ch;
  font-size: .76rem;
  line-height: 1.5;
  color: rgba(238, 245, 247, .42);
}
.footer-disclaimer a {
  color: rgba(201, 169, 97, .85);
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (max-width: 980px) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .footer-col--brand {
    grid-column: 1 / -1;
  }
}
@media (max-width: 560px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-about { max-width: none; }
}

.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
  gap: .85rem;
  margin-top: 1rem;
}
.album-card {
  display: flex;
  align-items: flex-end;
  min-height: 140px;
  padding: 1rem;
  background:
    linear-gradient(160deg, rgba(16, 17, 16, .06), rgba(16, 17, 16, .6)),
    #d9d1c3;
  color: #fff;
  text-decoration: none;
  border: 1px solid var(--line);
  transition: box-shadow .3s var(--ease), transform .3s var(--ease);
  background-size: cover;
  background-position: center;
}
.album-card--photo {
  min-height: 200px;
  background-color: #2a2a28;
}
.album-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.album-card__title {
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 600;
  text-shadow: 0 1px 8px rgba(0,0,0,.45);
}
.album-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}
.album-photos figure {
  margin: 0;
  border: 1px solid var(--line);
  background: var(--surface);
  overflow: hidden;
  transition: border-color .25s ease, box-shadow .3s ease, transform .3s ease;
}
.album-photos figure:hover {
  border-color: rgba(201, 169, 97, .45);
  box-shadow: 0 14px 28px rgba(16, 17, 16, .1);
  transform: translateY(-3px);
}
.album-photos a {
  display: block;
  position: relative;
  cursor: zoom-in;
}
.album-photos a::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(16, 17, 16, .35));
  opacity: 0;
  transition: opacity .25s ease;
  pointer-events: none;
}
.album-photos figure:hover a::after { opacity: 1; }
.album-photos img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform .45s ease;
}
.album-photos figure:hover img { transform: scale(1.04); }
.album-photos figcaption {
  padding: .55rem .7rem;
  font-size: .85rem;
  color: var(--ink-soft);
}
.album-descr { color: var(--ink-soft); margin: .35rem 0 0; }

/* Lightbox */
body.lightbox-open { overflow: hidden; }
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: rgba(10, 14, 18, .88);
  backdrop-filter: blur(6px);
}
.lightbox[hidden] { display: none !important; }
.lightbox__stage {
  position: relative;
  max-width: min(1100px, 94vw);
  max-height: 90vh;
  text-align: center;
}
.lightbox__img {
  display: block;
  max-width: 100%;
  max-height: min(78vh, 900px);
  margin: 0 auto;
  object-fit: contain;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
  background: #0a0c0e;
}
.lightbox__caption {
  margin-top: .75rem;
  color: rgba(245, 241, 234, .85);
  font-size: .95rem;
}
.lightbox__counter {
  margin-top: .35rem;
  color: rgba(245, 241, 234, .5);
  font-size: .8rem;
  letter-spacing: .06em;
}
.lightbox__close,
.lightbox__nav {
  position: absolute;
  z-index: 2;
  border: 1px solid rgba(201, 169, 97, .35);
  background: rgba(16, 17, 16, .72);
  color: #f5f1ea;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.lightbox__close:hover,
.lightbox__nav:hover {
  background: var(--gold);
  color: #fff;
}
.lightbox__close {
  top: 1rem;
  right: 1rem;
  width: 44px;
  height: 44px;
  font-size: 1.6rem;
  line-height: 1;
}
.lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  font-size: 1.8rem;
  line-height: 1;
}
.lightbox__nav--prev { left: .75rem; }
.lightbox__nav--next { right: .75rem; }
@media (max-width: 700px) {
  .lightbox__nav { width: 40px; height: 40px; }
  .lightbox__nav--prev { left: .35rem; }
  .lightbox__nav--next { right: .35rem; }
}

.order-line-card {
  padding: 0;
  margin: 0;
}
.order-line-card.cart-card {
  display: block;
  width: 100%;
  padding: 0 0 1.15rem;
  margin: 0 0 1rem;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  box-shadow: none;
  border-radius: 0;
}
.order-line-card.cart-card:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}
.order-line-card__head {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: .85rem;
  align-items: start;
  margin-bottom: .75rem;
}
.order-line-card .cart-card__options,
.order-line-card__opts {
  display: grid;
  grid-column: unset;
  gap: .45rem;
  width: 100%;
}
.order-line-card .cart-opt-row {
  position: relative;
}
.order-line-card .cart-opt-row__body {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}
.order-line-card .cart-opt-row__text {
  min-width: 0;
  display: block;
}
.order-line-card .cart-opt-row__text strong {
  display: block;
  font-size: .9rem;
}
.order-line-card .cart-opt-row__text .muted {
  display: block;
  font-size: .78rem;
  margin-top: .1rem;
}
.order-line-card .option-price {
  justify-self: end;
  align-self: center;
}
.order-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }

.prose, .content-page {
  max-width: none;
  width: 100%;
}
.prose h1, .content-page h1 { margin-top: 0; }
.prose h2, .content-page h2 { margin-top: 1.4em; }
.prose table, .content-page table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: .95rem;
}
.prose td, .prose th, .content-page td, .content-page th {
  border: 1px solid var(--line);
  padding: .45rem .6rem;
  text-align: left;
}
.prose img, .content-page img { max-width: 100%; height: auto; }
.map-embed {
  margin: 1rem 0;
  border: 1px solid var(--line);
  overflow: hidden;
  background: var(--bg-deep);
}
.map-embed iframe { display: block; width: 100%; min-height: 420px; border: 0; }

.article-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .85rem;
}
.article-list li {
  padding: .85rem 0;
  border-bottom: 1px solid var(--line);
}
.article-list a {
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  font-size: 1.05rem;
}
.article-list a:hover { color: var(--accent); }
.article-list p { margin: .35rem 0 0; font-size: .92rem; }

.sitemap-list { line-height: 1.7; }
.sitemap-list ul { margin: .25rem 0 .75rem; }

.content-page.panel { padding: 1.35rem 1.5rem; width: 100%; }

.feedback-form textarea {
  width: 100%;
  min-height: 140px;
  border: 1px solid var(--line-strong);
  padding: .65rem .75rem;
  font: inherit;
  resize: vertical;
  background: var(--surface);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

.header-search {
  display: flex;
  align-items: stretch;
  flex: 1 1 180px;
  max-width: 280px;
  margin-left: auto;
  border: 1px solid rgba(201, 169, 97, .22);
  background: rgba(255, 255, 255, .05);
  transition: border-color .2s ease, background .2s ease;
}
.header-search:focus-within {
  border-color: rgba(201, 169, 97, .55);
  background: rgba(255, 255, 255, .08);
}
.header-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: #f7f3eb;
  padding: .55rem .7rem;
  font: inherit;
  font-size: .86rem;
}
.header-search input::placeholder { color: rgba(247, 243, 235, .4); }
.header-search input:focus { outline: none; }
.header-search button {
  border: 0;
  border-left: 1px solid rgba(201, 169, 97, .18);
  background: transparent;
  color: rgba(247, 243, 235, .85);
  font: inherit;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 0 .8rem;
  cursor: pointer;
  white-space: nowrap;
  transition: color .2s ease, background .2s ease;
}
.header-search button:hover { color: var(--gold-soft); background: rgba(255, 255, 255, .05); }

.nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(.75rem, 1.6vw, 1.6rem);
  flex-wrap: wrap;
}
.nav a {
  position: relative;
  color: rgba(247, 243, 235, .8);
  text-decoration: none;
  font-weight: 600;
  font-size: .89rem;
  letter-spacing: .015em;
  padding-bottom: .2rem;
  transition: color .2s ease;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--gold);
  transition: right .25s var(--ease);
}
.nav a:hover { color: #fff; }
.nav a:hover::after { right: 0; }
.phone { white-space: nowrap; font-variant-numeric: tabular-nums; }
.phone::after { display: none; }
.cart-link {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .55rem 1.1rem;
  border-radius: 2px;
  border: 1px solid var(--gold-deep);
  background: var(--ink);
  color: var(--gold-soft) !important;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.cart-link::after { display: none; }
.cart-link:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: #fff !important;
}
.nav-tool {
  display: inline-flex !important;
  align-items: center;
  gap: .4rem;
}
.nav-tool::after { display: none; }
.nav .badge,
.cart-link .badge {
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 .35rem;
  margin-left: .15rem;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: var(--gold);
  color: #fff;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
  vertical-align: middle;
}
.nav-tool .badge[hidden],
.cart-link .badge[hidden] { display: none !important; }
.cart-link .badge {
  background: rgba(255, 255, 255, .18);
  color: var(--gold-soft);
}
.cart-link:hover .badge { background: rgba(0, 0, 0, .25); color: #fff; }
.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(42, 138, 154, .35);
  background: transparent;
  border-radius: 2px;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.menu-toggle span {
  width: 18px;
  height: 1.5px;
  background: #f5f1ea;
}

/* —— Layout —— */
.layout {
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  gap: clamp(1.1rem, 2.5vw, 2.25rem);
  /* НЕ обнулять боковые отступы .container — только верх/низ */
  padding-top: clamp(1.1rem, 2.5vw, 2rem);
  padding-bottom: 4rem;
  width: 100%;
  max-width: 100%;
  align-items: start;
  box-sizing: border-box;
}
.main, .sidebar { min-width: 0; width: 100%; }
.main { max-width: 100%; }

.sidebar-card, .panel {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: var(--radius-lg);
  width: 100%;
}
.sidebar-card { padding: 1.15rem 1.05rem; margin-bottom: 1rem; }
.sidebar-card h3 {
  font-family: var(--font);
  font-size: .7rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold-ink);
  margin-bottom: .95rem;
  padding-bottom: .6rem;
  border-bottom: 1px solid var(--line);
}
.side-nav { list-style: none; margin: 0; padding: 0; }
.side-nav a {
  display: block;
  padding: .45rem 0;
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  font-size: .86rem;
  transition: color .2s var(--ease), padding-left .2s var(--ease);
}
.side-nav a:hover { color: var(--accent); padding-left: .3rem; }
.side-nav .group { margin-top: .8rem; }
.side-nav__subtitle {
  margin: -.55rem 0 .85rem;
  font-size: .78rem;
  color: var(--muted);
}
.side-nav-group {
  margin: 0 0 .85rem;
  padding-bottom: .35rem;
  border-bottom: 1px solid var(--line);
}
.side-nav-group:last-of-type { border-bottom: 0; margin-bottom: .4rem; }
.side-nav-group__title {
  font-family: var(--font);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold-ink);
  margin: 0 0 .35rem;
}
.side-nav-group .side-nav a:last-child { border-bottom: 0; }
.side-nav--service {
  margin-top: .75rem;
  padding-top: .55rem;
  border-top: 1px dashed var(--line-strong);
}
.side-nav--service a { font-weight: 600; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  min-height: 46px;
  padding: .7rem 1.3rem;
  border: 1px solid var(--ink);
  border-radius: 2px;
  font: inherit;
  font-weight: 700;
  font-size: .86rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  color: var(--bg);
  background: var(--ink);
  transition: transform .25s var(--ease), background .25s ease, color .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.btn:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ink);
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(156, 122, 52, .28);
}
.btn-secondary { background: var(--accent-2); border-color: var(--accent-2); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
}
.btn-ghost:hover {
  background: var(--ink);
  color: var(--gold-soft);
  border-color: var(--ink);
  box-shadow: none;
}
.btn-block { width: 100%; }

.flash {
  padding: .85rem 1rem;
  margin-bottom: 1rem;
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--gold-deep);
  background: var(--surface);
  color: var(--ink-soft);
  border-radius: var(--radius);
}
.hp-field {
  position: absolute !important;
  left: -10000px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Media frames */
.media-frame {
  position: relative;
  width: 100%;
  background:
    linear-gradient(145deg, var(--bg-deep), #e3dbc7);
  border: 1px solid var(--line);
  overflow: hidden;
  display: grid;
  place-items: center;
}
.media-frame img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
  object-position: center;
  transition: transform .7s var(--ease);
}
.project-card:hover .media-frame img { transform: scale(1.03); }
.media-frame--card { aspect-ratio: 4 / 3; }
.media-frame--thumb-sq {
  aspect-ratio: 1 / 1;
}
.media-frame--thumb-sq img {
  object-fit: cover; /* квадратные preview 200×200 */
}
.media-frame--hero {
  aspect-ratio: auto;
  max-height: none;
  background: var(--bg-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}
.media-frame--hero img {
  width: 100%;
  height: auto;
  max-height: min(72vh, 720px);
  object-fit: contain;
  object-position: center;
}
.media-frame--plan,
.media-frame--facade-lg {
  aspect-ratio: auto;
  background: var(--surface);
  display: block;
  height: auto;
  min-height: 0;
  place-items: unset;
}
.media-frame--facade { aspect-ratio: 1 / 1; }
.media-frame--facade-lg { background: var(--bg-deep); }
.media-frame--thumb { aspect-ratio: 1 / 1; }
.media-frame--plan img,
.media-frame--facade-lg img,
.gallery-2 .media-frame img,
.gallery-stack .media-frame img {
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  object-fit: contain !important;
  display: block;
}
.gallery-2 {
  visibility: visible;
  opacity: 1;
}
.gallery-stack,
.facade-grid--lg {
  visibility: visible;
  opacity: 1;
}
.view-thumbs {
  visibility: visible;
}
.media-frame--thumb { aspect-ratio: 1 / 1; }

.badge-3d {
  position: absolute; top: .65rem; left: .65rem; z-index: 2;
  background: rgba(16, 17, 16, .9); color: var(--gold-soft);
  font-size: .65rem; font-weight: 700; letter-spacing: .14em;
  padding: .32rem .5rem;
  border: 1px solid rgba(201, 169, 97, .35);
}
a.badge-3d--link {
  text-decoration: none;
  color: var(--gold-soft);
  transition: background .2s ease, transform .2s ease;
}
a.badge-3d--link:hover {
  background: var(--gold);
  color: #fff;
  transform: translateY(-1px);
}
.project-3d-cta {
  position: absolute;
  left: 50%;
  bottom: 1rem;
  z-index: 3;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: .65rem 1.25rem;
  background: var(--gold);
  color: #fff !important;
  font-weight: 700;
  font-size: .82rem;
  letter-spacing: .06em;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, .2);
  box-shadow: 0 12px 28px rgba(16, 17, 16, .35);
  white-space: nowrap;
  transition: background .2s ease, transform .2s ease;
}
.project-3d-cta:hover {
  background: var(--gold-deep);
  color: #fff !important;
  transform: translateX(-50%) translateY(-2px);
}
.project-3d-note {
  margin: .75rem 0 0;
  font-size: .92rem;
  color: var(--muted);
}
.project-3d-note a {
  color: var(--gold-deep);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.project-trust {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem .75rem;
  margin: 1rem 0 0;
  padding: .75rem 0 0;
  border-top: 1px solid var(--line);
  font-size: .78rem;
  color: var(--muted);
}
.project-trust span {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
}
.project-trust span::before {
  content: "";
  width: .45rem;
  height: .45rem;
  border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0;
}
.badge-hit, .badge-sale {
  display: inline-block;
  margin-left: .35rem;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .2rem .45rem;
  vertical-align: middle;
}
.badge-hit { background: #c45c26; color: #fff; }
.badge-sale { background: var(--ink); color: var(--gold-soft); }
.badge-new {
  display: inline-block;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .2rem .45rem;
  background: #1a6b4a;
  color: #e8f7f0;
}
.project-card__media .badge-hit {
  position: absolute;
  top: .65rem;
  left: .65rem;
  margin: 0;
  background: rgba(16, 17, 16, .88);
  color: var(--gold-soft);
}
.project-card__media .badge-3d ~ .badge-hit {
  left: 3.4rem;
}
.project-card__media .badge-new {
  position: absolute;
  top: .65rem;
  right: .65rem;
  margin: 0;
}
.badge-hit--abs,
.badge-new--abs {
  position: absolute;
  z-index: 2;
  margin: 0;
}
.badge-hit--abs { top: .65rem; right: .65rem; }
.badge-new--abs { top: 2.5rem; right: .65rem; }

.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  gap: clamp(.85rem, 1.6vw, 1.25rem);
  width: 100%;
}
.project-card {
  background: var(--surface);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: 100%;
  position: relative;
  isolation: isolate;
  transition: border-color .3s ease, box-shadow .35s var(--ease), transform .35s var(--ease);
}
.project-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--gold-line);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .4s var(--ease);
  z-index: 3;
}
.project-card:hover::before { transform: scaleX(1); }
.project-card__tools {
  position: absolute;
  top: .5rem;
  right: .5rem;
  z-index: 3;
  display: flex;
  gap: .3rem;
}
.tool-btn {
  width: 34px;
  height: 34px;
  border: 0;
  background: rgba(255, 253, 248, .92);
  color: var(--ink);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .1);
  transition: background .2s ease, color .2s ease;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 50%;
}
.tool-btn .ico { display: block; }
.tool-btn[data-on="1"],
.tool-btn.is-active { background: var(--ink); color: var(--gold-soft); }
.tool-btn:hover { background: var(--ink); color: var(--gold-soft); }
.tool-btn.js-fav[data-on="1"] .ico-heart path,
.tool-btn.js-fav.is-active .ico-heart path,
.btn-icon.js-fav[data-on="1"] .ico-heart path,
.btn-icon.js-fav.is-active .ico-heart path {
  fill: currentColor;
}
.btn-icon .ico { display: block; }
.btn-icon.js-fav[data-on="1"],
.btn-icon.js-fav.is-active {
  color: #c0392b;
  border-color: rgba(192, 57, 43, .45);
}
.btn-icon.js-compare[data-on="1"],
.btn-icon.js-compare.is-active {
  color: var(--gold-deep);
  border-color: var(--gold);
  background: var(--gold-soft);
}
.view-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .65rem;
}
.view-thumb {
  width: 72px;
  height: 72px;
  padding: 0;
  border: 2px solid transparent;
  background: var(--bg-deep);
  cursor: pointer;
  overflow: hidden;
  transition: border-color .2s ease;
}
.view-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.view-thumb.is-active { border-color: var(--gold-deep); }
.view-thumb:hover { border-color: var(--line-strong); }
.badge-mirror {
  position: absolute;
  top: .65rem;
  left: .65rem;
  z-index: 2;
  background: var(--ink);
  color: var(--gold-soft);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .3rem .45rem;
}
.mirror-banner {
  margin-top: .35rem;
  padding: .65rem .75rem;
  background: var(--bg-deep);
  border: 1px solid var(--line-strong);
  font-size: .92rem;
}
.mirror-banner a { font-weight: 700; }
.project-views { min-width: 0; }
.project-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}
.project-card__media {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--bg-deep);
  text-decoration: none;
}
.project-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .7s var(--ease);
}
.project-card:hover .project-card__media img { transform: scale(1.04); }
.project-card__media .badge-3d {
  top: auto;
  bottom: .65rem;
  left: auto;
  right: .65rem;
  background: #b5651d;
  color: #fff;
  letter-spacing: .06em;
  border-radius: 2px;
  border-color: transparent;
}
.project-card__body {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .65rem 1rem;
  padding: .95rem 1rem 1.05rem;
  align-items: start;
  min-width: 0;
  border-top: 1px solid var(--line);
}
.project-card__main { min-width: 0; }
.project-card__code {
  display: block;
  font-family: var(--font);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.15;
  text-transform: none;
  transition: color .2s ease;
}
.project-card__code:hover { color: var(--gold-deep); }
.project-card__price {
  margin-top: .25rem;
  font-size: 1.05rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  color: var(--ink);
  white-space: nowrap;
}
.project-card__specs {
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: right;
  font-size: .78rem;
  line-height: 1.5;
  color: var(--muted);
}
.project-card__specs li { white-space: nowrap; }
.project-card h3 { font-size: 1.2rem; margin: 0; }
.project-card h3 a { color: var(--ink); text-decoration: none; }

.page-head { margin-bottom: 1rem; }
.page-head--catalog h1 { margin-bottom: 0; }
.page-head .lede { color: var(--muted); margin: 0; }
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  align-items: center;
  font-size: .74rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .6rem;
}
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent); }

/* —— Compact filter panel (architectural, plans-inspired) —— */
.filter-panel {
  position: relative;
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(26, 95, 110, .12);
  box-shadow: 0 10px 28px rgba(16, 17, 16, .05);
  backdrop-filter: blur(8px);
  padding: .95rem 1.1rem 1.1rem;
  margin-bottom: 1.3rem;
  border-radius: 4px;
}
.filter-panel::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--gold-line);
  opacity: .55;
  border-radius: 4px 4px 0 0;
}
.filter-panel__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .8rem;
  padding-bottom: .7rem;
  border-bottom: 1px solid var(--line);
}
.filter-panel__title {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink);
}
.filter-panel__title::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 1px;
  margin-right: .6em;
  background: var(--gold-deep);
  vertical-align: middle;
}
.filter-panel__count {
  font-size: .88rem;
  color: var(--muted);
  white-space: nowrap;
}
.filter-panel__count strong,
#catalog-total {
  color: var(--gold-ink);
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  font-size: 1.08rem;
  transition: opacity .2s ease;
}
#catalog-total.is-loading { opacity: .35; }
.filter-panel__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: .55rem .65rem;
  align-items: end;
}
.filter-panel__row--dims {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-top: .65rem;
}
.f-field {
  display: flex;
  flex-direction: column;
  gap: .24rem;
  min-width: 0;
  margin: 0;
}
.f-field > span:first-child {
  font-size: .67rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.f-field--code input { font-variant-numeric: tabular-nums; }
.f-field input,
.f-field select {
  min-height: 40px;
  padding: .45rem .55rem;
  font-size: .9rem;
  border-color: var(--line-strong);
  background: var(--surface);
}
.f-range {
  display: flex;
  align-items: center;
  gap: .3rem;
  width: 100%;
}
.f-range input { flex: 1 1 0; min-width: 0; }
.f-range__sep { color: var(--muted); font-size: .85rem; flex: 0 0 auto; }
.filter-panel__submit {
  display: flex;
  align-items: center;
  gap: .4rem;
  min-height: 40px;
}
.btn-find {
  min-height: 40px;
  padding: .45rem 1.1rem;
  font-size: .78rem;
  letter-spacing: .07em;
  background: var(--gold) !important;
  border-color: var(--gold) !important;
  color: #fff !important;
}
.btn-find:hover {
  background: var(--gold-deep) !important;
  border-color: var(--gold-deep) !important;
}
.filter-panel__actions-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: .55rem .65rem;
}
.f-field--sort { min-width: 150px; }
.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr));
  gap: .75rem;
  margin: 0 0 1.5rem;
}
.collection-tile {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 112px;
  padding: 1rem;
  text-decoration: none;
  color: #f7f3eb;
  background:
    linear-gradient(155deg, rgba(201,169,97,.22), rgba(16,17,16,.9) 55%),
    var(--ink-2);
  border: 1px solid rgba(201,169,97,.28);
  transition: transform .3s var(--ease), border-color .2s ease, box-shadow .3s var(--ease);
}
.collection-tile:hover {
  transform: translateY(-3px);
  border-color: var(--gold);
  color: #fff;
  box-shadow: var(--shadow);
}
.collection-tile strong {
  font-family: var(--display);
  font-size: 1.28rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.collection-tile span {
  font-size: .78rem;
  color: rgba(247,243,235,.68);
  margin-top: .28rem;
}
.recent-rail { margin-top: 2.25rem; }
.recent-rail__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.project-desc__body {
  margin: 0;
  line-height: 1.55;
}
.project-desc__body a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.project-desc__body a:hover {
  color: var(--accent, #3d6b3d);
}
.carousel {
  position: relative;
  overflow: hidden;
  margin-top: .35rem;
}
.carousel__track {
  display: flex;
  gap: clamp(.85rem, 1.6vw, 1.25rem);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-bottom: .35rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.carousel__track::-webkit-scrollbar { height: 6px; }
.carousel__track::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
.carousel__track .project-card {
  flex: 0 0 min(260px, 78vw);
  scroll-snap-align: start;
  width: min(260px, 78vw);
}
.carousel-nav {
  display: flex;
  gap: .4rem;
}
.carousel-btn {
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
}
.carousel-btn:hover {
  border-color: var(--gold-deep);
  background: rgba(201, 169, 97, .12);
}
.btn-reset {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  text-decoration: none;
  font-size: 1.35rem;
  line-height: 1;
  background: var(--surface);
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.btn-reset:hover { background: var(--ink); color: var(--gold-soft); border-color: var(--ink); }
.filter-panel__chips {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: .8rem;
}
.f-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0;
  margin: 0;
  cursor: pointer;
  user-select: none;
}
.f-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
}
.f-chip span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: .2rem .75rem;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink-soft);
  font-size: .8rem;
  line-height: 1.2;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}
.f-chip:hover span { border-color: var(--gold-deep); color: var(--ink); }
.f-chip.is-on span,
.f-chip input:checked + span {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--gold-soft);
}
.filter-panel__more {
  margin-top: .65rem;
  border-top: 1px dashed var(--line);
  padding-top: .45rem;
}
.filter-panel__more summary {
  cursor: pointer;
  font-size: .8rem;
  color: var(--muted);
  font-weight: 600;
  list-style: none;
  user-select: none;
}
.filter-panel__more summary::-webkit-details-marker { display: none; }
.filter-panel__more summary::after {
  content: " +";
  color: var(--gold-deep);
}
.filter-panel__more[open] summary::after { content: " −"; }

.filter-acc {
  margin-top: .55rem;
  border-top: 1px dashed var(--line);
  padding-top: .4rem;
}
.filter-acc:first-of-type {
  border-top: 0;
  margin-top: 0;
  padding-top: 0;
}
.filter-acc__summary {
  cursor: pointer;
  font-size: .82rem;
  color: var(--ink-soft);
  font-weight: 700;
  list-style: none;
  user-select: none;
  padding: .2rem 0 .45rem;
}
.filter-acc__summary::-webkit-details-marker { display: none; }
.filter-acc__summary::after {
  content: " +";
  color: var(--gold-deep);
}
.filter-acc[open] > .filter-acc__summary::after { content: " −"; }

.section-cta {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1.25rem;
  align-items: center;
  margin: 1.25rem 0 0;
}
.trust-block { margin-top: 2.5rem; }
.back-to-catalog {
  margin: -.35rem 0 1rem;
  font-size: .92rem;
}
.back-to-catalog a { color: var(--ink-soft); text-decoration: none; }
.back-to-catalog a:hover { color: var(--gold-deep); }

.build-cost__title {
  margin: 1.25rem 0 .75rem;
  font-size: 1.05rem;
}
.build-cost {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
}
.build-cost__item {
  border: 1px solid var(--line);
  background: var(--surface-2, #f7f5f1);
  padding: .85rem .9rem;
  display: flex;
  flex-direction: column;
  gap: .25rem;
}
.build-cost__item--accent {
  border-color: var(--gold-deep);
  background: rgba(201, 169, 97, .12);
}
.build-cost__label {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  font-weight: 700;
}
.build-cost__item strong { font-size: 1.15rem; }
.build-cost__hint { font-size: .78rem; color: var(--muted); }

.estimate-panel { scroll-margin-top: 5rem; }

.promo-hero {
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}
.promo-countdown {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  background: var(--ink);
  color: var(--gold-soft);
}
.promo-countdown__label {
  font-size: .78rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  opacity: .85;
  margin-bottom: .55rem;
}
.promo-countdown__digits {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
}
.promo-countdown__digits span {
  min-width: 3.5rem;
  text-align: center;
}
.promo-countdown__digits b {
  display: block;
  font-size: 1.55rem;
  font-variant-numeric: tabular-nums;
  color: #fff;
}
.promo-countdown__digits small {
  font-size: .68rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  opacity: .75;
}
.promo-countdown.is-ended .promo-countdown__digits { opacity: .45; }
.promo-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 1rem;
}
.promo-card {
  border: 1px solid var(--line);
  padding: 1rem 1.1rem;
}
.promo-card h3 { margin: 0 0 .45rem; font-size: 1.05rem; }
.promo-card p { margin: 0 0 .9rem; color: var(--ink-soft); font-size: .92rem; }
.katalog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin: 1rem 0 1.5rem;
}

/* legacy filter classes (other pages) */
.filter-box { padding: clamp(.9rem, 2vw, 1.25rem); margin-bottom: 1.25rem; }
.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr));
  gap: .8rem;
}
label.field {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  font-size: .78rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  min-width: 0;
}
label.field > span { display: flex; gap: .4rem; width: 100%; }
label.field > span > input { flex: 1 1 0; min-width: 0; }
input, select, textarea {
  width: 100%;
  max-width: 100%;
  min-height: 46px;
  font: inherit;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  padding: .65rem .75rem;
  background: var(--surface);
  text-transform: none;
  letter-spacing: normal;
  transition: border-color .2s ease, box-shadow .2s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--gold-deep);
  box-shadow: 0 0 0 3px rgba(201, 169, 97, .18);
}
textarea { min-height: 120px; resize: vertical; }
.check-row {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1rem;
  margin: .9rem 0;
  font-size: .9rem;
  text-transform: none;
  letter-spacing: normal;
}
.check-row label {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  color: var(--ink-soft);
  min-height: 40px;
  text-transform: none;
  letter-spacing: normal;
  font-size: .9rem;
}
.filter-actions { display: flex; flex-wrap: wrap; gap: .6rem; }

.project-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, .9fr);
  gap: clamp(1rem, 2vw, 1.5rem);
  margin-bottom: 1.75rem;
  width: 100%;
}
.facts { display: grid; gap: .5rem; font-size: .95rem; }
.facts__price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  flex-wrap: wrap;
  margin-top: .15rem;
}
.facts__price-row .price-lg { margin: 0; min-width: 0; }
.price-lg {
  color: var(--ink);
  font-size: clamp(1.5rem, 3vw, 1.95rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1.1rem; width: 100%; }

/* —— Project card actions hierarchy —— */
.project-actions {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  margin-top: 1.25rem;
  width: 100%;
  padding-top: .35rem;
}
.project-actions__service {
  position: static;
  display: flex;
  flex-shrink: 0;
  gap: .4rem;
  z-index: 2;
}
.btn-icon {
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, .92);
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1;
  transition: transform .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease;
}
.btn-icon:hover {
  border-color: var(--gold);
  color: var(--gold-deep);
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(26, 95, 110, .15);
}
.btn-icon.is-active,
.btn-icon[data-on="1"] {
  color: #c0392b;
  border-color: rgba(192, 57, 43, .45);
}
.project-actions__buy { margin: 0; width: 100%; }
.btn--buy {
  width: 100%;
  min-height: 56px;
  font-size: .95rem;
  letter-spacing: .04em;
  background: var(--gold) !important;
  border-color: var(--gold) !important;
  color: #fff !important;
  box-shadow: 0 10px 24px rgba(26, 95, 110, .22);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  flex-wrap: wrap;
  padding: .75rem 1rem;
}
.btn--buy__label {
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-size: .78rem;
}
.btn--buy__price {
  font-weight: 800;
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}
.btn--buy:hover {
  background: var(--gold-deep) !important;
  border-color: var(--gold-deep) !important;
  color: #fff !important;
}
.project-actions__secondary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .55rem;
}
.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
}
.btn-outline:hover {
  background: var(--ink);
  color: var(--gold-soft);
  border-color: var(--ink);
  box-shadow: none;
}
.btn-light {
  background: #f4f8f9;
  color: var(--ink);
  border: 1px solid rgba(26, 95, 110, .16);
}
.btn-light:hover {
  background: var(--gold-soft);
  border-color: var(--gold);
  color: var(--ink);
  box-shadow: none;
}
.project-actions__secondary .btn {
  width: 100%;
  min-height: 44px;
  justify-content: center;
  font-size: .78rem;
  padding: .55rem .7rem;
}
.project-actions__more {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}
.btn--sm {
  min-height: 36px;
  padding: .4rem .85rem;
  font-size: .72rem;
  letter-spacing: .04em;
}
.project-mobile-bar { display: none; }

/* Catalog filter drawer shell */
.catalog-toolbar {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin: 0 0 .85rem;
}
.catalog-toolbar__count { margin: 0; }
.catalog-filters-shell__backdrop { display: none; }
.catalog-filters-shell__head { display: none; }
.catalog-filters-shell__panel { min-width: 0; }

.promo-list { list-style: none; margin: .9rem 0; padding: 0; }
.promo-list li {
  border-top: 1px solid var(--line);
  padding: .7rem 0;
  font-size: .92rem;
  color: var(--ink-soft);
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.materials { columns: 2; gap: 1.5rem; margin: 0; padding-left: 1.1rem; }

.gallery-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(1rem, 2vw, 1.4rem);
  margin: 1.75rem 0;
  width: 100%;
}
.gallery-stack { display: grid; gap: 1.1rem; }
.gallery-stack figcaption {
  text-align: center;
  margin-top: .45rem;
  font-size: .8rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.facade-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 140px), 1fr));
  gap: .75rem;
}
.facade-grid--lg {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 1rem;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--line);
}
.table th, .table td {
  padding: .85rem .9rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.table th {
  background: var(--bg-deep);
  font-size: .74rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 700;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  align-items: center;
  margin-top: 1.5rem;
}
.pagination a, .pagination span {
  min-width: 2.5rem;
  min-height: 2.5rem;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: .9rem;
  padding: .2rem .45rem;
  transition: border-color .2s ease, color .2s ease;
}
.pagination a:hover { border-color: var(--gold-deep); color: var(--gold-deep); }
.pagination .current {
  background: var(--ink);
  color: var(--gold-soft);
  border-color: var(--ink);
}
.pagination__nav { padding-inline: .85rem; }
.pagination__gap { border: 0; background: transparent; min-width: auto; }
.pagination-note { margin-top: .75rem; font-size: .85rem; }

.catalog-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  padding: 1.25rem;
  color: var(--muted);
  font-size: .9rem;
}
.catalog-loader[hidden] { display: none !important; }
.catalog-sentinel { height: 1px; width: 100%; }
.catalog-end {
  text-align: center;
  margin: 1.1rem 0 0;
  font-size: .92rem;
}
.catalog-end[hidden] { display: none !important; }
.catalog-count b {
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.spin {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  border-top-color: var(--gold-deep);
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .9rem;
  width: 100%;
}
.form-grid .full { grid-column: 1 / -1; }
.error-box {
  background: #f8ebe8;
  border: 1px solid #e5c4bc;
  color: #6e2418;
  padding: .85rem 1rem;
  margin-bottom: 1rem;
}
.empty-state { padding: 1.5rem; }

.hero-home {
  position: relative;
  width: 100%;
  min-height: clamp(320px, 48vw, 540px);
  padding: clamp(1.4rem, 4vw, 2.9rem);
  margin-bottom: 1.2rem;
  color: #f7f3eb;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  isolation: isolate;
}
.hero-home__media {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--ink);
}
.hero-home__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  display: block;
}
.hero-home__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 100% at 100% 0%, rgba(42, 138, 154, .18), transparent 58%),
    linear-gradient(112deg, rgba(10, 28, 40, .94) 6%, rgba(10, 28, 40, .58) 46%, rgba(10, 28, 40, .22) 100%),
    linear-gradient(0deg, rgba(10, 28, 40, .62) 0%, transparent 48%);
}
.hero-home__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: end;
  width: 100%;
  max-width: 40rem;
}

/* —— Компактный подбор на главной —— */
.home-filter {
  margin: -1.5rem 0 1.5rem;
  position: relative;
  z-index: 2;
}
.home-filter__form {
  background: rgba(255, 255, 255, .78);
  border: 1px solid rgba(26, 95, 110, .12);
  box-shadow: 0 12px 32px rgba(16, 17, 16, .06);
  backdrop-filter: blur(10px);
  padding: clamp(.85rem, 2vw, 1.15rem);
  border-radius: 4px;
}
.home-filter__row {
  display: grid;
  grid-template-columns: minmax(9rem, 1.35fr) repeat(2, minmax(0, 1fr)) auto;
  gap: .65rem .75rem;
  align-items: end;
}
.home-filter__row--extra {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
  margin-top: .75rem;
  padding-top: .75rem;
  border-top: 1px dashed var(--line);
}
.home-filter__field {
  display: flex;
  flex-direction: column;
  gap: .28rem;
  min-width: 0;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
}
.home-filter__field input,
.home-filter__field select {
  width: 100%;
  font: inherit;
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
  padding: .55rem .65rem;
  border: 1px solid var(--line-strong);
  background: #fff;
}
.home-filter__submit {
  background: var(--gold) !important;
  border-color: var(--gold) !important;
  color: #fff !important;
  white-space: nowrap;
  min-height: 2.55rem;
  padding-left: 1.35rem;
  padding-right: 1.35rem;
}
.home-filter__submit:hover {
  background: var(--gold-deep) !important;
  border-color: var(--gold-deep) !important;
}
.home-filter__toggle {
  margin-top: .65rem;
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-size: .88rem;
  font-weight: 700;
  color: var(--gold-deep);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.home-filter__toggle::after { content: " +"; }
.home-filter__advanced.is-open .home-filter__toggle::after { content: " −"; }
.home-filter__chip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  align-self: end;
  margin-bottom: .35rem;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
}
.home-filter__chip input { accent-color: var(--ink); }

.filter-panel__head-actions {
  display: flex;
  align-items: center;
  gap: .85rem;
  flex-wrap: wrap;
}
.btn-reset-text {
  font-size: .82rem;
  font-weight: 700;
  color: var(--muted);
  text-decoration: none;
}
.btn-reset-text:hover { color: var(--gold-deep); }
.filter-code-jump {
  margin: .35rem 0 .65rem;
}
.filter-code-jump__row {
  display: flex;
  gap: .45rem;
  align-items: stretch;
}
.filter-code-jump__row input { flex: 1; min-width: 0; }
.filter-code-jump__row .btn-find { flex: 0 0 auto; width: auto; }
.filter-panel__submit-bar {
  margin-top: .75rem;
  display: flex;
  gap: .65rem;
}
.filter-quick {
  margin: 0 0 1rem;
  padding: .9rem 1rem;
  background: rgba(255, 255, 255, .55);
  border: 1px solid rgba(26, 95, 110, .1);
  box-shadow: 0 8px 22px rgba(16, 17, 16, .04);
  border-radius: 4px;
}
.filter-quick__title {
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--muted);
  margin-bottom: .55rem;
}
.filter-quick__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .35rem .85rem;
}
.filter-quick__list a {
  font-size: .9rem;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
}
.filter-quick__list a:hover { color: var(--gold-deep); }

@media (max-width: 900px) {
  .home-filter__row {
    grid-template-columns: 1fr 1fr;
  }
  .home-filter__submit { grid-column: 1 / -1; width: 100%; }
  .home-filter { margin-top: -.75rem; }
}
.hero-eyebrow {
  display: flex;
  align-items: center;
  margin: 0 0 .65rem;
  font-size: .72rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(126, 200, 212, .9);
}
.hero-eyebrow::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 1px;
  margin-right: .7em;
  background: var(--gold);
}
.hero-home h1 {
  color: #fff;
  max-width: 18ch;
  font-size: clamp(1.85rem, 5.2vw, 3.2rem);
  margin-bottom: .35em;
  text-shadow: 0 4px 24px rgba(0, 0, 0, .35);
}
.hero-home h1 .h1-sub {
  display: block;
  margin-top: .4em;
  max-width: 28ch;
  font-size: clamp(.72rem, 1.9vw, .92rem);
  font-weight: 600;
  letter-spacing: .01em;
  line-height: 1.35;
  color: rgba(247, 243, 235, .88);
  text-shadow: 0 2px 12px rgba(0, 0, 0, .3);
}
.hero-home__copy p {
  max-width: 40ch;
  color: rgba(247, 243, 235, .8);
  font-size: clamp(.98rem, 2.2vw, 1.08rem);
  margin: 0 0 1.15rem;
}
.hero-home .btn { background: var(--gold); border-color: var(--gold); color: #fff; }
.hero-home .btn:hover { background: var(--gold-deep); border-color: var(--gold-deep); color: #fff; }

.home-seo {
  margin: 1.5rem 0 2rem;
  padding: 1.35rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.home-seo h2 { margin-bottom: .55rem; }
.home-seo h3 {
  margin-top: 1.35rem;
  font-size: clamp(1.15rem, 2vw, 1.35rem);
}
.home-seo p { color: var(--ink-soft); margin: 0 0 .85rem; }
.home-seo__count {
  margin-bottom: 1rem !important;
  font-size: 1.02rem;
  color: var(--ink) !important;
}
.home-seo--more { margin-top: 2rem; }
.home-steps {
  margin: .5rem 0 1rem;
  padding-left: 1.2rem;
  color: var(--ink-soft);
}
.home-steps li { margin-bottom: .45rem; }
.home-bullets {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--ink-soft);
}
.home-bullets li { margin-bottom: .35rem; }

.hero-search {
  background: rgba(255, 253, 248, .97);
  color: var(--ink);
  padding: 1.15rem 1.2rem 1.2rem;
  border: 1px solid rgba(201, 169, 97, .28);
  box-shadow: var(--shadow-lg);
}
.hero-search__label {
  display: block;
  font-size: .76rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .6rem;
  font-weight: 700;
}
.hero-search__row {
  display: flex;
  gap: .5rem;
  align-items: stretch;
}
.hero-search__row input {
  flex: 1;
  min-width: 0;
  border-color: var(--line-strong);
}
.hero-search__row .btn {
  width: auto;
  flex: 0 0 auto;
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
  white-space: nowrap;
}
.hero-search__hint {
  margin: .6rem 0 0;
  font-size: .8rem;
  color: var(--muted);
}

.quick-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin: 0 0 1.25rem;
  width: 100%;
}
.home .quick-tags a,
.quick-tags a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: .35rem .8rem;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink-soft);
  text-decoration: none;
  font-size: .85rem;
  font-weight: 600;
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.quick-tags a:hover {
  border-color: var(--gold-deep);
  color: var(--ink);
  background: var(--bg-deep);
}

.muted { color: var(--muted); }
.panel { padding: 1.15rem; }

.page-head__lead {
  margin: .35rem 0 0;
  max-width: 42rem;
  color: var(--ink-soft);
  font-size: .98rem;
  line-height: 1.45;
}

.cart-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, .85fr);
  gap: clamp(1rem, 2.5vw, 1.75rem);
  align-items: start;
  width: 100%;
}
.cart-main { display: grid; gap: 1.1rem; min-width: 0; }
.cart-list { display: grid; gap: .9rem; width: 100%; }
.cart-card {
  position: relative;
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: .85rem 1.1rem;
  padding: clamp(1rem, 2vw, 1.25rem);
  background: #fff;
  border: 1px solid rgba(26, 95, 110, .12);
  box-shadow: 0 10px 28px rgba(14, 26, 36, .05);
  border-radius: 4px;
  width: 100%;
}
.cart-card__media {
  grid-row: 1 / span 2;
  display: block;
  overflow: hidden;
  border-radius: 3px;
  background: var(--bg-deep);
  align-self: start;
}
.cart-card__media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
}
.cart-card__info { min-width: 0; }
.cart-card__title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
}
.cart-card__title a { color: var(--ink); text-decoration: none; }
.cart-card__title a:hover { color: var(--gold-deep); }
.cart-card__params {
  margin-top: .28rem;
  color: var(--muted);
  font-size: .9rem;
}
.cart-card__base { margin-top: .45rem; font-size: .86rem; }
.cart-card__price {
  margin-top: .35rem;
  font-size: clamp(1.35rem, 2.6vw, 1.7rem);
  font-weight: 800;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.cart-card__links {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem .85rem;
  margin-top: .55rem;
  font-size: .86rem;
}
.cart-card__links a { color: var(--gold-deep); font-weight: 700; text-decoration: none; }
.cart-card__links a:hover { text-decoration: underline; }
.cart-card__options {
  grid-column: 2;
  display: grid;
  gap: .45rem;
}
.cart-opt-row {
  display: block;
  margin: 0;
  cursor: pointer;
}
.cart-opt-row > input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.cart-opt-row__body {
  display: grid;
  grid-template-columns: 1.6rem minmax(0, 1fr) auto;
  gap: .55rem;
  align-items: center;
  padding: .55rem .7rem;
  border: 1px solid var(--line);
  background: #f7fafb;
  border-radius: 3px;
  transition: border-color .2s ease, background .2s ease;
}
.cart-opt-row > input:checked + .cart-opt-row__body {
  border-color: var(--gold);
  background: var(--gold-soft);
}
.cart-opt-row__icon {
  font-size: 1rem;
  color: var(--gold-deep);
  text-align: center;
}
.cart-opt-row__body strong { display: block; font-size: .9rem; }
.cart-opt-row__body .muted { display: block; font-size: .78rem; margin-top: .1rem; }
.option-price {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--gold-ink);
  white-space: nowrap;
}
.cart-card__remove {
  position: absolute;
  top: .85rem;
  right: .95rem;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
}
.cart-trust {
  display: grid;
  gap: .75rem;
  padding: 1rem 1.1rem;
  background: rgba(255, 255, 255, .7);
  border: 1px solid rgba(26, 95, 110, .1);
  border-radius: 4px;
}
.trust-item {
  display: grid;
  grid-template-columns: 2.2rem minmax(0, 1fr);
  gap: .7rem;
  align-items: start;
}
.trust-icon {
  width: 2.2rem;
  height: 2.2rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--gold-soft);
  color: var(--gold-deep);
  font-size: .95rem;
  font-weight: 800;
}
.trust-item strong { display: block; font-size: .95rem; }
.trust-item .muted { margin: .2rem 0 .25rem; font-size: .86rem; line-height: 1.4; }
.trust-item a { font-size: .86rem; font-weight: 700; color: var(--gold-deep); text-decoration: none; }
.trust-item a:hover { text-decoration: underline; }

.cart-summary {
  position: sticky;
  top: calc(var(--header-height, 72px) + 1rem);
}
.cart-summary__panel {
  padding: 1.15rem 1.2rem 1.25rem;
  background: #fff;
  border: 1px solid rgba(26, 95, 110, .14);
  box-shadow: 0 14px 36px rgba(14, 26, 36, .08);
  border-radius: 4px;
}
.cart-summary__panel h2 {
  margin: 0 0 .85rem;
  font-size: 1.05rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.cart-total { display: grid; gap: .55rem; }
.cart-total__row,
.cart-total__final {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
  font-variant-numeric: tabular-nums;
}
.cart-total__row { color: var(--ink-soft); font-size: .95rem; }
.cart-total__row.is-zero { opacity: .55; }
.cart-total__final {
  margin-top: .35rem;
  padding-top: .75rem;
  border-top: 1px solid var(--line);
  font-size: 1.15rem;
  font-weight: 800;
}
.cart-total__final span:last-child {
  font-size: clamp(1.35rem, 2.5vw, 1.7rem);
  color: var(--gold-ink);
}
.cart-summary__cta {
  margin-top: 1rem;
  min-height: 54px;
  text-align: center;
}
.cart-summary .btn-ghost { margin-top: .55rem; }
.cart-summary__note {
  margin: .85rem 0 0;
  font-size: .84rem;
  line-height: 1.4;
}
.cart-summary__note a { color: var(--gold-deep); font-weight: 700; }

.cart-empty {
  text-align: center;
  padding: clamp(1.5rem, 4vw, 2.5rem) 1.25rem;
  background: #fff;
  border: 1px solid rgba(26, 95, 110, .12);
  box-shadow: 0 10px 28px rgba(14, 26, 36, .05);
}
.cart-empty__icon {
  width: 72px;
  height: 72px;
  margin: 0 auto .85rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--gold-soft);
  color: var(--gold-deep);
}
.cart-empty h2 { margin: 0 0 .45rem; }
.cart-empty > p {
  max-width: 34rem;
  margin: 0 auto 1.1rem;
  color: var(--ink-soft);
}
.cart-empty .btn--buy { display: inline-flex; width: auto; min-width: 220px; }
.cart-empty__popular { margin-top: 2rem; text-align: left; }
.cart-empty__popular h3 { margin: 0 0 .85rem; text-align: center; }

.cart-related { margin-top: 2.25rem; }
.cart-related .section-head { margin-bottom: .85rem; }
.cart-related .section-head h2 { margin: 0 0 .25rem; }

.order-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(240px, .75fr);
  gap: clamp(1rem, 2.5vw, 1.6rem);
  align-items: start;
}
.order-main { display: grid; gap: 1rem; min-width: 0; }
.order-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.order-line {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: .75rem;
  align-items: center;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--line);
}
.order-line:last-child { border-bottom: 0; padding-bottom: 0; }
.order-line__media img {
  display: block;
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 3px;
  background: var(--bg-deep);
}
.order-line__info a { color: var(--ink); text-decoration: none; }
.order-line__opts { margin-top: .2rem; font-size: .84rem; color: var(--gold-ink); }
.order-line__price { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.order-total-row { margin-top: .85rem; }
.order-form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  margin-top: 1.1rem;
}
.order-form__actions .btn--buy { flex: 1 1 220px; min-height: 52px; }
.order-trust .trust-icon {
  font-family: var(--font);
  background: var(--ink);
  color: var(--gold-soft);
}
.order-thanks { text-align: center; padding: clamp(1.6rem, 4vw, 2.6rem) 1.25rem; background: #fff; }
.order-thanks__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto .9rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--gold-soft);
  color: var(--gold-deep);
  font-size: 1.6rem;
  font-weight: 800;
}
.order-thanks__lead { max-width: 34rem; margin: 0 auto 1rem; color: var(--ink-soft); }
.order-thanks__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  justify-content: center;
  margin-top: 1.1rem;
}

@media (max-width: 980px) {
  .cart-layout,
  .order-layout { grid-template-columns: 1fr; }
  .cart-summary { position: static; }
}
@media (max-width: 640px) {
  .cart-card {
    grid-template-columns: 88px minmax(0, 1fr);
  }
  .cart-card__options { grid-column: 1 / -1; }
  .cart-card__media { grid-row: auto; }
  .cart-opt-row__body { grid-template-columns: 1.4rem minmax(0, 1fr); }
  .cart-opt-row__body .option-price { grid-column: 2; justify-self: start; }
  .order-line { grid-template-columns: 64px minmax(0, 1fr); }
  .order-line__price { grid-column: 2; }
  .order-line-card.cart-card {
    display: block;
    grid-template-columns: unset;
  }
  .order-line-card__head {
    grid-template-columns: 64px minmax(0, 1fr);
  }
  .order-line-card__head .order-line__price {
    grid-column: 2;
    justify-self: start;
  }
  .order-line-card .cart-card__options,
  .order-line-card__opts {
    grid-column: unset;
  }
  .order-line-card .cart-opt-row__body {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .order-line-card .cart-opt-row__body .option-price {
    grid-column: auto;
    justify-self: end;
  }
}


/* —— Breakpoints —— */
@media (max-width: 1100px) {
  .project-hero, .gallery-2 { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  :root { --pad: 0.85rem; }

  .menu-toggle { display: inline-flex; }
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: .35rem var(--pad) .9rem;
    background: var(--ink);
    border-bottom: 1px solid rgba(201, 169, 97, .16);
  }
  .header-inner { flex-wrap: wrap; }
  .header-search {
    order: 3;
    flex: 1 1 100%;
    max-width: none;
    margin: .15rem 0 .35rem;
  }
  .nav.is-open { display: flex; }
  .nav a {
    padding: .95rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    font-size: 1rem;
  }
  .nav a::after { display: none; }
  .nav .cart-link { justify-content: center; margin-top: .4rem; border-radius: 2px; }

  .layout { grid-template-columns: 1fr; }
  .sidebar { order: -1; }
  .sidebar-inner { display: none; margin-bottom: 1rem; }
  .sidebar-inner.is-open { display: block; }
  .sidebar-toggle { display: flex; width: 100%; margin-bottom: .75rem; }

  .hero-home__grid { grid-template-columns: 1fr; align-items: stretch; }
  .hero-home { min-height: clamp(340px, 70vw, 480px); align-items: flex-end; }
  .hero-home__media img { object-position: center center; }
  .hero-search__row { flex-direction: column; }
  .hero-search__row .btn { width: 100%; }

  .materials { columns: 1; }
  .form-grid { grid-template-columns: 1fr; }
  .actions .btn, .actions form, .filter-actions .btn { flex: 1 1 auto; }
  .actions form { display: flex; }
  .actions form .btn { width: 100%; }
  .media-frame--hero img { max-height: none; }

  .breadcrumbs {
    overflow-wrap: anywhere;
    line-height: 1.45;
  }
  .main > h1 {
    font-size: clamp(1.35rem, 5.5vw, 1.9rem);
    overflow-wrap: anywhere;
  }
  .project-3d-cta {
    white-space: normal;
    text-align: center;
    max-width: calc(100% - 1.25rem);
    min-height: 42px;
    font-size: .78rem;
    padding: .55rem .85rem;
    line-height: 1.25;
  }
  .mirror-banner {
    overflow-wrap: anywhere;
    line-height: 1.4;
  }
  .facts__price-row {
    align-items: flex-start;
  }
  .facts__price-row .price-lg {
    font-size: clamp(1.35rem, 6vw, 1.7rem);
  }
}

@media (max-width: 900px) {
  .filter-panel__row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-panel__submit { grid-column: 1 / -1; }
  .btn-find { flex: 1; }
  .project-card__body { grid-template-columns: 1fr; }
  .project-card__specs { text-align: left; display: flex; flex-wrap: wrap; gap: .15rem .75rem; }
  .build-cost { grid-template-columns: 1fr; }
  .filter-acc:not([open]) .filter-panel__chips,
  .filter-acc:not([open]) .filter-panel__row { display: none; }

  .catalog-toolbar { display: flex; }
  .catalog-filters-shell {
    position: fixed;
    inset: 0;
    z-index: 80;
    pointer-events: none;
    visibility: hidden;
  }
  .catalog-filters-shell.is-open {
    pointer-events: auto;
    visibility: visible;
  }
  .catalog-filters-shell__backdrop {
    display: block;
    position: absolute;
    inset: 0;
    background: rgba(16, 17, 16, .42);
    opacity: 0;
    transition: opacity .25s ease;
  }
  .catalog-filters-shell.is-open .catalog-filters-shell__backdrop { opacity: 1; }
  .catalog-filters-shell__panel {
    position: absolute;
    top: 0;
    right: 0;
    width: min(100%, 380px);
    height: 100%;
    overflow: auto;
    background: #f7fafb;
    box-shadow: -12px 0 36px rgba(16, 17, 16, .18);
    padding: 1rem 1rem 2rem;
    transform: translateX(104%);
    transition: transform .28s var(--ease);
  }
  .catalog-filters-shell.is-open .catalog-filters-shell__panel { transform: translateX(0); }
  .catalog-filters-shell__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .75rem;
  }
  .catalog-filters-shell .filter-panel {
    margin-bottom: .85rem;
    box-shadow: none;
  }
  .catalog-filters-shell .filter-panel__head { display: none; }
  body.filters-open { overflow: hidden; }

  .project-actions__secondary { grid-template-columns: 1fr; }
}

@media (min-width: 901px) {
  .filter-acc:first-of-type > .filter-acc__summary { display: none; }
  .catalog-toolbar { display: none !important; }
  .catalog-filters-shell__head,
  .catalog-filters-shell__backdrop { display: none !important; }
}

@media (max-width: 560px) {
  :root { --pad: var(--pad-mobile); }
  .logo__tag { font-size: .7rem; }
  .filter-panel__row { grid-template-columns: 1fr 1fr; }
  .f-field:nth-child(1),
  .f-field:nth-child(4) { grid-column: 1 / -1; }
  .filter-panel__head { flex-direction: column; align-items: flex-start; gap: .35rem; }
  .grid-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
  .project-card__code { font-size: 1rem; }
  .project-card__price { font-size: .95rem; }
  .project-card__specs { font-size: .72rem; }
  .facade-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .btn:not(.btn-icon):not(.btn--sm) { width: 100%; }
  .filter-actions { flex-direction: column; }
  .filter-actions .btn { width: 100%; }
  .filter-panel__submit .btn-find { width: auto; flex: 1; }
  .hero-home { min-height: 260px; }
  .project-actions__more .btn { flex: 1 1 calc(50% - .45rem); width: auto; min-width: 0; }
  .promo-list li { font-size: .88rem; }
  .btn-icon { width: 40px; height: 40px; }
  .project-card__tools { top: .4rem; right: .4rem; }
  .tool-btn { width: 32px; height: 32px; }
  .project-mobile-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 70;
    display: flex;
    gap: .55rem;
    padding: .7rem .85rem calc(.7rem + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .96);
    border-top: 1px solid var(--line);
    backdrop-filter: blur(10px);
    box-shadow: 0 -8px 24px rgba(16, 17, 16, .08);
  }
  .project-mobile-bar .btn { min-height: 48px; margin: 0; flex: 1; width: auto; }
  .project-mobile-bar .btn--buy { flex: 1.4; }
  body:has(.project-mobile-bar) { padding-bottom: 5.2rem; }
}

@media (min-width: 901px) {
  .sidebar-toggle { display: none !important; }
  .sidebar-inner { display: block !important; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .spin, .project-card:hover .media-frame img, .btn { animation: none; transition: none; }
}
