/* k2print.hu — Referenciák (/referenciak, /referenciak/<slug>). A shop.css kártya-/galéria-/morzsa-osztályaira épül (.cats, .shop-empty, .gal-*, .crumbs, .pc-vid). */

/* ---------- szűrő-sor: mobilon egy görgethető sor ---------- */
.rf-tags { margin-bottom: 22px; }
.rf-tags[hidden] { display: none; }
@media (max-width: 700px) {
  .rf-tags { flex-wrap: nowrap; overflow-x: auto; gap: 4px 18px; margin-inline: -16px; padding-inline: 16px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .rf-tags::-webkit-scrollbar { display: none; }
  .rf-tags .cat { flex: 0 0 auto; white-space: nowrap; }
}

/* ---------- kártyarács ---------- */
.rf-grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 700px) { .rf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; } }
@media (min-width: 1040px) { .rf-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.rf-grid > p { grid-column: 1 / -1; }
.rf-grid[hidden] { display: none; }
.rf-card { position: relative; min-width: 0; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); transition: border-color .15s, box-shadow .2s, transform .2s; }
.rf-card:hover, .rf-card:focus-within { border-color: var(--graphite); box-shadow: 0 10px 28px rgba(29, 29, 27, .08); }
.rf-link { display: flex; flex-direction: column; gap: 6px; height: 100%; padding-bottom: 18px; color: var(--ink); text-decoration: none; }
.rf-link > :not(.rf-img) { padding: 0 16px; }
.rf-img { position: relative; display: block; aspect-ratio: 3 / 2; margin-bottom: 10px; overflow: hidden; background: var(--card-2); }
.rf-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.rf-card:hover .rf-img img { transform: scale(1.03); }
.rf-img.empty { display: grid; place-items: center; background-image: linear-gradient(var(--rule-soft) 1px, transparent 1px), linear-gradient(90deg, var(--rule-soft) 1px, transparent 1px); background-size: 24px 24px; }
.rf-img.empty .display-sm { color: var(--deco); }
.rf-card .label { font-size: 12px; color: var(--faint); }
.rf-title { font-weight: 700; font-size: 17px; line-height: 1.3; overflow-wrap: anywhere; }
.rf-sum { font-size: 14px; color: var(--graphite); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.rf-facts-line { font-size: 12px; color: var(--faint); }
.rf-more { margin-top: auto; padding-top: 8px; font-size: 12px; font-weight: 650; letter-spacing: .14em; text-transform: uppercase; color: var(--navy); }
.rf-more::after { content: " →"; }
html.k2-motion .rf-card:hover { transform: translateY(-2px); }
.rf-card .pc-vbadge { right: 10px; bottom: 10px; }

/* ---------- részletoldal ---------- */
.rf-root { padding-bottom: clamp(28px, 5vw, 56px); }
.rf-detail { display: grid; gap: 22px; }
@media (min-width: 860px) {
  .rf-detail { grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: clamp(32px, 4vw, 64px); align-items: start; }
  .rf-detail .rf-gal { position: sticky; top: 84px; }
}

/* galéria: RÖGZÍTETT magasságú „színpad” (--rf-h: 1080-on max 620 px, mobilon a kijelző ~45%-a), a tartalom a természetes képarányával, levágás nélkül, középen;
   a keret (.rf-fit) szélessége = min(oszlop, magasság × arány), így a hely a betöltés előtt is ismert (az arányt a JS a szerver w/h-jából, majd a betöltött méretből adja: --ar) */
.rf-gal { --rf-h: clamp(220px, 45vh, 420px); }
@media (min-width: 860px) { .rf-gal { --rf-h: clamp(300px, 60vh, 620px); } }
@supports (width: 1cqw) {   /* a színpad se legyen magasabb, mint amilyen széles az oszlop (keskeny oszlopban a fekvő kép körül ne maradjon óriási üres sáv) */
  .rf-gal { container-type: inline-size; --rf-h: min(clamp(220px, 45vh, 420px), 100cqw); }
  @media (min-width: 860px) { .rf-gal { --rf-h: min(clamp(300px, 60vh, 620px), 100cqw); } }
}
.rf-gal .gal-track { aspect-ratio: auto; height: var(--rf-h); }
.rf-gal .gal-slide { display: grid; place-items: center; height: 100%; }
.rf-gal .gal-slide.vid { background: none; }
.rf-gal .gal-slide.empty { height: auto; max-height: var(--rf-h); aspect-ratio: 4 / 3; }
.rf-fit { position: relative; width: min(100%, calc(var(--rf-h) * var(--ar, 1.3333))); aspect-ratio: var(--ar, 1.3333); max-height: 100%; background: var(--card); overflow: hidden; }
.rf-fit.vid { --ar: 1.7778; background: #111; }
.rf-gal .rf-fit img, .rf-gal .rf-fit video { display: block; width: 100%; height: 100%; object-fit: contain; }
.rf-gal .rf-fit img { background: var(--card); }
.rf-play { position: absolute; left: 50%; top: 50%; translate: -50% -50%; display: grid; place-items: center; width: 64px; height: 64px; padding: 0; border: 0; border-radius: 50%; background: rgba(29, 29, 27, .72); color: var(--cream); cursor: pointer; transition: background .15s; }
.rf-play[hidden] { display: none; }
.rf-play::before { content: ""; margin-left: 5px; border-style: solid; border-width: 11px 0 11px 18px; border-color: transparent transparent transparent currentColor; }
.rf-play:hover, .rf-play:focus-visible { background: var(--ink); }
.rf-vid-err { position: absolute; inset: auto 0 0 0; margin: 0; padding: 10px 14px; background: rgba(29, 29, 27, .9); color: var(--cream); font-size: 14px; }
.rf-vid-err[hidden] { display: none; }
.rf-vid-err a { color: inherit; text-decoration: underline; }

/* szöveges oszlop: kiegyensúlyozott, sorhossz ≤ ~64 karakter, kompakt adattábla */
.rf-info { display: grid; gap: 16px; align-content: start; min-width: 0; }
.rf-info .rf-title { font-size: clamp(34px, 1.6vw + 14px, 48px); font-weight: 400; line-height: 1; overflow-wrap: anywhere; text-wrap: balance; }
.rf-lead { font-size: 17px; max-width: 60ch; color: var(--graphite); }
.rf-kv { grid-template-columns: minmax(96px, 34%) 1fr; gap: 4px 14px; max-width: 60ch; padding: 10px 14px; font-size: 14px; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); }
.rf-kv dt { padding-top: 1px; }
.rf-body { display: grid; gap: 12px; max-width: 64ch; }
.rf-body p { white-space: pre-line; overflow-wrap: anywhere; }
.rf-prod { display: grid; gap: 8px; justify-items: start; padding-top: 4px; }
.rf-actions { margin-top: 6px; }
.rf-actions .admin-chip { margin-left: auto; }
@media (max-width: 520px) { .rf-actions .admin-chip { margin-left: 0; } }

/* ---------- gyűjtemény (kind = collection) ---------- */
/* lista: jelvény a kártya képén */
.rf-kbadge { position: absolute; left: 10px; top: 10px; z-index: 1; padding: 5px 10px; background: rgba(244, 241, 236, .94); border: 1px solid var(--ink); border-radius: var(--radius-btn); font-size: 13px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; line-height: 1.2; color: var(--ink); pointer-events: none; }

/* részletoldal: saját fő galéria nélkül egyoszlopos, olvasható sorhosszal */
.rf-detail.no-gal { grid-template-columns: minmax(0, 1fr); }

/* „Ebben a gyűjteményben”: asztalon 3 / 2 oszlop, telefonon 1 */
.rf-items { margin-top: clamp(28px, 4vw, 56px); padding-top: clamp(20px, 3vw, 36px); border-top: 1px solid var(--rule); }
.rf-items-head { display: grid; gap: 6px; margin-bottom: 18px; }
.rf-items-head .display-sm { margin: 0; overflow-wrap: anywhere; }
.rf-items-grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 700px) { .rf-items-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; } }
@media (min-width: 1040px) { .rf-items-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.rf-item { min-width: 0; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.rf-item-body { display: grid; gap: 6px; align-content: start; padding: 14px 16px 18px; min-width: 0; }
.rf-item-no { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .14em; font-variant-numeric: tabular-nums; color: var(--faint); }
.rf-item-title { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.rf-item-desc { margin: 0; max-width: 62ch; font-size: 15px; line-height: 1.55; color: var(--graphite); white-space: pre-line; overflow-wrap: anywhere; }

/* az elem mini-galériája: a fő galéria komponense kisebb színpaddal, a kártya szélén, keret nélkül */
.rf-gal.rf-mini { --rf-h: clamp(190px, 28vh, 260px); position: static; }   /* a fő galéria „ragadós” (sticky) — az elem-galéria nem */
@supports (width: 1cqw) { .rf-gal.rf-mini { --rf-h: min(clamp(190px, 28vh, 260px), 100cqw); } }
.rf-mini .gal-main { border: 0; border-bottom: 1px solid var(--rule); }
.rf-mini .gal-thumbs { margin: 0; padding: 8px 12px; gap: 6px; border-bottom: 1px solid var(--rule-soft); }
.rf-mini .gal-thumb { width: 48px; height: 48px; }
.rf-mini .gal-count { font-size: 12px; padding: 4px 8px; }

/* v3 (2026-11-13, AUDIT P3): a referencia-részlet CTA-ja, előző/következő léptetés, kapcsolódó referenciák */
.rf-cta { display: grid; gap: 10px; padding: var(--sp-2); border: 1px solid var(--navy); background: var(--navy-soft); border-radius: var(--radius); }
.rf-cta-t { font-family: var(--display); font-weight: 400; font-size: var(--fs-5); line-height: 1; letter-spacing: .01em; text-transform: uppercase; }
.rf-cta .row { gap: 10px; }
.rf-cta p { max-width: 56ch; }
.rf-more-host:empty { display: none; }
.rf-related { margin-top: clamp(28px, 4vw, 56px); padding-top: clamp(20px, 3vw, 36px); border-top: 1px solid var(--rule); }
.rf-pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: clamp(20px, 3vw, 32px); }
.rf-pg { display: grid; gap: 2px; align-content: start; min-height: 64px; padding: 12px 14px; border: 1px solid var(--rule); background: var(--card); border-radius: var(--radius); color: var(--ink); text-decoration: none; min-width: 0; }
.rf-pg:hover, .rf-pg:focus-visible { border-color: var(--navy); background: #fff; }
.rf-pg b { overflow-wrap: anywhere; font-size: 15px; }
.rf-pg.next { text-align: right; }
@media (max-width: 520px) { .rf-pager { grid-template-columns: minmax(0, 1fr); } .rf-pg.next { text-align: left; } }

/* kép nélküli gyűjtemény-elem helyőrzője */
.rf-item-ph { aspect-ratio: 4 / 3; display: grid; place-items: center; background: var(--card-2, #efebe4); color: var(--deco, #a19d95); font-family: var(--display); font-size: 40px; letter-spacing: .04em; border: 1px solid var(--rule); }
