/* Ammopriser – grafisk profil v1: papper, svart, en signalorange yta. Raka hörn, tjocka linjer. */
:root {
  --color-paper: #F3F1EA;
  --color-ink: #0E0E0E;
  --color-signal: #FF6A2B; /* endast som yta, aldrig som textfärg */
  --color-stock: #1F7A4D;
  --color-muted: #5C5B57;
  --color-white: #FFFFFF;
  --line: 2px solid var(--color-ink);
  --line-input: 3px solid var(--color-ink);
  --line-heavy: 6px solid var(--color-ink);
  --font: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; border-radius: 0; }
[hidden] { display: none !important; }
html { color-scheme: light; }
body {
  margin: 0;
  background: var(--color-paper);
  color: var(--color-ink);
  font: 400 17px/1.5 var(--font);
}
a { color: var(--color-ink); }
a:hover { color: var(--color-muted); }
:focus-visible { outline: 3px solid var(--color-ink); outline-offset: 2px; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.label { font-weight: 700; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; }
.muted, .pspec, .note { color: var(--color-muted); }
.note { font-size: 14px; margin: 0; }
h1, h2, h3 { margin: 0; }
h2 { font-weight: 800; font-size: clamp(28px, 3vw, 36px); letter-spacing: -0.03em; line-height: 1.1; }
h3 { font-weight: 700; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 12px; }
b, .big, .c-ppr, .c-total { font-variant-numeric: tabular-nums; }

/* Sidhuvud och sidfot */
.site-header { border-bottom: var(--line-heavy); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 18px; padding-bottom: 18px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand span { font-family: "Pixelify Sans", monospace; font-weight: 700; font-size: 32px; line-height: 1; }
.logo { shape-rendering: crispEdges; flex: 0 0 auto; }
.site-header nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; font-weight: 700; font-size: 16px; }
.site-header nav a { text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.site-header nav a[aria-current] { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 6px; }
.soon { color: var(--color-muted); }
.soon span { font-weight: 500; }
main.wrap { padding-top: 40px; padding-bottom: 72px; display: flex; flex-direction: column; gap: 48px; }
.site-footer { border-top: var(--line-heavy); font-size: 14px; }
.site-footer .wrap { padding-top: 20px; padding-bottom: 32px; }
.site-footer p { margin: 0 0 8px; max-width: 760px; }
.foot-brand { font-weight: 700; }

/* Sökfält, knappar, filter */
.search { display: flex; flex-wrap: wrap; gap: 10px; }
.search input {
  flex: 1 1 280px; min-width: 0; height: 60px; padding: 0 18px;
  background: var(--color-white); border: var(--line-input); color: var(--color-ink);
  font: 500 20px var(--font);
}
.search button, .btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 60px; padding: 0 30px;
  background: var(--color-ink); color: var(--color-paper); border: 0; cursor: pointer;
  font: 700 18px var(--font); text-decoration: none;
}
.btn:hover, .search button:hover { color: var(--color-paper); background: #2a2a2a; }
.chips, .quick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.quick .label { margin-right: 6px; }
.chip {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
  background: transparent; color: var(--color-ink); border: var(--line);
  font: 500 15px var(--font); text-decoration: none; cursor: pointer;
}
button.chip { font-weight: 700; }
.chip[aria-pressed="true"] { background: var(--color-ink); color: var(--color-paper); }
.chip:hover { background: var(--color-ink); color: var(--color-paper); }
.pang {
  display: inline-block; background: var(--color-signal); color: var(--color-ink);
  font-weight: 800; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 4px 8px; margin-right: 12px; vertical-align: middle; line-height: 1.2;
}
.tag { display: inline-block; border: var(--line); font-weight: 700; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; padding: 0 5px; line-height: 1.5; }
.mark { font-weight: 800; margin-right: 2px; cursor: help; }
.stock { font-weight: 700; }
.stock.lager { color: var(--color-stock); }
.stock.slut, .stock.okand { color: var(--color-muted); }
.change { font-size: 13px; font-weight: 700; margin-left: 4px; cursor: help; white-space: nowrap; }
.change.down { color: var(--color-stock); }
.change.up { color: var(--color-muted); }
.empty { margin: 0; font-weight: 700; }

/* Produktbilder: alltid kvadratiska etiketter i vit ruta */
.img { display: flex; align-items: center; justify-content: center; flex: 0 0 auto; aspect-ratio: 1; background: var(--color-white); border: var(--line); padding: 8%; }
.img img { width: 100%; height: 100%; object-fit: contain; }
.img svg { display: block; flex: 0 0 auto; height: auto; aspect-ratio: 1; }
/* Fasta mått: procentbredd inuti tabellceller blir 0 i Chromium */
.s56 svg { width: 32px; } .s72 svg { width: 40px; } .s132 svg { width: 76px; }
/* Små rutor med fasta mått: procent (padding, aspect-ratio) räknas fel inuti tabellceller */
.s56 { width: 56px; height: 56px; padding: 5px; }
.s72 { width: 72px; height: 72px; padding: 6px; }
.s132 { width: 132px; height: 132px; padding: 10px; }
.s480 { width: 100%; max-width: 520px; }

/* Startsida */
.hero { display: flex; flex-wrap: wrap; gap: 24px; align-items: stretch; padding-top: 16px; }
.hero-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 32px; }
.hero h1 { font-weight: 800; font-size: clamp(56px, 9vw, 136px); line-height: 0.88; letter-spacing: -0.055em; }
.hero .search input, .hero .search button { height: 64px; }
.pangcard {
  flex: 1 1 300px; min-width: 0; background: var(--color-signal); color: var(--color-ink); text-decoration: none;
  padding: 28px; display: flex; flex-direction: column; justify-content: space-between; gap: 28px;
}
.pangcard:hover { color: var(--color-ink); outline: 3px solid var(--color-ink); outline-offset: -3px; }
.pc-body { display: flex; flex-direction: column; gap: 6px; }
.pc-body .img { margin-bottom: 10px; }
.pc-spec { font-weight: 500; font-size: 15px; }
.pc-name { font-weight: 700; font-size: 20px; line-height: 1.25; }
.big { font-weight: 800; font-size: clamp(44px, 6vw, 64px); line-height: 1; letter-spacing: -0.035em; }
.pc-more { font-weight: 700; font-size: 16px; }
.split { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; border-top: var(--line); padding-top: 28px; }
.drops { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; }
.drops h2 { margin-bottom: 12px; }
.drop { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 0; border-top: var(--line); text-decoration: none; }
.drop-l { display: flex; align-items: center; gap: 14px; min-width: 0; }
.drop-r { display: flex; flex-direction: column; align-items: flex-end; white-space: nowrap; }
.drop-r b { font-weight: 800; font-size: 20px; }
.pinfo { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pname { font-weight: 700; font-size: 17px; line-height: 1.3; }
.pspec { font-size: 14px; }
.how { flex: 1 1 300px; min-width: 0; background: var(--color-ink); color: var(--color-paper); padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.how h2 { font-size: 28px; }
.how p { margin: 0; display: flex; gap: 14px; font-size: 16px; }
.how .n { flex: 0 0 auto; width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; background: var(--color-signal); color: var(--color-ink); font-weight: 800; font-size: 15px; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px; border-bottom: var(--line-heavy); padding-bottom: 10px; margin-bottom: 20px; }
.calibers .cat { margin-bottom: 28px; }
.calgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 10px; }
.calcard { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; min-height: 44px; border: var(--line); text-decoration: none; background: transparent; }
.calcard:hover { background: var(--color-ink); color: var(--color-paper); }
.calcard:hover .pspec { color: var(--color-paper); }
.cal { font-weight: 800; font-size: 20px; letter-spacing: -0.02em; }
.cprice { font-size: 15px; }
.cprice b { font-weight: 800; }
.stores { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0 24px; }
.stores li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: var(--line); font-weight: 700; }

/* Kalibersida (sökresultat) */
main.wrap:has(.results) { gap: 24px; }
.crumbs { font-size: 14px; font-weight: 500; display: flex; flex-wrap: wrap; gap: 8px; }
.result-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px; border-bottom: var(--line-heavy); padding: 24px 0 12px; }
.result-head h1 { font-weight: 800; font-size: clamp(56px, 7vw, 88px); line-height: 0.9; letter-spacing: -0.05em; }
.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 16px; }
th { text-align: left; font-weight: 700; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; padding: 12px; }
td { padding: 14px 12px; vertical-align: middle; }
th:first-child, td:first-child { padding-left: 0; }
th:last-child, td:last-child { padding-right: 0; }
.num, .c-ppr, .c-total { text-align: right; white-space: nowrap; }
.results { min-width: 760px; }
.results tbody tr { border-top: var(--line); }
.c-prod a { display: flex; align-items: center; gap: 16px; text-decoration: none; }
.c-prod a:hover .pname { text-decoration: underline; }
.c-store a { font-weight: 500; }
.c-ppr b { font-weight: 800; font-size: 20px; }

/* Produktsida */
main.wrap:has(.product) { padding-top: 28px; gap: 40px; }
.product { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; }
.gallery { flex: 1 1 360px; min-width: 0; max-width: 520px; }
.gallery .img svg { width: 56%; }
.pmain { flex: 999 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.ptitle { display: flex; flex-direction: column; gap: 8px; }
.ptitle h1 { font-weight: 800; font-size: clamp(40px, 5vw, 64px); line-height: 0.95; letter-spacing: -0.045em; }
.bestbox { background: var(--color-signal); padding: 24px; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px; }
.bestbox > div { display: flex; flex-direction: column; gap: 4px; }
.bestbox .label { font-weight: 800; font-size: 12px; letter-spacing: 0.06em; }
.bestbox .big { font-size: clamp(44px, 5vw, 56px); }
.bestbox .btn { min-height: 56px; }
.facts { margin: 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); border-bottom: var(--line); }
.facts dt, .facts dd { margin: 0; padding: 10px 0; border-top: var(--line); }
.facts dt { font-weight: 700; padding-right: 24px; }
.shops { min-width: 640px; }
.shops tbody tr { border-bottom: var(--line); }
.shops .c-store a { font-weight: 700; }
.shops tr.sold { color: var(--color-muted); }

@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  main.wrap { padding-top: 24px; gap: 36px; }
  .brand span { font-size: 26px; }
  .search button { flex: 1 1 100%; }
  .drop { align-items: flex-start; }
  .pangcard, .how, .bestbox { padding: 20px; }
  /* Tabellerna staplas så att pris per patron syns utan att scrolla i sidled */
  .results, .shops { min-width: 0; }
  .results thead, .shops thead { display: none; }
  .results tr, .shops tr { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 14px 0; }
  .results td, .shops td { padding: 0; }
  .results .c-prod { grid-column: 1 / -1; }
  .results .s72 { width: 56px; height: 56px; padding: 5px; }
  .results .s72 svg { width: 32px; }
  .results .c-store, .shops .c-store { grid-column: 1; }
  .results .c-ppr, .shops .c-ppr { grid-column: 2; grid-row: 2 / span 2; align-self: center; }
  .results .c-stock { grid-column: 1; }
  .results .c-total, .shops .c-total { grid-column: 2; text-align: right; color: var(--color-muted); font-size: 14px; }
  .shops td:nth-child(2), .shops td:nth-child(3) { grid-column: 1; }
  .shops .c-ppr { grid-row: 1 / span 2; }
}
