/* 387.ba, one stylesheet, no framework, no webfont.
   System stack rather than Inter: the design's character is in the tracking and
   weights, which we can match, and a font request is the one render blocking
   thing the brief rules out. */
:root {
  color-scheme: light;
  --red: #c52b25;
  --red-dark: #9b201c;
  --red-soft: #fdf0ee;
  --ink: #252c28;
  --muted: #646c68;
  --line: #e6e3dc;
  --line-soft: #efedE7;
  --paper: #f6f5f2;
  --panel: #fff;
  --green: #15613e;
  --amber: #875107;
  --amber-soft: #fdf6e7;
  --amber-line: #e7d7b4;
  --radius: 14px;
  font-size: 16px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.5;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-synthesis-weight: none;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select { font: inherit; }
button { cursor: pointer; border: 0; color: inherit; }
:focus-visible { outline: 3px solid #286ea0; outline-offset: 3px; }

.wrap { max-width: 1200px; margin: 0 auto; padding-inline: 24px; }
.sprite { display: none; }
.icon { width: 20px; height: 20px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---- header ----------------------------------------------------------- */
.site-head { background: var(--panel); border-top: 4px solid var(--red); border-bottom: 1px solid var(--line); }
.head-inner { min-height: 74px; display: flex; align-items: center; gap: 32px; flex-wrap: wrap; padding: 10px 0; }
.brand { font-size: 27px; font-weight: 850; letter-spacing: -1.4px; white-space: nowrap; color: var(--red); }
.brand span { color: var(--ink); font-weight: 500; font-size: 22px; }
.brand:hover { text-decoration: none; }
.nav { display: flex; gap: 26px; align-self: stretch; align-items: center; }
.nav a { display: flex; align-items: center; font-weight: 600; font-size: 14px; color: var(--muted); position: relative; }
.nav a:hover { color: var(--ink); text-decoration: none; }
.nav a.on { color: var(--red); }
.nav a.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -11px; height: 3px; background: var(--red); }
.search { display: flex; gap: 8px; margin-left: auto; flex: 0 1 340px; min-width: 190px; }
.search input {
  flex: 1; min-width: 0; padding: 9px 13px; font-size: 14.5px;
  background: var(--paper); border: 1px solid #d4d1c9; border-radius: 9px; color: var(--ink);
}
.search input:focus { outline: 0; border-color: var(--red); box-shadow: 0 0 0 3px #c52b2518; }
.search button { padding: 9px 18px; border-radius: 9px; background: var(--red); color: #fff; font-size: 14px; font-weight: 700; }
.search button:hover { background: var(--red-dark); }
.search-quiet { max-width: 330px; }

/* ---- hero ------------------------------------------------------------- */
.hero { background: var(--panel); border-bottom: 1px solid var(--line); padding-top: 28px; }
.hero-panel {
  background: #f2efe9; border: 1px solid var(--line); border-radius: 20px;
  padding: 34px 36px; display: flex; gap: 32px; align-items: center;
}
.hero-copy { flex: 1 1 auto; min-width: 0; }
.eyebrow { color: var(--red); font-size: 12px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; margin: 0 0 9px; }
.hero h1 { font-size: clamp(27px, 3.2vw, 40px); letter-spacing: -1.4px; line-height: 1.14; margin: 0 0 12px; font-weight: 780; }
.hero p { color: var(--muted); margin: 0; font-size: 16px; max-width: 60ch; }
.hero-search { display: flex; gap: 8px; max-width: 560px; margin-top: 22px; }
.hero-search input {
  flex: 1; min-width: 0; padding: 13px 16px; font-size: 16px;
  background: #fff; border: 1px solid #d4d1c9; border-radius: 11px; color: var(--ink);
}
.hero-search input:focus { outline: 0; border-color: var(--red); box-shadow: 0 0 0 3px #c52b2518; }
.hero-search button { padding: 13px 26px; border-radius: 11px; background: var(--red); color: #fff; font-size: 15px; font-weight: 700; }
.hero-search button:hover { background: var(--red-dark); }

.stats { display: flex; flex-wrap: wrap; align-items: center; gap: 0; margin: 0; padding: 18px 0; list-style: none; }
.stats li { display: flex; align-items: baseline; gap: 7px; padding-right: 24px; margin-right: 24px; border-right: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.stats li:last-child { border-right: 0; margin-right: 0; padding-right: 0; }
.stats b { font-size: 22px; font-weight: 800; letter-spacing: -0.7px; color: var(--red); font-variant-numeric: tabular-nums; }

/* ---- page furniture ---------------------------------------------------- */
main { padding: 26px 0 48px; }
.crumbs { font-size: 13px; color: var(--muted); padding: 14px 0 0; }
.crumbs .sep { opacity: 0.45; margin: 0 3px; }
h1 { font-size: clamp(25px, 3vw, 34px); letter-spacing: -1.1px; line-height: 1.18; margin: 10px 0 8px; font-weight: 780; }
.lede { color: var(--muted); margin: 0 0 22px; max-width: 72ch; font-size: 15.5px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.more { font-weight: 650; color: var(--red); }

.section-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 38px 0 16px; }
.heading-group { display: flex; gap: 12px; align-items: center; min-width: 0; }
.section-icon { display: grid; place-items: center; width: 38px; height: 38px; background: var(--red-soft); color: var(--red); border-radius: 10px; flex: 0 0 auto; }
.section-head h2 { font-size: 21px; letter-spacing: -0.6px; margin: 0; font-weight: 750; }
.section-head .sub { font-size: 13px; color: var(--muted); margin: 2px 0 0; }
.count { color: var(--muted); font-size: 13px; white-space: nowrap; }
h2 { font-size: 21px; letter-spacing: -0.6px; margin: 34px 0 14px; font-weight: 750; }
h2 .icon { color: var(--red); vertical-align: -0.2em; margin-right: 4px; }
h2 .count { font-weight: 400; }
h3 { font-size: 16px; margin: 0 0 6px; font-weight: 650; }

/* ---- deal cards -------------------------------------------------------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 14px; }
.card {
  display: flex; flex-direction: column; min-width: 0; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 17px 17px 0;
  overflow: hidden; transition: box-shadow .18s, border-color .18s;
}
.card:hover { border-color: #c9c4b8; box-shadow: 0 5px 18px rgba(31, 48, 35, 0.05); }
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; min-height: 24px; }
.discount { background: var(--red); color: #fff; font-weight: 750; font-size: 12.5px; padding: 3px 8px; border-radius: 5px; white-space: nowrap; }
.card h3 { font-size: 14.5px; font-weight: 650; line-height: 1.42; margin: 0 0 14px; min-height: 62px; overflow-wrap: anywhere; }
.card h3 a { color: var(--ink); }
.price-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; line-height: 1.25; }
.price { font-weight: 800; font-size: 27px; letter-spacing: -1px; color: var(--red); font-variant-numeric: tabular-nums; }
.price small { font-size: 13.5px; font-weight: 700; letter-spacing: 0; }
.old { color: var(--muted); font-size: 13px; white-space: nowrap; text-decoration: line-through; }
.unit { font-size: 12px; color: var(--muted); margin: 5px 0 0; min-height: 17px; }
.saving { font-size: 12px; font-weight: 650; color: var(--green); margin: 8px 0 0; min-height: 17px; }
.note { font-size: 12px; color: var(--muted); margin: 11px 0 14px; line-height: 1.5; min-height: 36px; }
.card-footer {
  display: flex; gap: 7px; align-items: center; margin: auto -17px 0; padding: 11px 17px;
  border-top: 1px solid var(--line-soft); font-size: 12.5px; color: var(--muted); background: #fbfaf7;
}
.card-footer .icon { width: 15px; height: 15px; }
.card-footer .rlogo { margin-left: auto; }

.upcoming-block { margin-top: 38px; padding-top: 26px; border-top: 1px solid var(--amber-line); }
.upcoming-block .section-icon { background: var(--amber-soft); color: var(--amber); }
.upcoming-block .card-footer { background: var(--amber-soft); color: var(--amber); border-top-color: var(--amber-line); }

/* ---- retailer marks ---------------------------------------------------- */
/* Fixed-height box so an image mark and a text wordmark sit on the same line:
   an inline-flex takes its baseline from its content, which pushed wordmarks
   below the logos they stood next to. */
.rlogo { display: inline-flex; align-items: center; height: 26px; vertical-align: middle; }
.rlogo-small { height: 21px; }
.rlogo-big { height: 38px; }
.rlogo:hover { text-decoration: none; opacity: 0.72; }
.rlogo img { width: auto; height: auto; max-width: 104px; max-height: 26px; object-fit: contain; display: block; }
.rlogo-small img { max-width: 82px; max-height: 21px; }
.rlogo-big img { max-width: 148px; max-height: 38px; }
.wordmark { display: inline-block; font-weight: 850; letter-spacing: -0.4px; color: var(--brand); font-size: 14px; line-height: 1.1; }
.rlogo-small .wordmark { font-size: 12.5px; }
.rlogo-big .wordmark { font-size: 19px; }

/* ---- filters ----------------------------------------------------------- */
.filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 22px; }
.store-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filter {
  display: inline-flex; align-items: center; gap: 6px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 8px; padding: 9px 14px;
  font-size: 14px; font-weight: 600; min-height: 42px; color: var(--ink);
}
.filter:hover { border-color: #b3ada0; text-decoration: none; }
/* Active state is a ring, not a fill. The logos are normalised onto a white
   background rather than transparency, so any fill or filter would sit behind
   an opaque tile and hide the mark. The ring uses box-shadow rather than a
   thicker border so selecting a filter does not shift the row. */
.filter.on { border-color: var(--red); color: var(--red); box-shadow: 0 0 0 2px #c52b2530; }
.filter.on em { opacity: 1; color: var(--red); }
.filter em { font-style: normal; font-weight: 400; opacity: 0.7; font-size: 12px; }
.filter img { max-height: 18px; max-width: 66px; object-fit: contain; }
.select-wrap { margin-left: auto; display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); }
select { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 10px 11px; color: var(--ink); font-size: 14px; min-height: 42px; }
.result-bar { display: flex; align-items: center; gap: 14px; font-size: 14px; color: var(--muted); margin: -4px 0 20px; flex-wrap: wrap; }
.text-button { background: transparent; color: var(--red); font-size: 14px; font-weight: 650; padding: 0; }
.text-button:hover { text-decoration: underline; }

/* ---- category chips ---------------------------------------------------- */
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0 0 22px; }
.chips a {
  display: inline-flex; align-items: center; gap: 9px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 8px; padding: 9px 13px;
  font-size: 13.5px; min-height: 42px; color: var(--ink);
}
.chips a:hover { border-color: #b3ada0; text-decoration: none; }
.chips .icon { width: 18px; height: 18px; color: var(--muted); }
.chips a:hover .icon { color: var(--red); }
.chips span { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }

/* ---- tables ------------------------------------------------------------ */
.table { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: 14.5px; }
.table th, .table td { padding: 11px 13px; text-align: left; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.table th { background: #f2efe9; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); font-weight: 700; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table .strong { font-weight: 750; }
.table tr.best { background: #f3faf5; }
.prices tr.best td:first-child { border-left: 3px solid var(--green); }
.muted-table { opacity: 0.8; }

.pct { background: var(--red-soft); color: var(--red); font-weight: 750; padding: 2px 7px; border-radius: 5px; font-size: 12.5px; }
.tag { background: #edf4f9; color: #1c5e8c; font-size: 11.5px; font-weight: 650; padding: 2px 7px; border-radius: 5px; margin-left: 6px; }
.soon { background: var(--amber-soft); color: var(--amber); font-size: 11.5px; font-weight: 650; padding: 2px 7px; border-radius: 5px; }
.expired { background: #efeee9; color: var(--muted); font-size: 11.5px; font-weight: 650; padding: 2px 7px; border-radius: 5px; }
.saving-line { font-size: 14.5px; margin-top: 11px; color: var(--green); font-weight: 600; }

/* ---- lists and blocks -------------------------------------------------- */
.cat-list { list-style: none; margin: 0; padding: 0; }
.cat-list li { padding: 9px 0; border-bottom: 1px solid var(--line-soft); display: flex; flex-wrap: wrap; gap: 9px; align-items: baseline; font-size: 14.5px; }
.cat-list li:last-child { border-bottom: 0; }
.cat-list .count { margin-left: auto; }
.cat-list.big li { padding: 12px 0; font-size: 15.5px; }
.retailer-block { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 12px; }
.retailer-block h3 { margin-bottom: 8px; }
.plain { padding-left: 18px; margin: 0; }
.plain li { margin: 5px 0; font-size: 14.5px; }
.empty { background: var(--panel); border: 1px dashed #c2bcae; border-radius: var(--radius); padding: 28px; color: var(--muted); text-align: center; }

/* ---- catalogue page images --------------------------------------------- */
.pagegrid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; padding: 0; margin: 0; }
.pagegrid li { position: relative; }
.pagegrid a { display: block; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--panel); line-height: 0; }
.pagegrid a:hover { border-color: var(--red); }
.pagegrid img { width: 100%; height: auto; display: block; }
.pagegrid span { position: absolute; bottom: 6px; right: 6px; background: rgba(37,44,40,0.85); color: #fff; font-size: 11px; font-weight: 700; line-height: 1; padding: 3px 6px; border-radius: 4px; }

.sources { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.sources li { display: flex; gap: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 11px; font-size: 13.5px; }
.sources .pagethumb { flex: 0 0 auto; line-height: 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.sources .pagethumb img { display: block; width: 92px; height: auto; }
.sources strong { color: var(--red); font-size: 15px; }
.sources .rlogo { margin-bottom: 3px; }

.chart { margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; overflow-x: auto; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12.5px; color: var(--muted); margin-top: 9px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }

.pager { display: flex; gap: 16px; align-items: center; justify-content: center; margin: 30px 0 0; font-size: 14.5px; }
.pager a { font-weight: 650; color: var(--red); }

/* ---- footer ------------------------------------------------------------ */
.site-foot { background: var(--panel); border-top: 1px solid var(--line); padding: 28px 0 34px; font-size: 12.5px; color: var(--muted); }
.site-foot p { margin: 5px 0; max-width: 78ch; }

@media (max-width: 780px) {
  .wrap { padding-inline: 16px; }
  .hero-panel { padding: 24px 20px; }
  .head-inner { gap: 14px; }
  .nav { order: 3; width: 100%; }
  .nav a.on::after { bottom: -6px; }
  .table { display: block; overflow-x: auto; white-space: nowrap; }
  .stats li { padding-right: 16px; margin-right: 16px; }
  .select-wrap { margin-left: 0; width: 100%; }
}

[hidden] { display: none !important; }

/* One catalogue, two chains honouring it. */
.also-valid { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; font-size: 14px; margin: 0 0 16px; color: var(--green); }
.also-valid .icon { width: 18px; height: 18px; }
.also-valid .rlogo img { max-height: 20px; }

/* Selected category reads the same way as the selected store filter. */
.chips a.on { border-color: var(--red); color: var(--red); box-shadow: 0 0 0 2px #c52b2530; }
.chips a.on .icon { color: var(--red); }
.chips a.on span { color: var(--red); }

/* ---- nagradne igre ----------------------------------------------------- */
.games { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.games li { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.game-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.game-head h3 { margin: 0; font-size: 17px; font-weight: 700; }
.game-meta { margin: 6px 0 0; font-size: 13.5px; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.game-entry { margin: 9px 0 0; font-size: 14px; color: var(--muted); }
.game-offers { margin: 11px 0 0; padding-top: 11px; border-top: 1px solid var(--line-soft); font-size: 13.5px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.game-offers .icon { width: 16px; height: 16px; color: var(--red); }
.game-offers strong { color: var(--red); }
.unverified { background: #fdf3e2; color: var(--amber); font-size: 11.5px; font-weight: 650; padding: 2px 7px; border-radius: 5px; }
.game-prizes { margin: 9px 0 0; font-size: 13.5px; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.game-prizes .icon { width: 16px; height: 16px; color: var(--red); flex: 0 0 auto; }

/* ---- shopping list ------------------------------------------------------ */
.list-count {
  display: inline-block; min-width: 17px; margin-left: 5px; padding: 0 4px;
  background: var(--red); color: #fff; border-radius: 9px;
  font-size: 11px; font-weight: 700; line-height: 17px; text-align: center;
}
.card-footer .add {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; margin-right: 8px; border-radius: 50%;
  border: 1px solid var(--line); background: #fff; color: var(--red);
  font-weight: 700; line-height: 1; text-decoration: none;
}
.card-footer .add:hover { border-color: var(--red); }
.card-footer .add.on { background: var(--red); border-color: var(--red); color: #fff; }
.basket-savings {
  margin: 0 0 22px; padding: 14px 16px; border-radius: var(--radius);
  background: #eef6ef; border: 1px solid #cfe4d2; font-size: 16px;
}
.basket-savings strong { font-size: 19px; }
.basket-savings .muted { display: block; margin-top: 4px; }
td.qty { white-space: nowrap; }
td.qty a {
  display: inline-block; width: 20px; text-align: center; text-decoration: none;
  border: 1px solid var(--line); border-radius: 5px; color: var(--ink);
}
td.qty a:hover { border-color: var(--red); color: var(--red); }
td.qty span { display: inline-block; min-width: 24px; text-align: center; font-weight: 600; }
.list-controls { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.list-controls .chips { margin: 0; }
.list-controls .text-button { margin-left: auto; }

/* ---- sortable tables ---------------------------------------------------- */
th.sortable { padding: 0; }
th.sortable a {
  display: block; padding: 11px 14px; color: inherit; text-decoration: none;
  font: inherit; letter-spacing: inherit; text-transform: inherit; white-space: nowrap;
}
th.sortable.num a { text-align: right; }
th.sortable a:hover { color: var(--red); }
th.sorted a { color: var(--red); }
th.sortable .arrow { display: inline-block; width: 10px; margin-left: 3px; }
.table td .add {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; margin-left: 6px; border-radius: 50%;
  border: 1px solid var(--line); background: #fff; color: var(--red);
  font-weight: 700; line-height: 1; text-decoration: none; vertical-align: middle;
}
.table td .add:hover { border-color: var(--red); }
.table td .add.on { background: var(--red); border-color: var(--red); color: #fff; }
a.pct { text-decoration: none; }
a.pct:hover { text-decoration: underline; }
