/* Tracon STEP portál - publikus katalógus stílusai (Fázis 4.8)
   Ez a stílus PONTOSAN a STEP-portal-design-spec.md szerint készült.
   Nincs benne kitalált szín vagy betű; minden érték a specből származik.
*/

:root {
  /* --- Spec: alap felület és szöveg --- */
  --ink:         #0F1B14;        /* fő szövegszín */
  --paper:       #F6F7F4;        /* oldal háttér */
  --surface:     #FFFFFF;        /* kártya/panel háttér */

  /* --- Spec: Tracon márka zöld skála --- */
  --tracon:        #57B947;      /* Tracon zöld (márka) */
  --tracon-strong: #3E9E30;      /* erős zöld (elsődleges gomb) */
  --tracon-deep:   #2E7A24;      /* mély zöld (kiemelt szöveg) */

  /* --- Spec: állapotszínek --- */
  --signal:      #E8A317;        /* borostyán = igényelhető / hiányzó */
  --blueprint:   #2A6F97;        /* kék = technikai elem */

  /* --- Spec: keretek és halvány szöveg --- */
  --line:        #DDE3DC;
  --line-strong: #C6D0C7;
  --muted:       #5B6B60;
  --muted-soft:  #8A968D;

  /* --- Spec: státuszlámpa színek --- */
  --lamp-green:  #4FBE3D;
  --lamp-amber:  #F0A82B;
  --lamp-blue:   #3E8FC0;

  /* --- Spec: fontok --- */
  --sans: "Inter", "Helvetica Neue", Arial, system-ui, sans-serif;
  --mono: "JetBrains Mono", "SF Mono", ui-monospace, "Cascadia Code", Consolas, monospace;

  /* --- Spec: geometria és árnyék --- */
  --radius:    10px;
  --radius-lg: 14px;
  --shadow:    0 1px 2px rgba(15,27,20,.04), 0 6px 20px rgba(15,27,20,.06);
  --shadow-sm: 0 1px 2px rgba(15,27,20,.06);

  /* --- Kompatibilitási alias-ok a korábbi kód miatt (fokozatos átállás) --- */
  --green:        var(--tracon-deep);
  --green-bright: var(--tracon);
  --green-dark:   var(--tracon-deep);
  --green-tint:   #EFF8EC;
  --ink-2:        #37493d;
  --bg:           var(--surface);
  --bg-alt:       var(--paper);
  --orange:       var(--signal);
  --orange-dark:  #c78610;
  --orange-tint:  #FBF3E3;
  --yellow:       #f0b429;
  --yellow-tint:  #FBF3DE;
  --blue:         var(--blueprint);
  --blue-tint:    #EAF3FA;
  --red:          #b83a2c;
  --red-tint:     #fdecea;
  --display:      var(--sans);
  --body:         var(--sans);
}

/* Inter fontok - önhostolt woff2 fájlok a /public/assets/fonts/ mappában.
   Ha nincsenek feltöltve, a system-ui fallback (BlinkMacSystemFont / Helvetica Neue / Arial) megy. */
@font-face { font-family: 'Inter'; src: url('/assets/fonts/Inter-Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: optional; }
@font-face { font-family: 'Inter'; src: url('/assets/fonts/Inter-Medium.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: optional; }
@font-face { font-family: 'Inter'; src: url('/assets/fonts/Inter-SemiBold.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: optional; }
@font-face { font-family: 'Inter'; src: url('/assets/fonts/Inter-Bold.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: optional; }
@font-face { font-family: 'Inter'; src: url('/assets/fonts/Inter-ExtraBold.woff2') format('woff2'); font-weight: 800; font-style: normal; font-display: optional; }
/* Régi Archivo fájlok most fallback (ha valahol maradt volna hivatkozás), NEM használjuk. */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

/* Oldalváltáskor a fehér flash megszüntetése: a html háttér rögzítve,
   így a böngésző soha nem villan fehérre a régi oldal ürítése és az új
   megjelenése között. Ez minden böngészőben azonnal javul. */
html { background: var(--paper); }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeSpeed;
}
a { color: var(--tracon-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

.mono { font-family: var(--mono); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ==================== FEJLÉC ==================== */
.topnav { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 100; }
.topnav-inner { max-width: 1440px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; gap: 32px; height: 64px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-logo { height: 26px; width: auto; display: block; }
.brand-sub { font-family: var(--display); font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.mainnav { display: flex; align-items: center; gap: 4px; }
.mainnav a { color: var(--ink-2); font-weight: 600; font-size: 14px; padding: 8px 14px; border-radius: 8px; }
.mainnav a:hover { background: var(--bg-alt); text-decoration: none; }
.mainnav a.on { background: var(--green-tint); color: var(--green-dark); }
.topright { margin-left: auto; display: flex; align-items: center; gap: 12px; }

/* Fejléc-kereső (a demó searchwrap.sm mintája): minden oldalon, az adatlap kivételével */
.headsearch { flex: 1; max-width: 420px; margin-left: auto; display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line-strong); border-radius: 10px; padding: 0 12px; transition: border-color .15s, box-shadow .15s; }
.headsearch:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px rgba(87,185,71,.12); }
.headsearch .headsearch-ic { color: #9aa79b; display: flex; flex: 0 0 auto; }
.headsearch .headsearch-ic svg { width: 16px; height: 16px; }
.headsearch input { flex: 1; border: 0; outline: 0; background: transparent; padding: 9px 0; font-size: 13px; color: var(--ink); font-family: var(--sans); }
.headsearch input::placeholder { color: var(--muted-2); }
/* Ha a fejléc-kereső jelen van, a topright nem tolja jobbra magától */
.headsearch + .topright { margin-left: 12px; }
.lang-switch { display: inline-flex; background: var(--bg-alt); border-radius: 999px; padding: 3px; border: 1px solid var(--line); }
.lang-switch a { padding: 5px 12px; font-size: 12px; font-weight: 700; color: var(--muted); border-radius: 999px; }
.lang-switch a:hover { text-decoration: none; }
.lang-switch a.on { background: var(--green); color: #fff; }
.cta { background: var(--green); color: #fff; padding: 9px 16px; border-radius: 8px; font-weight: 700; font-size: 14px; }
.cta:hover { background: var(--green-dark); text-decoration: none; }

/* ==================== FLASH ==================== */
.flash-wrap { max-width: 1440px; margin: 12px auto 0; padding: 0 24px; }
.flash { padding: 12px 16px; border-radius: var(--radius); font-size: 14px; margin-bottom: 8px; }
.flash-ok  { background: var(--green-tint); color: var(--green-dark); border: 1px solid #bfe3b6; }
.flash-err { background: var(--red-tint);   color: #7a1a13;         border: 1px solid #f3c3bf; }

/* ==================== FŐ TARTALOM ==================== */
.page { max-width: 1440px; margin: 0 auto; padding: 24px; min-height: calc(100vh - 200px); }
.layout { display: grid; grid-template-columns: 280px 1fr; gap: 24px; align-items: start; }
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static !important; }
}

/* ==================== HERO ==================== */
.hero { background: linear-gradient(135deg, #f7faf7 0%, #eef4ee 100%); border-radius: var(--radius-lg); padding: 24px 28px 20px; margin-bottom: 24px; border: 1px solid var(--line); }
.hero-inner { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 18px; }
.hero-left { flex: 1; }
.kick { font-family: var(--display); font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 7px; }
.hero h1 { font-family: var(--display); font-size: 20px; font-weight: 700; letter-spacing: -0.01em; margin: 0 0 7px; color: var(--ink); line-height: 1.25; }
.hero .lead { font-size: 13px; color: var(--ink-2); margin: 0; max-width: 640px; line-height: 1.5; }
.hero-stats { display: flex; gap: 32px; padding: 4px 0; }
.stat { display: flex; flex-direction: column; align-items: flex-end; }
.stat-num { font-family: var(--mono); font-size: 20px; font-weight: 700; color: var(--green); line-height: 1; font-variant-numeric: tabular-nums; }
.stat:nth-child(3) .stat-num { color: var(--orange); }
.stat-label { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
@media (max-width: 700px) {
  .hero-inner { flex-direction: column; }
  .hero-stats { gap: 20px; }
  .hero h1 { font-size: 20px; }
}

/* ==================== KERESŐ ==================== */
.searchbar { display: flex; align-items: center; gap: 8px; background: #fff; border: 1.5px solid var(--line-strong); border-radius: 12px; padding: 6px 6px 6px 14px; transition: border-color .15s; }
.searchbar:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px rgba(87,185,71,.12); }
.search-icon { color: var(--muted); display: flex; }
.searchbar input { flex: 1; border: 0; outline: none; font-size: 14px; padding: 9px 6px; background: transparent; color: var(--ink); }
.searchbar input::placeholder { color: var(--muted-2); }
.btn-search { background: var(--green); color: #fff; border: 0; padding: 10px 20px; border-radius: 8px; font-weight: 700; font-size: 14px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.btn-search:hover { background: var(--green-dark); }
.searchbar-page { margin-bottom: 20px; }

/* ==================== SIDEBAR - narancssárga progress sávval ==================== */
.sidebar {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 12px 14px 14px;
  position: sticky;
  top: 84px;
}
.sidebar-title {
  font-family: var(--display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 8px 10px;
  border-bottom: 1px solid var(--line);
  margin: 0 0 6px;
  line-height: 1.4;
}
.cat-list { display: flex; flex-direction: column; gap: 1px; }
.cat-item {
  display: grid;
  grid-template-columns: 6px 1fr 52px 46px;
  align-items: center;
  gap: 8px;
  padding: 8px 8px 8px 4px;
  border-radius: 8px;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 500;
}
.cat-item:hover { background: var(--bg-alt); text-decoration: none; }
.cat-item.on { background: var(--green-tint); color: var(--green-dark); font-weight: 700; }
.cat-marker {
  width: 3px;
  height: 20px;
  border-radius: 2px;
  background: var(--green-bright);
  opacity: 0.5;
  transition: opacity .15s;
}
.cat-item:hover .cat-marker { opacity: 0.9; }
.cat-item.on .cat-marker { opacity: 1; }

/* Színes kategória csíkok - 8-színes ciklus, hangulatos katalógusélményhez.
   Sorrend szempontjából a kategórialista első eleme kap #1 színt, stb.
   Az .on állapotban a szín teljesen kitelítődik, egyébként halványan látszik. */
.cat-item:nth-child(8n+1) .cat-marker { background: #57B947; } /* Tracon zöld */
.cat-item:nth-child(8n+2) .cat-marker { background: #3d7ec2; } /* kék */
.cat-item:nth-child(8n+3) .cat-marker { background: #f39c1f; } /* narancs */
.cat-item:nth-child(8n+4) .cat-marker { background: #9b59b6; } /* lila */
.cat-item:nth-child(8n+5) .cat-marker { background: #16a085; } /* teal */
.cat-item:nth-child(8n+6) .cat-marker { background: #e6b422; } /* borostyán */
.cat-item:nth-child(8n+7) .cat-marker { background: #e74c3c; } /* vörös */
.cat-item:nth-child(8n+8) .cat-marker { background: #34495e; } /* palaszürke */

/* Aktív kategóriánál a saját színe telítetten, kis fényudvarral */
.cat-item.on:nth-child(8n+1) .cat-marker { background: #2E7A24; box-shadow: 0 0 0 2px rgba(87,185,71,.2); }
.cat-item.on:nth-child(8n+2) .cat-marker { background: #275a90; box-shadow: 0 0 0 2px rgba(61,126,194,.2); }
.cat-item.on:nth-child(8n+3) .cat-marker { background: #d47a09; box-shadow: 0 0 0 2px rgba(243,156,31,.2); }
.cat-item.on:nth-child(8n+4) .cat-marker { background: #7d3c98; box-shadow: 0 0 0 2px rgba(155,89,182,.2); }
.cat-item.on:nth-child(8n+5) .cat-marker { background: #0e6b58; box-shadow: 0 0 0 2px rgba(22,160,133,.2); }
.cat-item.on:nth-child(8n+6) .cat-marker { background: #b58a10; box-shadow: 0 0 0 2px rgba(230,180,34,.2); }
.cat-item.on:nth-child(8n+7) .cat-marker { background: #c0392b; box-shadow: 0 0 0 2px rgba(231,76,60,.2); }
.cat-item.on:nth-child(8n+8) .cat-marker { background: #1e2b3a; box-shadow: 0 0 0 2px rgba(52,73,94,.2); }
.cat-name { line-height: 1.3; overflow: hidden; text-overflow: ellipsis; }
.cat-bar {
  height: 6px;
  background: #e8ecea;
  border-radius: 3px;
  overflow: hidden;
  display: block;
  width: 100%;
}
.cat-bar-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--orange-bar), var(--orange));
  border-radius: 3px;
  min-width: 2px;
  transition: width .3s;
}
.cat-count {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  text-align: right;
  white-space: nowrap;
}
.cat-item.on .cat-count { color: var(--green-dark); }

/* ==================== TARTALOM ==================== */
.content { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; min-height: 500px; }
/* Cikk adatlap teljes szélességű, sidebar nélkül - a demó szerint */
.art-page { display: block; }
.content.content-full { min-height: 0; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 12px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--green); }
.crumb-sep { color: var(--muted-2); }
.crumb-current { color: var(--ink-2); font-weight: 600; }

.page-title { font-family: var(--display); font-size: 20px; font-weight: 700; letter-spacing: -0.01em; margin: 0 0 6px; color: var(--ink); }
.page-lead { color: var(--muted); font-size: 14px; margin: 0 0 20px; }

.notice { padding: 20px; background: var(--bg-alt); border: 1px dashed var(--line-strong); border-radius: var(--radius); color: var(--muted); text-align: center; }

/* ==================== ÜRES ÁLLAPOT ==================== */
.empty-state { padding: 60px 24px; text-align: center; color: var(--muted); }
.empty-illustration { margin-bottom: 16px; opacity: 0.8; }
.empty-state h2 { font-family: var(--display); font-size: 20px; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); margin: 0 0 6px; }
.empty-state p { max-width: 480px; margin: 0 auto; }
.error-state .err-code { font-family: var(--display); font-size: 72px; font-weight: 700; color: var(--green-tint); line-height: 1; margin-bottom: 8px; }
.err-actions { display: flex; gap: 12px; justify-content: center; margin-top: 20px; }

/* ==================== CSALÁD KÁRTYÁK (státuszjelzővel) ==================== */
.fam-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 10px;
}
.fam-card {
  display: flex;
  flex-direction: column;
  padding: 11px 13px 9px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  transition: border-color .15s, background .15s, box-shadow .15s;
  position: relative;
  overflow: hidden;
  min-height: 88px;
}
.fam-card:hover {
  border-color: var(--green-bright);
  background: var(--bg-alt);
  text-decoration: none;
  box-shadow: 0 3px 10px rgba(15,26,18,.05);
}
.fam-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 7px;
  min-height: 34px;
}
.fam-name {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 13px;
  color: var(--ink);
  line-height: 1.3;
  flex: 1;
}
.fam-arrow {
  font-size: 14px;
  color: var(--muted-2);
  flex: 0 0 auto;
  line-height: 1.4;
}
.fam-card:hover .fam-arrow { color: var(--green); }
.fam-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
  margin-top: auto;
  margin-bottom: 7px;
}
.fam-count {
  font-weight: 600;
  color: var(--ink-2);
}
.fam-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.fam-card-none .fam-status { color: #8a5a12; }
.fam-card-partial .fam-status { color: var(--green-dark); }
.fam-card-all .fam-status { color: var(--green-dark); }
.fam-progress {
  height: 4px;
  background: #eef1ee;
  border-radius: 2px;
  overflow: hidden;
  margin: 2px -13px -9px;
}
/* 0%-os (Nincs kész STEP) kártyáknál nincs mit mutatni, elrejtjük a zavaró szürke csíkot */
.fam-card-none .fam-progress { display: none; }
.fam-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--orange-bar), var(--orange));
  min-width: 2px;
  transition: width .3s;
}
.fam-card-all .fam-progress-fill {
  background: linear-gradient(90deg, var(--green-bright), var(--green));
}

/* ==================== CSALÁD FEJLÉC ==================== */
.family-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.family-cta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.family-cta-hint {
  font-size: 12px;
  color: var(--muted);
  max-width: 260px;
  text-align: right;
  line-height: 1.3;
}
.family-cta-hint-warn { color: #8a5a12; }
.btn-outline { display: inline-flex; align-items: center; gap: 6px; padding: 10px 16px; background: #fff; color: var(--green); border: 1.5px solid var(--green); border-radius: 8px; font-weight: 700; font-size: 13px; }
.btn-outline:hover { background: var(--green-tint); text-decoration: none; }
.btn-solid-icon svg { flex: 0 0 auto; }
.btn-solid:disabled,
.btn-solid[disabled] {
  background: #d5dcd7;
  color: #7d8880;
  cursor: not-allowed;
  border: 0;
}
.btn-solid:disabled:hover { background: #d5dcd7; }

/* ==================== SZŰRŐK + NÉZETVÁLTÓ ==================== */
.filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filter-label { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  font-size: 13px; font-weight: 600;
  color: var(--ink-2); cursor: pointer;
}
.chip:hover { background: var(--bg-alt); text-decoration: none; }
.chip.on { border-color: var(--ink); background: var(--ink); color: #fff; }
.chip.on .chip-dot { box-shadow: none; }
.chip-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.chip-dot-green  { background: radial-gradient(circle at 30% 30%, #7ed77a, #2ea24a); box-shadow: 0 0 0 2px rgba(46,162,74,.15); }
.chip-dot-blue   { background: radial-gradient(circle at 30% 30%, #7cb4e0, #3d7ec2); box-shadow: 0 0 0 2px rgba(61,126,194,.15); }
.chip-dot-yellow { background: radial-gradient(circle at 30% 30%, #ffd471, #f0b429); box-shadow: 0 0 0 2px rgba(240,180,41,.15); }

.view-switch {
  display: inline-flex;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
}
.vs-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.vs-btn:hover { color: var(--ink); text-decoration: none; }
.vs-btn.on { background: var(--ink); color: #fff; }

/* ==================== 3D-S STÁTUSZLÁMPÁK ==================== */
.status-lamp {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  flex: 0 0 auto;
  box-shadow: inset -1px -1px 2px rgba(0,0,0,.2);
}
.status-lamp.green {
  background: radial-gradient(circle at 30% 30%, #a3e3a1, #2ea24a 55%, #1b6d34);
  box-shadow: inset -1px -1px 2px rgba(0,0,0,.25), 0 0 6px rgba(46,162,74,.3);
}
.status-lamp.yellow {
  background: radial-gradient(circle at 30% 30%, #ffe58c, #f0b429 55%, #a37a10);
  box-shadow: inset -1px -1px 2px rgba(0,0,0,.25), 0 0 6px rgba(240,180,41,.3);
}
.status-lamp.blue {
  background: radial-gradient(circle at 30% 30%, #9bc5e8, #3d7ec2 55%, #234f7d);
  box-shadow: inset -1px -1px 2px rgba(0,0,0,.25), 0 0 6px rgba(61,126,194,.3);
}
.status-lamp.lg { width: 14px; height: 14px; }

/* ==================== CIKK TÁBLA - lista nézet ==================== */
.art-table {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.art-head, .art-row {
  display: grid;
  grid-template-columns: 36px 180px 1fr 90px 46px 110px 130px;
  gap: 12px;
  padding: 12px 16px;
  align-items: center;
}
/* A kereső eredménytáblában nincs checkbox oszlop, más az oszlopszám és -sorrend:
   cikkszám | megnevezés | kategória | állapot | nyíl (5 oszlop). */
.search-table .art-head, .search-table .art-row {
  grid-template-columns: 180px 1fr 220px 130px 40px;
}
.art-head {
  background: var(--bg-alt);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.art-row {
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  transition: background .1s;
}
.art-row:last-child { border-bottom: 0; }
.art-row:hover { background: var(--bg-alt); }
.art-link { color: var(--ink); text-decoration: none; }
.art-link:hover { color: var(--green); text-decoration: none; }
.col-check input[type="checkbox"] {
  width: 15px; height: 15px;
  accent-color: var(--green);
  cursor: not-allowed;
  opacity: .5;
}
.col-cikk { display: flex; align-items: center; gap: 8px; }
.col-cikk b { font-family: var(--display); font-weight: 700; font-size: 14px; }
.col-nev { color: var(--ink-2); font-size: 14px; }
.col-size, .col-ver, .col-date {
  font-size: 13px;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.col-date { color: var(--muted); }
.dash { color: var(--muted-2); }

.ver-badge {
  display: inline-block;
  padding: 2px 6px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 4px;
  font-family: var(--display);
  font-size: 10px;
  font-weight: 700;
  color: var(--ink-2);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.btn-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
  width: 100%;
}
.btn-row-download {
  background: #fff;
  color: var(--ink-2);
  border-color: var(--line-strong);
}
.btn-row-download:hover { background: var(--green-tint); border-color: var(--green); color: var(--green-dark); text-decoration: none; }
.btn-row-request {
  background: #fff;
  color: var(--orange-dark);
  border-color: var(--yellow-strong);
}
.btn-row-request:hover { background: var(--yellow-tint); text-decoration: none; }

/* ==================== KÁRTYA NÉZET ==================== */
.art-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.art-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.art-card:hover { border-color: var(--green-bright); text-decoration: none; box-shadow: 0 4px 12px rgba(15,26,18,.06); }
.art-card-photo {
  aspect-ratio: 1;
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}
.art-card-photo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.pm-mini { color: var(--green-bright); opacity: .7; }
.art-card-body { padding: 12px; }
.art-card-status { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.art-card-status b { font-family: var(--display); font-size: 13px; font-weight: 700; }
.art-card-name { font-size: 12px; color: var(--muted); line-height: 1.3; margin-bottom: 8px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; min-height: 32px; }
.art-card-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted); }

/* ==================== BADGE ==================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.badge-lg { padding: 5px 12px; font-size: 13px; gap: 8px; }
.badge-green  { background: var(--green-tint);  color: var(--green-dark); border: 1px solid #bfe3b6; }
.badge-yellow { background: var(--yellow-tint); color: #8a5a12;           border: 1px solid #f0d9ad; }
.badge-blue   { background: var(--blue-tint);   color: #1e4c7c;           border: 1px solid #bfd0e6; }

/* ==================== CIKK ADATLAP ==================== */
.art-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
@media (max-width: 900px) { .art-layout { grid-template-columns: 1fr; } }

.art-media { display: flex; flex-direction: column; gap: 10px; }
.viewer {
  aspect-ratio: 1;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.viewer-expand {
  position: absolute; top: 12px; right: 12px; z-index: 3;
  background: rgba(255,255,255,.9);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px; cursor: pointer;
  color: var(--ink-2);
  display: flex; align-items: center; justify-content: center;
}
.viewer-expand:hover { background: #fff; color: var(--green); }
.viewer-pane {
  position: absolute; inset: 0;
  display: none;
  align-items: center; justify-content: center;
  padding: 24px;
}
.viewer-pane.on { display: flex; }
.viewer-pane img { max-width: 100%; max-height: 100%; object-fit: contain; }
.viewer-pane img.zoomable { cursor: zoom-in; transition: transform .15s; }
.viewer-pane img.zoomable:hover { transform: scale(1.03); }
.viewer-caption {
  position: absolute; left: 14px; bottom: 12px;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted);
}
.photo-missing { display: flex; flex-direction: column; align-items: center; gap: 12px; color: var(--green-bright); padding: 24px; text-align: center; }
.pm-text { font-size: 13px; font-weight: 600; color: var(--muted); }

.viewer-tabs { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
.tab { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 12px; background: #fff; border: 1.5px solid var(--line); border-radius: 8px; color: var(--ink-2); font-weight: 600; font-size: 13px; cursor: pointer; }
.tab:hover { background: var(--bg-alt); }
.tab.on { border-color: var(--green); background: var(--green-tint); color: var(--green-dark); }

/* --- 3D placeholder --- */
.preview3d { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.cube-scene { width: 140px; height: 140px; perspective: 620px; }
.cube { width: 140px; height: 140px; position: relative; transform-style: preserve-3d; animation: cube-spin 12s linear infinite; }
.cube .f { position: absolute; width: 140px; height: 140px; border: 1.5px solid rgba(87,185,71,.7); background: rgba(87,185,71,.06); }
.cube .fr { transform: translateZ(70px) }
.cube .bk { transform: rotateY(180deg) translateZ(70px) }
.cube .rt { transform: rotateY(90deg)  translateZ(70px) }
.cube .lf { transform: rotateY(-90deg) translateZ(70px) }
.cube .tp { transform: rotateX(90deg)  translateZ(70px) }
.cube .bt { transform: rotateX(-90deg) translateZ(70px) }
@keyframes cube-spin { from { transform: rotateX(-22deg) rotateY(0) } to { transform: rotateX(-22deg) rotateY(360deg) } }
@media (prefers-reduced-motion: reduce) { .cube { animation: none } }
.preview3d-msg { font-size: 13px; color: var(--muted); text-align: center; max-width: 240px; }

/* --- Info oldal --- */
.art-info { display: flex; flex-direction: column; gap: 16px; }
.art-status { display: flex; gap: 8px; }
.art-code { font-family: var(--mono); font-size: 20px; font-weight: 700; margin: 0; color: var(--ink); letter-spacing: -0.01em; }
.art-name { font-size: 16px; color: var(--ink); margin: 2px 0 6px; font-weight: 700; }
.art-path { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin: 0; }
.art-path a { color: var(--muted); }
.art-path a:hover { color: var(--green); }
.path-sep { margin: 0 6px; color: var(--muted-2); }

/* --- Műszaki tábla --- */
.tech-table { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.tech-row { display: flex; align-items: center; gap: 9px; padding: 9px 14px; border-bottom: 1px solid var(--line); font-size: 13px; min-height: 40px; }
.tech-row:nth-last-child(-n+2) { border-bottom: 0; }
.tech-row:nth-child(2n) { border-left: 1px solid var(--line); }
.tech-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green-bright); flex: 0 0 auto; }
.tech-name { color: var(--muted); flex: 1; line-height: 1.3; }
.tech-value { font-family: var(--mono); font-weight: 600; color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }
.tech-unit { color: var(--muted); font-weight: 500; margin-left: 2px; }
.tech-note { font-size: 12px; color: var(--muted); margin: 2px 0 0; }
.tech-empty { padding: 20px; background: var(--bg-alt); border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); text-align: center; font-size: 13px; }

/* --- STEP letöltési doboz --- */
.step-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border-radius: var(--radius);
}
.step-box.step-ready {
  background: var(--green-tint);
  border: 1px solid #bfe3b6;
}
.step-box.step-request {
  background: var(--yellow-tint);
  border: 1px solid #f0d9ad;
}
.step-info { flex: 1; min-width: 0; }
.step-file {
  font-family: var(--display);
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.step-meta { font-size: 12px; color: var(--muted); margin-top: 3px; }
.step-box.step-ready .step-meta { color: #4a6b45; }

.btn-download, .btn-request {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 18px;
  border: 0;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  transition: all .15s;
  white-space: nowrap;
  flex: 0 0 auto;
}
.btn-download {
  background: var(--green);
  color: #fff;
  box-shadow: 0 1px 2px rgba(28,77,23,.15), 0 2px 6px rgba(28,77,23,.1);
}
.btn-download:hover {
  background: var(--green-dark);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(28,77,23,.2), 0 4px 12px rgba(28,77,23,.15);
}
.btn-download:active { transform: translateY(0); }
.btn-request {
  background: #f0b429;
  color: #4a3708;
  box-shadow: 0 1px 2px rgba(138,90,18,.15), 0 2px 6px rgba(138,90,18,.1);
}
.btn-request:hover {
  background: var(--orange);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(138,90,18,.2), 0 4px 12px rgba(138,90,18,.15);
}
.btn-request:active { transform: translateY(0); }

/* --- Dokumentumok: útmutató = kék, nyilatkozat = sárga (a demó szerint) --- */
.docs { margin-top: 4px; }
.docs-title { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.docs-list { display: flex; gap: 8px; flex-wrap: wrap; }

.doc {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 8px;
  border-radius: 8px;
  font-size: 13px;
  border: 1px solid;
  transition: border-color .15s, box-shadow .15s;
  text-decoration: none;
}
.doc:hover { text-decoration: none; box-shadow: 0 2px 8px rgba(15,26,18,.06); }

/* Felhasználói útmutató: kék világos háttér */
.doc.doc-manual {
  background: #e8f2fa;
  border-color: #c5dcee;
  color: #1e4c7c;
}
.doc.doc-manual:hover { background: #dbeaf7; border-color: #a8c7e2; }
.doc.doc-manual .doc-name { color: #1e4c7c; font-weight: 600; }
.doc.doc-manual .doc-size { color: #5b7fa3; }

/* Nyilatkozat: sárga világos háttér */
.doc.doc-declaration {
  background: #fef3d5;
  border-color: #f0d9ad;
  color: #8a5a12;
}
.doc.doc-declaration:hover { background: #fce9b8; border-color: #e6c78a; }
.doc.doc-declaration .doc-name { color: #8a5a12; font-weight: 600; }
.doc.doc-declaration .doc-size { color: #b28a4a; }

/* A "PDF" badge mindkét változatnál: fehér chip, vörös felirat */
.doc-type {
  font-family: var(--display);
  font-size: 10px;
  font-weight: 700;
  color: #b83a2c;
  background: #fff;
  padding: 4px 7px;
  border-radius: 5px;
  border: 1px solid rgba(184,58,44,.15);
  letter-spacing: 0.05em;
  flex: 0 0 auto;
}

.doc-name {
  font-size: 13px;
  line-height: 1.2;
}
.doc-size {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.feedback-link { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); margin-top: 8px; }
.feedback-link:hover { color: var(--green); }

/* ==================== LIGHTBOX ==================== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(247, 250, 247, 0.98);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  cursor: zoom-out;
}
.lightbox[hidden] { display: none; }
.lb-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink-2);
  padding: 8px;
  cursor: pointer;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(15,26,18,.08);
}
.lb-close:hover { background: var(--green-tint); color: var(--green-dark); }
.lb-img {
  max-width: 100%;
  max-height: calc(100vh - 120px);
  object-fit: contain;
  cursor: default;
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 8px 32px rgba(15,26,18,.12);
}
.lb-caption {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  background: rgba(255,255,255,.9);
  border-radius: 999px;
  border: 1px solid var(--line);
}

/* ==================== COVERAGE (Fázis 4.3) ==================== */
/* 3 kompakt statisztika kártya balra igazítva */
.cov-stats {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.cov-stat {
  padding: 14px 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-width: 160px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cov-stat-num {
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--green);
}
.cov-stat-missing .cov-stat-num { color: var(--ink); }
.cov-stat-percent .cov-stat-num { color: var(--ink); }
.cov-stat-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.2;
}

/* Jelmagyarázat (csak akkor jelenik meg, ha van tervezés alatti cikk) */
.cov-legend {
  display: flex;
  gap: 20px;
  margin-bottom: 16px;
  padding: 10px 14px;
  background: var(--bg-alt);
  border-radius: 8px;
  font-size: 12px;
  color: var(--muted);
  flex-wrap: wrap;
}
.cov-leg-item { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.cov-leg-dot { width: 12px; height: 4px; border-radius: 2px; display: inline-block; }
.cov-leg-dot-ready    { background: var(--green); }
.cov-leg-dot-progress { background: #3f8fbf; }
.cov-leg-dot-missing  { background: #d9dfd9; }

/* Kategória lista - fejléc nélkül, nagy sávokkal */
.cov-list {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}
.cov-row {
  display: grid;
  grid-template-columns: 180px 1fr 50px 110px;
  gap: 20px;
  padding: 12px 20px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  transition: background .1s;
  text-decoration: none;
}
.cov-row:last-child { border-bottom: 0; }
.cov-row:hover { background: var(--bg-alt); text-decoration: none; }

.cov-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
  line-height: 1.3;
}
.cov-row:hover .cov-name { color: var(--green-dark); }

/* Két-szegmensű progress sáv: ZÖLD (kész) + KÉK (tervezés) + SZÜRKE (hiányzó) - demó szerint */
.cov-bar-wrap {
  display: flex;
  align-items: center;
}
.cov-bar-track {
  width: 100%;
  height: 16px;
  background: repeating-linear-gradient(45deg, #E7EBE6, #E7EBE6 5px, #F1F3EF 5px, #F1F3EF 10px);
  border-radius: 7px;
  overflow: hidden;
  display: flex;
  position: relative;
}
.cov-bar-ready {
  height: 100%;
  background: linear-gradient(180deg, var(--green-bright), var(--green));
  min-width: 0;
  transition: width .4s;
}
.cov-bar-progress {
  height: 100%;
  background: linear-gradient(180deg, #4d8ed0, #3f8fbf);
  min-width: 0;
  transition: width .4s;
}

.cov-pct {
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
  color: var(--green);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.cov-count {
  font-size: 13px;
  color: var(--muted);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 700px) {
  .cov-row {
    grid-template-columns: 1fr 50px;
    gap: 8px;
  }
  .cov-bar-wrap { grid-column: 1 / -1; order: 3; }
  .cov-count { grid-column: 1; text-align: left; font-size: 11px; }
}

/* ==================== IGÉNYLÉS FORM ==================== */
.request-form { max-width: 640px; }
.form-row { margin-bottom: 20px; }
.form-row label { display: block; font-size: 13px; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; }
.req { color: var(--red); }
.form-row input, .form-row textarea { width: 100%; padding: 10px 12px; border: 1.5px solid var(--line-strong); border-radius: 8px; font-size: 14px; font-family: var(--body); color: var(--ink); background: #fff; }
.form-row input:focus, .form-row textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(87,185,71,.12); }
.form-hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.form-actions { display: flex; align-items: center; gap: 16px; margin-top: 24px; flex-wrap: wrap; }
.form-consent { font-size: 12px; color: var(--muted); }

/* ==================== HELP + PRIVACY prose ==================== */
.help-blocks { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.help-block { padding: 20px; background: var(--bg-alt); border-radius: var(--radius); border-left: 3px solid var(--green-bright); }
.help-block h3 { font-family: var(--display); font-size: 16px; font-weight: 700; margin: 0 0 8px; color: var(--ink); }
.help-block p { font-size: 14px; color: var(--muted); margin: 0; }
.prose { max-width: 720px; font-size: 14px; color: var(--ink-2); }
.prose h3 { font-family: var(--display); font-size: 16px; font-weight: 700; margin: 24px 0 8px; color: var(--ink); }
.prose ul { padding-left: 22px; }
.prose li { margin-bottom: 6px; }

/* ==================== ÁLTALÁNOS GOMBOK ==================== */
.btn-solid { display: inline-flex; align-items: center; gap: 6px; padding: 10px 20px; background: var(--green); color: #fff; border: 0; border-radius: 8px; font-weight: 700; font-size: 14px; cursor: pointer; text-decoration: none; }
.btn-solid:hover { background: var(--green-dark); text-decoration: none; }
.btn-ghost { display: inline-flex; align-items: center; gap: 6px; padding: 10px 20px; background: transparent; color: var(--ink-2); border: 1.5px solid var(--line-strong); border-radius: 8px; font-weight: 700; font-size: 14px; cursor: pointer; text-decoration: none; }
.btn-ghost:hover { background: var(--bg-alt); text-decoration: none; }

/* ==================== LÁBLÉC ==================== */
.footer { background: #0e1a12; color: #a7bdad; padding: 32px 24px; margin-top: 48px; }
.footer-inner { max-width: 1440px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.footer-brand b { color: #fff; font-family: var(--display); }
.footer-brand span { font-size: 13px; margin-left: 6px; opacity: 0.7; }
.footer-nav { display: flex; gap: 20px; }
.footer-nav a { color: #a7bdad; font-size: 13px; }
.footer-nav a:hover { color: #fff; }
.footer-copy { font-size: 12px; opacity: 0.6; }

/* ==================== SÜTIS SÁV ==================== */
.cookiebar { position: fixed; bottom: 20px; left: 20px; right: 20px; z-index: 200; background: #fff; border: 1px solid var(--line-strong); border-radius: var(--radius-lg); box-shadow: 0 8px 32px rgba(15,26,18,.16); padding: 16px 20px; max-width: 900px; margin: 0 auto; }
.cookiebar-inner { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.cookiebar-text { flex: 1; font-size: 13px; color: var(--ink-2); min-width: 260px; }
.cookiebar-actions { display: flex; gap: 8px; }
.cookiebar-actions .btn-solid, .cookiebar-actions .btn-ghost { padding: 8px 14px; font-size: 13px; }

@media (max-width: 900px) {
  .art-head, .art-row {
    grid-template-columns: 30px 130px 1fr 90px 100px;
    gap: 8px;
  }
  .art-head .col-ver, .art-row .col-ver,
  .art-head .col-date, .art-row .col-date { display: none; }
  /* A kereső táblánál 4 oszlop marad 900px alatt: cikk, nev, status, nyíl */
  .search-table .art-head, .search-table .art-row {
    grid-template-columns: 150px 1fr 120px 30px;
  }
  .search-table .col-path { display: none; }
}
@media (max-width: 700px) {
  .topnav-inner { gap: 12px; height: auto; padding: 12px 16px; flex-wrap: wrap; }
  .mainnav { order: 3; width: 100%; overflow-x: auto; }
  .headsearch { order: 4; width: 100%; max-width: none; margin-left: 0; }
  .headsearch + .topright { margin-left: auto; }
  .art-head, .art-row { grid-template-columns: 130px 1fr 90px; gap: 8px; }
  .art-head .col-check, .art-row .col-check,
  .art-head .col-size, .art-row .col-size,
  .art-head .col-ver, .art-row .col-ver,
  .art-head .col-date, .art-row .col-date { display: none; }
  /* Kereső táblánál 700px alatt csak cikk + nev + nyíl */
  .search-table .art-head, .search-table .art-row {
    grid-template-columns: 130px 1fr 30px;
  }
  .search-table .col-path,
  .search-table .col-status { display: none; }
}

/* ================================================================== */
/* FÁZIS 4.6 - Új kártya és lista nézet a demó szerint (1:1 másolat)  */
/* ================================================================== */

/* ---------- Státuszlámpa (spec 3. pont pontos CSS-e) ---------- */
.lamp {
  --c: var(--lamp-green);
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, #fff8 0 12%, var(--c) 55% 100%);
  box-shadow: 0 0 0 1px rgba(15,27,20,.12), 0 0 8px -1px var(--c);
  display: inline-block;
  flex: 0 0 auto;
  vertical-align: middle;
}
.lamp.amber { --c: var(--lamp-amber); }
.lamp.blue  { --c: var(--lamp-blue); animation: lamp-pulse 1.8s ease-in-out infinite; }
.lamp.off   { --c: #C6D0C7; box-shadow: 0 0 0 1px rgba(15,27,20,.12); }
@keyframes lamp-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.55; }
}
/* Kompatibilitási alias-ok (a régi kód is működjön a fokozatos átállás alatt) */
.lamp.lamp-green { --c: var(--lamp-green); }
.lamp.lamp-amber { --c: var(--lamp-amber); }
.lamp.lamp-blue  { --c: var(--lamp-blue); animation: lamp-pulse 1.8s ease-in-out infinite; }
.lamp.lamp-off   { --c: #C6D0C7; box-shadow: 0 0 0 1px rgba(15,27,20,.12); }

/* ---------- verzió chip (pl. "v1") - demó pontos másolat ---------- */
.verpill {
  display: inline-block;
  font: 600 10px/1 var(--mono);
  color: #5a675b;
  background: #EEF2EE;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 2px 5px;
  margin-left: 4px;
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
}

/* ---------- Státusz chip (státuszlámpa mellé, csak "Igényelhető" / "Tervezés alatt") ---------- */
.status-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  vertical-align: middle;
}
.status-tag.status-ok   { color: var(--green-dark); border-color: #BEE3B4; background: #EFF8EC; }
.status-tag.status-req  { color: #9a6b0d; border-color: #F0DCAE; background: #FBF3E1; }
.status-tag.status-wip  { color: #215d80; border-color: #BBD6E7; background: #EAF2F7; }

/* ---------- Lista táblázat (.art-list) - a demó .rtable-jét másolja ---------- */
.art-list {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.art-list thead th {
  text-align: left;
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: #FbFCFb;
}
.art-list tbody td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  font-size: 13px;
}
.art-list tbody tr:last-child td { border-bottom: 0; }
.art-list tbody tr:hover { background: #FAFCFA; }
.art-list tbody tr.muted-row td { opacity: 0.85; }
.art-list .muted-cell { color: var(--muted); }

.art-list .col-chk { width: 34px; }
.art-list .col-chk input { accent-color: var(--green); cursor: pointer; }
.art-list .td-num  { text-align: right; font-variant-numeric: tabular-nums; }
.art-list .td-act  { width: 130px; text-align: right; }

.art-list .cell-part {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.art-list .pn {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 13px;
  color: var(--ink);
  text-decoration: none;
}
.art-list .pn:hover { color: var(--green-dark); text-decoration: underline; }
.art-list .cell-name { color: var(--muted); font-size: 13px; }
.art-list .cell-size, .art-list .cell-date {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

/* Mini lista-gombok */
.btn-mini {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all .12s;
  white-space: nowrap;
}
.btn-mini-download {
  color: var(--green-dark);
  background: #fff;
  border-color: #bfe3b6;
}
.btn-mini-download:hover {
  background: var(--green-tint);
  text-decoration: none;
}
.btn-mini-request {
  color: #8a5a12;
  background: #fff;
  border-color: #f0d9ad;
}
.btn-mini-request:hover {
  background: var(--yellow-tint);
  text-decoration: none;
}

/* Mobil szabályok az art-list-hez */
.art-list .hide-sm { display: table-cell; }
@media (max-width: 900px) {
  .art-list .hide-sm { display: none; }
  .art-list tbody td, .art-list thead th { padding: 10px 12px; }
}
@media (max-width: 600px) {
  .art-list .col-chk { display: none; }
  .btn-mini span { display: none; }
  .btn-mini { padding: 6px 8px; }
}

/* ================================================================== */
/* Új kártya nézet (.pcard) - a demó pixel-pontos másolata             */
/* ================================================================== */
.art-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.pcard {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15,27,20,.06);
  position: relative;
  display: flex;
  flex-direction: column;
  transition: border-color .15s, box-shadow .15s;
}
.pcard:hover {
  border-color: var(--line-strong);
  box-shadow: 0 1px 2px rgba(15,27,20,.04), 0 6px 20px rgba(15,27,20,.06);
}
.pcard.pcard-muted { }
.pcard.pcard-muted .pmedia { opacity: 0.75; }

/* Kép rész: 112px magas, radial gradient háttér mint a demóban */
.pcard .pmedia {
  height: 112px;
  background: radial-gradient(120% 120% at 50% 22%, #fff, #EDF0ED);
  display: grid;
  place-items: center;
  border-bottom: 1px solid var(--line);
  position: relative;
  cursor: pointer;
  text-decoration: none;
  overflow: hidden;
}
.pcard .pmedia img {
  max-height: 92px;
  max-width: 74%;
  object-fit: contain;
  filter: drop-shadow(0 6px 10px rgba(15,27,20,.12));
}
.pcard .pmedia-placeholder {
  color: #b6c2b8;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Hover felugró "Részletek" tipp */
.pcard .viewtip {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(.94);
  background: rgba(20, 30, 22, .86);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 13px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
  box-shadow: 0 6px 16px rgba(0,0,0,.22);
}
.pcard .pmedia:hover .viewtip {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* Kártya body: cikkszám, név, meta - demó pontos másolat: monospace font */
.pcard .pbody {
  padding: 11px 12px 4px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}
.pcard .ppn {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.pcard .ppn a {
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
}
.pcard .ppn a:hover {
  color: var(--green-dark);
  text-decoration: underline;
}
.pcard .pname {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
  min-height: 16px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pcard .pmeta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted-soft);
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}
.pcard .pmeta-req { color: #9a6b0d; font-weight: 600; }

/* Kártya akció gomb (alul, teljes szélességű) */
.pcard .pact {
  padding: 10px 12px 12px;
  margin-top: auto;
  border-top: 1px solid var(--line);
}
.btn-card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 8px 12px;
  border-radius: 7px;
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
  border: 0;
  transition: all .15s;
  cursor: pointer;
}
.btn-card-download {
  background: var(--green);
  color: #fff;
  box-shadow: 0 1px 2px rgba(28,77,23,.15);
}
.btn-card-download:hover {
  background: var(--green-dark);
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(28,77,23,.2);
}
.btn-card-request {
  background: #f0b429;
  color: #4a3708;
  box-shadow: 0 1px 2px rgba(138,90,18,.15);
}
.btn-card-request:hover {
  background: var(--orange);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(138,90,18,.2);
}

@media (max-width: 480px) {
  .art-cards { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
  .pcard .pmedia { height: 90px; }
  .pcard .pmedia img { max-height: 74px; }
}

/* ================================================================== */
/* FÁZIS 4.7 - Welcome hero a főoldalon: forgó 3D kocka + útmutató     */
/* ================================================================== */
.welcome-hero {
  padding: 24px 20px 32px;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}

/* ---------- Valódi 3D-s forgó kocka CSS-ben ---------- */
.welcome-cube-wrap {
  perspective: 800px;
  width: 120px;
  height: 120px;
  margin: 0 auto 24px;
}
.welcome-cube {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  animation: wc-rotate 14s linear infinite;
  transform: translateZ(-60px);
}
@keyframes wc-rotate {
  from { transform: translateZ(-60px) rotateX(-15deg) rotateY(0deg); }
  to   { transform: translateZ(-60px) rotateX(-15deg) rotateY(360deg); }
}
.wc-face {
  position: absolute;
  width: 120px;
  height: 120px;
  border: 1.5px solid var(--green-bright);
  background: rgba(87, 185, 71, 0.04);
  box-sizing: border-box;
  border-radius: 3px;
}
.wc-face-front  { transform: translateZ(60px);   }
.wc-face-back   { transform: translateZ(-60px) rotateY(180deg); }
.wc-face-right  { transform: rotateY(90deg)  translateZ(60px);  }
.wc-face-left   { transform: rotateY(-90deg) translateZ(60px);  }
.wc-face-top    { transform: rotateX(90deg)  translateZ(60px);  }
.wc-face-bottom { transform: rotateX(-90deg) translateZ(60px);  }

/* ---------- Welcome szöveg ---------- */
.welcome-text { margin-bottom: 28px; }
.welcome-title {
  font-family: var(--display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 12px;
  line-height: 1.25;
}
.welcome-lead {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0 auto;
  max-width: 560px;
}

/* ---------- 3 lépés kártyák ---------- */
.welcome-steps {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  text-align: left;
}
.wstep {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: border-color .15s, background .15s;
}
.wstep:hover {
  border-color: var(--line-strong);
  background: #f4f7f4;
}
.wstep-num {
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.wstep-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.wstep-body b {
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
  color: var(--ink);
  line-height: 1.3;
}
.wstep-body span {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

/* ---------- CTA sáv alul ---------- */
.welcome-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 10px 14px;
  background: var(--green-tint);
  border: 1px solid #bfe3b6;
  border-radius: 8px;
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 600;
}
.welcome-arrow {
  color: var(--green);
  display: inline-flex;
  animation: wa-nudge 1.8s ease-in-out infinite;
}
@keyframes wa-nudge {
  0%, 100% { transform: translateX(0); }
  50%      { transform: translateX(-4px); }
}

@media (max-width: 700px) {
  .welcome-steps { grid-template-columns: 1fr; }
  .welcome-cube-wrap { width: 90px; height: 90px; }
  .welcome-cube { transform: translateZ(-45px); }
  @keyframes wc-rotate {
    from { transform: translateZ(-45px) rotateX(-15deg) rotateY(0deg); }
    to   { transform: translateZ(-45px) rotateX(-15deg) rotateY(360deg); }
  }
  .wc-face { width: 90px; height: 90px; }
  .wc-face-front  { transform: translateZ(45px); }
  .wc-face-back   { transform: translateZ(-45px) rotateY(180deg); }
  .wc-face-right  { transform: rotateY(90deg)  translateZ(45px); }
  .wc-face-left   { transform: rotateY(-90deg) translateZ(45px); }
  .wc-face-top    { transform: rotateX(90deg)  translateZ(45px); }
  .wc-face-bottom { transform: rotateX(-90deg) translateZ(45px); }
  .welcome-title { font-size: 20px; }
}

/* Csökkentett mozgás: forgás kikapcsolva GDPR/kompatibilitás miatt */
@media (prefers-reduced-motion: reduce) {
  .welcome-cube { animation: none; transform: translateZ(-60px) rotateX(-15deg) rotateY(-30deg); }
  .welcome-arrow { animation: none; }
}

/* ================================================================== */
/* FÁZIS 4.8 - Spec pontos komponensek: .btn család, .att-btn, .dl-box, .stage */
/* ================================================================== */

/* ---------- Gombok (spec 4. pont pontos CSS-e) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  justify-content: center;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  padding: 8px 14px;
  border-radius: 8px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, border-color .15s, transform .05s;
}
.btn:hover { background: #F6F7F4; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: var(--tracon-strong);
  border-color: var(--tracon-strong);
  color: #fff;
}
.btn-primary:hover { background: var(--tracon-deep); border-color: var(--tracon-deep); text-decoration: none; }

.btn-signal {
  background: #fff;
  border-color: var(--signal);
  color: #9a6b0d;
}
.btn-signal:hover { background: #FBF3E3; text-decoration: none; }

.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 7px; }
.btn-lg { padding: 11px 26px; font-size: 14px; }
.btn-xs { padding: 4px 9px; font-size: 12px; }

/* Ha a gomb kártyán vagy dobozon belül van, teljes szélességű a .pact-ben */
.pact .btn { width: 100%; }

/* ---------- verpill (spec 7. pont pontos CSS-e) ---------- */
.verpill {
  display: inline-block;
  font: 600 10px/1 var(--mono);
  color: #5a675b;
  background: #EEF2EE;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 2px 5px;
  margin-left: 4px;
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
}

/* ---------- .rtable (spec 6. pont pontos CSS-e) ---------- */
.rtable {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.rtable thead th {
  text-align: left;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted-soft);
  font-weight: 600;
  padding: 10px 18px;
  border-bottom: 1px solid var(--line);
  background: #FbFCFb;
}
.rtable tbody td {
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  font-size: 13px;
}
.rtable tbody tr:last-child td { border-bottom: 0; }
.rtable tbody tr:hover { background: #FAFCFA; }
.rtable .cell-part {
  display: flex;
  align-items: center;
  gap: 11px;
}
.rtable .pn {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 13px;
  color: var(--ink);
  text-decoration: none;
}
.rtable .pn:hover { color: var(--tracon-deep); text-decoration: underline; }
.rtable .cell-name { color: var(--muted); }
.rtable .cell-size, .rtable .cell-date {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.rtable .td-num { white-space: nowrap; text-align: right; }
.rtable .td-act { text-align: right; white-space: nowrap; width: 150px; }
.rtable .col-chk { width: 34px; }
.rtable .muted-row { opacity: .62; }
.rtable .hide-sm { display: table-cell; }
@media (max-width: 900px) {
  .rtable .hide-sm { display: none; }
  .rtable tbody td, .rtable thead th { padding: 10px 12px; }
}
@media (max-width: 600px) {
  .rtable .col-chk { display: none; }
  .rtable .btn-sm span, .rtable .btn span { display: none; }
  .rtable .btn, .rtable .btn-sm { padding: 6px 8px; }
}

/* ---------- .pcard finomítás a spec 5. pont pontos CSS-e szerint ---------- */
/* A meglévő .pcard-ot fenntartjuk, csak a spec finom eltéréseivel: */
.pcard { box-shadow: var(--shadow-sm); }
.pcard:hover { box-shadow: var(--shadow); border-color: var(--line-strong); }
.pcard .pmeta { color: var(--muted-soft); }
.pcard .pmeta-wip { color: #215d80; }        /* spec: tervezés alatt kék */
.pcard .pmeta-req { color: #9a6b0d; font-weight: 600; }  /* spec: hiányzó borostyán */
.pcard .viewtip { line-height: 1; }

/* ---------- .dl-box adatlapon (spec 8. pont pontos CSS-e) ---------- */
.dl-box {
  padding: 16px 18px;
  background: #EFF8EC;
  border-top: 1px solid #CBE6C2;
  border-radius: 0 0 var(--radius) var(--radius);
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.dl-box-signal {
  background: #FBF3E3;
  border-top: 1px solid #F0DCAE;
}
.dl-box .dlm {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.35;
}
.dl-box .dlm .fmt {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
}
.dl-box .dlm .sub {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}
.dl-box .dl-act {
  margin-left: auto;
  display: flex;
  gap: 10px;
}

/* ---------- .att-btn adatlap mellékletgombok (spec 9. pont pontos CSS-e) ---------- */
.att-row {
  padding: 4px 0 0;
}
.att-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 9px;
}
.att-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.att-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 10px;
  padding: 9px 14px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid;
  transition: background .12s, border-color .12s;
}
.att-btn svg { width: 16px; height: 16px; flex: none; }
.att-btn .pdftag {
  font: 700 10px/1 var(--mono);
  letter-spacing: .5px;
  padding: 3px 6px;
  border-radius: 5px;
  flex: none;
  background: rgba(255,255,255,.65);
}
.att-btn .attsz {
  font: 600 11px/1 var(--mono);
  opacity: .7;
  margin-left: 1px;
  font-variant-numeric: tabular-nums;
}
/* Felhasználói útmutató = kék */
.att-um {
  color: #1f5f86;
  background: #EAF3FA;
  border-color: #CFE4F1;
}
.att-um:hover {
  background: #DAEBF6;
  border-color: #1f5f86;
  text-decoration: none;
}
.att-um .pdftag {
  color: #1f5f86;
  border: 1px solid #CFE4F1;
}
/* Nyilatkozat = borostyán */
.att-nyil {
  color: #96631a;
  background: #FBF3DE;
  border-color: #F0DCAE;
}
.att-nyil:hover {
  background: #F6E8C7;
  border-color: #96631a;
  text-decoration: none;
}
.att-nyil .pdftag {
  color: #96631a;
  border: 1px solid #F0DCAE;
}

/* ---------- .stage adatlap média-terület (spec 10. pont pontos CSS-e) ---------- */
.stage {
  position: relative;
  height: 330px;
  margin: 12px 12px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #fff, #F6F7F4);
}
.stage .stage-expand {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.9);
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  transition: all .12s;
}
.stage .stage-expand:hover {
  border-color: var(--tracon-strong);
  color: var(--tracon-deep);
  background: #fff;
}
.stage .stage-caption {
  position: absolute;
  bottom: 8px;
  left: 12px;
  font: 600 10px/1 var(--mono);
  color: var(--muted-soft);
  text-transform: uppercase;
  letter-spacing: .1em;
  z-index: 3;
}
.view {
  display: none;
  width: 100%;
  height: 100%;
  place-items: center;
}
.view.on { display: grid; }
#dPhoto.on { display: grid; place-items: center; width: 100%; height: 100%; }
#dPhoto .phimg {
  position: relative;
  z-index: 1;
  max-height: 300px;
  max-width: 88%;
  object-fit: contain;
}
#d2d.on { display: grid; place-items: center; width: 100%; height: 100%; position: relative; }
#d2d .d2dimg {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  max-width: 86%;
  max-height: 84%;
  object-fit: contain;
  z-index: 2;
  background: #fff;
  padding: 6px;
  border-radius: 6px;
}
/* --- 3D viewer (demó pontos szerkezete, 1:1) --- */
/* Izometrikus kocka placeholder, amíg nincs GLB, vagy amíg tölt */
.part3d {
  width: 200px;
  height: 118px;
  border-radius: 8px;
  background: linear-gradient(135deg, #3a4750, #141a20 70%);
  transform: rotateX(52deg) rotateZ(-32deg);
  box-shadow: 0 26px 40px -18px rgba(20, 26, 32, .6);
  position: relative;
}
.part3d::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, .10);
}
.part3d::after {
  content: "";
  position: absolute;
  left: 16px;
  top: 14px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .14);
}

#d3dHost {
  position: absolute;
  inset: 0;
  display: none;
}
#d3dHost.on { display: block; }
#d3dHost canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  cursor: grab;
}
#d3dHost canvas:active { cursor: grabbing; }

/* Betöltés overlay + spinner */
.d3dload {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  background: #EDF0ED;
  z-index: 4;
}
.d3dload.show { display: flex; }
.d3dload .d3d-load-err { color: #b23; }
.d3dspin {
  width: 30px;
  height: 30px;
  border: 3px solid #d3ddd4;
  border-top-color: var(--tracon-strong);
  border-radius: 50%;
  animation: d3sp .8s linear infinite;
}
@keyframes d3sp { to { transform: rotate(360deg); } }

/* Lebegő navigációs panel a stage jobb alsó sarkában */
.d3dnav {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: none;
  flex-direction: column;
  gap: 6px;
  z-index: 5;
}
.d3dnav.show { display: flex; }
.d3dnav-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}
.d3dnav button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .94);
  border-radius: 7px;
  padding: 5px 7px;
  font-size: 11px;
  font-weight: 600;
  color: #26402c;
  cursor: pointer;
  min-width: 46px;
}
.d3dnav button:hover { border-color: var(--tracon-strong); }
.d3dnav button.on {
  background: var(--tracon-strong);
  color: #fff;
  border-color: var(--tracon-strong);
}
.d3dbtns {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
}

/* Média fülök (Fotó / 3D / 2D rajz) */
.stage-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 0 12px 6px;
}
.stage-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  text-decoration: none;
  transition: border-color .12s, background .12s, color .12s;
}
.stage-tab svg { width: 14px; height: 14px; color: currentColor; }
.stage-tab:hover { border-color: var(--line-strong); color: var(--ink); text-decoration: none; }
.stage-tab.on {
  border-color: var(--tracon-strong);
  background: #EFF8EC;
  color: var(--tracon-deep);
}


/* ============================================================
   TABLET ES ERINTES OPTIMALIZALAS (Android Chrome, iPad Safari)
   Csak valodi erintoeszkozon hat, az asztali (egeres) nezet valtozatlan.
   ============================================================ */

/* iPad Safari a 16px alatti input-mezokre fokuszkor ravonzit (zoom).
   16px betumeret ezt megszunteti. Minden erintoeszkozon (pointer: coarse). */
@media (pointer: coarse) {
  .headsearch input,
  .searchbar input,
  .form-row input,
  .form-row textarea,
  .form-row select { font-size: 16px; }
}

/* Erintes-barat celpontok es highlight - csak touch-eszkozon. */
@media (hover: none) and (pointer: coarse) {
  /* A default kek tap-highlight helyett halvany zold. */
  a, button, .cta, .header-cart, .btn-search, .cat-item, .mainnav a, .lang-switch a {
    -webkit-tap-highlight-color: rgba(87, 185, 71, .18);
  }

  /* Fejlec-navigacio nagyobb erintofelulettel. */
  .mainnav a { padding: 11px 14px; }
  .lang-switch a { padding: 9px 15px; font-size: 13px; }

  /* Kereso es fo gombok legalabb 44px magasak. */
  .headsearch { min-height: 44px; }
  .searchbar { padding: 8px 8px 8px 14px; }
  .btn-search { min-height: 44px; padding: 12px 20px; }
  .cta,
  .header-cart { min-height: 44px; box-sizing: border-box; }

  /* Kategoria-sorok kenyelmes sormagassaggal az ujjnak. */
  .cat-item { padding-top: 12px; padding-bottom: 12px; min-height: 44px; box-sizing: border-box; }

  /* Urlap-mezok es -gombok kenyelmesebb merete (igenyles, visszajelzes). */
  .form-row input,
  .form-row textarea,
  .form-row select { padding: 12px 12px; }
}

/* ============================================================
   TABLET SZERKEZETI ELRENDEZES
   A fejlec ujrarendezese, hogy ne csorduljon tul es ne essen szet
   tablet szelessegen (Android Chrome, iPad Safari).
   ============================================================ */

/* Vizszintes tulcsordulas megszuntetese (a kilogo elem miatt esett szet a
   hero es nem ert vegig a footer). A clip nem rontja a sticky fejlecet. */
@media (max-width: 1024px) {
  html, body { overflow-x: clip; }

  /* Fejlec: tobb sorba rendezetten, a kereso kulon (masodik) sorba. */
  .topnav-inner {
    flex-wrap: wrap;
    height: auto;
    min-height: 60px;
    padding: 10px 16px;
    gap: 10px 14px;
  }
  .brand { flex: 0 0 auto; }
  .mainnav { flex: 0 1 auto; }
  .topright { margin-left: auto; flex: 0 0 auto; gap: 10px; }

  /* A fejlec-kereso az elso sor ala, teljes szelessegben. */
  .headsearch {
    order: 10;
    flex: 1 0 100%;
    max-width: 100%;
    margin-left: 0;
  }
  .headsearch + .topright { margin-left: auto; }

  /* A kosar ne logjon ki. */
  .header-cart { flex: 0 0 auto; }
}

/* Hero: egy oszlop, hogy a cim ne toredezzen a keskeny bal oszlopban. */
@media (max-width: 900px) {
  .hero-inner { flex-direction: column; align-items: stretch; }
  .hero-stats { gap: 24px; flex-wrap: wrap; }
}
