/* Rat Factory storefront — grubby 1980s mail-order catalogue */

@font-face {
  font-family: "Anton";
  src: url("/assets/fonts/anton-latin.woff") format("woff");
  font-weight: 400;
  font-display: swap;
}

:root {
  --red: #d8161d;
  --red-dark: #a90f15;
  --black: #15130f;
  --cream: #efe3c8;
  --paper: #f7efdc;
  --white: #fffdf7;
  --muted: #5b5245;
  --line: 3px solid var(--black);
  --display: "Anton", "Impact", "Haettenschweiler", "Arial Narrow Bold", sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --wrap: 1240px;
  --gutter: clamp(12px, 2.5vw, 24px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--black);
  background: var(--cream) url("/assets/img/paper.png");
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
a:hover { color: var(--red); }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: -999px; top: 0; z-index: 100; background: var(--black); color: #fff; padding: 8px 12px; }
.skip-link:focus { left: 8px; top: 8px; }

/* ---- lettering (headings drawn from the alphabet reference) ---- */
.lettering { margin: 0; line-height: 1; font-weight: normal; color: var(--black); }
.lettering__art { display: block; }
.ll { display: flex; flex-wrap: wrap; column-gap: .24em; row-gap: .03em; }
.lw { height: 1em; display: block; overflow: visible; flex: none; }
.lw use { fill: currentColor; }
.lettering--fit { font-size: var(--max, 4rem); }
@supports (width: 1cqi) {
  .lettering--fit { font-size: min(var(--max, 9rem), calc(var(--fit) * 99cqi)); }
}

/* ---- textures ---- */
.inked { position: relative; isolation: isolate; }
.site-header, .strip, .promo, .site-footer, .btn--red, .mode-banner {
  background-image: url("/assets/img/ink.png");
}

/* ---- mode banner ---- */
.mode-banner {
  background-color: var(--black);
  color: var(--paper);
  text-align: center;
  font-size: 14px;
  padding: 6px 12px;
  border-bottom: 2px solid var(--red);
}
.mode-banner strong { color: #ffd34d; text-transform: uppercase; letter-spacing: .04em; }

/* ---- header ---- */
.site-header {
  background-color: var(--red);
  border-bottom: 4px solid var(--black);
  color: #fff;
  position: relative;
  z-index: 20;
}
.site-header__inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 10px var(--gutter);
  display: grid;
  grid-template-columns: auto auto 1fr auto auto;
  grid-template-areas: "logo nav . search basket";
  align-items: center;
  gap: 18px;
}
.logo { grid-area: logo; display: block; padding-right: 22px; border-right: 3px solid var(--black); }
.logo img { height: 96px; width: auto; }
.menu-btn { display: none; }
.main-nav { grid-area: nav; display: flex; gap: 30px; }
.main-nav a {
  font-family: var(--display);
  font-size: 32px;
  line-height: 1;
  letter-spacing: .01em;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
  text-shadow: 2px 2px 0 var(--black);
  padding: 4px 0;
  border-bottom: 4px solid transparent;
}
.main-nav a:hover, .main-nav a[aria-current="page"] { color: #fff; border-bottom-color: var(--black); }
.main-nav__extra { display: none; }
.search {
  grid-area: search;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: var(--line);
  padding: 0 10px;
  height: 46px;
  width: min(260px, 26vw);
  color: var(--black);
}
.search input { border: 0; outline: 0; background: transparent; width: 100%; font-size: 15px; height: 100%; }
.search:focus-within { outline: 3px solid var(--black); outline-offset: 1px; }
.i { width: 1.1em; height: 1.1em; flex: none; display: inline-block; vertical-align: -0.15em; }
.basket-btn {
  grid-area: basket;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: var(--black);
  border: var(--line);
  height: 46px;
  padding: 0 14px;
  font-family: var(--display);
  font-size: 22px;
  text-transform: uppercase;
  text-decoration: none;
  position: relative;
}
.basket-btn:hover { background: var(--black); color: #fff; }
.basket-btn .i { width: 26px; height: 26px; }
.basket-btn__badge { display: none; }

/* ---- layout ---- */
main.wrap { flex: 1; width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 18px var(--gutter) 40px; }
.panel {
  background: var(--paper) url("/assets/img/paper.png");
  border: 4px solid var(--black);
}
.section { margin-top: 18px; }
.empty { padding: 24px; background: var(--paper); border: var(--line); }

/* ---- hero ---- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  gap: 24px;
  padding: 24px 28px 28px;
  align-items: stretch;
}
.hero__text { container-type: inline-size; display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.hero__title { --max: 8.6rem; width: 100%; }
.brush { color: var(--red); width: 84%; height: 20px; margin: .35em 0 .45em; }
.hero__sub { --max: 3.6rem; width: 100%; }
.hero__sub .lettering__art { width: 100%; }
.hero__text .lettering--fit.hero__sub { font-size: min(var(--max), calc(var(--fit) * 88cqi)); }
.hero .btn--big { margin-top: 22px; }
.hero__media {
  position: relative;
  display: block;
  border: var(--line);
  background: var(--white);
  overflow: hidden;
  min-height: 340px;
}
.hero__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__media--empty { display: grid; place-items: center; color: var(--muted); font-family: var(--display); font-size: 34px; text-transform: uppercase; }
.hero__tag {
  position: absolute; left: 0; bottom: 0;
  background: var(--black); color: var(--paper);
  font-family: var(--display); font-size: 18px; text-transform: uppercase; letter-spacing: .02em;
  padding: 6px 12px 6px 10px;
  max-width: 100%;
}
.hero__tag span { color: #fff; background: var(--red); padding: 0 6px; margin-right: 6px; }
a.hero__media:hover .hero__tag { background: var(--red); }

/* ---- strips ---- */
.strip {
  position: relative;
  display: flex;
  align-items: center;
  background-color: var(--black);
  color: var(--paper);
  padding: 10px 18px;
  overflow: hidden;
  margin-bottom: 14px;
}
.strip__text { flex: 1; min-width: 0; container-type: inline-size; margin-right: min(170px, 22%); position: relative; z-index: 1; }
.strip .lettering { color: var(--paper); --max: 3.1rem; }
.hazard {
  position: absolute; right: 0; top: 0; bottom: 0; width: min(240px, 28%);
  background: repeating-linear-gradient(-55deg, var(--red) 0 16px, transparent 16px 34px);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 30%);
  mask-image: linear-gradient(90deg, transparent, #000 30%);
}

/* ---- product grid & cards ---- */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card {
  display: flex;
  flex-direction: column;
  background: var(--paper) url("/assets/img/paper.png");
  border: var(--line);
  min-width: 0;
}
.card__img {
  position: relative;
  display: block;
  aspect-ratio: 5 / 4;
  background: var(--white);
  border-bottom: var(--line);
  overflow: hidden;
}
.card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.card__img:hover img { transform: scale(1.03); }
.card__noimg { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); color: var(--muted); font-size: 24px; text-transform: uppercase; }
.card--soldout .card__img img, .card--archive .card__img img { filter: grayscale(.7) contrast(.95); }
.card__body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card__name { margin: 0; font-family: var(--display); font-weight: normal; font-size: 26px; line-height: 1.05; text-transform: uppercase; letter-spacing: .005em; }
.card__name a { text-decoration: none; }
.card__meta { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; white-space: nowrap; font-family: var(--display); text-transform: uppercase; margin-top: auto; }
.price { color: var(--red); font-size: 30px; line-height: 1; }
.sep { font-family: var(--body); font-weight: 700; color: var(--black); }
.stock { font-size: 19px; color: var(--black); }
.card .btn, .card .add-form { width: 100%; }
.card .add-form .btn { width: 100%; }

.stamp {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%) rotate(-10deg);
  border: 4px solid var(--red); color: var(--red);
  background: rgba(255, 253, 247, .88);
  font-family: var(--display); font-size: 30px; text-transform: uppercase; letter-spacing: .04em;
  padding: 2px 14px; white-space: nowrap; pointer-events: none;
}
.stamp--big { font-size: clamp(34px, 6vw, 56px); border-width: 6px; z-index: 2; }
.badge {
  position: absolute; top: 10px; left: 10px;
  background: var(--black); color: #fff;
  font-family: var(--display); font-size: 15px; text-transform: uppercase; letter-spacing: .04em;
  padding: 3px 8px;
}
.badge--inline { position: static; display: inline-block; margin: 0 0 6px; }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--display); font-weight: normal; font-size: 20px; line-height: 1.1;
  text-transform: uppercase; letter-spacing: .02em; text-decoration: none;
  padding: 9px 16px;
  background: var(--white); color: var(--black);
  border: var(--line);
  cursor: pointer;
  transition: transform .08s ease, box-shadow .08s ease;
}
.btn:hover { color: var(--black); transform: translate(-2px, -2px); box-shadow: 3px 3px 0 var(--black); }
.btn:active { transform: none; box-shadow: none; }
.btn--red { background-color: var(--red); color: #fff; }
.btn--red:hover { color: #fff; background-color: var(--red-dark); }
.btn--big { font-size: 27px; padding: 10px 22px; }
.btn--block { width: 100%; }
.btn--small { font-size: 16px; padding: 5px 10px; }
.btn--outline { background: var(--white); }
.btn--sold, .btn[disabled] { background: #c9c1b1; color: #5c554a; cursor: not-allowed; transform: none !important; box-shadow: none !important; }
.btn .i--arrow { width: 1em; height: 1em; }
.linkish { background: none; border: 0; padding: 0; color: var(--black); text-decoration: underline; cursor: pointer; font-size: 15px; }

/* ---- promo ---- */
.promo {
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 24px;
  background-color: var(--red);
  border: 4px solid var(--black);
  padding: 16px 24px;
}
.promo__text { flex: 1; min-width: 0; container-type: inline-size; }
.promo__title { --max: 6rem; color: #fff; filter: drop-shadow(3px 3px 0 var(--black)); }
.promo .btn { flex: none; }
.narrow-only { display: none; }
@media (max-width: 760px) { .wide-only { display: none; } .narrow-only { display: block; } }

/* ---- page heads, prose ---- */
.page-head { margin: 8px 0 16px; }
.page-head__title { font-size: clamp(3rem, 9vw, 5.6rem); }
.page-head__intro { margin: 8px 0 0; font-size: 18px; max-width: 60ch; }
.subhead { font-family: var(--display); font-weight: normal; text-transform: uppercase; font-size: 30px; margin: 28px 0 10px; }
.prose { padding: 20px 24px; max-width: 820px; font-size: 17px; }
.prose h3 { font-family: var(--display); font-weight: normal; text-transform: uppercase; font-size: 26px; margin: 1.2em 0 .3em; }
.prose p:first-child { margin-top: 0; }
.crumbs { font-size: 14px; margin: 0 0 10px; color: var(--muted); }

/* ---- shop filters ---- */
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-family: var(--display); text-transform: uppercase; font-size: 17px; text-decoration: none; border: var(--line); padding: 4px 10px; background: var(--white); }
.chip[aria-current="true"] { background: var(--black); color: #fff; }
.sort { display: flex; gap: 8px; align-items: center; font-family: var(--display); text-transform: uppercase; font-size: 18px; }
.sort select, .field select { border: var(--line); background: var(--white); padding: 8px 10px; font-family: var(--body); font-size: 16px; }
.results-for { font-size: 18px; }

/* ---- product page ---- */
.product { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.gallery { position: relative; min-width: 0; }
.gallery__main {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  border: 4px solid var(--black); background: var(--white);
  scrollbar-width: none;
}
.gallery__main::-webkit-scrollbar { display: none; }
.gallery__main--empty { aspect-ratio: 1; display: grid; place-items: center; font-family: var(--display); font-size: 30px; color: var(--muted); text-transform: uppercase; }
.gallery__slide { flex: 0 0 100%; margin: 0; scroll-snap-align: start; aspect-ratio: 1; }
.gallery__slide img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.gallery__thumb { flex: none; width: 76px; height: 76px; border: 3px solid transparent; outline: 2px solid var(--black); outline-offset: -2px; }
.gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumb[aria-current="true"] { border-color: var(--red); outline-color: var(--red); }
.gallery .stamp--big { top: 42%; }
.product__info { padding: 20px 22px; }
.product__name { font-family: var(--display); font-weight: normal; font-size: clamp(34px, 4.4vw, 50px); line-height: 1; text-transform: uppercase; margin: 0 0 8px; }
.product__price { font-family: var(--display); color: var(--red); font-size: 40px; line-height: 1; margin: 0 0 6px; }
.product__stock { font-family: var(--display); font-size: 22px; text-transform: uppercase; margin: 0 0 16px; }
.product__desc { margin-top: 18px; font-size: 17px; }
.product__delivery { border-top: 3px dashed var(--black); margin-top: 16px; padding-top: 10px; font-size: 15px; }
.product__delivery h2 { font-family: var(--display); font-weight: normal; text-transform: uppercase; font-size: 22px; margin: 0 0 4px; }
.notice { border: var(--line); background: #fff3c9; padding: 10px 12px; font-weight: 600; }

.options { border: 0; padding: 0; margin: 0 0 14px; }
.options legend { font-family: var(--display); text-transform: uppercase; font-size: 20px; margin-bottom: 6px; }
.options__list { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { position: relative; display: flex; flex-direction: column; align-items: center; min-width: 74px; padding: 8px 10px; border: var(--line); background: var(--white); cursor: pointer; text-align: center; }
.opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.opt__label { font-family: var(--display); font-size: 22px; line-height: 1.1; text-transform: uppercase; }
.opt__stock { font-size: 13px; }
.opt:has(input:checked) { background: var(--black); color: #fff; }
.opt:has(input:focus-visible) { outline: 3px solid var(--red); outline-offset: 2px; }
.opt--out { background: #ddd5c4; color: #6c6457; cursor: not-allowed; }
.opt--out .opt__label { text-decoration: line-through; }
.buy__row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.buy__btn { flex: 1; min-width: 200px; }
.buy__hint { min-height: 1.4em; margin: 8px 0 0; font-weight: 600; color: var(--red-dark); }
.qty { display: flex; flex-direction: column; gap: 4px; font-family: var(--display); text-transform: uppercase; font-size: 16px; }
.stepper { display: inline-flex; border: var(--line); background: var(--white); height: 52px; }
.stepper button { width: 44px; border: 0; background: var(--white); font-size: 24px; font-weight: 700; cursor: pointer; }
.stepper button:hover:not(:disabled) { background: var(--black); color: #fff; }
.stepper button:disabled { color: #b5ad9e; cursor: not-allowed; }
.stepper input { width: 52px; border: 0; border-left: var(--line); border-right: var(--line); text-align: center; font-size: 18px; font-weight: 700; -moz-appearance: textfield; appearance: textfield; }
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* ---- basket ---- */
.basket { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 20px; align-items: start; }
.basket__lines { padding: 6px 16px; }
.line { display: grid; grid-template-columns: 88px minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 2px dashed var(--black); }
.line:last-child { border-bottom: 0; }
.line__img { width: 88px; height: 88px; border: var(--line); background: var(--white); overflow: hidden; }
.line__img img { width: 100%; height: 100%; object-fit: cover; }
.line__info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.line__name { font-family: var(--display); font-size: 22px; text-transform: uppercase; text-decoration: none; line-height: 1.1; }
.line__opt, .line__unit { font-size: 14px; color: var(--muted); }
.line__problem { color: var(--red-dark); font-weight: 700; font-size: 14px; }
.line--problem { background: #ffe3dc; }
.line__qty { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.line__qty .stepper { height: 42px; }
.line__qty .stepper button { width: 36px; font-size: 20px; }
.line__qty .stepper input { width: 44px; font-size: 16px; }
.line__total { font-family: var(--display); font-size: 24px; min-width: 80px; text-align: right; }
.basket__summary { padding: 18px; display: flex; flex-direction: column; gap: 12px; position: sticky; top: 12px; }
.sums { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.sums div { display: flex; justify-content: space-between; gap: 12px; }
.sums dt, .sums dd { margin: 0; }
.sums__total { border-top: 3px solid var(--black); padding-top: 8px; font-family: var(--display); font-size: 26px; text-transform: uppercase; }
.small { font-size: 14px; color: var(--muted); margin: 0; }
.empty-basket { padding: 30px; text-align: center; font-size: 20px; }
.empty-basket .btn { margin-top: 10px; }

/* ---- checkout ---- */
.checkout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(260px, 1fr); gap: 20px; align-items: start; }
.checkout__form, .checkout__summary { padding: 18px 20px; }
.checkout__summary { position: sticky; top: 12px; display: flex; flex-direction: column; gap: 12px; }
.formhead { font-family: var(--display); font-weight: normal; text-transform: uppercase; font-size: 26px; margin: 18px 0 8px; line-height: 1.1; }
.formhead:first-of-type { margin-top: 0; }
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.field__label { font-weight: 700; font-size: 15px; }
.field input, .field textarea {
  width: 100%; border: 2px solid var(--black); background: var(--white);
  padding: 11px 12px; font-size: 16px; border-radius: 0;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: 3px solid var(--red); outline-offset: 0; }
.field input:disabled { background: #e9e1cf; }
.field__hint { font-size: 13px; color: var(--muted); }
.field__err { color: var(--red-dark); font-weight: 700; font-size: 14px; }
.field--err input { border-color: var(--red); border-width: 3px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ship { border: 0; padding: 0; margin: 0 0 12px; display: flex; flex-direction: column; gap: 8px; }
.ship__opt { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; border: var(--line); background: var(--white); padding: 12px; cursor: pointer; }
.ship__opt:has(input:checked) { outline: 3px solid var(--red); outline-offset: -6px; }
.ship__opt input { width: 20px; height: 20px; accent-color: var(--red); }
.ship__name { font-weight: 700; }
.ship__name small { display: block; font-weight: 400; color: var(--muted); }
.ship__price { font-family: var(--display); font-size: 22px; }
.ship__opt[hidden] { display: none; }
.pay-note { border: 2px dashed var(--black); padding: 10px 12px; background: var(--white); font-size: 15px; }
.pay-note--sim { background: #fff3c9; }
.mini-lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.mini-lines li { display: flex; justify-content: space-between; gap: 12px; }
.mini-lines small { display: block; color: var(--muted); }

/* ---- order pages ---- */
.order-done { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; max-width: 720px; }
.order-done .panel { padding: 20px 22px; width: 100%; }
.order-no { font-family: var(--display); font-size: 30px; text-transform: uppercase; margin: 0; }
.order-status { font-size: 18px; margin-top: 4px; }
.sim { padding: 22px; max-width: 720px; }
.sim__flag { display: inline-block; background: #ffd34d; border: var(--line); font-family: var(--display); text-transform: uppercase; font-size: 20px; padding: 4px 10px; margin: 0 0 10px; }
.sim__title { font-family: var(--display); font-weight: normal; text-transform: uppercase; font-size: 40px; margin: 0 0 10px; line-height: 1; }
.sim__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }

/* ---- flash & toast ---- */
.flash { border: var(--line); padding: 10px 14px; margin: 0 0 14px; font-weight: 600; background: #fff3c9; }
.flash--ok { background: #e2efd0; }
.flash--error { background: #ffd8d4; }
.toast {
  position: fixed; left: 50%; bottom: 18px; z-index: 50;
  transform: translate(-50%, calc(100% + 40px));
  visibility: hidden;
  background: var(--black); color: #fff; border: 3px solid #fff; outline: 3px solid var(--black);
  padding: 10px 16px; font-weight: 700; max-width: calc(100% - 24px);
  transition: transform .2s ease;
}
.toast.is-on { transform: translate(-50%, 0); visibility: visible; }
.toast a { color: #ffd34d; margin-left: 8px; }
.toast--error { background: var(--red-dark); }

/* ---- footer ---- */
.site-footer { background-color: var(--black); color: var(--paper); border-top: 4px solid var(--red); margin-top: 20px; }
.site-footer__inner { max-width: var(--wrap); margin: 0 auto; padding: 24px var(--gutter); display: grid; grid-template-columns: repeat(3, 1fr) 1.4fr; gap: 20px; }
.site-footer__h { font-family: var(--display); font-weight: normal; text-transform: uppercase; font-size: 22px; margin: 0 0 6px; color: #fff; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer a { color: var(--paper); }
.site-footer a:hover { color: #ffd34d; }
.site-footer p { margin: 0; }
.site-footer__small { font-size: 14px; color: #c9bea6; align-self: end; }

/* ---- responsive ---- */
@media (max-width: 1100px) {
  .main-nav { gap: 20px; }
  .main-nav a { font-size: 28px; }
  .logo img { height: 84px; }
}
@media (max-width: 980px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-header__inner { grid-template-columns: auto 1fr auto auto; grid-template-areas: "logo nav search basket"; }
  .search { width: 200px; }
  .main-nav a { font-size: 26px; }
  .product { grid-template-columns: 1fr; }
  .basket, .checkout { grid-template-columns: 1fr; }
  .basket__summary, .checkout__summary { position: static; }
}

@media (max-width: 760px) {
  body { font-size: 15px; }
  .site-header__inner {
    grid-template-columns: 48px 1fr 48px;
    grid-template-areas: "menu logo basket" "search search search";
    gap: 8px 10px;
    padding: 8px 12px 10px;
  }
  .menu-btn {
    grid-area: menu; display: grid; place-items: center;
    width: 46px; height: 46px; background: transparent; border: 0; color: #fff; cursor: pointer;
  }
  .menu-btn .i { width: 34px; height: 34px; filter: drop-shadow(2px 2px 0 var(--black)); }
  .logo { justify-self: center; border: 0; padding: 0; }
  .logo img { height: 62px; }
  .basket-btn { grid-area: basket; justify-self: end; border: 0; background: transparent; color: #fff; padding: 0; width: 46px; height: 46px; justify-content: center; }
  .basket-btn:hover { background: transparent; color: #fff; }
  .basket-btn .i { width: 34px; height: 34px; filter: drop-shadow(2px 2px 0 var(--black)); }
  .basket-btn__label, .basket-btn__count { display: none; }
  .basket-btn__badge {
    display: grid; place-items: center; position: absolute; top: 0; right: -2px;
    min-width: 22px; height: 22px; padding: 0 5px; border-radius: 11px;
    background: #fff; color: var(--black); border: 2px solid var(--black);
    font-family: var(--body); font-size: 12px; font-weight: 800;
  }
  .basket-btn__badge[hidden] { display: none; }
  .search { width: 100%; height: 40px; }
  .main-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; gap: 0;
    background: var(--black); border-bottom: 4px solid var(--red);
    padding: 6px 16px 14px;
  }
  .main-nav.is-open { display: flex; }
  .main-nav a { font-size: 34px; padding: 8px 0; border-bottom: 2px solid #333; text-shadow: none; }
  .main-nav__extra { display: flex; gap: 18px; padding-top: 10px; }
  .main-nav__extra a { font-size: 20px; border: 0; color: var(--paper); }

  main.wrap { padding-top: 12px; }
  .hero { grid-template-columns: 1fr; padding: 16px 14px 14px; gap: 14px; text-align: center; }
  .hero__text { align-items: center; }
  .hero__title .ll, .hero__sub .ll { justify-content: center; }
  .brush { width: 88%; height: 14px; }
  .hero .btn--big { margin-top: 14px; font-size: 24px; }
  .hero__media { min-height: 0; aspect-ratio: 4 / 3; }

  .strip { padding: 8px 12px; margin-bottom: 10px; }
  .strip__text { margin-right: 64px; }
  .hazard { width: 90px; }

  .grid { grid-template-columns: 1fr; gap: 10px; }
  .card { display: grid; grid-template-columns: 40% minmax(0, 1fr); }
  .card__img { aspect-ratio: auto; min-height: 150px; border-bottom: 0; border-right: var(--line); }
  .card__img img { position: absolute; inset: 0; }
  .card__body { padding: 10px 12px; gap: 6px; justify-content: center; }
  .card__name { font-size: 22px; }
  .price { font-size: 23px; }
  .stock { font-size: 15px; }
  .card__meta { column-gap: 7px; }
  .card .btn { font-size: 17px; padding: 7px 10px; }
  .stamp { font-size: 19px; border-width: 3px; padding: 1px 8px; }
  .badge { font-size: 12px; top: 6px; left: 6px; }

  .promo { flex-direction: row; gap: 12px; padding: 12px; }
  .promo__title { --max: 3.4rem; }
  .promo .btn--big { font-size: 20px; padding: 8px 12px; }

  .line { grid-template-columns: 70px minmax(0, 1fr) auto; grid-template-areas: "img info total" "img qty qty"; gap: 8px 12px; }
  .line__img { grid-area: img; width: 70px; height: 70px; }
  .line__info { grid-area: info; }
  .line__qty { grid-area: qty; flex-direction: row; justify-content: space-between; }
  .line__total { grid-area: total; font-size: 20px; min-width: 0; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .product__info { padding: 16px; }
  .site-footer__inner { grid-template-columns: 1fr 1fr; }
  .site-footer__small { grid-column: 1 / -1; }
}

@media (max-width: 380px) {
  .card { grid-template-columns: 36% minmax(0, 1fr); }
  .card__name { font-size: 20px; }
}

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

@media print {
  .site-header, .site-footer, .mode-banner, .toast { display: none; }
  body { background: #fff; }
}
