/* ============================================================
   ЯРМАРКА — Маркетплейс изделий ручной работы Якутии
   Shared design system
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant:wght@500;600;700&family=Manrope:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* ---- Brand color ---- */
  --green-950: #0c241c;
  --green-900: #103026;
  --green-800: #16412f;
  --green-700: #1d543d;
  --green-600: #2a6e51;
  --green-100: #e4ede8;
  --green-050: #f1f5f2;

  --red-700: #7e1d22;
  --red-600: #9b2226;
  --red-500: #b8323a;
  --red-050: #f7eceb;

  /* ---- Neutrals (warm) ---- */
  --white: #ffffff;
  --paper: #faf8f4;     /* warm off-white page bg */
  --sand: #f3f0ea;      /* light grey/sand surface */
  --line: #e6e1d8;      /* hairlines */
  --graphite: #2b2c29;  /* near-black text */
  --ink: #1a1b19;
  --muted: #6f7269;     /* secondary text */
  --muted-2: #9a9c92;

  /* ---- Type ---- */
  --display: 'Cormorant', Georgia, serif;
  --sans: 'Manrope', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;

  /* ---- Layout ---- */
  --maxw: 1280px;
  --gutter: 24px;
  --radius-s: 4px;
  --radius-m: 8px;
  --radius-l: 14px;

  --shadow-s: 0 1px 2px rgba(16,48,38,.06), 0 1px 3px rgba(16,48,38,.04);
  --shadow-m: 0 6px 24px rgba(16,48,38,.08), 0 2px 6px rgba(16,48,38,.05);
  --shadow-l: 0 18px 50px rgba(16,48,38,.14);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--graphite);
  background: var(--paper);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.08; }
p { margin: 0; }
ul { margin: 0; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Yakut ornament band ----------
   Geometric "lyre/diamond" motif built from CSS gradients */
.ornament {
  height: 14px;
  background-color: var(--green-800);
  background-image:
    linear-gradient(135deg, var(--green-600) 25%, transparent 25%),
    linear-gradient(225deg, var(--green-600) 25%, transparent 25%),
    linear-gradient(45deg, var(--green-600) 25%, transparent 25%),
    linear-gradient(315deg, var(--green-600) 25%, transparent 25%);
  background-position: 7px 0, 7px 0, 0 0, 0 0;
  background-size: 14px 14px;
  background-repeat: repeat-x;
  opacity: .9;
}
.ornament--red {
  background-color: var(--red-600);
  background-image:
    linear-gradient(135deg, var(--red-500) 25%, transparent 25%),
    linear-gradient(225deg, var(--red-500) 25%, transparent 25%),
    linear-gradient(45deg, var(--red-500) 25%, transparent 25%),
    linear-gradient(315deg, var(--red-500) 25%, transparent 25%);
}

/* A vertical accent rule with the diamond motif */
.diamond-row {
  display: flex;
  gap: 6px;
  align-items: center;
}
.diamond-row i {
  width: 7px; height: 7px;
  background: var(--red-600);
  transform: rotate(45deg);
  display: block;
}
.diamond-row i:nth-child(even) { background: var(--green-700); }

/* ============================================================
   HEADER
   ============================================================ */
.topbar {
  background: var(--green-950);
  color: rgba(255,255,255,.78);
  font-size: 12.5px;
  letter-spacing: .02em;
}
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; height: 38px; }
.topbar a:hover { color: #fff; }
.topbar nav { display: flex; gap: 22px; }

.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250,248,244,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header .wrap { display: flex; align-items: center; gap: 28px; height: 78px; }

.logo { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.logo-mark {
  width: 38px; height: 38px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect width='32' height='32' rx='7' fill='%2316412f'/%3E%3Cpath d='M16 4.5 L27.5 16 L16 27.5 L4.5 16 Z' fill='none' stroke='%23b8323a' stroke-width='2.3' stroke-linejoin='round'/%3E%3Cpath d='M16 11 L21 16 L16 21 L11 16 Z' fill='%23e6b35a'/%3E%3C/svg%3E") center / contain no-repeat;
}
.logo-name { font-family: var(--display); font-weight: 700; font-size: 26px; letter-spacing: .04em; color: var(--green-900); line-height: 1; }
.logo-sub { font-size: 10.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }

.search {
  flex: 1; display: flex; align-items: center;
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-m);
  height: 48px; padding: 0 6px 0 16px;
  transition: border-color .15s;
}
.search:focus-within { border-color: var(--green-600); }
.search input { flex: 1; border: 0; outline: 0; font-size: 15px; background: transparent; color: var(--ink); }
.search input::placeholder { color: var(--muted-2); }
.search button {
  height: 38px; padding: 0 20px; border: 0; border-radius: var(--radius-s);
  background: var(--green-800); color: #fff; font-weight: 600; font-size: 14px;
}
.search button:hover { background: var(--green-700); }

.header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.icon-btn {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: none; border: 0; color: var(--graphite); font-size: 11px; font-weight: 500;
  padding: 6px 10px; border-radius: var(--radius-s);
}
.icon-btn:hover { background: var(--sand); }
.icon-btn svg { width: 22px; height: 22px; stroke: var(--green-800); }

/* nav strip */
.navstrip { background: var(--white); border-bottom: 1px solid var(--line); }
.navstrip .wrap { display: flex; align-items: center; gap: 4px; height: 50px; overflow-x: auto; }
.navstrip a {
  font-size: 14px; font-weight: 600; color: var(--graphite);
  padding: 8px 14px; border-radius: var(--radius-s); white-space: nowrap;
}
.navstrip a:hover { background: var(--green-050); color: var(--green-800); }
.navstrip a.cta { color: var(--red-600); }
.navstrip .menu-btn {
  display: flex; align-items: center; gap: 9px; background: var(--green-800); color: #fff;
  padding: 9px 18px; border-radius: var(--radius-s); font-weight: 700; font-size: 14px; border: 0;
}
.navstrip .menu-btn:hover { background: var(--green-700); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--sans); font-weight: 700; font-size: 15px;
  padding: 13px 26px; border-radius: var(--radius-m); border: 1.5px solid transparent;
  transition: transform .08s, background .15s, border-color .15s; line-height: 1;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 19px; height: 19px; }
.btn-primary { background: var(--green-800); color: #fff; }
.btn-primary:hover { background: var(--green-700); }
.btn-red { background: var(--red-600); color: #fff; }
.btn-red:hover { background: var(--red-700); }
.btn-ghost { background: transparent; color: var(--green-800); border-color: var(--green-800); }
.btn-ghost:hover { background: var(--green-050); }
.btn-light { background: var(--white); color: var(--graphite); border-color: var(--line); }
.btn-light:hover { border-color: var(--green-600); color: var(--green-800); }
.btn-lg { padding: 16px 30px; font-size: 16px; }
.btn-block { width: 100%; }

/* ============================================================
   IMAGE PLACEHOLDERS (striped, with mono labels)
   ============================================================ */
.ph {
  position: relative; overflow: hidden;
  background-color: var(--sand);
  background-image: repeating-linear-gradient(45deg,
    rgba(16,48,38,.045) 0, rgba(16,48,38,.045) 1px,
    transparent 1px, transparent 11px);
  display: grid; place-items: center;
}
.ph span {
  font-family: var(--mono); font-size: 11px; letter-spacing: .03em;
  color: var(--muted); text-align: center; padding: 8px 12px;
  background: rgba(250,248,244,.7); border-radius: var(--radius-s);
}
.ph--green {
  background-color: var(--green-900);
  background-image: repeating-linear-gradient(45deg,
    rgba(255,255,255,.04) 0, rgba(255,255,255,.04) 1px,
    transparent 1px, transparent 11px);
}
.ph--green span { color: rgba(255,255,255,.7); background: rgba(12,36,28,.5); }

/* ============================================================
   SECTION SCAFFOLD
   ============================================================ */
.section { padding: 64px 0; }
.section--tight { padding: 44px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 42px; }
.section-title { font-family: var(--display); font-size: 40px; font-weight: 600; color: var(--green-900); letter-spacing: .005em; }
.section-kicker { font-size: 12px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--red-600); margin-bottom: 10px; }
.section-link { font-size: 14px; font-weight: 700; color: var(--green-800); display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.section-link:hover { gap: 11px; }

/* ============================================================
   PRODUCT CARD
   ============================================================ */
.grid-products { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-l);
  overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .18s, transform .18s, border-color .18s;
}
.card:hover { box-shadow: var(--shadow-m); transform: translateY(-3px); border-color: var(--green-100); }
.card-media { position: relative; aspect-ratio: 3 / 4; }
.card-media .ph { position: absolute; inset: 0; }
.card-badges { position: absolute; top: 12px; left: 12px; display: flex; flex-direction: column; gap: 6px; }
.badge {
  font-size: 11px; font-weight: 700; letter-spacing: .02em; padding: 5px 10px; border-radius: 100px;
  background: var(--green-800); color: #fff; backdrop-filter: blur(4px);
}
.badge--red { background: var(--red-600); }
.badge--light { background: rgba(255,255,255,.92); color: var(--green-900); }
.card-fav {
  position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.92); border: 0; display: grid; place-items: center;
}
.card-fav svg { width: 18px; height: 18px; stroke: var(--graphite); fill: none; }
.card-fav:hover svg { stroke: var(--red-600); }
.card-vid {
  position: absolute; bottom: 10px; right: 10px; width: 30px; height: 30px; border-radius: 50%;
  background: rgba(12,36,28,.78); display: grid; place-items: center;
}
.card-vid svg { width: 13px; height: 13px; fill: #fff; }
.card-body { padding: 14px 15px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-price { display: flex; align-items: baseline; gap: 9px; }
.card-price b { font-size: 19px; font-weight: 800; color: var(--ink); letter-spacing: -.01em; }
.card-price s { font-size: 13px; color: var(--muted-2); }
.card-title { font-size: 14px; font-weight: 500; color: var(--graphite); line-height: 1.35; }
.card-meta { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 4px; }
.card-seller { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.dot-city::before { content: "•"; margin: 0 5px; color: var(--muted-2); }
.stars { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 700; color: var(--graphite); }
.stars svg { width: 13px; height: 13px; fill: #d8a23a; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: var(--green-950); color: rgba(255,255,255,.7); margin-top: 0; }
.footer .wrap { padding-top: 56px; padding-bottom: 32px; }
.footer-top { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 44px; border-bottom: 1px solid rgba(255,255,255,.1); }
.footer h4 { color: #fff; font-family: var(--sans); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 18px; font-weight: 700; }
.footer ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 11px; font-size: 14px; }
.footer a:hover { color: #fff; }
.footer .logo-name { color: #fff; }
.footer .logo-sub { color: rgba(255,255,255,.55); }
.footer-blurb { font-size: 14px; line-height: 1.65; margin: 18px 0 0; max-width: 320px; color: rgba(255,255,255,.62); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 26px; font-size: 13px; color: rgba(255,255,255,.5); gap: 20px; flex-wrap: wrap; }

/* ============================================================
   UTILITIES
   ============================================================ */
.tag {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600;
  padding: 5px 12px; border-radius: 100px; background: var(--green-050); color: var(--green-800);
}
.tag--red { background: var(--red-050); color: var(--red-600); }
.tag--mute { background: var(--sand); color: var(--muted); }
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }

@media (max-width: 1100px) {
  .grid-products { grid-template-columns: repeat(3, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .grid-products { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .section-title { font-size: 30px; }
  .section { padding: 44px 0; }
  .header .wrap { gap: 14px; height: 64px; }
  .logo-sub { display: none; }
  .header-actions .icon-btn span { display: none; }
}
