/* Гепард24 — фирменные стили.
   Палитра: янтарь гепарда, чёрные пятна, тень савanny.
   Шрифты: Unbounded (заголовки) + Onest (интерфейс). */

:root {
  --ink: #1b1a16;
  --ink-soft: #55524a;
  --ink-mute: #8b8679;
  --line: #e6e2d9;
  --surface: #f4f2ee;
  --paper: #ffffff;
  --amber: #e2a100;
  --amber-deep: #b57f00;
  --spot: #241f17;
  --teal: #0d5c63;
  --green: #0f7b4f;
  --red: #c6371f;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 0 var(--line);
  --wrap: 1360px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Onest, "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

h1, h2, h3, h4, .brand-name, .price-lg {
  font-family: Unbounded, Onest, system-ui, sans-serif;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin: 0 0 12px;
}

h1 { font-size: clamp(26px, 3.4vw, 40px); line-height: 1.08; }
h2 { font-size: clamp(20px, 2.2vw, 27px); line-height: 1.15; }
h3 { font-size: 18px; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--amber-deep); }

:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--ink-mute); }
.small { font-size: 13px; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.stack > * + * { margin-top: 14px; }
.row { display: flex; gap: 12px; align-items: center; }
.row-between { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.grow { flex: 1; }

/* --- Шапка ------------------------------------------------------------ */
.topline {
  background: var(--spot);
  color: #cfc9bb;
  font-size: 13px;
}
.topline .wrap { display: flex; gap: 22px; align-items: center; height: 38px; }
.topline a:hover { color: var(--amber); }

.header { border-bottom: 1px solid var(--line); background: var(--paper); position: sticky; top: 0; z-index: 40; }
.header .wrap { display: flex; align-items: center; gap: 18px; height: 76px; }

.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 38px; height: 38px; flex: none; }
.brand-name { font-size: 21px; line-height: 1; display: block; }
.brand-slogan { font-size: 11px; color: var(--ink-mute); letter-spacing: 0.04em; }

.btn-catalog {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--amber); color: var(--spot);
  border: none; border-radius: var(--radius-sm);
  padding: 12px 18px; font: inherit; font-weight: 600; cursor: pointer;
}
.btn-catalog:hover { background: var(--amber-deep); color: #fff; }

.search { flex: 1; display: flex; }
.search input {
  flex: 1; height: 46px; border: 2px solid var(--line); border-right: none;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  padding: 0 16px; font: inherit; background: var(--surface);
}
.search input:focus { background: #fff; border-color: var(--amber); outline: none; }
.search button {
  height: 46px; padding: 0 22px; border: none; cursor: pointer;
  background: var(--spot); color: #fff; font: inherit; font-weight: 600;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.search button:hover { background: var(--ink); }

.hicons { display: flex; gap: 4px; }
.hicon {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  min-width: 62px; padding: 6px 4px; font-size: 11px; color: var(--ink-soft);
  position: relative;
}
.hicon svg { width: 22px; height: 22px; }
.hicon:hover { color: var(--amber-deep); }
.badge {
  position: absolute; top: 2px; right: 12px;
  background: var(--red); color: #fff; font-size: 10px; font-weight: 700;
  min-width: 17px; height: 17px; border-radius: 9px; padding: 0 4px;
  display: grid; place-items: center;
}

/* --- Меню категорий --------------------------------------------------- */
.drawer { display: none; border-bottom: 1px solid var(--line); background: var(--paper); }
.drawer.open { display: block; }
.drawer .wrap { padding-top: 18px; padding-bottom: 22px; }
.drawer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 4px 24px; }
.drawer-grid a { padding: 8px 10px; border-radius: var(--radius-sm); display: flex; gap: 9px; }
.drawer-grid a:hover { background: var(--surface); }

/* --- Герой ------------------------------------------------------------ */
.hero {
  position: relative; overflow: hidden;
  background: var(--spot); color: #fff;
  padding: 54px 0 58px; margin-bottom: 34px;
}
.hero-spots { position: absolute; inset: 0; opacity: 0.5; }
.hero .wrap { position: relative; }
.hero h1 { max-width: 15ch; color: #fff; }
.hero .lead { max-width: 46ch; color: #d8d2c4; font-size: 17px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.hero-facts { display: flex; gap: 34px; flex-wrap: wrap; margin-top: 34px; color: #cfc9bb; font-size: 14px; }
.hero-facts b { display: block; font-family: Unbounded, sans-serif; font-size: 21px; color: var(--amber); }

/* --- Кнопки ----------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: var(--radius-sm); border: 2px solid transparent;
  padding: 12px 20px; font: inherit; font-weight: 600; cursor: pointer;
  background: var(--amber); color: var(--spot); transition: background .15s;
}
.btn:hover { background: var(--amber-deep); color: #fff; }
.btn-dark { background: var(--spot); color: #fff; }
.btn-dark:hover { background: var(--ink); color: #fff; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { background: var(--surface); color: var(--ink); }
.btn-sm { padding: 7px 13px; font-size: 13px; border-radius: 7px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* --- Плитки категорий -------------------------------------------------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; }
.tile {
  background: var(--surface); border-radius: var(--radius);
  padding: 16px; min-height: 104px; display: flex; flex-direction: column;
  justify-content: space-between; font-weight: 600;
}
.tile:hover { background: #ece8e0; color: var(--ink); }
.tile span { font-size: 26px; }

/* --- Карточка товара --------------------------------------------------- */
.section { margin: 0 0 46px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; gap: 16px; }
.section-head a { color: var(--teal); font-weight: 600; font-size: 14px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 22px 16px; }
.card { position: relative; display: block; }
.card-photo {
  position: relative; aspect-ratio: 3 / 4; background: var(--surface);
  border-radius: var(--radius); overflow: hidden; margin-bottom: 10px;
}
.card-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-photo .empty { display: grid; place-items: center; height: 100%; color: var(--ink-mute); font-size: 12px; }
.card:hover .card-photo img { transform: scale(1.03); }
.card-photo img { transition: transform .25s ease; }
.sale-badge {
  position: absolute; left: 10px; top: 10px; background: var(--red); color: #fff;
  font-weight: 700; font-size: 12px; padding: 3px 8px; border-radius: 6px;
}
.card-price { display: flex; align-items: baseline; gap: 8px; }
.price-now { font-family: Unbounded, sans-serif; font-weight: 700; font-size: 17px; }
.price-old { color: var(--ink-mute); text-decoration: line-through; font-size: 13px; }
.card-title { font-size: 14px; line-height: 1.35; margin: 4px 0 3px; }
.card-meta { font-size: 12px; color: var(--ink-mute); display: flex; gap: 8px; flex-wrap: wrap; }
.stars { color: var(--amber); letter-spacing: -1px; }
.eta { color: var(--green); font-size: 12px; font-weight: 600; }

/* --- Каталог ----------------------------------------------------------- */
.catalog { display: grid; grid-template-columns: 236px 1fr; gap: 30px; align-items: start; }
.filters { position: sticky; top: 96px; }
.filters fieldset { border: none; border-top: 1px solid var(--line); padding: 16px 0 4px; margin: 0; }
.filters legend { font-weight: 600; font-size: 14px; padding-right: 8px; }
.filters label { display: block; padding: 4px 0; font-size: 14px; color: var(--ink-soft); }
.filters .scroll { max-height: 232px; overflow-y: auto; padding-right: 6px; }
.price-inputs { display: flex; gap: 8px; }
.toolbar { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 18px; flex-wrap: wrap; }
.chips { display: flex; gap: 7px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line); border-radius: 20px; padding: 6px 14px;
  font-size: 13px; background: var(--paper); cursor: pointer;
}
.chip.active { background: var(--spot); color: #fff; border-color: var(--spot); }

/* --- Формы ------------------------------------------------------------- */
input[type=text], input[type=tel], input[type=email], input[type=password],
input[type=number], input[type=date], select, textarea {
  width: 100%; padding: 11px 13px; font: inherit; color: var(--ink);
  border: 2px solid var(--line); border-radius: var(--radius-sm); background: var(--paper);
}
input:focus, select:focus, textarea:focus { border-color: var(--amber); outline: none; }
textarea { min-height: 96px; resize: vertical; }
.field { margin-bottom: 14px; }
.field > label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; }
.field .hint { font-size: 12px; color: var(--ink-mute); margin-top: 4px; }
.fields-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.fields-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }
.check { display: flex; gap: 9px; align-items: flex-start; font-size: 14px; }
.check input { width: auto; margin-top: 3px; }

.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.panel + .panel { margin-top: 18px; }
.panel-tight { padding: 16px; }
.narrow { max-width: 460px; margin: 46px auto; }

.alert { border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 18px; font-size: 14px; }
.alert-ok { background: #e8f5ee; color: #0c5a3a; }
.alert-warn { background: #fdf0d5; color: #7a5300; }
.alert-err { background: #fbe9e5; color: #8f2413; }

/* --- Таблицы ----------------------------------------------------------- */
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th {
  text-align: left; font-size: 12px; font-weight: 600; color: var(--ink-mute);
  padding: 0 12px 9px; border-bottom: 1px solid var(--line);
}
table.data td { padding: 13px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data tr:hover td { background: #fbfaf8; }
.thumb { width: 46px; height: 60px; object-fit: cover; border-radius: 7px; background: var(--surface); }

.status {
  display: inline-block; font-size: 12px; font-weight: 600; padding: 4px 10px;
  border-radius: 20px; background: var(--surface); color: var(--ink-soft);
}
.status-delivered { background: #e8f5ee; color: var(--green); }
.status-returned, .status-canceled { background: #fbe9e5; color: var(--red); }
.status-shipped, .status-at_point { background: #e4f0f1; color: var(--teal); }
.status-new, .status-packing { background: #fdf0d5; color: var(--amber-deep); }

/* --- Кабинеты ---------------------------------------------------------- */
.cabinet { display: grid; grid-template-columns: 222px 1fr; gap: 30px; align-items: start; margin: 30px 0 60px; }
.sidenav { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 2px; }
.sidenav a { padding: 10px 14px; border-radius: var(--radius-sm); font-size: 14px; color: var(--ink-soft); }
.sidenav a:hover { background: var(--surface); color: var(--ink); }
.sidenav a.active { background: var(--spot); color: #fff; font-weight: 600; }
.sidenav .divider { height: 1px; background: var(--line); margin: 10px 0; }

.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.metric { border: 1px solid var(--line); border-radius: var(--radius); padding: 17px 18px; }
.metric .label { font-size: 13px; color: var(--ink-mute); }
.metric .value { font-family: Unbounded, sans-serif; font-weight: 700; font-size: 25px; margin-top: 6px; }
.metric.accent { background: var(--spot); border-color: var(--spot); color: #fff; }
.metric.accent .label { color: #b9b3a4; }
.metric.accent .value { color: var(--amber); }

.bars { display: flex; align-items: flex-end; gap: 5px; height: 168px; margin-top: 10px; }
.bars div { flex: 1; background: var(--amber); border-radius: 4px 4px 0 0; min-height: 3px; }
.bars div:hover { background: var(--spot); }

/* --- Товарная страница -------------------------------------------------- */
.product { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 34px; align-items: start; margin: 26px 0 50px; }
.gallery { display: grid; grid-template-columns: 74px 1fr; gap: 12px; }
.gallery .thumbs { display: flex; flex-direction: column; gap: 8px; }
.gallery .thumbs img { width: 74px; height: 96px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; }
.gallery .thumbs img.active { border-color: var(--amber); }
.gallery .main { aspect-ratio: 3 / 4; background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.gallery .main img { width: 100%; height: 100%; object-fit: cover; }
.buybox { position: sticky; top: 96px; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.price-lg { font-size: 33px; }
.sizes { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.sizes label { border: 2px solid var(--line); border-radius: 8px; padding: 8px 14px; cursor: pointer; font-size: 14px; }
.sizes input { display: none; }
.sizes input:checked + span { color: var(--amber-deep); }
.sizes label:has(input:checked) { border-color: var(--spot); }
.specs { width: 100%; border-collapse: collapse; font-size: 14px; }
.specs td { padding: 9px 0; border-bottom: 1px dashed var(--line); vertical-align: top; }
.specs td:first-child { color: var(--ink-mute); width: 44%; }

/* --- Корзина ------------------------------------------------------------ */
.cart { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 28px; align-items: start; margin: 26px 0 60px; }
.cart-line { display: grid; grid-template-columns: 92px 1fr auto; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.cart-line img { width: 92px; height: 120px; object-fit: cover; border-radius: 9px; background: var(--surface); }
.qty { display: inline-flex; align-items: center; border: 2px solid var(--line); border-radius: 8px; overflow: hidden; }
.qty button { width: 34px; height: 34px; border: none; background: var(--paper); font-size: 17px; cursor: pointer; }
.qty button:hover { background: var(--surface); }
.qty span { width: 34px; text-align: center; font-weight: 600; }
.summary-row { display: flex; justify-content: space-between; padding: 7px 0; font-size: 14px; }
.summary-total { display: flex; justify-content: space-between; padding: 14px 0 4px; border-top: 1px solid var(--line); margin-top: 8px; font-family: Unbounded, sans-serif; font-weight: 700; font-size: 19px; }

/* --- Шаги заказа --------------------------------------------------------- */
.track { display: flex; gap: 0; margin: 18px 0; }
.track-step { flex: 1; font-size: 12px; color: var(--ink-mute); padding-top: 16px; position: relative; }
.track-step::before {
  content: ""; position: absolute; top: 0; left: 0; right: 3px; height: 5px;
  background: var(--line); border-radius: 3px;
}
.track-step.done::before { background: var(--amber); }
.track-step.done { color: var(--ink); font-weight: 600; }

/* --- Подвал -------------------------------------------------------------- */
.footer { background: var(--spot); color: #b9b3a4; margin-top: 60px; padding: 44px 0 30px; font-size: 14px; }
.footer h4 { color: #fff; font-size: 14px; margin-bottom: 12px; }
.footer a { color: #b9b3a4; display: block; padding: 3px 0; }
.footer a:hover { color: var(--amber); }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 30px; }
.footer-bottom { border-top: 1px solid #37322a; margin-top: 30px; padding-top: 18px; font-size: 12px; color: #8b8577; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* --- Адаптив -------------------------------------------------------------- */
@media (max-width: 1000px) {
  .catalog, .cabinet, .product, .cart { grid-template-columns: 1fr; }
  .filters, .sidenav, .buybox { position: static; }
  .sidenav { flex-direction: row; overflow-x: auto; padding-bottom: 6px; }
  .sidenav a { white-space: nowrap; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .header .wrap { height: auto; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; gap: 12px; }
  .search { order: 3; width: 100%; flex-basis: 100%; }
  .brand-slogan { display: none; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 18px 10px; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: 1fr; }
  .gallery .thumbs { flex-direction: row; overflow-x: auto; order: 2; }
  .fields-2, .fields-3 { grid-template-columns: 1fr; }
  .hero { padding: 34px 0 38px; }
  .topline .wrap { gap: 14px; overflow-x: auto; }
  table.data { display: block; overflow-x: auto; white-space: nowrap; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
