:root {
  --ground: #F6F1E7;
  --paper: #FFFDF8;
  --ink: #1F1B16;
  --ink-2: #4A4238;
  --ink-3: #6B6155;
  --accent: #E4572E;
  --accent-ink: #B8401F;
  --focus: #1F5FA8;
  --toys: #F3D9A4;
  --sport: #C9DCCB;
  --home: #E7CFC4;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 16px/1.5 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

h1, h2, .brand, .price, .counter strong { font-family: "Space Grotesk", Inter, system-ui, sans-serif; }

a { color: var(--ink); }
a:hover { color: var(--accent-ink); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip { position: absolute; left: -9999px; top: 8px; padding: 8px 16px; background: var(--ink); color: var(--ground); border-radius: 8px; z-index: 10; }
.skip:focus { left: 16px; color: var(--ground); }

.wrap { max-width: 1160px; margin: 0 auto; padding: 24px 16px 64px; }
@media (min-width: 640px) { .wrap { padding: 24px 24px 80px; } }

.top {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  padding-bottom: 20px; border-bottom: 2px solid var(--ink);
}
.brand { display: flex; align-items: center; gap: 12px; margin: 0; font-size: 20px; font-weight: 700; }
.brand svg { stroke-width: 1.8; }

.lang {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px;
  border: 2px solid var(--ink); border-radius: 999px; font-weight: 600; text-decoration: none;
}
.lang:hover { background: var(--ink); color: var(--ground); }

.hero {
  display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-end; justify-content: space-between;
  padding: 48px 0 36px;
}
.hero > div { flex: 1 1 480px; min-width: 0; }
.kicker { margin: 0 0 12px; font-weight: 600; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); }
h1 { margin: 0; font-size: clamp(42px, 7vw, 88px); line-height: .95; letter-spacing: -.03em; }
.lead { margin: 20px 0 0; max-width: 560px; font-size: 18px; color: var(--ink-2); }

.counter {
  flex: 0 1 280px; display: flex; flex-direction: column; gap: 4px; margin: 0;
  padding: 20px 24px; background: var(--ink); color: var(--ground); border-radius: 16px; transform: rotate(-2deg);
}
.counter strong { font-size: 56px; line-height: 1; }
.counter span { font-size: 15px; color: #D9D0C1; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 28px; }
.chip {
  min-height: 44px; padding: 0 18px; border: 2px solid var(--ink); border-radius: 999px;
  background: transparent; color: var(--ink); font: 600 15px Inter, system-ui, sans-serif; cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--ink); color: var(--ground); }

.grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px;
}
.card[hidden] { display: none; }
.card article {
  height: 100%; display: flex; flex-direction: column;
  background: var(--paper); border: 2px solid var(--ink); border-radius: 16px; overflow: hidden;
}
.photo { position: relative; aspect-ratio: 1 / 1; border-bottom: 2px solid var(--ink); }
.photo--toys { background: var(--toys); }
.photo--sport { background: var(--sport); }
.photo--home { background: var(--home); }
.photo-link { display: block; width: 100%; height: 100%; }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (hover: hover) {
  .photo-link img { transition: opacity .15s; }
  .photo-link:hover img { opacity: .88; }
}
.badge {
  position: absolute; top: 12px; left: 12px; padding: 4px 10px;
  background: var(--ink); color: var(--ground); font-size: 12px; font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase; border-radius: 999px;
}

.body { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px 20px; flex-grow: 1; }
.cat { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.body h2 { margin: 0; font-size: 21px; line-height: 1.2; }
.desc { margin: 0; font-size: 15px; color: var(--ink-2); flex-grow: 1; }
.ship { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.ship svg { flex: 0 0 auto; stroke-width: 1.8; }
.ship { flex-wrap: wrap; row-gap: 0; }
.fee { margin-left: 2px; font-weight: 500; color: var(--ink-3); white-space: nowrap; }
.opts { margin: 12px 0 0; padding-left: 20px; color: var(--ink-2); }
.opts li { margin-bottom: 6px; }
.opts strong { color: var(--ink); }
.prices { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin: 6px 0 0; }
.price { display: inline-block; padding: 4px 12px; background: var(--accent); color: var(--ink); font-weight: 700; font-size: 22px; border-radius: 8px; }
.was { font-size: 15px; color: var(--ink-3); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 999px; font-weight: 600; text-decoration: none;
}
.lbl-short { display: none; }
.btn--line { align-self: stretch; padding: 8px 14px; border-radius: 22px; line-height: 1.25; text-align: center; }
.btn--line svg { flex: 0 0 auto; }
.btn--line { margin-top: 8px; border: 2px solid var(--ink); font-size: 15px; }
.btn--line:hover { background: var(--ink); color: var(--ground); }
.btn--solid { min-height: 48px; padding: 0 24px; background: var(--ink); color: var(--ground); }
.btn--solid:hover { background: var(--accent-ink); color: #fff; }

.how {
  display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: center;
  margin-top: 64px; padding: 28px; background: var(--paper); border: 2px dashed var(--ink); border-radius: 16px;
}
.how > div { flex: 1 1 380px; min-width: 0; }
.how h2 { margin: 0 0 8px; font-size: 28px; }
.how p { margin: 0; color: var(--ink-2); }

.foot { margin-top: 40px; font-size: 14px; color: var(--ink-3); }
.foot p { margin: 0 0 4px; }

/* Phones: compact header, horizontal list cards, swipeable filters */
@media (max-width: 640px) {
  .top { padding-bottom: 14px; }
  .brand { font-size: 18px; }
  .brand svg { width: 28px; height: 28px; }
  .lang { min-height: 44px; padding: 0 14px; font-size: 15px; }
  .lbl-long { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .lbl-short { display: inline; }

  .hero { gap: 16px; padding: 24px 0 20px; }
  .hero > div { flex-basis: 100%; }
  h1 { font-size: 40px; }
  .lead { margin-top: 12px; font-size: 16px; }
  .counter {
    flex: 1 1 100%; flex-direction: row; align-items: baseline; gap: 10px;
    padding: 12px 16px; border-radius: 12px; transform: none;
  }
  .counter strong { font-size: 32px; }

  .chips {
    position: sticky; top: 0; z-index: 5;
    flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none;
    margin: 0 -16px 16px; padding: 10px 16px;
    background: var(--ground); border-bottom: 1px solid rgba(31, 27, 22, .12);
  }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: 0 0 auto; scroll-snap-align: start; }

  .grid { grid-template-columns: 1fr; gap: 12px; }
  .card article { flex-direction: row; border-radius: 12px; }
  .photo { flex: 0 0 120px; aspect-ratio: auto; min-height: 140px; border-bottom: 0; border-right: 2px solid var(--ink); }
  .badge { top: 8px; left: 8px; padding: 2px 8px; font-size: 10px; }
  .body { gap: 6px; padding: 12px 14px 14px; min-width: 0; }
  .cat { font-size: 11px; }
  .body h2 { font-size: 17px; }
  .desc {
    font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }
  .prices { margin-top: 2px; gap: 8px; }
  .price { font-size: 18px; padding: 2px 10px; }
  .was { font-size: 14px; }
  .btn--line { margin-top: 4px; align-self: flex-start; font-size: 14px; padding: 0 14px; white-space: nowrap; }

  .how { margin-top: 40px; padding: 20px; }
  .how h2 { font-size: 24px; }
  .btn--solid { width: 100%; }
}

@media (max-width: 360px) {
  .photo { flex-basis: 96px; }
  h1 { font-size: 34px; }
}

@media (prefers-reduced-motion: no-preference) {
  .chip, .lang, .btn { transition: background-color .15s, color .15s; }
}
