/* automobili.css — katalog i single automobili za delove */

/* ── PAGE HEADER (dijeli s delovi.css) ───────────────────────────────────── */
.page-header {
  background: var(--boja-pozadina); color: var(--boja-bela);
  padding: 28px 20px 24px;
  border-bottom: 1px solid #2a2d31;
}
.page-header-inner { max-width: var(--max-sirina-nav); margin: 0 auto; }

.breadcrumb {
  font-size: 13px; color: #6a6e74; margin-bottom: 10px;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.breadcrumb a { color: #6a6e74; text-decoration: none; }
.breadcrumb a:hover { color: #C9CDD2; }
.breadcrumb svg { width: 12px; height: 12px; fill: #6a6e74; flex-shrink: 0; }

.page-header h1 {
  font-family: var(--font-naslov);
  font-size: clamp(36px, 6vw, 64px);
  letter-spacing: .02em; margin-bottom: 4px;
}
.page-header .ukupno { color: #8E9297; font-size: 14px; }
.page-header .ukupno b { color: #C9CDD2; }

/* ── LAYOUT ──────────────────────────────────────────────────────────────── */
.katalog-wrap {
  max-width: var(--max-sirina-nav); margin: 0 auto; padding: 28px 20px;
}

/* ── GRID KARTICA ────────────────────────────────────────────────────────── */
.automobili-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

/* ── AUTO KARTICA ────────────────────────────────────────────────────────── */
.auto-kartica {
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  text-decoration: none; color: inherit;
  transition: box-shadow .15s;
}
.auto-kartica:hover { box-shadow: 0 3px 14px rgba(0,0,0,.07); }

.auto-slika {
  aspect-ratio: 4 / 3;
  background: #E8E8E4;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.auto-slika img { width: 100%; height: 100%; object-fit: cover; }
.auto-slika-placeholder {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: #B0B0A8; font-size: 12px; text-align: center; padding: 12px;
  font-family: var(--font-body);
}
.auto-slika-placeholder svg { width: 40px; height: 40px; fill: #C8C8C0; }

.auto-body {
  padding: 12px 4px; flex: 1;
  display: flex; flex-direction: column; gap: 4px;
}
.auto-naziv {
  font-family: var(--font-kondenz);
  font-weight: 700; font-size: 16px;
  line-height: 1.2; letter-spacing: .01em;
}
.auto-opis {
  font-size: 12px; color: var(--boja-dim);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.auto-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: auto; padding-top: 6px;
}
.auto-info-txt { font-size: 12px; color: var(--boja-dim); }
.auto-cta-link {
  font-family: var(--font-body); font-weight: 600; font-size: 12px;
  color: var(--boja-primarna);
}

/* ── CTA BANER ───────────────────────────────────────────────────────────── */
.poziv-baner {
  background: var(--boja-pozadina); color: #fff;
  border-radius: var(--radius); padding: 24px 20px; margin-top: 32px;
  display: grid; gap: 16px; align-items: center;
}
.poziv-baner h3 {
  font-family: var(--font-kondenz); font-size: 22px;
  letter-spacing: .02em; text-transform: uppercase;
}
.poziv-baner p { color: #B9BDC2; font-size: 15px; }

/* ── SINGLE — GALERIJA ───────────────────────────────────────────────────── */
.single-auto-wrap {
  display: grid; gap: 24px;
}

.auto-galerija {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}
.auto-gal-main {
  grid-column: 1 / -1;
}
.auto-gal-item {
  display: block; overflow: hidden;
  border-radius: var(--radius-mali);
  background: #E8E8E4;
  aspect-ratio: 4 / 3;
}
.auto-gal-main { aspect-ratio: 16 / 9; }
.auto-gal-item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .2s;
  display: block;
}
.auto-gal-item:hover img { transform: scale(1.03); }

/* ── SINGLE — INFO ───────────────────────────────────────────────────────── */
.single-auto-opis {
  font-size: 15px; line-height: 1.65;
  color: var(--boja-pozadina);
  margin-bottom: 20px;
}
.single-auto-cta {
  display: flex; gap: 10px; flex-wrap: wrap;
  margin-bottom: 14px;
}
.single-auto-napomena {
  font-size: 13px; color: var(--boja-dim);
  font-style: italic; margin-bottom: 20px;
}
.single-auto-nazad {
  display: inline-block;
  font-size: 14px; font-weight: 600;
  color: var(--boja-dim); text-decoration: none;
}
.single-auto-nazad:hover { color: var(--boja-pozadina); }

/* ── LIGHTBOX ────────────────────────────────────────────────────────────── */
.auto-lightbox {
  border: none; padding: 0;
  background: rgba(0,0,0,.92);
  max-width: 100vw; max-height: 100vh;
  width: 100%; height: 100%;
}
.auto-lightbox:not([open]) { display: none; }
.auto-lightbox[open] { display: flex; align-items: center; justify-content: center; }
.auto-lightbox::backdrop { background: rgba(0,0,0,.92); }
.auto-lightbox img {
  max-width: 94vw; max-height: 90vh;
  object-fit: contain; border-radius: 4px;
}
#auto-lb-close {
  position: fixed; top: 16px; right: 18px;
  background: none; border: none;
  color: #fff; font-size: 32px; line-height: 1;
  cursor: pointer; z-index: 1;
}

/* ── DESKTOP ─────────────────────────────────────────────────────────────── */
@media (min-width: 760px) {
  .automobili-grid { grid-template-columns: repeat(3, 1fr); }
  .single-auto-wrap { grid-template-columns: 1fr 340px; align-items: start; }
  .poziv-baner { grid-template-columns: 1fr auto; }
}
@media (min-width: 1024px) {
  .automobili-grid { grid-template-columns: repeat(4, 1fr); }
  .single-auto-wrap { grid-template-columns: 1fr 380px; }
}
