:root {
  --bg: #05070d;
  --bg-2: #0a0f1c;
  --blue: #2f7bff;
  --blue-glow: rgba(47, 123, 255, 0.55);
  --text: #eef2fa;
  --muted: #a9b4c8;
  --line: rgba(255, 255, 255, 0.14);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  font-family: "Poppins", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
.blue { color: var(--blue); }
em { font-style: italic; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 26px; border-radius: 40px; font-weight: 600;
  transition: .25s; cursor: pointer;
}
.btn-outline {
  border: 1.5px solid var(--blue);
  background: rgba(10, 20, 45, .6);
  box-shadow: 0 0 18px rgba(47, 123, 255, .25), inset 0 0 12px rgba(47, 123, 255, .12);
}
.btn-outline:hover { background: var(--blue); box-shadow: 0 0 28px var(--blue-glow); }
.btn-lg { padding: 16px 36px; font-size: 1.05rem; }
.arrow { font-size: 1.6rem; line-height: 1; color: var(--blue); }
.btn:hover .arrow { color: #fff; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 14px 5%;
  background: linear-gradient(180deg, rgba(5,7,13,.96), rgba(5,7,13,.8));
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.logo { display: flex; flex-direction: column; line-height: 1; }
.logo-name {
  font-style: italic; font-weight: 700; font-size: 1.5rem; letter-spacing: 1px;
  background: linear-gradient(180deg, #fff, #8d97aa);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.logo-name strong { font-weight: 800; }
.logo-tag { font-size: .6rem; letter-spacing: 3px; color: var(--muted); margin-top: 4px; text-transform: uppercase; }

.nav { display: flex; gap: 34px; }
.nav a { font-size: .95rem; font-weight: 500; padding: 8px 0; border-bottom: 2px solid transparent; transition: .2s; }
.nav a:hover, .nav a.active { border-color: var(--blue); color: #fff; }
.btn-call { padding: 10px 22px; font-size: .9rem; }
.menu-toggle { display: none; background: none; border: 0; color: #fff; font-size: 1.8rem; cursor: pointer; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: clamp(560px, 46vw, 880px);
  display: flex; align-items: center; padding: 60px 5%;
  background:
    linear-gradient(90deg, rgba(5,7,13,.92) 0%, rgba(5,7,13,.55) 40%, rgba(5,7,13,0) 70%),
    url("images/hero-bg.png") center 75% / cover no-repeat,
    #05070d;
}
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 120px;
  background: linear-gradient(180deg, transparent, var(--bg));
}
.hero-content { position: relative; z-index: 2; max-width: 560px; }
.hero h1 { font-size: clamp(2rem, 4.4vw, 3.4rem); line-height: 1.15; font-weight: 700; margin-bottom: 18px; }
.hero h1 .blue { font-style: italic; text-shadow: 0 0 24px var(--blue-glow); }
.hero-sub { font-style: italic; color: #dde4f2; font-size: 1.1rem; margin-bottom: 32px; }

/* ---------- Features ---------- */
.features {
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: linear-gradient(180deg, #080c17, #0b1224);
  border-top: 1px solid rgba(47,123,255,.4);
  border-bottom: 1px solid rgba(47,123,255,.4);
  box-shadow: 0 0 30px rgba(47,123,255,.15);
}
.feature {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  padding: 26px 12px; color: #cfd8e8; font-size: .95rem; line-height: 1.3;
  border-right: 1px solid var(--line);
}
.feature:last-child { border-right: 0; }
.feature svg { color: #cfd8e8; flex-shrink: 0; }

/* ---------- Section titles ---------- */
.section-title { text-align: center; font-size: clamp(1.8rem, 3.5vw, 2.8rem); font-weight: 700; font-style: italic; }
.section-title span {
  display: inline-block; position: relative; padding: 0 28px;
  background: linear-gradient(180deg, #fff, #98a3b8); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.section-title em.blue { -webkit-text-fill-color: var(--blue); }
.section-sub { text-align: center; font-style: italic; color: #dbe2f0; margin-bottom: 34px; }

/* ---------- Cars ---------- */
.cars { padding: 60px 5% 50px; background: radial-gradient(ellipse at 50% 0%, #0c1530, var(--bg) 70%); }
.carousel { position: relative; max-width: 1300px; margin: 0 auto; padding: 0 28px; }
.car-track {
  display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; padding: 6px 2px 10px;
}
.car-track::-webkit-scrollbar { display: none; }

.car-card {
  flex: 0 0 calc((100% - 64px) / 5);
  min-width: 210px; scroll-snap-align: start;
  background: #0a0e18; border: 1px solid rgba(255,255,255,.28); border-radius: 10px; overflow: hidden;
  transition: .3s;
}
.car-card:hover { transform: translateY(-6px); border-color: var(--blue); box-shadow: 0 10px 30px rgba(47,123,255,.3); }
.car-img {
  aspect-ratio: 4 / 3; width: 100%; object-fit: cover; display: block;
  background: linear-gradient(135deg, #111a33, #05070d);
}
.car-body { padding: 14px 10px 16px; text-align: center; }
.car-body h3 { font-size: .95rem; font-weight: 600; margin-bottom: 4px; }
.car-meta { font-size: .8rem; color: var(--muted); }
.car-km { font-size: .8rem; color: var(--muted); margin: 6px 0 10px; }
.price {
  display: inline-block; padding: 5px 20px; border-radius: 20px; font-weight: 700; font-size: .9rem;
  background: linear-gradient(180deg, #2f7bff, #1445a8); box-shadow: 0 0 14px var(--blue-glow);
}
.car-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 36px; height: 36px; border-radius: 50%; cursor: pointer;
  border: 1.5px solid var(--blue); background: rgba(5,7,13,.9); color: #fff; font-size: 1.4rem; line-height: 1;
  transition: .2s;
}
.car-arrow:hover { background: var(--blue); }
.car-arrow.prev { left: -6px; }
.car-arrow.next { right: -6px; }
.dots { display: flex; justify-content: center; gap: 8px; margin-top: 18px; }
.dots button { width: 10px; height: 10px; border-radius: 50%; border: 0; background: #4a5368; cursor: pointer; transition: .2s; }
.dots button.on { background: var(--blue); box-shadow: 0 0 10px var(--blue-glow); }

/* ---------- About ---------- */
.about { padding: 60px 5%; text-align: center; background: var(--bg-2); }
.about p { max-width: 760px; margin: 22px auto 0; color: var(--muted); font-size: 1.05rem; }

/* ---------- Contact ---------- */
.contact {
  display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 30px;
  padding: 50px 6%;
  background: radial-gradient(ellipse at 85% 50%, rgba(47,123,255,.22), transparent 55%), linear-gradient(90deg, #0a0f1c, #05070d);
  border-top: 1px solid rgba(47,123,255,.4);
}
.contact-info { display: flex; flex-direction: column; gap: 22px; }
.contact-row { display: flex; align-items: center; gap: 22px; }
.contact-label { font-size: 1.3rem; font-weight: 600; }
.contact-phone { font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; letter-spacing: 1px; }
.contact-phone:hover { color: var(--blue); }
.contact-place { font-size: 1.9rem; }
.contact-script { text-align: center; transform: rotate(-6deg); }
.script-1, .script-2 { display: block; font-family: "Great Vibes", cursive; color: #e6ecf8; }
.script-1 { font-size: clamp(2.6rem, 5vw, 4.2rem); line-height: 1; }
.script-2 { font-size: clamp(1.8rem, 3.4vw, 2.8rem); color: #cbd6ee; border-bottom: 3px solid var(--blue); display: inline-block; padding-bottom: 4px; }

/* ---------- Footer ---------- */
.footer {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px;
  padding: 26px 6%; background: #03050a; border-top: 1px solid var(--line);
}
.socials { display: flex; gap: 22px; align-items: center; }
.socials a:hover { color: var(--blue); }
.footer-checks { display: flex; gap: 28px; flex-wrap: wrap; font-size: .95rem; }
.footer-checks span { color: #dbe2f0; }
.footer-checks span::first-letter { color: var(--blue); }
.footer-copy { width: 100%; text-align: center; font-size: .78rem; color: #6c778c; margin-top: 6px; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .car-card { flex-basis: calc((100% - 32px) / 3); }
  .features { grid-template-columns: repeat(2, 1fr); }
  .feature:nth-child(2) { border-right: 0; }
  .feature:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 860px) {
  .hero {
    background:
      linear-gradient(180deg, rgba(5,7,13,.88), rgba(5,7,13,.55)),
      url("images/hero-bg.png") center / cover no-repeat,
      #05070d;
  }
  .menu-toggle { display: block; }
  .btn-call { display: none; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0;
    background: rgba(5,7,13,.98); border-bottom: 1px solid var(--line);
    max-height: 0; overflow: hidden; transition: max-height .3s;
  }
  .nav.open { max-height: 320px; }
  .nav a { padding: 14px 5%; border-bottom: 1px solid var(--line); }
  .contact { grid-template-columns: 1fr; }
    .contact-script { transform: none; }
}
@media (max-width: 560px) {
  .car-card { flex-basis: 78%; }
  .carousel { padding: 0 6px; }
  .car-arrow { display: none; }
  .footer { justify-content: center; text-align: center; }
  .footer-checks { justify-content: center; gap: 14px; }
  .hero { min-height: 70vh; }
}
 /* ---------- Filtrat e makinave ---------- */
.filters { max-width: 1100px; margin: 0 auto 28px; display: flex; flex-direction: column; gap: 12px; }
.filter-group { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; }
.filter-title { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 1.5px; min-width: 110px; text-align: right; margin-right: 6px; }
.filter-btn {
  padding: 7px 18px; border-radius: 30px; cursor: pointer;
  border: 1.5px solid rgba(47,123,255,.5); background: rgba(10,20,45,.6);
  color: var(--text); font: inherit; font-size: .85rem; transition: .2s;
}
.filter-btn:hover { border-color: var(--blue); }
.filter-btn.on { background: var(--blue); border-color: var(--blue); box-shadow: 0 0 14px var(--blue-glow); }
.car-tags { font-size: .72rem; color: var(--blue); letter-spacing: .5px; margin-bottom: 4px; }
@media (max-width: 560px) {
  .filter-title { min-width: 100%; text-align: center; margin: 0; }
}
/* ---------- Supabase: mesazhe, status, dritarja e detajeve ---------- */
.car-msg { width: 100%; text-align: center; color: var(--muted); padding: 40px 0; font-style: italic; }
.car-card { cursor: pointer; text-align: inherit; }
.car-card:focus-visible { outline: 2px solid var(--blue); }
.tag-status { display: inline-block; margin-left: 6px; padding: 1px 9px; border-radius: 20px; font-size: .68rem; background: #1b2a4f; color: #9cc0ff; vertical-align: middle; }
dialog { width: min(860px, 94vw); max-height: 92vh; overflow: auto; margin: auto; padding: 0; color: var(--text); background: var(--bg-2); border: 1px solid var(--blue); border-radius: 16px; }
dialog::backdrop { background: rgba(0,0,0,.78); }
.dlg-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; }
.dlg-head h2 { font-size: 1.3rem; }
.dlg-x { background: none; border: 0; color: var(--text); font-size: 2rem; line-height: 1; cursor: pointer; }
.dlg-main { width: 100%; max-height: 440px; object-fit: cover; display: block; }
.dlg-thumbs { display: flex; gap: 6px; padding: 8px 20px; overflow-x: auto; }
.dlg-thumbs img { height: 56px; border-radius: 6px; cursor: pointer; opacity: .65; }
.dlg-thumbs img:hover { opacity: 1; }
.dlg-body { padding: 6px 20px 22px; }
.dlg-price { margin: 8px 0; }
.dlg-specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin: 14px 0; }
.dlg-specs div { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px; }
.dlg-specs small { display: block; color: var(--muted); }
.dlg-desc { white-space: pre-line; color: var(--muted); }
.dlg-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

/* ---------- Butoni i filtrave + paneli anësor ---------- */
.cars-layout { max-width: 1300px; margin: 0 auto; }
.cars-main { min-width: 0; }
.carousel { max-width: none; }
.cars-main .car-card { flex-basis: calc((100% - 64px) / 5); }

.filters { max-width: none; margin: 0 0 18px; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 14px; }
.filter-toggle {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px; border-radius: 30px; cursor: pointer;
  font: inherit; font-weight: 600; font-size: .9rem; color: var(--text);
  border: 1.5px solid var(--blue); background: rgba(10,20,45,.6); box-shadow: 0 0 14px rgba(47,123,255,.25); transition: .2s;
}
.filter-toggle:hover { background: var(--blue); }
.filter-toggle b { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--blue); font-size: .75rem; }
.filter-toggle:hover b { background: #fff; color: var(--blue); }
.filter-count { color: var(--muted); font-size: .85rem; }
.filter-clear { background: none; border: 0; color: #9cc0ff; font: inherit; font-size: .85rem; cursor: pointer; text-decoration: underline; }

#fdlg { width: min(400px, 92vw); height: 100dvh; max-height: 100dvh; margin: 0 auto 0 0; border-radius: 0 16px 16px 0; border-left: 0; }
#fdlg[open] { display: flex; flex-direction: column; animation: drawer .22s ease-out; }
@keyframes drawer { from { transform: translateX(-24px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { #fdlg[open] { animation: none; } }
.fbody { flex: 1; overflow-y: auto; padding: 4px 20px 16px; }
.ffoot { display: flex; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--bg-2); }
.fgroup { margin-bottom: 18px; }
#fdlg .filter-title { display: block; min-width: 0; text-align: left; margin: 0 0 8px; }
.fopts { display: flex; flex-wrap: wrap; gap: 8px; }
.frange { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.finput {
  width: 100%; padding: 9px 12px; border-radius: 10px; font: inherit; font-size: .9rem; color: var(--text);
  border: 1.5px solid rgba(47,123,255,.4); background: var(--bg);
}
.finput:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47,123,255,.25); }

@media (max-width: 1000px) { .cars-main .car-card { flex-basis: calc((100% - 32px) / 3); } }
@media (max-width: 560px) { .cars-main .car-card { flex-basis: 78%; } }