:root {
  --ink: #22201d;
  --muted: #726e68;
  --soft: #f7f5f1;
  --paper: #ffffff;
  --line: #e4dfd7;
  --accent: #1f5d72;
  --accent-dark: #173f4f;
  --green: #2e7565;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--soft);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

img {
  display: block;
  max-width: 100%;
}

a,
button {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 230px minmax(240px, 1fr) auto;
  gap: 20px;
  align-items: center;
  min-height: 72px;
  padding: 0 32px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 760;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: #fff;
  background: var(--accent-dark);
  border-radius: 50%;
  font-size: 14px;
}

.search {
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  color: var(--muted);
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14px;
}

.top-action,
.contact a,
.order-box a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  color: #fff;
  background: var(--accent-dark);
  border-radius: 6px;
  font-weight: 740;
}

.intro {
  display: grid;
  grid-template-columns: minmax(320px, 1.2fr) minmax(300px, 0.8fr);
  gap: 30px;
  padding: 44px 32px 34px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.intro h1 {
  max-width: 820px;
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.02;
  letter-spacing: 0;
}

.intro p {
  max-width: 850px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.62;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.intro-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-self: end;
}

.intro-stats div {
  min-height: 96px;
  padding: 18px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

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

.intro-stats span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.catalog-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 28px;
  padding: 28px 32px 54px;
}

.filters {
  position: sticky;
  top: 92px;
  align-self: start;
  padding: 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.filters h2 {
  margin: 0 0 16px;
  font-size: 20px;
}

.filter {
  width: 100%;
  min-height: 42px;
  margin-bottom: 8px;
  padding: 0 12px;
  text-align: left;
  color: var(--ink);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
}

.filter.active,
.filter:hover {
  background: var(--soft);
  border-color: var(--line);
}

.filter-note {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.filter-note strong {
  color: var(--ink);
}

.products {
  min-width: 0;
}

.products-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.products-head h2 {
  margin: 0;
  font-size: 30px;
}

.count {
  color: var(--muted);
  font-size: 14px;
}

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

.product-card,
.empty-card {
  min-width: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.card-button {
  width: 100%;
  padding: 0;
  text-align: left;
  color: inherit;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.card-image {
  position: relative;
  aspect-ratio: 4 / 5;
  background: #edf0ef;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 180ms ease;
}

.card-button:hover .card-image img {
  transform: scale(1.035);
}

.badge {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 6px 9px;
  color: #fff;
  background: var(--green);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 760;
}

.card-info {
  padding: 14px 14px 16px;
}

.category {
  display: block;
  margin-bottom: 7px;
  color: var(--green);
  font-size: 12px;
  font-weight: 780;
  text-transform: uppercase;
}

.card-info h3 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.25;
}

.card-info p {
  min-height: 44px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.price-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.price-row span {
  color: var(--muted);
}

.price-row strong {
  color: var(--ink);
  font-weight: 780;
  text-align: right;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.meta span {
  padding: 6px 8px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
}

.empty-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 380px;
  padding: 24px;
  color: var(--muted);
}

.empty-card h3 {
  margin: 0 0 10px;
  color: var(--ink);
}

.contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 46px 32px;
  color: #fff;
  background: var(--accent-dark);
}

.contact div {
  max-width: 820px;
}

.contact h2 {
  margin: 0 0 10px;
  font-size: 34px;
}

.contact p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.6;
}

.contact a {
  background: #fff;
  color: var(--accent-dark);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
}

.modal.open {
  display: block;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(22, 25, 27, 0.62);
}

.modal-panel {
  position: absolute;
  inset: 32px;
  display: grid;
  grid-template-columns: minmax(380px, 1.1fr) minmax(360px, 0.9fr);
  gap: 28px;
  max-width: 1260px;
  margin: auto;
  padding: 24px;
  background: var(--paper);
  border-radius: 10px;
  overflow: auto;
}

.close {
  position: absolute;
  right: 18px;
  top: 14px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: var(--soft);
  cursor: pointer;
  font-size: 24px;
}

.detail-gallery {
  min-width: 0;
}

.main-photo {
  display: grid;
  place-items: center;
  min-height: 580px;
  background: #edf0ef;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.main-photo img {
  width: 100%;
  max-height: 760px;
  object-fit: contain;
}

.thumbs {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.thumbs button {
  aspect-ratio: 1;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--soft);
  cursor: pointer;
}

.thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-info {
  padding: 18px 8px 8px;
}

.detail-info h2 {
  margin: 0 0 10px;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.05;
}

.style-no {
  margin: 0 0 18px;
  color: var(--muted);
  font-weight: 720;
}

.detail-copy {
  color: var(--muted);
  line-height: 1.65;
}

.detail-specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 22px 0;
}

.detail-specs div {
  padding: 14px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.detail-specs span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
}

.detail-specs strong {
  display: block;
  margin-top: 6px;
}

.order-box {
  padding: 20px;
  background: #f3f7f5;
  border: 1px solid #d4e3dc;
  border-radius: 8px;
}

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

.order-box ul {
  display: grid;
  gap: 8px;
  margin: 0 0 18px;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.45;
}

@media (max-width: 1120px) {
  .grid {
    grid-template-columns: repeat(3, minmax(210px, 1fr));
  }
}

@media (max-width: 920px) {
  .topbar,
  .intro,
  .catalog-shell,
  .modal-panel {
    grid-template-columns: 1fr;
  }

  .topbar {
    gap: 12px;
    padding: 14px 20px;
  }

  .catalog-shell,
  .intro,
  .contact {
    padding-left: 20px;
    padding-right: 20px;
  }

  .filters {
    position: static;
  }

  .grid {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .modal-panel {
    inset: 14px;
  }

  .main-photo {
    min-height: 420px;
  }
}

@media (max-width: 620px) {
  .intro-stats,
  .detail-specs,
  .grid {
    grid-template-columns: 1fr;
  }

  .contact {
    align-items: flex-start;
    flex-direction: column;
  }

  .thumbs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
