:root {
  --ink: #1d2521;
  --muted: #68716c;
  --line: #dfe3df;
  --paper: #f5f6f3;
  --card: #ffffff;
  --accent: #a84b38;
  --accent-soft: #f5e8e3;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 126px;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

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

.container {
  width: min(1500px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.topbar {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-decoration: none;
  text-transform: uppercase;
}

.brand span {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--ink);
  border-radius: 50%;
  font-size: 0.69rem;
  letter-spacing: -0.02em;
}

.catalog-count {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.category-nav {
  border-top: 1px solid var(--line);
}

.category-nav-inner {
  min-height: 45px;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.category-nav-inner::-webkit-scrollbar { display: none; }

.category-nav a {
  flex: 0 0 auto;
  padding: 8px 12px;
  color: #4e5752;
  background: #f2f4f1;
  border: 1px solid #e4e7e3;
  border-radius: 99px;
  font-size: 0.69rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.category-nav a:first-child {
  color: #fff;
  background: var(--ink);
  border-color: var(--ink);
}

.catalog { padding: 24px 0 60px; }

.catalog-heading {
  min-height: 92px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.overline {
  margin: 0 0 5px;
  color: var(--accent);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.catalog-heading h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2rem, 3.1vw, 3.2rem);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1;
}

.catalog-heading > p {
  max-width: 430px;
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 0.79rem;
  line-height: 1.5;
  text-align: right;
}

.category-section { padding-top: 30px; }

.category-heading {
  min-height: 54px;
  display: grid;
  grid-template-columns: minmax(230px, auto) minmax(180px, 1fr) auto;
  align-items: center;
  gap: 26px;
  margin-bottom: 14px;
}

.category-heading > div {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.category-order {
  color: var(--accent);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.09em;
}

.category-heading h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.55rem, 2vw, 2.05rem);
  font-weight: 400;
  letter-spacing: -0.03em;
}

.category-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.45;
}

.category-total {
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: stretch;
  gap: 18px 14px;
}

.product-card {
  min-width: 0;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.product-card:hover,
.product-card:focus-within {
  border-color: #b8c0bb;
  box-shadow: 0 10px 28px rgba(29, 37, 33, 0.09);
  transform: translateY(-2px);
}

.product-card > a {
  height: 100%;
  display: flex;
  flex-direction: column;
  text-decoration: none;
}

.product-image {
  position: relative;
  aspect-ratio: 0.84;
  overflow: hidden;
  background: #f0f1ee;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 320ms ease;
}

.product-card:hover .product-image img { transform: scale(1.025); }

.featured-badge {
  position: absolute;
  z-index: 2;
  top: 10px;
  left: 10px;
  padding: 6px 8px;
  color: #fff;
  background: var(--accent);
  border-radius: 4px;
  font-size: 0.55rem;
  font-weight: 850;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.open-product {
  position: absolute;
  right: 9px;
  bottom: 9px;
  padding: 7px 9px;
  color: #fff;
  background: rgba(29, 37, 33, 0.9);
  border-radius: 99px;
  font-size: 0.58rem;
  font-weight: 800;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.product-card:hover .open-product,
.product-card:focus-within .open-product {
  opacity: 1;
  transform: translateY(0);
}

.image-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: #9ba39e;
  font-size: 1rem;
  font-weight: 850;
  letter-spacing: 0.12em;
}

.product-content {
  flex: 1;
  display: grid;
  grid-template-rows: auto auto 1fr;
  padding: 12px 12px 14px;
}

.product-category {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 0.55rem;
  font-weight: 850;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.product-content h3 {
  min-height: 2.5em;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1rem, 1.35vw, 1.26rem);
  font-weight: 400;
  line-height: 1.25;
}

.product-description {
  display: -webkit-box;
  overflow: hidden;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.empty-state {
  margin-top: 28px;
  padding: 50px;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  text-align: center;
}

.site-footer {
  background: #fff;
  border-top: 1px solid var(--line);
}

.footer-inner {
  min-height: 78px;
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  align-items: center;
  gap: 24px;
  color: var(--muted);
  font-size: 0.61rem;
  line-height: 1.45;
}

.footer-inner p { margin: 0; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media (max-width: 1250px) {
  .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 940px) {
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .category-heading { grid-template-columns: 1fr auto; }
  .category-heading p { display: none; }
}

@media (max-width: 640px) {
  html { scroll-padding-top: 116px; }
  .container { width: min(100% - 20px, 600px); }
  .topbar { min-height: 56px; }
  .brand { font-size: 0.65rem; }
  .brand span { width: 34px; height: 34px; font-size: 0.61rem; }
  .category-nav-inner { min-height: 43px; }
  .catalog { padding-top: 16px; }
  .catalog-heading { min-height: 72px; padding-bottom: 15px; }
  .catalog-heading > p { display: none; }
  .catalog-heading h1 { font-size: 2rem; }
  .category-section { padding-top: 22px; }
  .category-heading { min-height: 42px; gap: 12px; margin-bottom: 10px; }
  .category-heading h2 { font-size: 1.35rem; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 9px; }
  .product-content { padding: 9px 9px 11px; }
  .product-content h3 { min-height: 2.5em; font-size: 0.94rem; }
  .product-description { font-size: 0.64rem; }
  .open-product { opacity: 1; transform: none; }
  .footer-inner { grid-template-columns: 1fr; gap: 4px; padding-block: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

