/* =====================================================================
   Narancs Autókereskedés – stílusok
   Mobil először; desktop: min-width 1024px.
   ===================================================================== */

:root {
  --o: #F26B1D;        /* fő narancs */
  --o-light: #FF8A3D;  /* világosabb */
  --o-deep: #D9560F;   /* mélyebb */
  --ink: #111111;
  --white: #ffffff;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --t: .22s var(--ease);
  --radius: 14px;

  --bar-h: 60px;                                       /* kirakat felső sáv */
  --cta-h: calc(76px + env(safe-area-inset-bottom));   /* mobil alsó sáv */
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--o);
  overflow-x: clip;
}
body.lock { overflow: hidden; }

img, svg, iframe { display: block; }
a { color: inherit; }
button { font: inherit; }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
[tabindex="-1"]:focus { outline: none; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px;
  padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 10px;
  font-weight: 800; text-decoration: none;
}
.skip:focus { top: 16px; }

.container { max-width: 1300px; margin: 0 auto; }

/* ---------- Gombok ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 52px; padding: 0 1.4em;
  border: 3px solid var(--ink); border-radius: 999px;
  font-weight: 850; font-size: 1.05rem; line-height: 1.1;
  text-decoration: none; cursor: pointer;
  transition: transform var(--t), background-color var(--t), color var(--t);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: scale(.97); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: #000; }
.btn-white { background: #fff; color: var(--ink); }
.btn-orange { background: var(--o); color: var(--ink); }
.btn-outline { background: transparent; color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-xl { min-height: 68px; padding: 0 2em; font-size: clamp(1.1rem, 3.8vw, 1.4rem); }
.btn-sm { min-height: 44px; padding: 0 1em; font-size: .95rem; }
.btn-block { width: 100%; }

.btn-link {
  background: none; border: 0; padding: 0 8px; min-height: 48px;
  color: var(--ink); font-weight: 800; text-decoration: underline; text-underline-offset: 3px;
  cursor: pointer;
}

.icon-btn {
  display: inline-grid; place-items: center;
  width: 48px; height: 48px; border-radius: 50%;
  border: 3px solid var(--ink); background: #fff; color: var(--ink);
  cursor: pointer; transition: transform var(--t), background-color var(--t), color var(--t);
}
.icon-btn:hover { background: var(--ink); color: #fff; }
.icon-btn:disabled { opacity: .35; cursor: default; }
.icon-btn:disabled:hover { background: #fff; color: var(--ink); }

/* =====================================================================
   1) NYITÓ KÉPERNYŐ
   ===================================================================== */
.hero {
  position: relative; overflow: hidden;
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column;
  padding: 18px 16px 96px;
  background: var(--ink);
}
/* Fotó a háttérben + narancs takarás: a szöveg alatt tömör narancs, a fotó felé átúszik */
/* Mobil: teljes képernyős hero, álló formátumú fotóval (assets/img/hero-mobile.webp) */
.hero-pic { display: contents; }
.hero .hero-photo {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 50%;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: none;
}
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; z-index: 0;
  height: 10px; background: var(--ink);
}
.hero-nav, .hero-inner { position: relative; z-index: 1; }
.hero-arrow { z-index: 1; }

.hero-nav {
  display: flex; align-items: center; justify-content: flex-end; gap: 22px;
  max-width: 1400px; width: 100%; margin: 0 auto;
  font-weight: 800;
}
.hero-nav a { text-decoration: none; }
.hero-nav a:not(.hero-tel) { display: none; }
.hero-nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.hero-tel {
  background: var(--ink); color: #fff; padding: .55em 1em; border-radius: 999px;
}
.hero-tel:hover { text-decoration: none !important; background: #000; }

.hero-inner {
  flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
  max-width: 1400px; width: 100%; margin: 0 auto; padding-top: 24px;
}

.status {
  display: inline-flex; align-items: center; gap: .6em; margin: 0;
  background: var(--ink); color: #fff;
  padding: .55em 1.05em; border-radius: 999px;
  font-weight: 800; font-size: clamp(.9rem, 3.4vw, 1.05rem);
}
.status-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--o-light); flex: none; }
.status.is-open .status-dot { background: #44E08A; animation: pulse 1.8s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(68, 224, 138, .7); }
  70% { box-shadow: 0 0 0 10px rgba(68, 224, 138, 0); }
  100% { box-shadow: 0 0 0 0 rgba(68, 224, 138, 0); }
}

.hero-title {
  margin: .12em 0 .08em -.04em;
  font-size: clamp(4rem, 19vw, 17rem);
  font-weight: 900; line-height: .82; letter-spacing: -.06em;
  color: var(--ink);
}
.hero-sub {
  margin: 0 0 1.5em;
  font-size: clamp(1.1rem, 4vw, 1.9rem); font-weight: 800; line-height: 1.2;
}

.hero-arrow {
  position: absolute; left: 50%; bottom: 22px;
  width: 58px; height: 58px; margin-left: -29px;
  display: grid; place-items: center;
  border-radius: 50%; background: var(--ink); color: var(--o);
  animation: bounce 1.6s var(--ease) infinite;
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(10px); }
}

/* =====================================================================
   2) AUTÓK (rács) – mobil alap
   ===================================================================== */
.showcase {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column;
  background: var(--ink);
}
.showcase-wrap { flex: 1; display: flex; flex-direction: column; }
.showcase-main { flex: 1; display: flex; flex-direction: column; }

/* Felső sáv: cím, darabszám, szűrők – mobilon görgetés közben is látszik */
.topbar {
  position: sticky; top: 0; z-index: 20;
  flex: none; height: var(--bar-h);
  display: flex; align-items: center; gap: 10px;
  padding: 0 12px 0 16px;
  background: var(--ink); color: #fff;
}
.topbar-title { margin: 0; font-size: 1.4rem; font-weight: 900; letter-spacing: -.02em; color: #fff; }
.counter {
  margin: 0;
  font-size: 1.05rem; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.counter strong { color: var(--o); }

.topbar :focus-visible { outline-color: #fff; }

.filter-btn {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 0 .9em;
  border: 0; border-radius: 999px; background: #fff; color: var(--ink);
  font-weight: 900; font-size: .95rem; cursor: pointer;
}
.badge {
  display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 5px;
  border-radius: 999px; background: var(--o); color: var(--ink);
  font-size: .8rem; font-weight: 900;
}

.state {
  display: inline-flex; align-items: center; gap: .4em; margin: 0;
  padding: .38em .8em; border: 2px solid var(--ink); border-radius: 8px;
  background: #fff; color: var(--ink);
  font-size: .78rem; font-weight: 900; text-transform: uppercase; letter-spacing: .07em;
}
.state-kituno { background: var(--ink); color: var(--o-light); }

/* Fotó / sziluett */
.media { position: absolute; inset: 0; }
.ph-wrap {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  color: var(--ink);
}
.ph { width: min(100%, 560px); height: auto; max-height: calc(100% - 22px); }
.ph-note { font-size: .72rem; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; opacity: .65; }
.media img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0; transition: opacity var(--t);
}
.media img.loaded { opacity: 1; }
.media.has-img .ph-wrap { visibility: hidden; }

/* Rács nézet */
.grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  padding: 16px;
}
.card {
  display: flex; flex-direction: column; overflow: hidden;
  background: #fff; border: 4px solid var(--o); border-radius: var(--radius);
  transition: transform var(--t), border-color var(--t);
}
.card:hover { transform: translateY(-3px); border-color: var(--o-light); }
.card-media { position: relative; aspect-ratio: 16 / 9; background: var(--o-light); }
.card-media .ph-wrap { padding: 10px 14px 6px; }
.card-body { flex: 1; display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; }
.card-brand { margin: 0; font-size: .8rem; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; color: var(--o-deep); }
.card-model { margin: 0; font-size: 1.25rem; font-weight: 900; line-height: 1.1; letter-spacing: -.02em; }
.card-price { margin: 2px 0 0; font-size: 2rem; font-weight: 900; line-height: 1; letter-spacing: -.04em; white-space: nowrap; }
.card-price .ft { font-size: .5em; letter-spacing: 0; }
.card-specs { margin: 0; font-size: .92rem; font-weight: 600; color: #333; }
.card .state { align-self: flex-start; }
.card-actions { margin-top: auto; padding-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }
.card-actions .btn { flex: 1; }

/* Üres állapot */
.empty {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px; padding: 32px 16px; text-align: center;
  background: var(--o);
}
.empty-title {
  margin: 0; max-width: 16ch;
  font-size: clamp(1.8rem, 7vw, 3.2rem); font-weight: 900; line-height: 1.02; letter-spacing: -.03em;
}

/* =====================================================================
   3) SZŰRŐK – mobilon alulról felcsúszó panel
   ===================================================================== */
.filters {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
  max-height: 88vh; max-height: 88svh;
  display: flex; flex-direction: column;
  background: #fff; color: var(--ink);
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, .35);
  transform: translateY(100%); visibility: hidden;
  transition: transform .26s var(--ease), visibility 0s linear .26s;
}
.filters.open { transform: none; visibility: visible; transition: transform .26s var(--ease), visibility 0s; }

.filters-head {
  flex: none; display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 10px; border-bottom: 3px solid var(--ink);
}
.filters-title { margin: 0; font-size: 1.7rem; font-weight: 900; letter-spacing: -.02em; }
.filters-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 16px 12px; }

.fgroup { margin: 0; padding: 14px 0; border: 0; border-bottom: 2px solid #eee; min-width: 0; }
.fgroup:last-child { border-bottom: 0; }
.nw { white-space: nowrap; }
legend.flabel { float: left; width: 100%; }
.fgroup > .chips { clear: both; }
.flabel {
  display: block; padding: 0; margin: 0 0 10px;
  font-size: .8rem; font-weight: 900; letter-spacing: .09em; text-transform: uppercase;
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 42px; padding: 0 12px 0 14px;
  border: 2px solid var(--ink); border-radius: 999px;
  background: #fff; color: var(--ink);
  font-weight: 800; font-size: .95rem; cursor: pointer;
  transition: background-color var(--t), transform var(--t);
}
.chip:hover { background: #fff1e8; }
.chip:active { transform: scale(.96); }
.chip[aria-pressed="true"] { background: var(--o); }
.chip-count {
  min-width: 1.75em; padding: .12em .45em; border-radius: 999px;
  background: var(--ink); color: #fff; font-size: .75rem; font-weight: 900; text-align: center;
}
.chip.is-zero { opacity: .42; }

select, input, textarea {
  width: 100%; min-height: 50px; padding: 0 14px;
  border: 2px solid var(--ink); border-radius: 12px;
  background: #fff; color: var(--ink);
  font: inherit; font-weight: 700;
}
textarea { padding: 12px 14px; min-height: 120px; resize: vertical; font-weight: 600; }
select { cursor: pointer; }
select:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid var(--o); outline-offset: 1px; }

.filters-foot {
  flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  border-top: 3px solid var(--ink); background: #fff;
}
.match { margin: 0; flex: 1 1 100%; font-weight: 800; font-size: 1.05rem; }
.match strong { font-size: 1.7rem; font-weight: 900; color: var(--o-deep); }
.foot-btns { display: flex; align-items: center; gap: 8px; width: 100%; }
.foot-btns .btn { flex: 1; }

.sheet-backdrop {
  position: fixed; inset: 0; z-index: 65;
  background: rgba(17, 17, 17, .62);
  opacity: 0; transition: opacity var(--t);
}
.sheet-backdrop.show { opacity: 1; }

/* Mobil: ragadós alsó sáv */
.cta-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: flex; gap: 10px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: var(--ink);
  transform: translateY(110%); visibility: hidden;
  transition: transform var(--t), visibility 0s linear .22s;
}
.cta-bar.show { transform: none; visibility: visible; transition: transform var(--t), visibility 0s; }
.cta-bar .btn { flex: 1; min-height: 56px; font-size: 1.1rem; }
.cta-bar :focus-visible { outline-color: #fff; }

/* =====================================================================
   4) MIÉRT MI
   ===================================================================== */
.section-title {
  margin: 0 0 36px;
  font-size: clamp(2.6rem, 10vw, 6rem); font-weight: 900; line-height: .92; letter-spacing: -.045em;
}
.why { background: var(--ink); color: #fff; padding: 76px 16px; }
.why .section-title span { color: var(--o); }
.why-grid { display: grid; gap: 36px; }
.why-item { border-top: 4px solid var(--o); padding-top: 22px; }
.why-item svg { width: 60px; height: 60px; color: var(--o); margin-bottom: 14px; }
.why-item h3 { margin: 0 0 8px; font-size: clamp(1.5rem, 5vw, 2rem); font-weight: 900; line-height: 1.05; letter-spacing: -.02em; }
.why-item p { margin: 0; font-size: 1.08rem; color: #f2f2f2; max-width: 38ch; }

/* =====================================================================
   5) KAPCSOLAT
   ===================================================================== */
.contact { background: var(--o); padding: 76px 16px; }
.contact-grid { display: grid; gap: 40px; }

.info-list { margin: 0 0 32px; }
.info-list > div {
  display: grid; grid-template-columns: 1fr; gap: 2px;
  padding: 12px 0; border-bottom: 2px solid rgba(17, 17, 17, .28);
}
.info-list dt { font-size: .78rem; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.info-list dd { margin: 0; font-size: 1.15rem; font-weight: 700; }
.big-link { font-size: 1.6rem; font-weight: 900; text-decoration: none; letter-spacing: -.01em; }
.big-link:hover { text-decoration: underline; }

.sub-title { margin: 0 0 12px; font-size: 1.6rem; font-weight: 900; letter-spacing: -.02em; }

.hours { width: 100%; border-collapse: collapse; margin-bottom: 32px; font-size: 1.05rem; }
.hours td { padding: 9px 12px; border-bottom: 2px solid rgba(17, 17, 17, .2); font-weight: 700; }
.hours td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.hours tr.today td { background: var(--ink); color: #fff; border-bottom-color: var(--ink); }
.hours tr.today td:first-child { border-radius: 10px 0 0 10px; }
.hours tr.today td:last-child { border-radius: 0 10px 10px 0; }
.today-tag {
  display: inline-block; margin-left: 8px; padding: .1em .55em; border-radius: 999px;
  background: var(--o); color: var(--ink); font-size: .72rem; font-weight: 900; text-transform: uppercase; letter-spacing: .06em;
  vertical-align: 2px;
}

.map {
  aspect-ratio: 4 / 3; overflow: hidden;
  border: 4px solid var(--ink); border-radius: var(--radius);
  background: var(--o-deep);
}
.map iframe { width: 100%; height: 100%; border: 0; }

.lead-form, .thanks {
  background: #fff; border: 4px solid var(--ink); border-radius: var(--radius);
  padding: 24px 18px;
  scroll-margin-top: 16px;
}
.form-title { margin: 0; font-size: clamp(2rem, 7vw, 2.8rem); font-weight: 900; letter-spacing: -.03em; line-height: 1; }
.form-lead { margin: 6px 0 18px; font-weight: 600; }
.field { margin-bottom: 14px; }
.field label { display: block; margin-bottom: 6px; font-weight: 900; }
.req { color: var(--o-deep); }
.field-err { margin: 6px 0 0; color: #B3260B; font-weight: 800; font-size: .92rem; }
input[aria-invalid="true"] { border-color: #B3260B; box-shadow: 0 0 0 2px #B3260B; }
.form-note { margin: 12px 0 0; font-size: .9rem; font-weight: 600; color: #444; }

.lead-form.flash { animation: flash .9s var(--ease); }
@keyframes flash {
  0% { box-shadow: 0 0 0 0 rgba(17, 17, 17, .9); }
  100% { box-shadow: 0 0 0 18px rgba(17, 17, 17, 0); }
}

.thanks-title { margin: 0 0 10px; font-size: clamp(2rem, 7vw, 2.8rem); font-weight: 900; line-height: 1; letter-spacing: -.03em; }
.thanks p { font-weight: 600; }
.thanks a { font-weight: 900; }

/* =====================================================================
   6) LÁBLÉC
   ===================================================================== */
.footer {
  background: var(--o); color: var(--ink);
  border-top: 6px solid var(--ink);
  padding: 44px 16px calc(var(--cta-h) + 28px);
}
.footer-grid { display: grid; gap: 18px; }
.footer-logo { margin: 0; font-size: clamp(3rem, 15vw, 6rem); font-weight: 900; line-height: .85; letter-spacing: -.06em; }
.footer p { margin: 0 0 8px; font-weight: 700; }
.footer a { font-weight: 900; }
.footer-note { font-weight: 800; }

/* =====================================================================
   Mobil finomítások
   ===================================================================== */
@media (max-width: 559px) {
  .hero-nav { justify-content: center; }
}

/* Telefon/tablet: az alcím a fotón olvasható maradjon */
@media (max-width: 1023px) {
  .hero-sub {
    display: inline-block; background: var(--ink); color: #fff;
    padding: .4em .75em; border-radius: 14px; font-size: clamp(.8rem, 3.6vw, 1.4rem);
  }
}

@media (min-width: 560px) {
  .hero-nav a:not(.hero-tel) { display: inline; }
  .info-list > div { grid-template-columns: 170px 1fr; align-items: baseline; }
}

/* =====================================================================
   Desktop
   ===================================================================== */
@media (min-width: 1024px) {
  body { font-size: 18px; }

  .hero { min-height: 100vh; min-height: 100svh; padding: 26px 40px 110px; }
  .hero::before {
    z-index: 1;
    background: linear-gradient(90deg, var(--o) 0%, var(--o) 24%, rgba(242, 107, 29, .7) 34%, rgba(242, 107, 29, 0) 50%);
  }
  .hero .hero-photo { object-position: 50% 50%; }
  .hero-nav { gap: 30px; font-size: 1.05rem; }

  .cta-bar { display: none; }

  .showcase { min-height: 0; padding: 36px 32px 56px; }
  .showcase-wrap {
    max-width: 1480px; width: 100%; margin: 0 auto;
    display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 24px; align-items: start;
  }
  .showcase-main { border-radius: var(--radius); overflow: hidden; }

  /* Szűrő: állandó oldalsó panel */
  .filters {
    position: sticky; top: 24px; z-index: auto;
    max-height: calc(100vh - 48px);
    border: 4px solid var(--o); border-radius: var(--radius);
    box-shadow: none; transform: none; visibility: visible; transition: none;
  }
  .filters-head { padding: 16px 18px 12px; }
  .filters-body { padding: 4px 18px 12px; }
  .filters-foot { padding: 14px 18px; }
  .filters-close, #filters-show, .sheet-backdrop, .filter-btn { display: none !important; }
  .foot-btns { justify-content: flex-start; }
  .foot-btns .btn-link { padding-left: 0; }

  .topbar { position: static; height: 72px; padding: 0 22px; gap: 18px; border-bottom: 4px solid var(--o); }
  .topbar-title { font-size: 1.9rem; letter-spacing: -.03em; }
  .counter { font-size: 1.5rem; }

  .grid { padding: 22px; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
  .empty { min-height: 560px; }

  .why, .contact { padding: 110px 40px; }
  .why-grid { grid-template-columns: repeat(3, 1fr); gap: 40px; }
  .contact-grid { grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: start; }
  .form-col { position: sticky; top: 24px; }
  .lead-form, .thanks { padding: 32px 30px; }

  .footer { padding: 56px 40px; }
  .footer-grid { grid-template-columns: auto 1fr 1fr; gap: 48px; align-items: end; }
}

/* =====================================================================
   Csökkentett mozgás
   ===================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition-duration: 0s !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }
}

/* =====================================================================
   Részletek – nagyított képnézegető (<dialog>)
   ===================================================================== */
.card-media[data-detail] { cursor: zoom-in; }
.card-actions .card-detail { flex: 1 1 100%; }

.detail {
  width: 100%; max-width: none; height: 100%; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: var(--o); color: var(--ink);
  overflow: hidden;
}
.detail::backdrop { background: rgba(17, 17, 17, .8); }
.detail[open] { animation: dIn .24s var(--ease); }
@keyframes dIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.d-wrap {
  position: relative; height: 100%;
  display: flex; flex-direction: column;
  overflow-y: auto; overscroll-behavior: contain;
}
.d-close {
  position: absolute; top: 12px; right: 12px; z-index: 5;
  width: 52px; height: 52px; background: var(--ink); color: #fff; border-color: var(--ink);
}
.d-close:hover { background: #fff; color: var(--ink); }

.d-gallery { flex: none; background: var(--ink); }
.d-stage {
  position: relative; aspect-ratio: 16 / 10; max-height: 62svh; width: 100%;
  background: var(--o-light); overflow: hidden; touch-action: pan-y;
}
.d-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; background: #111;
  opacity: 0; transition: opacity var(--t);
}
.d-img.loaded { opacity: 1; }
.d-ph {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  padding: 24px;
}
.d-ph .ph { width: min(100%, 560px); }

.d-arrow {
  position: absolute; top: 50%; margin-top: -26px; z-index: 2;
  width: 52px; height: 52px; background: var(--ink); color: #fff; border-color: var(--ink);
}
.d-arrow:hover { background: #fff; color: var(--ink); }
.d-prev { left: 10px; }
.d-next { right: 10px; }
.d-count {
  position: absolute; left: 12px; bottom: 12px; z-index: 2; margin: 0;
  padding: .3em .8em; border-radius: 999px;
  background: var(--ink); color: #fff; font-weight: 900; font-variant-numeric: tabular-nums;
}
.d-count:empty { display: none; }

.d-thumbs { display: flex; gap: 8px; padding: 10px 12px; overflow-x: auto; }
.d-thumb {
  flex: none; width: 96px; aspect-ratio: 16 / 10; padding: 0; overflow: hidden;
  border: 3px solid transparent; border-radius: 10px; background: #333; cursor: pointer;
  opacity: .65; transition: opacity var(--t), border-color var(--t);
}
.d-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.d-thumb:hover { opacity: 1; }
.d-thumb[aria-pressed="true"] { opacity: 1; border-color: var(--o); }
.d-gallery :focus-visible { outline-color: #fff; }

.d-info { flex: none; padding: 18px 16px calc(24px + env(safe-area-inset-bottom)); }
.d-brand { margin: 0; font-size: 1rem; font-weight: 900; text-transform: uppercase; letter-spacing: .07em; }
.d-title { margin: .05em 0 .15em; font-size: clamp(1.6rem, 6.4vw, 2.6rem); font-weight: 900; line-height: 1.03; letter-spacing: -.03em; }
.d-price { margin: 0 0 .3em; font-size: clamp(2.6rem, 13vw, 5rem); font-weight: 900; line-height: .95; letter-spacing: -.045em; white-space: nowrap; }
.d-price .ft { font-size: .42em; letter-spacing: 0; margin-left: .12em; }
.d-chips { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.d-chips li { background: var(--ink); color: #fff; padding: .32em .75em; border-radius: 999px; font-size: .9rem; font-weight: 800; white-space: nowrap; }
.d-actions { display: flex; gap: 10px; margin-top: 18px; }
.d-actions .btn { flex: 1; min-height: 56px; }
.d-actions .btn-outline { background: #fff; }

@media (min-width: 1024px) {
  .detail {
    width: min(1240px, calc(100vw - 64px)); height: min(760px, calc(100vh - 64px));
    margin: auto; border: 4px solid var(--ink); border-radius: 18px;
  }
  .d-wrap { flex-direction: row; overflow: hidden; }
  .d-gallery { flex: 1.45; display: flex; flex-direction: column; min-width: 0; }
  .d-stage { flex: 1; aspect-ratio: auto; max-height: none; }
  .d-info { flex: 1; overflow-y: auto; padding: 56px 36px 32px; display: flex; flex-direction: column; justify-content: center; }
  .d-price { font-size: clamp(3rem, 4.2vw, 4.6rem); }
  .d-close { top: 14px; right: 14px; }
}

/* Alacsony fekvő telefon: kép és adatok egymás mellett */
@media (max-width: 1023px) and (orientation: landscape) and (max-height: 560px) {
  .d-wrap { flex-direction: row; overflow: hidden; }
  .d-gallery { flex: 1.2; display: flex; flex-direction: column; min-width: 0; }
  .d-stage { flex: 1; aspect-ratio: auto; max-height: none; }
  .d-thumbs { display: none; }
  .d-info { flex: 1; overflow-y: auto; padding-top: 64px; }
}

@media (min-width: 1024px) {
  .detail { height: auto; max-height: calc(100vh - 64px); }
  .d-wrap { align-items: stretch; }
  .d-gallery { flex: 1.5; justify-content: center; }
  .d-stage { flex: none; aspect-ratio: 16 / 10; }
}

/* Telefon/tablet: a hero felirata narancs (a fotón), finom árnyékkal a jobb olvashatóságért */
@media (max-width: 1023px) {
  .hero-title { color: var(--o); text-shadow: 0 2px 6px rgba(0, 0, 0, .55), 0 0 28px rgba(0, 0, 0, .45); }
}

/* Vissza a tetejére gomb – jobb alsó sarok */
.to-top {
  position: fixed; right: 16px; bottom: calc(var(--cta-h) + 14px); z-index: 55;
  width: 56px; height: 56px; padding: 0;
  display: grid; place-items: center;
  border: 3px solid var(--ink); border-radius: 50%;
  background: var(--o); color: var(--ink); cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .4);
  opacity: 0; transform: translateY(14px) scale(.9); visibility: hidden;
  transition: opacity var(--t), transform var(--t), background-color var(--t), color var(--t), visibility 0s linear .22s;
}
.to-top.show { opacity: 1; transform: none; visibility: visible; transition: opacity var(--t), transform var(--t), background-color var(--t), color var(--t), visibility 0s; }
.to-top:hover { background: var(--ink); color: var(--o); }
.to-top:active { transform: scale(.93); }
@media (min-width: 1024px) {
  .to-top { right: 28px; bottom: 28px; width: 60px; height: 60px; }
}

/* =====================================================================
   Betöltő képernyő
   ===================================================================== */
.loader {
  position: fixed; inset: 0; z-index: 300;
  display: grid; place-items: center;
  background: var(--ink); color: #fff;
  transition: opacity .3s var(--ease), visibility 0s linear .3s;
}
.loader.done { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-inner { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.loader-fruit { overflow: visible; }
.loader-body { transform-origin: 70px 140px; animation: loaderHop .62s cubic-bezier(.3, .1, .4, 1) infinite alternate; }
.loader-shadow { transform-origin: 70px 142px; animation: loaderShadow .62s cubic-bezier(.3, .1, .4, 1) infinite alternate; }
@keyframes loaderHop {
  0%   { transform: translateY(0) scale(1.1, .88) rotate(-6deg); }
  18%  { transform: translateY(-4px) scale(.96, 1.05) rotate(-4deg); }
  100% { transform: translateY(-34px) scale(1, 1) rotate(7deg); }
}
@keyframes loaderShadow {
  0%   { transform: scale(1.1); opacity: .32; }
  100% { transform: scale(.62); opacity: .14; }
}
.loader-text {
  margin: 0; font-size: clamp(1.8rem, 8vw, 3rem); font-weight: 900; letter-spacing: -.04em; line-height: 1;
}
.loader-dots { color: var(--o); }
.loader-dots i { font-style: normal; opacity: .2; animation: loaderDot 1.2s infinite; }
.loader-dots i:nth-child(2) { animation-delay: .2s; }
.loader-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes loaderDot { 0%, 60%, 100% { opacity: .2; } 30% { opacity: 1; } }
