/* Витрина Tamerlan. Палитра и характер — те же, что в админке и боте:
   тёплый светлый фон, почти чёрный текст, без цветных акцентов.
   Заголовки — с засечками: классическая мужская одежда, а не техно-стартап. */
:root {
  --bg: #f5f4f2;
  --panel: #ffffff;
  --ink: #1c1b19;
  --muted: #625e59;
  --line: #e2ded8;
  --band: #ebe8e3;
  --serif: Georgia, "Times New Roman", serif;
  --sans: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--sans);
}

a { color: var(--ink); }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; background: var(--panel); padding: 8px 12px; z-index: 20; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.block { padding-top: 40px; padding-bottom: 40px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.2; margin: 0; }
h1 { font-size: clamp(30px, 4.6vw, 46px); }
h2 { font-size: clamp(22px, 3vw, 28px); margin-bottom: 20px; }
h3 { font-size: 19px; }

/* ── Шапка ── */
.top { background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.top-row { display: flex; align-items: center; gap: 28px; min-height: 64px; }
.brand {
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: .18em;
  text-transform: uppercase;
  text-decoration: none;
}
.menu { display: flex; gap: 4px; margin-right: auto; overflow-x: auto; scrollbar-width: none; }
.menu::-webkit-scrollbar { display: none; }
.menu a {
  padding: 21px 11px 19px;
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.menu a:hover, .menu a.on { color: var(--ink); }
.menu a.on { border-bottom-color: var(--ink); }

/* ── Кнопки ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 24px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { opacity: .86; }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.small { min-height: 38px; padding: 0 16px; font-size: 14px; }
.btn.big { min-height: 54px; width: 100%; font-size: 16px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }

/* ── Главная ── */
.hero { background: var(--band); padding: 72px 0; }
.hero h1 { max-width: 15em; }
.lead { font-size: 18px; color: var(--muted); max-width: 40em; margin: 18px 0 0; }

.block-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.block-head a { font-size: 14px; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.tile { position: relative; display: block; aspect-ratio: 4 / 5; background: var(--band); overflow: hidden; text-decoration: none; }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.tile:hover img { transform: scale(1.04); }
.tile-label {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 12px 14px;
  background: rgba(255, 255, 255, .92);
  font-family: var(--serif);
  font-size: 18px;
}
.tile-n { font-family: var(--sans); font-size: 13px; color: var(--muted); margin-left: 4px; }

.band { background: var(--band); }
.steps { list-style: none; padding: 0; margin: 0 0 20px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 28px; }
.steps .step-title { font-size: 19px; margin: 0; }
.steps p { color: var(--muted); font-size: 15px; margin: 8px 0 0; }
.step-n { display: block; font-family: var(--serif); font-size: 34px; color: var(--muted); line-height: 1; margin-bottom: 10px; }

/* ── Список вещей ── */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 32px 20px; }
.card { display: block; text-decoration: none; }
.card-photo { position: relative; aspect-ratio: 4 / 5; background: var(--band); overflow: hidden; margin-bottom: 12px; }
.card-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card:hover .card-photo img { transform: scale(1.03); }
.tag {
  position: absolute; top: 10px; left: 10px;
  padding: 3px 9px;
  background: var(--panel);
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
}
.card-brand { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.card-title { font-size: 15px; line-height: 1.4; margin-top: 2px; }
.card-price { margin-top: 6px; font-variant-numeric: tabular-nums; font-weight: 600; }

.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }
.count { color: var(--muted); font-size: 14px; margin: 0 0 18px; }
.empty { color: var(--muted); padding: 40px 0; }

.filters { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; margin: 22px 0 26px; }
.filters label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.filters select {
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--panel);
  font: inherit;
  font-size: 14px;
  color: var(--ink);
}
.reset { font-size: 14px; padding-bottom: 9px; }

.pager { display: flex; gap: 14px; align-items: center; justify-content: center; margin-top: 40px; font-size: 14px; color: var(--muted); }

/* ── Карточка вещи ── */
.product { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.gallery-main { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; background: var(--band); }
.thumbs { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.thumb { padding: 0; border: 1px solid transparent; background: none; cursor: pointer; width: 72px; }
.thumb img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.thumb.on { border-color: var(--ink); }

.info h1 { font-size: clamp(26px, 3.4vw, 36px); margin-top: 4px; }
.info h2 { font-size: 20px; margin: 34px 0 12px; }
.sku { color: var(--muted); font-size: 14px; margin: 8px 0 0; }
.price { font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; margin: 22px 0 4px; }
.price span { font-size: 14px; font-weight: 400; color: var(--muted); margin-left: 6px; }
.note { color: var(--muted); font-size: 14px; margin: 8px 0 0; }
.gone { font-size: 18px; margin: 22px 0 18px; }

.sizes { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 22px 0; }
.sizes-label { font-size: 13px; color: var(--muted); margin-right: 4px; }
.size { min-width: 44px; padding: 8px 10px; border: 1px solid var(--line); background: var(--panel); text-align: center; font-size: 14px; }

.specs { display: grid; grid-template-columns: 170px 1fr; gap: 8px 16px; margin: 0; font-size: 15px; }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; }
.desc { white-space: pre-line; margin: 0; }
.terms { padding-left: 20px; margin: 0 0 14px; }
.terms li { margin-bottom: 6px; }

code { font-family: ui-monospace, Consolas, monospace; font-size: .95em; background: var(--band); padding: 1px 5px; }

/* ── Текстовые страницы ── */
.text-page { max-width: 820px; }
.text-page > h2 { margin-top: 40px; }
.text-page .steps { margin-top: 34px; }
.offer { margin-top: 22px; }

/* ── Подвал ── */
.foot { background: var(--ink); color: #cfcac3; margin-top: 40px; padding: 48px 0; font-size: 14px; }
.foot a { color: #fff; }
.foot .brand { color: #fff; }
.foot h2 { font-family: var(--sans); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: #a39d95; margin-bottom: 12px; }
.foot ul { list-style: none; padding: 0; margin: 0; }
.foot li { margin-bottom: 8px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }

@media (max-width: 860px) {
  .wrap { padding: 0 16px; }
  .top-row { flex-wrap: wrap; gap: 0 14px; min-height: 0; }
  .brand { margin-right: auto; padding: 14px 0; font-size: 19px; }
  .menu { order: 3; width: calc(100% + 32px); margin: 0 -16px; padding: 0 8px; border-top: 1px solid var(--line); }
  .menu a { padding: 13px 9px 11px; }
  .hero { padding: 44px 0; }
  .block { padding-top: 28px; padding-bottom: 28px; }
  .product { grid-template-columns: 1fr; gap: 24px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 12px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .specs { grid-template-columns: 130px 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .filters label { flex: 1 1 40%; }
}

@media (prefers-reduced-motion: reduce) {
  .tile img, .card-photo img { transition: none; }
}
