/* ============================================================
   KOMIS WIDMAR — design system (stonowany, motoryzacyjny)
   ============================================================ */

:root {
  --bg: #0f1218;
  --surface: #1d212b;
  --surface-2: #272c38;
  --border: #353b49;
  --text: #f3f5f9;
  --muted: #b4bbc9;
  --primary: #e63946;          /* żywa, motoryzacyjna czerwień */
  --primary-glow: #ff5d6a;
  --primary-fg: #ffffff;
  --gradient-primary: linear-gradient(135deg, #ff4757, #c1121f);
  --gradient-dark: linear-gradient(180deg, rgba(15,18,24,.4), rgba(15,18,24,.95));
  --shadow-glow: 0 8px 24px -8px rgba(230,57,70,.55);
  --shadow-card: 0 8px 24px -16px rgba(0,0,0,.6);
  --radius: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
  overflow-x: hidden;
}
img { display:block; max-width:100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }

h1,h2,h3,h4 {
  font-family: 'Bebas Neue', 'Oswald', Impact, sans-serif;
  font-weight: 400;
  letter-spacing: .04em;
  line-height: 1.15;
}

.container { max-width: 1240px; margin: 0 auto; padding: 0 1.5rem; }
.text-red { color: var(--primary); }
.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.eyebrow {
  font-size: .72rem; letter-spacing: .3em;
  color: var(--primary); font-weight: 600; text-transform: uppercase;
}

/* ===== Animacje ===== */
@keyframes fadeUp   { from{opacity:0; transform:translateY(18px);} to{opacity:1; transform:none;} }
@keyframes fadeIn   { from{opacity:0;} to{opacity:1;} }
@keyframes scaleIn  { from{opacity:0; transform:scale(.97);} to{opacity:1; transform:none;} }
@keyframes slideR   { from{opacity:0; transform:translateX(-18px);} to{opacity:1; transform:none;} }
@keyframes slideL   { from{opacity:0; transform:translateX(18px);} to{opacity:1; transform:none;} }

.reveal { opacity:0; }
.reveal.in { animation: fadeUp .7s cubic-bezier(.2,.7,.2,1) both; }
.reveal.in-left  { animation: slideR .7s cubic-bezier(.2,.7,.2,1) both; }
.reveal.in-right { animation: slideL .7s cubic-bezier(.2,.7,.2,1) both; }

/* ===== Header ===== */
.header {
  position: sticky; top: 0; z-index: 50; width: 100%;
  transition: background .3s, border-color .3s, backdrop-filter .3s;
  background: rgba(16,18,22,.7);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
}
.header.scrolled {
  background: rgba(16,18,22,.92);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}
.header-inner {
  position: relative;
  display:flex; align-items:center; justify-content:space-between;
  padding: .9rem 1.5rem; max-width: 1240px; margin: 0 auto;
  gap: 1rem;
}
.logo {
  display:inline-flex; align-items:center; gap:.7rem;
  white-space: nowrap;
}
.logo-mark {
  flex: 0 0 auto;
  width:40px; height:40px; border-radius:10px;
  background: var(--gradient-primary);
  display:inline-grid; place-items:center; font-family:'Bebas Neue',sans-serif;
  font-size: 1.3rem; color:#fff;
  font-weight: 700;
}
.logo-text {
  font-family:'Bebas Neue',sans-serif;
  font-size: 1.3rem;
  letter-spacing:.13em;
  display: inline-flex; gap:.35em;
  line-height: 1;
}
.logo-text span { color: var(--primary); }
@media (max-width: 420px) {
  .logo-text { font-size: 1rem; letter-spacing:.08em; }
  .logo-mark { width:36px; height:36px; font-size:1.05rem; }
}

.nav { display:none; gap:1.75rem; }
.nav a {
  position:relative; font-weight:500; font-size:.92rem; color: var(--text);
  transition: color .2s;
}
.nav a:hover, .nav a.active { color: var(--primary); }
.nav a::after {
  content:''; position:absolute; left:0; bottom:-6px; height:2px; width:100%;
  background: var(--primary); transform: scaleX(0); transform-origin:right;
  transition: transform .3s;
}
.nav a:hover::after, .nav a.active::after { transform: scaleX(1); transform-origin:left; }

.menu-toggle {
  display:inline-flex; padding:.5rem; color: var(--text); border-radius:8px;
}
.menu-toggle:hover { background: var(--surface-2); }

/* DESKTOP od 768px — pokazujemy menu, ukrywamy hamburger */
@media (min-width: 768px) {
  .nav { display:flex; }
  .menu-toggle { display:none !important; }
  .mobile-nav { display:none !important; }
}

/* Mobile nav — wewnątrz headera, nigdy nie wystaje obok */
.mobile-nav {
  position: absolute;
  left: 0; right: 0; top: 100%;
  background: rgba(16,18,22,.97);
  backdrop-filter: blur(18px);
  border-bottom:1px solid var(--border);
  display:flex; flex-direction:column;
  padding: .25rem 1.25rem 1rem;
  max-height: 0; overflow: hidden;
  transition: max-height .35s ease, padding .25s ease;
}
.mobile-nav.open { max-height: 80vh; padding: .5rem 1.25rem 1.25rem; }
.mobile-nav a {
  padding: .9rem .25rem; border-bottom:1px solid var(--border); font-size:1rem;
}
.mobile-nav a:last-child { border-bottom: none; }

/* ===== Buttons ===== */
.btn {
  display:inline-flex; align-items:center; justify-content:center; gap:.5rem;
  padding:.85rem 1.4rem; border-radius: 10px; font-weight:600; font-size:.92rem;
  letter-spacing:.02em; transition: transform .2s, box-shadow .2s, background .2s, border-color .2s;
  white-space: nowrap;
}
.btn-primary {
  background: var(--gradient-primary); color:#fff;
  box-shadow: var(--shadow-glow);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 18px -10px rgba(168,56,64,.5); }
.btn-ghost {
  background: transparent; color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }

/* ===== HERO ===== */
.hero {
  position:relative; min-height: 72vh;
  display:flex; align-items:center;
  background: #0f1115 center/cover no-repeat;
  overflow:hidden;
}
.hero::before {
  content:''; position:absolute; inset:0;
  background:
    radial-gradient(60% 70% at 75% 30%, rgba(168,56,64,.10), transparent 70%),
    linear-gradient(180deg, rgba(20,22,27,.78) 0%, rgba(20,22,27,.95) 100%);
}
.hero-grid {
  position:relative; z-index:1; width:100%;
  display:grid; grid-template-columns: 1fr; gap:2.25rem; align-items:center;
  padding: 2.5rem 0 3.25rem;
}
@media (min-width: 980px) {
  .hero-grid { grid-template-columns: .9fr 1.1fr; gap:4rem; padding: 5rem 0 6rem; }
}

/* MOBILE: tekst pierwszy, mapa pod CTA */
.hero-text  { order: 1; animation: slideR 1s ease-out both .1s; }
.hero-loc   { order: 2; animation: slideL 1s ease-out both .25s; }
@media (min-width: 980px) {
  .hero-loc  { order: 1; }
  .hero-text { order: 2; }
}

.loc-card {
  background: linear-gradient(180deg, rgba(35,39,48,.85), rgba(28,31,37,.85));
  border:1px solid var(--border); border-radius: var(--radius);
  padding: 1rem; box-shadow: var(--shadow-card);
}
.loc-card .loc-map,
.loc-card img {
  border-radius: 10px; aspect-ratio: 1/1; object-fit: cover; width:100%;
}
.loc-card-meta {
  display:flex; align-items:flex-start; gap:.6rem; margin-top:.85rem; font-size:.92rem;
}
.loc-card-meta strong { color: var(--primary); letter-spacing:.05em; }

/* Godziny otwarcia w hero */
.hours-card {
  margin-top: .85rem;
  padding: .85rem 1rem;
  background: rgba(20,22,27,.55);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: .88rem;
}
.hours-card h5 {
  font-family: 'Bebas Neue', sans-serif; font-size: .85rem;
  letter-spacing: .2em; color: var(--primary); text-transform: uppercase;
  margin-bottom: .45rem;
}
.hours-card ul { list-style:none; display:flex; flex-direction:column; gap:.2rem; }
.hours-card li { display:flex; justify-content:space-between; gap:1rem; color: var(--muted); }
.hours-card li strong { color: var(--text); font-weight: 600; }

.hero h1 {
  font-size: clamp(2.1rem, 6vw, 4.2rem);
  text-transform: uppercase; line-height: 1.02;
  word-break: break-word;
}
.hero h1 .accent { display:block; color: var(--primary); margin-top: .15em; }
.hero-slogan {
  margin-top:1.1rem; font-size: 1.02rem; max-width: 540px; color: var(--muted);
  line-height: 1.6;
}
.hero-cta {
  margin-top: 1.6rem;
  display:flex; flex-wrap:wrap; gap: .8rem;
}

/* MOBILE — mniejsza mapa, wycentrowany tekst sekcji start */
@media (max-width: 979px) {
  .hero { min-height: auto; }
  .hero-text { text-align: center; }
  .hero h1 { font-size: clamp(1.9rem, 8vw, 2.6rem); }
  .hero-slogan { margin-left: auto; margin-right: auto; }
  .hero-cta { justify-content: center; }
  .loc-card { max-width: 360px; margin: 0 auto; padding: .75rem; }
  .loc-card .loc-map,
  .loc-card img { aspect-ratio: 16/10; }
  .loc-card-meta { justify-content: center; text-align: left; }
  .hours-card { font-size: .82rem; }
}
@media (max-width: 480px) {
  .loc-card { max-width: 320px; }
  .loc-card .loc-map { aspect-ratio: 16/11; }
}

/* ===== Sekcje ===== */
.section { padding: 4.5rem 0; }
@media (max-width: 768px) { .section { padding: 3rem 0; } }
.section-head { text-align:center; margin-bottom: 2.75rem; }
.section-head .eyebrow { display:inline-block; margin-bottom: .9rem; }
.section-head h2 {
  font-size: clamp(1.7rem, 4.2vw, 2.6rem); text-transform: uppercase;
  margin-top: .25rem; line-height: 1.2;
}
.section-head p { color: var(--muted); max-width: 620px; margin: 1.1rem auto 0; line-height: 1.6; }

/* ===== Bestseller / Cards grid ===== */
.cards-3 {
  display:grid; gap:1.25rem; grid-template-columns: 1fr;
}
@media (min-width: 720px)  { .cards-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1020px) { .cards-3 { grid-template-columns: repeat(3, 1fr); } }

.car-card {
  position:relative; background: var(--surface); border:1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; display:flex; flex-direction:column;
  transition: transform .3s, border-color .3s, box-shadow .3s;
}
.car-card:hover { transform: translateY(-3px); border-color: var(--primary); box-shadow: var(--shadow-card); }
.car-card .photo {
  position:relative; aspect-ratio: 4/3; overflow: hidden; background:#000;
}
.car-card .photo img { width:100%; height:100%; object-fit: cover; transition: transform .6s; }
.car-card:hover .photo img { transform: scale(1.05); }
.bestseller-badge {
  position:absolute; top: .7rem; left:.7rem;
  background: var(--gradient-primary); color:#fff;
  font-size:.68rem; letter-spacing:.16em; font-weight:600; text-transform:uppercase;
  padding: .3rem .6rem; border-radius: 6px;
  z-index: 5; pointer-events:none;
}
.car-body { padding: 1rem 1.15rem 1.15rem; display:flex; flex-direction:column; gap:.3rem; }
.car-name { font-family:'Bebas Neue', sans-serif; font-size:1.4rem; letter-spacing:.05em; }
.car-price { color: var(--primary); font-weight:700; font-size:1rem; }
.car-meta  { color: var(--muted); font-size:.85rem; }
.car-actions { padding: 0 1.15rem 1.15rem; }
.spec-toggle {
  width:100%; padding:.65rem 1rem; border-radius:10px;
  background: var(--surface-2); border:1px solid var(--border);
  color: var(--text); font-weight:600; font-size:.82rem; letter-spacing:.04em;
  text-transform: uppercase; transition: background .2s, border-color .2s, color .2s;
}
.spec-toggle:hover { background: var(--primary); color:#fff; border-color: var(--primary); }

.section-foot { text-align:center; margin-top: 2.25rem; }

/* ===== O nas ===== */
.about-grid {
  display:grid; gap:1.5rem; grid-template-columns: 1fr;
}
@media (min-width: 900px) { .about-grid { grid-template-columns: 1.1fr .9fr; } }
.about-card {
  background: var(--surface); border:1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem 1.7rem;
}
.about-card h3 {
  font-size: 1.5rem; text-transform: uppercase; margin-bottom:.6rem;
}
.about-card p { color: var(--muted); margin-bottom:.8rem; }
.about-list { list-style:none; display:flex; flex-direction:column; gap:.55rem; margin-top:.4rem; color: var(--muted); }
.about-list li { padding-left: 0; }

/* ===== Kontakt ===== */
.contact-grid {
  display:grid; gap:1.25rem; grid-template-columns: 1fr;
}
@media (min-width: 720px) { .contact-grid { grid-template-columns: repeat(3, 1fr); } }
.contact-card {
  background: var(--surface); border:1px solid var(--border);
  border-radius: var(--radius); padding: 1.6rem 1.4rem; text-align:center;
  display:flex; flex-direction:column; gap:.4rem; align-items:center;
}
.contact-card .icon { font-size: 1.7rem; }
.contact-card h4 {
  font-family:'Bebas Neue',sans-serif; font-size:1.2rem; letter-spacing:.12em;
  text-transform: uppercase;
}
.contact-card a { color: var(--text); font-weight:600; }
.contact-card a:hover { color: var(--primary); }
.contact-card small { color: var(--muted); font-size:.8rem; }

/* ===== Footer ===== */
.footer {
  background: rgba(0,0,0,.2); border-top:1px solid var(--border); padding: 2.5rem 0 1.5rem;
  margin-top: 3rem;
}
.foot-grid {
  display:grid; gap: 1.75rem; grid-template-columns: 1fr;
}
@media (min-width: 800px) { .foot-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.footer h5 {
  font-family:'Bebas Neue',sans-serif; font-size: 1rem; letter-spacing:.18em;
  color: var(--primary); margin-bottom:.8rem; text-transform: uppercase;
}
.footer ul { list-style: none; display:flex; flex-direction:column; gap:.45rem; }
.footer li, .footer p { color: var(--muted); font-size:.88rem; }
.footer a:hover { color: var(--primary); }
.foot-bottom {
  border-top:1px solid var(--border); margin-top:2.25rem; padding-top:1.1rem;
  text-align:center; color: var(--muted); font-size:.78rem;
}

/* ============================================================
   OFERTA — pełna lista, paginacja, panel admina
   ============================================================ */
.offer-toolbar {
  display:flex; align-items:center; justify-content:space-between;
  flex-wrap: wrap; gap: 1rem; margin-bottom: 2rem;
}
.offer-toolbar h1 {
  font-size: clamp(1.9rem, 4.5vw, 3rem); text-transform: uppercase;
}
.admin-actions { display:flex; gap:.5rem; flex-wrap:wrap; }

.car-spec { display:none; }
.spec-layout {
  display:grid; gap: 1.25rem; grid-template-columns: 1fr;
}
@media (min-width: 820px) {
  .spec-layout { grid-template-columns: 1.1fr .9fr; }
}
.gallery-main {
  position:relative; aspect-ratio: 4/3; background:#000; border-radius: 10px; overflow:hidden;
}
.gallery-main img { width:100%; height:100%; object-fit:cover; }
.gallery-thumbs {
  display:flex; gap:.5rem; margin-top:.5rem; flex-wrap:wrap;
}
.gallery-thumbs img {
  width: 70px; height: 52px; object-fit:cover; border-radius:6px; cursor:pointer;
  border:2px solid transparent; opacity:.75; transition: opacity .2s, border-color .2s;
}
.gallery-thumbs img.active, .gallery-thumbs img:hover { opacity:1; border-color: var(--primary); }

.spec-list { list-style:none; display:grid; grid-template-columns: 1fr; gap: .5rem; }
.spec-list li { display:flex; justify-content:space-between; gap:1rem; padding: .55rem .75rem;
  background: var(--surface); border:1px solid var(--border); border-radius:8px;
  font-size:.9rem;
}
.spec-list li strong { color: var(--muted); font-weight:500; }
.spec-list li span { color: var(--text); font-weight:600; text-align:right; }
.spec-cta { margin-top:1rem; display:flex; gap:.6rem; flex-wrap:wrap; }
.spec-cta .btn { flex:1; min-width:160px; }

.admin-checks {
  display:flex; gap:.75rem; padding: .7rem 1.15rem; border-top:1px solid var(--border);
  background: var(--surface-2); justify-content: space-between; align-items:center;
  font-size:.85rem;
}
.admin-checks form { display:inline-flex; gap:.5rem; }
.admin-btn {
  padding:.45rem .85rem; border-radius:8px; font-weight:600; font-size:.78rem;
  text-transform: uppercase; letter-spacing:.04em; border:1px solid var(--border);
  background: var(--surface); color: var(--text); transition: all .2s;
}
.admin-btn:hover { border-color: var(--primary); color: var(--primary); }
.admin-btn.danger:hover { background: var(--primary); color:#fff; border-color: var(--primary); }

/* ===== Paginacja ===== */
.pager {
  display:flex; gap:.4rem; justify-content:center; margin: 3rem 0 1rem; flex-wrap:wrap;
}
.pager a, .pager span {
  min-width:40px; height:40px; padding: 0 .8rem; border-radius:10px;
  display:inline-flex; align-items:center; justify-content:center;
  background: var(--surface); border:1px solid var(--border);
  color: var(--text); font-weight:600; font-size:.88rem; transition: all .2s;
}
.pager a:hover { border-color: var(--primary); color: var(--primary); }
.pager .current { background: var(--gradient-primary); color:#fff; border-color: transparent; }

/* ===== Formularz admin ===== */
.admin-shell { max-width: 940px; margin: 0 auto; }
.form-card {
  background: var(--surface); border:1px solid var(--border); border-radius: var(--radius);
  padding: 2rem;
}
.form-grid {
  display:grid; gap:1rem; grid-template-columns: 1fr;
}
@media (min-width: 760px) { .form-grid { grid-template-columns: 1fr 1fr; } }
.field { display:flex; flex-direction:column; gap:.4rem; }
.field label { font-size:.78rem; color: var(--muted); text-transform: uppercase; letter-spacing:.08em; }
.field input, .field select, .field textarea {
  background: var(--surface-2); border:1px solid var(--border); color: var(--text);
  padding:.7rem .9rem; border-radius:10px; outline:none; transition: border-color .2s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); }
.field.full { grid-column: 1 / -1; }
.checkbox-row { display:flex; align-items:center; gap:.6rem; }
.checkbox-row input { width:20px; height:20px; accent-color: var(--primary); }

.flash {
  padding: .9rem 1.1rem; border-radius:10px; margin-bottom:1rem; font-size:.9rem;
  border:1px solid;
}
.flash.ok    { background: rgba(0,160,80,.1);  border-color: rgba(0,160,80,.4);  color:#79e3a8; }
.flash.err   { background: rgba(184,35,42,.12);  border-color: rgba(184,35,42,.5);   color:#ff8a82; }

.login-shell {
  min-height: 70vh; display:grid; place-items:center; padding: 4rem 1.5rem;
}
.login-card {
  width:100%; max-width:420px; background: var(--surface); border:1px solid var(--border);
  border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow-card);
}
.login-card h1 { font-size:2rem; text-transform:uppercase; margin-bottom:1.5rem; text-align:center; }

hr.sep { border:0; border-top:1px solid var(--border); margin: 2rem 0; }
.text-center { text-align:center; }
.muted { color: var(--muted); }

/* ===== Mapa — iframe Bydgoszcz ===== */
.loc-map {
  border-radius: 10px; aspect-ratio: 1/1; width:100%;
  border: 0; display:block; filter: grayscale(.2) contrast(1.02);
}

/* ===== Modal specyfikacji ===== */
.spec-modal {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(8,9,12,.78); backdrop-filter: blur(8px);
  display: none; align-items: flex-start; justify-content: center;
  padding: 2rem 1rem; overflow-y: auto;
  animation: fadeIn .25s ease both;
}
.spec-modal.open { display: flex; }
.spec-modal-content {
  position: relative; width: 100%; max-width: 1080px;
  background: var(--surface); border:1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-card);
  padding: 1.75rem 1.5rem 1.5rem;
  animation: scaleIn .3s cubic-bezier(.2,.7,.2,1) both;
}
.spec-modal-close {
  position:absolute; top:.6rem; right:.7rem;
  width:40px; height:40px; border-radius:50%;
  background: var(--surface-2); border:1px solid var(--border);
  color: var(--text); font-size:1.4rem; line-height:1;
  display:grid; place-items:center; transition: background .2s, color .2s, border-color .2s;
  z-index: 2;
}
.spec-modal-close:hover { background: var(--primary); color:#fff; border-color: var(--primary); }
.car-spec-data { display: none; }
@media (max-width: 640px) {
  .spec-modal { padding: 0; }
  .spec-modal-content { border-radius: 0; min-height: 100vh; padding: 3.5rem 1rem 1.5rem; }
}

/* ===== Mobile: blokada zaznaczania/kopiowania w karcie i modalu ===== */
@media (max-width: 900px) {
  .car-card, .spec-modal-content {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
  }
  .car-card a[href^="tel:"], .spec-modal-content a[href^="tel:"],
  .car-card a[href^="mailto:"], .spec-modal-content a[href^="mailto:"] {
    -webkit-user-select: auto; user-select: auto; -webkit-touch-callout: default;
  }
}

/* ===== Podpowiedzi w formularzu admina ===== */
.field .hint {
  display:block; margin-top:.15rem;
  font-size:.74rem; color: var(--muted); line-height:1.5;
}
.field .hint strong { color: var(--text); font-weight:600; }
.field .req { color: var(--primary); font-weight:700; margin-left:.15rem; }

/* ===== Karta oferty: pełne zdjęcia (lupa tylko w modalu specyfikacji) ===== */
.car-card .photo {
  background: #0a0c10;
}
.car-card .photo img {
  object-fit: contain;
  transition: transform .6s;
}
@media (hover: hover) {
  .car-card:hover .photo img { transform: scale(1.03); }
}

/* Galeria w modalu — pełne zdjęcia */
.gallery-main { aspect-ratio: 4/3; background: #0a0c10; cursor: zoom-in; }
.gallery-main img { object-fit: contain; }
.gallery-main::after {
  content: "🔍";
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.4rem; color:#fff;
  background: rgba(0,0,0,.4);
  opacity: 0; transition: opacity .25s;
  pointer-events: none;
}
@media (hover: hover) {
  .gallery-main:hover img { filter: brightness(.7); }
  .gallery-main:hover::after { opacity: 1; }
}
.gallery-thumbs img { object-fit: contain; background:#0a0c10; }

/* Sekcja Opis (rubryka) */
.spec-description {
  margin-top: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.15rem;
}
.spec-description h3 {
  font-family: 'Bebas Neue', 'Oswald', Impact, sans-serif;
  font-size: 1.2rem; letter-spacing: .15em;
  color: var(--primary);
  text-transform: uppercase;
  margin-bottom: .5rem;
}
.spec-description p { color: var(--muted); font-size: .92rem; line-height: 1.6; white-space: pre-line; }

/* Desktop: opis pod zdjęciami (lewa kolumna). Mobile: nad CTA */
.spec-desc-desktop { display: none; }
.spec-desc-mobile { display: block; }
@media (min-width: 820px) {
  .spec-desc-desktop { display: block; }
  .spec-desc-mobile { display: none; }
}

/* ===== Lightbox (powiększone zdjęcie) ===== */
.lightbox {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(0,0,0,.92);
  display: none; align-items: center; justify-content: center;
  padding: 2rem;
  animation: fadeIn .25s ease both;
}
.lightbox.open { display: flex; }
.lightbox-img {
  max-width: 95vw; max-height: 88vh;
  object-fit: contain;
  border-radius: 8px;
  animation: scaleIn .25s ease both;
}
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  color: #fff; width: 52px; height: 52px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 1.8rem; line-height: 1;
  cursor: pointer; transition: background .2s, transform .2s;
  z-index: 2;
}
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover {
  background: var(--primary); border-color: var(--primary); transform: scale(1.05);
}
.lightbox-close { top: 1.2rem; right: 1.2rem; }
.lightbox-prev  { left: 1.2rem; top: 50%; transform: translateY(-50%); }
.lightbox-next  { right: 1.2rem; top: 50%; transform: translateY(-50%); }
.lightbox-prev:hover { transform: translateY(-50%) scale(1.05); }
.lightbox-next:hover { transform: translateY(-50%) scale(1.05); }
.lightbox-counter {
  position: absolute; bottom: 1.2rem; left: 50%; transform: translateX(-50%);
  color: #fff; font-size: .9rem; background: rgba(0,0,0,.5);
  padding: .4rem .8rem; border-radius: 999px;
}
@media (max-width: 640px) {
  .lightbox-prev, .lightbox-next { width: 44px; height: 44px; font-size: 1.4rem; }
  .lightbox-close { width: 44px; height: 44px; font-size: 1.4rem; }
}

/* ===== Theme toggle button (kwadratowy) ===== */
.theme-toggle {
  display: inline-grid; place-items: center;
  width: 38px; height: 38px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 1.1rem; line-height: 1;
  margin-left: .5rem;
  transition: background .2s, border-color .2s, color .2s, transform .15s;
}
.theme-toggle:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-1px); }
@media (max-width: 767px) {
  .theme-toggle { margin-left: auto; margin-right: .25rem; }
}

/* ===== Friendlier font on the home page only ===== */
body.page-home {
  font-family: 'Nunito', 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  letter-spacing: .005em;
}
body.page-home h1,
body.page-home h2,
body.page-home h3,
body.page-home h4,
body.page-home .car-name,
body.page-home .logo-text,
body.page-home .logo-mark {
  font-family: 'Nunito', 'Inter', system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: .01em;
  text-transform: none;
}
body.page-home .eyebrow,
body.page-home .hours-card h5,
body.page-home .footer h5,
body.page-home .contact-card h4 {
  font-family: 'Nunito', sans-serif;
  letter-spacing: .18em;
  font-weight: 700;
}
body.page-home .hero h1 { text-transform: none; line-height: 1.1; }

/* ===== Tryb jasny ===== */
html.theme-light {
  --bg: #f5f6fa;
  --surface: #ffffff;
  --surface-2: #eef0f6;
  --border: #d8dce6;
  --text: #16181d;
  --muted: #5b6271;
  --primary: #d62839;
  --primary-glow: #ff5d6a;
  --primary-fg: #ffffff;
  --gradient-primary: linear-gradient(135deg, #ff4757, #c1121f);
  --gradient-dark: linear-gradient(180deg, rgba(255,255,255,.4), rgba(245,246,250,.95));
  --shadow-glow: 0 8px 24px -8px rgba(214,40,57,.35);
  --shadow-card: 0 8px 24px -16px rgba(0,0,0,.18);
}
html.theme-light body { background: var(--bg); color: var(--text); }
html.theme-light .header { background: rgba(255,255,255,.8); }
html.theme-light .header.scrolled { background: rgba(255,255,255,.95); }
html.theme-light .mobile-nav { background: rgba(255,255,255,.98); }
html.theme-light .hero { background-color: #f5f6fa; }
html.theme-light .hero::before {
  background:
    radial-gradient(60% 70% at 75% 30%, rgba(214,40,57,.10), transparent 70%),
    linear-gradient(180deg, rgba(245,246,250,.78) 0%, rgba(245,246,250,.95) 100%);
}
html.theme-light section[style*="background:#0d0d10"] { background: #eef0f6 !important; }
html.theme-light .footer { background: rgba(0,0,0,.04); }
html.theme-light .car-card .photo,
html.theme-light .gallery-main,
html.theme-light .gallery-thumbs img { background: #eef0f6; }
html.theme-light .lightbox { background: rgba(20,22,30,.92); }
html.theme-light .spec-modal { background: rgba(20,22,30,.55); }
html.theme-light .field input,
html.theme-light .field select,
html.theme-light .field textarea { background: #fff; }
html.theme-light .theme-toggle .theme-toggle-icon::before { content: "☀"; }
html.theme-light .theme-toggle .theme-toggle-icon { font-size: 0; }
html.theme-light .theme-toggle .theme-toggle-icon::before { font-size: 1.1rem; }

/* Tryb jasny — karta mapy/lokalizacji i godzin */
html.theme-light .loc-card {
  background: linear-gradient(180deg, #ffffff, #f5f6fa);
  border-color: var(--border);
}
html.theme-light .hours-card { background: #f5f6fa; }
html.theme-light .loc-map { filter: none; }

/* Klikalne karty (oferta, kontakt) */
.card-link {
  display: block;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}
.car-card.card-link:hover { text-decoration: none; }
.car-card { cursor: pointer; }
/* Cursor pointer dla karty tylko na mobile/tablet */
.car-card { cursor: default; }
@media (max-width: 900px) { .car-card { cursor: pointer; } }

/* ===== Filtry oferty ===== */
.offer-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: .8rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem 1.1rem;
  margin: 0 0 1.6rem;
}
.offer-filters .ff { display:flex; flex-direction:column; gap:.35rem; }
.offer-filters .ff label {
  font-size:.72rem; letter-spacing:.12em; text-transform:uppercase;
  color: var(--muted); font-weight:600;
}
.offer-filters .ff input,
.offer-filters .ff select {
  width:100%; padding:.55rem .7rem; border-radius:9px;
  background: var(--surface-2); border:1px solid var(--border);
  color: var(--text); font-size:.92rem; font-family:inherit;
}
.offer-filters .ff input:focus,
.offer-filters .ff select:focus { outline:none; border-color: var(--primary); }
.offer-filters .ff-pair { display:grid; grid-template-columns:1fr 1fr; gap:.4rem; }
.offer-filters .ff-actions { flex-direction:row; align-items:flex-end; gap:.5rem; }
.offer-filters .ff-actions .btn { flex:1; padding:.55rem .8rem; font-size:.85rem; }
html.theme-light .offer-filters .ff input,
html.theme-light .offer-filters .ff select { background:#fff; }
