:root {
  --bg: #0f1216;
  --bg-2: #171b22;
  --surface: #1e2430;
  --text: #f2f4f7;
  --muted: #9aa3b2;
  --accent: #c45c26;
  --accent-2: #e8a05c;
  --line: rgba(255,255,255,.08);
  --ok: #3d9a6a;
  --font: "Manrope", system-ui, sans-serif;
  --display: "Oswald", "Manrope", sans-serif;
  --radius: 14px;
  --shadow: 0 18px 50px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(196,92,38,.22), transparent 55%),
    radial-gradient(900px 400px at 90% 0%, rgba(232,160,92,.12), transparent 50%),
    linear-gradient(180deg, #12161c 0%, var(--bg) 40%, #0c0f13 100%);
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }

.site-header {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(14px);
  background: rgba(15,18,22,.82);
  border-bottom: 1px solid var(--line);
}
.site-header__inner, .site-footer__inner, .site-main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}
.site-header__inner {
  display: flex; align-items: center; gap: 20px;
  min-height: 68px;
}
.logo {
  font-family: var(--display);
  font-size: 1.35rem; letter-spacing: .06em; text-transform: uppercase;
}
.logo span { display: block; font-size: .7rem; color: var(--accent-2); letter-spacing: .14em; }
.site-nav { display: flex; gap: 14px; flex-wrap: wrap; margin-left: auto; }
.site-nav a { color: var(--muted); font-weight: 600; font-size: .92rem; }
.site-nav a.is-active, .site-nav a:hover { color: var(--text); }
.site-header__meta { display: flex; gap: 8px; flex-wrap: wrap; }
.site-main { padding: 28px 0 64px; }
body.is-manager-mode .site-header { border-bottom-color: rgba(196,92,38,.35); }
.site-footer { border-top: 1px solid var(--line); padding: 24px 0 40px; color: var(--muted); font-size: .9rem; }
.site-footer__inner { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

.hero { margin-bottom: 28px; }
.eyebrow { text-transform: uppercase; letter-spacing: .16em; color: var(--accent-2); font-size: .75rem; font-weight: 700; margin: 0 0 10px; }
.hero h1, .product h1, .showroom h1, .selection h1 {
  font-family: var(--display); font-weight: 600; letter-spacing: .02em;
  font-size: clamp(2rem, 4vw, 3.2rem); margin: 0 0 12px; text-transform: uppercase;
}
.hero__lead { color: var(--muted); max-width: 42rem; font-size: 1.05rem; line-height: 1.55; }

.filters { margin-bottom: 24px; }
.filters__form { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.filters__form input, .filters__form select, .panel input, .panel select, .modal input, .modal textarea, .form-row input {
  background: var(--surface); color: var(--text); border: 1px solid var(--line);
  border-radius: 10px; padding: 12px 14px; min-width: 0;
}
.filters__chips { display: flex; gap: 8px; flex-wrap: wrap; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px; border-radius: 999px; background: rgba(255,255,255,.04);
  border: 1px solid var(--line); color: var(--muted); font-size: .85rem; font-weight: 600;
}
.chip--accent, .chip.is-active { background: rgba(196,92,38,.18); border-color: rgba(196,92,38,.45); color: var(--accent-2); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 18px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); cursor: pointer; font-weight: 700;
}
.btn--primary { background: linear-gradient(135deg, var(--accent), #9a3f14); border-color: transparent; }
.btn--ghost { background: transparent; }
.btn:hover { filter: brightness(1.08); }

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.card {
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}
.card__media { aspect-ratio: 16/10; background: var(--bg-2); overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.card:hover .card__media img { transform: scale(1.04); }
.card__body { padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card__dir { color: var(--accent-2); font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.card__title { font-size: 1.15rem; margin: 0; line-height: 1.25; }
.card__text { color: var(--muted); margin: 0; flex: 1; }
.card__models { font-size: .85rem; color: var(--muted); }
.card__actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }

.product { display: grid; grid-template-columns: 1.05fr .95fr; gap: 28px; align-items: start; }
.product__media { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--bg-2); }
.product__media img { width: 100%; }
.gallery__main { aspect-ratio: 16/10; background: var(--bg-2); }
.gallery__main img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumbs { display: flex; gap: 8px; padding: 10px; overflow-x: auto; }
.gallery__thumb {
  flex: 0 0 72px; height: 56px; padding: 0; border: 2px solid transparent; border-radius: 8px;
  overflow: hidden; background: transparent; cursor: pointer;
}
.gallery__thumb.is-active, .gallery__thumb:hover { border-color: var(--accent); }
.gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
.product__lead { color: var(--muted); font-size: 1.05rem; }
.hpv-block { display: grid; gap: 12px; margin: 20px 0; }
.hpv-block h3 { margin: 0 0 4px; font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: var(--accent-2); }
.hpv-block p { margin: 0; color: var(--text); }
.tech { display: grid; gap: 10px; margin: 0 0 20px; }
.tech div { display: grid; grid-template-columns: 140px 1fr; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.tech dt { color: var(--muted); margin: 0; }
.tech dd { margin: 0; }
.product__actions { display: flex; gap: 10px; flex-wrap: wrap; }

.product-related { display: block; width: 100%; margin-top: 40px; clear: both; }
.related { margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--line); width: 100%; }
.related:first-child { margin-top: 0; }
.related__title {
  font-family: var(--display); font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  text-transform: uppercase; letter-spacing: .02em; margin: 0 0 16px; color: var(--text);
}
.related__sub { margin: 0 0 18px; }
.related__grid.catalog-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.related .card__title { font-size: 1rem; }
@media (max-width: 992px) {
  .related__grid.catalog-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 576px) {
  .related__grid.catalog-grid { grid-template-columns: 1fr; }
}

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.draft-list { list-style: none; padding: 0; margin: 0 0 76px; }
.draft-list li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.form-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.form-row label { display: grid; gap: 6px; flex: 1; min-width: 180px; }
.flash-ok { background: rgba(61,154,106,.15); border: 1px solid rgba(61,154,106,.4); padding: 14px; border-radius: 12px; margin-bottom: 16px; }
.muted { color: var(--muted); }
.empty { color: var(--muted); padding: 40px 0; }
.selection__cta { margin-top: 24px; display: grid; gap: 10px; justify-items: start; }
.selection__hint { margin: 8px 0 20px; }
.selection-card.is-excluded { opacity: .42; }
.selection-card.is-excluded .card__media { filter: grayscale(.7); }
.selection-card.is-excluded .btn-selection-toggle { border-color: var(--accent); color: var(--accent-2); }
.link-danger { background: none; border: 0; color: #e07070; cursor: pointer; }

.modal[hidden] { display: none; }
.modal {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(0,0,0,.62);
  display: grid; place-items: center; padding: 16px;
}
.modal__card {
  width: min(440px, 100%); background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 16px; padding: 22px; position: relative; box-shadow: var(--shadow);
}
.modal__card label { display: grid; gap: 6px; margin-bottom: 10px; }
.modal__close { position: absolute; right: 12px; top: 8px; background: none; border: 0; color: var(--muted); font-size: 1.6rem; cursor: pointer; }
.form-msg { margin-top: 10px; }
.form-msg.is-ok { color: var(--ok); }
.form-msg.is-err { color: #e07070; }

@media (max-width: 992px) {
  .catalog-grid { grid-template-columns: repeat(2, 1fr); }
  .product { grid-template-columns: 1fr; }
  .tech div { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .site-header__inner { flex-wrap: wrap; padding: 10px 0; }
  .site-nav { margin-left: 0; width: 100%; }
  .catalog-grid { grid-template-columns: 1fr; }
  .filters__form { flex-direction: column; }
  .filters__form input, .filters__form select, .filters__form .btn { width: 100%; }
}
