/* ============================================================================
   RetailRadar — falazóelem árak.
   The intelligence-lite layout (filters | featured product + merchant table, catalogue grid
   below) on the site's own dark tokens: green is the Építőanyag accent everywhere on this
   site, so it is the price colour here; cyan marks the cheapest row.
   ============================================================================ */

.prices { --container: 1320px;
  padding: clamp(28px, 4vw, 48px) 0 60px;
  --p-accent: var(--accent-green);
  --p-accent-rgb: 16, 185, 129;
  --p-best: var(--accent-blue);
  --p-best-rgb: 56, 189, 248;
  --p-panel: rgba(15, 23, 42, 0.7);
  --p-panel-2: rgba(255, 255, 255, 0.035);
  --p-mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --p-radius: 10px;
}
.prices__head { margin-bottom: 22px; }
.prices__head .display { margin-bottom: 10px; }
.prices__lead { max-width: 68ch; color: var(--text-muted); font-size: 15px; }

/* --- search bar ------------------------------------------------------------- */
/* The search stays under the sticky header while the page scrolls: the catalogue is long
   and the search is how a reader moves through it. The bar paints the page ground so the
   rows sliding under it do not show through. */
.prices__bar {
  position: sticky; top: var(--header-h); z-index: 20;
  display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center;
  margin: 0 -8px 22px; padding: 10px 8px;
  background: var(--bg-main);
  box-shadow: 0 8px 12px -10px rgba(0, 0, 0, 0.6);
}
.search { position: relative; }
.search-icon { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--text-dim); }
.search-input {
  width: 100%; height: 46px; padding: 0 14px 0 44px; font: inherit; font-size: 15px; color: var(--text-main);
  background: var(--p-panel); border: 1px solid var(--border-strong); border-radius: var(--p-radius);
}
.search-input:focus { outline: 2px solid var(--p-accent); outline-offset: -1px; }
.search-input::placeholder { color: var(--text-dim); }
.search-input::-webkit-search-cancel-button { display: none; }
.clear-btn, .filters-toggle {
  height: 46px; border: 1px solid var(--border-strong); background: var(--p-panel); color: var(--text-muted);
  border-radius: var(--p-radius); font: inherit; cursor: pointer;
}
.clear-btn { width: 46px; display: inline-flex; align-items: center; justify-content: center; font-size: 16px; }
.clear-btn:hover, .clear-btn.is-active { color: var(--p-accent); border-color: var(--p-accent); }
.filters-toggle { display: none; padding: 0 16px; font-weight: 600; }

/* --- layout ------------------------------------------------------------------ */
.prices__upper { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 24px; align-items: start; }

/* --- filters ----------------------------------------------------------------- */
.filters { position: sticky; top: calc(var(--header-h) + 82px); background: var(--p-panel); border: 1px solid var(--border); border-radius: var(--p-radius); padding: 16px 18px; }
.filters-head { display: flex; align-items: baseline; justify-content: space-between; padding-bottom: 10px; border-bottom: 1px solid var(--border-strong); }
.filters-head h2 { font-family: var(--font-display); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); font-weight: 700; }
.link-btn { background: none; border: 0; padding: 0; color: var(--text-muted); font: inherit; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link-btn:hover { color: var(--p-accent); }
.filter-group { padding: 12px 0; border-bottom: 1px solid var(--border); }
.filter-group:last-child { border-bottom: 0; }
.filter-title { font-family: var(--font-display); margin: 0 0 8px; font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; }
.filter-title-row { display: flex; align-items: baseline; justify-content: space-between; }
.filter-links { font-size: 13px; color: var(--text-dim); }
.filter-list { display: flex; flex-direction: column; gap: 8px; }
.check { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; font-size: 14px; cursor: pointer; color: var(--text-main); }
.check.hidden { display: none; }
.check input { width: 16px; height: 16px; margin: 0; accent-color: var(--p-accent); }
.check span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.check i { font-style: normal; font-family: var(--p-mono); font-size: 12px; color: var(--text-dim); }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { padding: 5px 10px; border: 1px solid var(--border-strong); border-radius: 999px; background: transparent; color: var(--text-muted); font-family: var(--p-mono); font-size: 13px; cursor: pointer; }
.pill:hover { color: var(--text-main); border-color: var(--text-dim); }
.pill.active { background: var(--p-accent); color: #03150f; border-color: var(--p-accent); font-weight: 700; }
.filters-foot { padding: 12px 0; border-bottom: 1px solid var(--border); }
.jump-btn { display: block; text-decoration: none; text-align: center; padding: 9px 12px; border: 1px solid var(--border-strong); border-radius: 8px; color: var(--text-main); font-weight: 600; font-size: 13px; }
.jump-btn:hover { border-color: var(--p-accent); color: var(--p-accent); }
.map-link { display: block; font-size: 13px; color: var(--p-accent); text-decoration: none; margin: 2px 0 10px; }
.map-link:hover { text-decoration: underline; }
.mini-search { width: 100%; height: 34px; padding: 0 10px; font: inherit; font-size: 13px; color: var(--text-main); background: var(--p-panel-2); border: 1px solid var(--border-strong); border-radius: 8px; margin-bottom: 8px; }
.mini-search::placeholder { color: var(--text-dim); }
.merchant-list { display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow-y: auto; padding-right: 4px; }
.merchant-list-empty { color: var(--text-dim); font-size: 13px; }

/* --- featured product -------------------------------------------------------- */
.featured {
  scroll-margin-top: calc(var(--header-h) + 82px);
  display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 24px;
  background: var(--p-panel); border: 1px solid var(--border); border-radius: var(--p-radius); padding: 22px 24px;
}
.featured-eyebrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.tag { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--p-accent); font-weight: 700; }
.brand-tag, .maker-tag { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); padding: 2px 9px; border: 1px solid var(--border-strong); border-radius: 999px; }
.maker-tag { color: var(--text-dim); }
.brand-tag:empty, .maker-tag:empty { display: none; }
.featured-title { font-family: var(--font-display); margin: 0 0 12px; font-size: clamp(20px, 2.4vw, 26px); line-height: 1.2; font-weight: 800; letter-spacing: 0.02em; text-wrap: balance; }
.specs { display: flex; flex-wrap: wrap; gap: 6px; }
.spec { font-size: 13px; padding: 3px 9px; border: 1px solid var(--border-strong); background: var(--p-panel-2); border-radius: 6px; color: var(--text-main); }
.spec.empty { color: var(--text-dim); border-style: dashed; background: transparent; }
.spec-notes { font-size: 12px; color: var(--text-dim); margin-top: 6px; }
.spec-notes:empty { display: none; }
.featured-price { display: grid; grid-template-columns: auto 1fr; gap: 2px 14px; align-items: baseline; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.price-label { grid-column: 1 / -1; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); }
.price-value { font-family: var(--p-mono); font-size: 34px; font-weight: 700; color: var(--p-accent); line-height: 1; }
.price-value small { font-size: 14px; color: var(--text-muted); font-weight: 500; margin-left: 4px; }
.price-meta { font-size: 13px; color: var(--text-muted); }
.featured-photo { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.featured-photo img { width: 100%; aspect-ratio: 1; object-fit: contain; background: #fff; border: 1px solid var(--border-strong); border-radius: 8px; padding: 10px; }
.featured-photo img[hidden] { display: none; }
.featured-photo figcaption { font-size: 12px; color: var(--text-dim); }

/* --- merchant table ---------------------------------------------------------- */
.offers { margin-top: 20px; background: var(--p-panel); border: 1px solid var(--border); border-radius: var(--p-radius); }
.offers-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; padding: 14px 20px; border-bottom: 1px solid var(--border-strong); }
.offers-head h2 { font-family: var(--font-display); margin: 0; font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; }
.offers-tools { display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--text-muted); }
.sort select { font: inherit; font-size: 13px; padding: 5px 8px; border: 1px solid var(--border-strong); border-radius: 6px; background: var(--bg-elevated); color: var(--text-main); margin-left: 6px; }
.table-wrap { overflow-x: auto; }
/* Fixed layout: the merchant column takes what is left and its listing title ellipsizes,
   instead of a long title widening the table past its box and pushing the comparison column
   into a horizontal scroll nobody notices. */
.offers-table { width: 100%; table-layout: fixed; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.col-price { width: 118px; }
.col-link { width: 122px; }
.col-cmp { width: 190px; }
.offers-table th { text-align: left; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim); font-weight: 700; padding: 10px 16px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.offers-table td { padding: 10px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.offers-table tr:last-child td { border-bottom: 0; }
.offers-table tr.best td { background: rgba(var(--p-best-rgb), 0.08); }
.td-price { font-family: var(--p-mono); font-weight: 700; font-size: 15px; white-space: nowrap; color: var(--text-main); }
.td-price small { font-weight: 500; color: var(--text-dim); font-size: 12px; }
.td-price.none { font-family: var(--font-body); font-weight: 500; color: var(--text-dim); }
.merchant { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.merchant b { font-weight: 600; }
.merchant span { font-size: 12px; color: var(--text-dim); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.merchant b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.open-link { font-size: 13px; font-weight: 600; color: var(--p-accent); text-decoration: none; white-space: nowrap; }
.open-link:hover { text-decoration: underline; }
.open-link.none { color: var(--text-dim); font-weight: 400; }
.cmp { display: grid; grid-template-columns: minmax(60px, 1fr) auto; gap: 10px; align-items: center; }
.cmp-bar { height: 8px; background: rgba(255, 255, 255, 0.08); border-radius: 999px; overflow: hidden; }
.cmp-bar span { display: block; height: 100%; background: var(--text-dim); border-radius: 999px; }
.cmp-bar.best span { background: var(--p-best); }
.cmp-pct { font-family: var(--p-mono); font-size: 12px; color: var(--text-muted); }
.cmp-pct.best { color: var(--p-best); font-weight: 700; }
.empty-row td { color: var(--text-dim); text-align: center; padding: 22px; }
.offers-foot { padding: 12px 20px; font-size: 12px; color: var(--text-dim); border-top: 1px solid var(--border); }

/* --- catalogue grid ---------------------------------------------------------- */
.catalogue { margin-top: 36px; scroll-margin-top: calc(var(--header-h) + 82px); }
.catalogue-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; margin-bottom: 16px; }
.catalogue-sub { font-size: 13px; color: var(--text-dim); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.grid-empty { grid-column: 1 / -1; padding: 40px; text-align: center; color: var(--text-muted); background: var(--p-panel); border: 1px dashed var(--border-strong); border-radius: var(--p-radius); }
.card { position: relative; min-width: 0; display: flex; flex-direction: column; gap: 6px; padding: 12px; background: var(--p-panel); border: 1px solid var(--border); border-radius: var(--p-radius); cursor: pointer; transition: border-color .15s, transform .15s; }
.card:hover { border-color: var(--text-dim); transform: translateY(-2px); }
.card.active { border-color: var(--p-accent); box-shadow: 0 0 0 1px var(--p-accent); }
.card:focus-visible { outline: 2px solid var(--p-accent); outline-offset: 2px; }
.card img, .card-nophoto { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: #fff; border-radius: 6px; }
.card-nophoto { background: var(--p-panel-2); }
.card-brand { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--p-accent); font-weight: 700; }
.card-title { font-size: 13px; font-weight: 600; line-height: 1.3; margin: 0; flex: 1; }
.card-foot { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 8px; margin-top: 4px; }
.card-price { font-family: var(--p-mono); font-weight: 700; font-size: 14px; white-space: nowrap; }
.card-price small { font-weight: 500; color: var(--text-dim); font-size: 11px; }
.card-merchants { font-size: 11px; color: var(--text-dim); white-space: nowrap; }
.card-review { position: absolute; top: 8px; right: 8px; font-size: 10px; padding: 2px 6px; border-radius: 4px; background: rgba(251, 191, 36, 0.18); color: #fbbf24; }

/* --- responsive -------------------------------------------------------------- */
@media (max-width: 900px) {
  .prices__upper { grid-template-columns: minmax(0, 1fr); }
  .filters { position: static; display: none; }
  .filters.open { display: block; }
  .filters-toggle { display: inline-flex; align-items: center; }
  .featured { grid-template-columns: minmax(0, 1fr); }
  .featured-photo { max-width: 260px; }
}
@media (max-width: 560px) {
  .prices__bar { grid-template-columns: 1fr auto; }
  .filters-toggle { grid-column: 1 / -1; justify-content: center; }
  .price-value { font-size: 28px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  /* Four columns in 340px: the link is its arrow, the comparison its percentage, and the
     merchant keeps what a name needs. */
  .offers-table th, .offers-table td { padding: 10px 10px; }
  .col-price { width: 92px; }
  .col-link { width: 34px; }
  .col-cmp { width: 62px; }
  .open-link__text { display: none; }
  .cmp { grid-template-columns: auto; justify-content: end; }
  .cmp-bar { display: none; }
}
