:root {
  --bg: #f4efe6;
  --bg-elev: #fffaf3;
  --ink: #17211c;
  --muted: #5b675f;
  --line: #d9d0c3;
  --forest: #1b3a2e;
  --forest-2: #23483a;
  --copper: #c45c26;
  --copper-hover: #a94b1c;
  --header: #132019;
  --radius: 14px;
  --shadow: 0 12px 32px rgba(19, 32, 25, 0.12);
  --max: 1180px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  cursor: pointer;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.container {
  width: min(100% - 32px, var(--max));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -40px;
  z-index: 100;
  background: #fff;
  padding: 8px 12px;
}

.skip-link:focus {
  top: 12px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header);
  color: #f6f1e8;
}

.topbar {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
}

.topbar__inner {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  min-height: 40px;
}

.topbar__city,
.topbar p {
  margin: 0;
  color: #c9d4cc;
}

.topbar__contacts {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.topbar a:hover,
.header-phone:hover,
.btn--ghost:hover {
  color: #fff;
}

.header-main__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 76px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.logo__mark {
  color: #e8c39a;
  flex-shrink: 0;
}

.logo__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.logo__name {
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.02em;
  line-height: 1.1;
}

.logo__tag {
  color: #b7c3bb;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-contacts {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-phone {
  display: none;
  flex-direction: column;
  line-height: 1.2;
}

.header-phone__label {
  font-size: 11px;
  color: #b7c3bb;
}

.header-phone__number {
  font-weight: 700;
  font-size: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
}

.btn--ghost {
  border-color: rgba(255, 255, 255, 0.25);
  color: #f6f1e8;
}

.btn--primary {
  background: var(--copper);
  color: #fff;
}

.btn--primary:hover {
  background: var(--copper-hover);
}

.btn--outline {
  border-color: var(--forest);
  color: var(--forest);
}

.burger {
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  padding: 10px;
  margin-left: auto;
}

.burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #f6f1e8;
  transition: transform 0.2s, opacity 0.2s;
}

.burger.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.burger.is-open span:nth-child(2) {
  opacity: 0;
}

.burger.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav {
  display: none;
  background: var(--forest);
}

.nav__list {
  display: flex;
  gap: 8px;
}

.nav__link {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 14px;
  font-weight: 600;
}

.nav__item {
  position: relative;
}

.submenu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 5;
  min-width: 220px;
  background: var(--bg-elev);
  color: var(--ink);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow);
  padding: 8px 0;
  display: none;
}

.has-sub:hover > .submenu,
.has-sub:focus-within > .submenu,
.has-sub.is-open > .submenu {
  display: grid;
}

.submenu a {
  display: block;
  padding: 10px 16px;
}

.submenu a:hover,
.submenu a:focus-visible {
  background: #efe6d8;
}

.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 16, 13, 0.45);
  z-index: 60;
}

.mobile-menu {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(100%, 360px);
  background: #fffaf3;
  color: var(--ink);
  z-index: 70;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
  overflow: auto;
}

.mobile-menu.is-open {
  transform: translateX(0);
}

.mobile-menu__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.mobile-menu__title {
  margin: 0;
  font-weight: 700;
}

.mobile-menu__close {
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  font-size: 28px;
  line-height: 1;
}

.mobile-nav__toggle {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  min-height: 52px;
  padding: 12px 20px;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
}

.mobile-nav__toggle::after {
  content: "+";
  font-weight: 400;
}

.mobile-nav__toggle[aria-expanded="true"]::after {
  content: "–";
}

.mobile-nav__sub {
  display: none;
  background: #efe8dc;
}

.mobile-nav__toggle[aria-expanded="true"] + .mobile-nav__sub {
  display: block;
}

.mobile-nav__sub a {
  display: block;
  padding: 12px 20px 12px 28px;
  min-height: 44px;
}

.mobile-menu__contacts {
  margin-top: auto;
  padding: 20px;
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
}

body.menu-open {
  overflow: hidden;
}

.hero {
  padding: 48px 0 32px;
}

.hero__grid {
  display: grid;
  gap: 28px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--copper);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 12px;
}

.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 5vw, 44px);
  line-height: 1.15;
}

.hero__lead {
  margin: 0 0 20px;
  color: var(--muted);
  max-width: 56ch;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.hero__stats li {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}

.hero__stats strong {
  display: block;
  font-size: 22px;
}

.section-head {
  margin-bottom: 20px;
}

.section-head h2 {
  margin: 0 0 6px;
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

.catalog {
  padding: 16px 0 64px;
  scroll-margin-top: 140px;
}

.nav__link.is-active,
.submenu a.is-active,
.mobile-nav__sub a.is-active {
  color: #e8c39a;
}

.submenu a.is-active,
.mobile-nav__sub a.is-active {
  color: var(--copper);
  font-weight: 700;
}

.product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.card__media {
  aspect-ratio: 4 / 3;
  background: #ece6dc;
  position: relative;
  overflow: hidden;
}

.card__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  color: transparent;
  font-size: 0;
}

.card__photo--interior {
  opacity: 0;
  z-index: 1;
  transition: opacity 0.35s ease;
}

.card.is-interior .card__photo--interior {
  opacity: 1;
}

.card__eye {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 2;
  display: none;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 6px 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(19, 32, 25, 0.12);
}

.card__eye[aria-pressed="true"] {
  background: var(--forest);
  color: #fff;
}

.card__body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.card__brand {
  margin: 0;
  color: #8a8f8b;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.card__name {
  margin: 0;
  font-size: 17px;
  line-height: 1.3;
  font-weight: 700;
}

.card__art {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.card__params {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 4px 0 2px;
}

.card__params li {
  background: #f4efe6;
  color: #4d5750;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 4px;
}

.card__price {
  margin: 8px 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}

.card__price-value {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.card__price-unit {
  color: var(--muted);
  font-size: 14px;
}

.card__wa {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 8px;
  background: #1f7a46;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
}

.card__wa:hover {
  background: #18633a;
}

@media (hover: hover) and (pointer: fine) {
  .card--swap .card__media:hover .card__photo--interior,
  .card--swap .card__media:focus-within .card__photo--interior {
    opacity: 1;
  }

  .card__eye {
    display: none !important;
  }
}

@media (hover: none), (pointer: coarse) {
  .card--swap .card__eye {
    display: inline-flex;
  }
}

.empty-state {
  background: var(--bg-elev);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 28px 18px;
  text-align: center;
  color: var(--muted);
}

.site-footer {
  background: var(--header);
  color: #d7ddd9;
  padding: 32px 0 20px;
}

.footer__grid {
  display: grid;
  gap: 20px;
}

.footer__grid a,
.footer__copy {
  display: block;
}

.footer__copy {
  margin: 24px auto 0;
  opacity: 0.7;
  font-size: 13px;
}

@media (min-width: 560px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .burger,
  .mobile-menu,
  .menu-overlay {
    display: none;
  }

  .header-phone {
    display: flex;
  }

  .nav {
    display: block;
  }

  .hero__grid {
    grid-template-columns: 1.4fr 0.8fr;
    align-items: center;
  }

  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer__grid {
    grid-template-columns: 1.4fr 1fr;
  }
}

@media (min-width: 1100px) {
  .product-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 767px) {
  .topbar__contacts {
    display: none;
  }

  .btn--ghost {
    display: none;
  }
}

@media (min-width: 768px) {
  .card__name {
    font-size: 18px;
  }

  .card__price-value {
    font-size: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .mobile-menu,
  .burger span,
  .card__photo--interior {
    transition: none;
  }
}
