/* ============================================
   MOJMOTOR.SI — Motorcycle Marketplace
   Premium Dark Theme Stylesheet
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* --- CSS Custom Properties --- */
:root {
  --bg-primary: #0d0d14;
  --bg-secondary: #13131f;
  --bg-card: rgba(25, 25, 45, 0.7);
  --bg-card-hover: rgba(35, 35, 60, 0.85);
  --bg-glass: rgba(255, 255, 255, 0.04);
  --bg-glass-hover: rgba(255, 255, 255, 0.08);
  --bg-input: rgba(255, 255, 255, 0.06);
  --bg-input-focus: rgba(255, 255, 255, 0.1);

  --accent-red: #e94560;
  --accent-red-glow: rgba(233, 69, 96, 0.3);
  --accent-orange: #ff6b35;
  --accent-gradient: linear-gradient(135deg, #e94560, #ff6b35);
  --accent-gradient-reverse: linear-gradient(135deg, #ff6b35, #e94560);

  --text-primary: #f0f0f5;
  --text-secondary: rgba(240, 240, 245, 0.65);
  --text-muted: rgba(240, 240, 245, 0.4);

  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);
  --border-accent: rgba(233, 69, 96, 0.3);

  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.3);
  --shadow-card-hover: 0 12px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px rgba(233, 69, 96, 0.15);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;

  --header-height: 72px;
  --sidebar-width: 320px;
  --banner-h: 36px;
}

body.banner-off { --banner-h: 0px; }
/* Instant hide before JS loads — prevents flash on pages where banner was dismissed */
html.no-banner { --banner-h: 0px; }
html.no-banner .dev-banner { transition: none !important; }

/* ========== DEV BANNER ========== */
.dev-banner {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--banner-h);
  overflow: hidden;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .72rem;
  font-weight: 400;
  letter-spacing: .01em;
  z-index: 1001;
  transition: height .3s ease;
}
.dev-banner-badge {
  display: inline-block;
  background: var(--accent-red);
  color: #fff;
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .08em;
  padding: .15rem .4rem;
  border-radius: 3px;
  margin-right: .35rem;
  vertical-align: middle;
}
.dev-banner-inner {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 3rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dev-banner a {
  color: var(--text-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
  opacity: 0.8;
}
.dev-banner-close {
  position: absolute;
  right: .75rem;
  background: none;
  border: none;
  color: rgba(255,255,255,.75);
  font-size: .9rem;
  cursor: pointer;
  padding: 4px 6px;
  line-height: 1;
}
.dev-banner-close:hover { color: #fff; }
.banner-txt-short { display: none; }
@media (max-width: 540px) {
  .banner-txt-long  { display: none; }
  .banner-txt-short { display: inline; }
  .dev-banner-inner { font-size: .72rem; gap: .25rem; }
}

/* ========== REPORT MODAL ========== */
.report-modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 2rem 1.75rem;
  width: 100%;
  max-width: 420px;
  position: relative;
  text-align: center;
}
.report-modal-icon { font-size: 2.5rem; margin-bottom: .5rem; }
.report-modal-title { font-size: 1.1rem; font-weight: 700; margin-bottom: .4rem; }
.report-modal-sub { font-size: .82rem; color: var(--text3); margin-bottom: 1.25rem; line-height: 1.5; }
.report-select, .report-textarea {
  width: 100%;
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text-primary);
  padding: .65rem .9rem;
  font-size: .88rem;
  font-family: inherit;
  margin-bottom: .75rem;
  display: block;
}
.report-textarea { resize: vertical; min-height: 72px; }
.report-submit-btn {
  width: 100%;
  padding: .75rem;
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .2s;
}
.report-submit-btn:hover { opacity: .85; }
.share-btn.report-btn {
  margin-left: auto;
  background: rgba(220,38,38,.1);
  border-color: rgba(220,38,38,.3);
  color: #f87171;
}
.share-btn.report-btn:hover { background: rgba(220,38,38,.2); }

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  color: inherit;
}

select,
input {
  font-family: inherit;
  color: var(--text-primary);
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ============================================
   HEADER
   ============================================ */
.header {
  position: fixed;
  top: var(--banner-h);
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(13, 13, 20, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 1000;
  display: flex;
  align-items: center;
  padding: 0 2rem;
  /* GPU compositing hint */
  will-change: transform;
}

.header-inner {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.logo-icon {
  font-size: 1.8rem;
}

.logo-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-dot {
  color: var(--text-muted);
  font-weight: 400;
  -webkit-text-fill-color: initial;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  position: relative;
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-glass-hover);
}

.nav-link.active {
  color: var(--accent-red);
}

/* Dogodki nav link — distinct from marketplace links */
.nav-link-dogodki {
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.2);
  border-radius: var(--radius-sm);
}
.nav-link-dogodki:hover {
  color: #6ee7b7;
  background: rgba(52, 211, 153, 0.08);
  border-color: rgba(52, 211, 153, 0.35);
}
.nav-link-dogodki.active {
  color: #6ee7b7;
  background: rgba(52, 211, 153, 0.12);
  border-color: rgba(52, 211, 153, 0.4);
}
.nav-link-promet {
  color: #60a5fa;
  border: 1px solid rgba(96, 165, 250, 0.2);
  border-radius: var(--radius-sm);
}
.nav-link-promet:hover {
  color: #93c5fd;
  background: rgba(96, 165, 250, 0.08);
  border-color: rgba(96, 165, 250, 0.35);
}
.nav-link-promet.active {
  color: #93c5fd;
  background: rgba(96, 165, 250, 0.12);
  border-color: rgba(96, 165, 250, 0.4);
}

/* Dogodki section header */
.dogodki-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 0 1.25rem; gap: 1rem; flex-wrap: wrap;
}
.dogodki-title {
  font-size: 1.3rem; font-weight: 700; color: var(--text-primary); margin-bottom: 0.2rem;
}
.dogodki-subtitle {
  font-size: 0.85rem; color: var(--text-secondary);
}
.dogodki-add-btn {
  flex-shrink: 0; background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.35) !important;
  color: #34d399 !important;
}
.dogodki-add-btn:hover {
  background: rgba(52, 211, 153, 0.2) !important;
}

.nav-cta {
  padding: 0.5rem 1.25rem;
  background: var(--accent-gradient);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  color: white;
  transition: all var(--transition-fast);
  margin-left: 0.5rem;
}

.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow);
}

/* Nav search */
.nav-search-form {
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin: 0 0.25rem;
  transition: border-color var(--transition-fast);
}

.nav-search-form:focus-within {
  border-color: var(--accent-red);
}

.nav-search-input {
  background: transparent;
  border: none;
  outline: none;
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
  color: var(--text-primary);
  width: 140px;
  font-family: inherit;
}

.nav-search-input::placeholder {
  color: var(--text-secondary);
}

.nav-search-btn {
  background: transparent;
  border: none;
  padding: 0.4rem 0.6rem;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: color var(--transition-fast);
}

.nav-search-btn:hover {
  color: var(--accent-red);
}

/* Token display */
.token-display {
  font-family: monospace;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  background: var(--bg-input);
  border: 2px solid var(--accent-red, #e94560);
  border-radius: var(--radius-sm);
  padding: 0.875rem 1rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
  word-break: break-all;
}

.token-copy-btn {
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.token-copy-btn:hover {
  background: var(--bg-glass-hover);
}

.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0.5rem;
}

.mobile-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition-fast);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  position: relative;
  height: 520px;
  margin-top: calc(var(--header-height) + var(--banner-h));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.3) saturate(0.8);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
      rgba(13, 13, 20, 0.4) 0%,
      rgba(13, 13, 20, 0.6) 50%,
      rgba(13, 13, 20, 1) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 2rem;
  animation: fadeInUp 0.8s ease;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  backdrop-filter: blur(10px);
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  animation: pulse 2s infinite;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 1rem;
}

.hero h1 .highlight {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}


/* ============================================
   MAIN LAYOUT
   ============================================ */
.main-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 2rem;
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  gap: 2rem;
  min-height: 60vh;
}
.main-container.no-sidebar {
  grid-template-columns: 1fr;
}

/* ============================================
   FILTER SIDEBAR
   ============================================ */
.filter-sidebar {
  position: sticky;
  top: calc(var(--header-height) + var(--banner-h) + 2rem);
  height: fit-content;
  max-height: calc(100vh - var(--header-height) - 4rem);
  overflow-y: auto;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.filter-sidebar::-webkit-scrollbar {
  width: 4px;
}

.filter-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
}

.filter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.filter-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-reset {
  font-size: 0.8rem;
  color: var(--accent-red);
  cursor: pointer;
  transition: opacity var(--transition-fast);
  background: none;
  border: none;
  font-weight: 500;
}

.filter-reset:hover {
  opacity: 0.8;
}

.filter-group {
  margin-bottom: 1.25rem;
}

.filter-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.filter-group select,
.filter-group input[type="number"] {
  width: 100%;
  padding: 0.625rem 0.875rem;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--text-primary);
  transition: all var(--transition-fast);
  appearance: none;
  -webkit-appearance: none;
}

.filter-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
}

.filter-group select:focus,
.filter-group input[type="number"]:focus {
  outline: none;
  border-color: var(--accent-red);
  background: var(--bg-input-focus);
  box-shadow: 0 0 0 3px var(--accent-red-glow);
}

.filter-group select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.filter-range {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.filter-range input::placeholder {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.filter-btn {
  width: 100%;
  padding: 0.875rem;
  background: var(--accent-gradient);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 700;
  color: white;
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.filter-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.filter-btn:active {
  transform: translateY(0);
}

/* ============================================
   LOAD MORE
   ============================================ */
.load-more-wrap {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  padding: 1.5rem 0 0.5rem;
}

.load-more-btn {
  padding: 0.75rem 2rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.load-more-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(99, 102, 241, 0.06);
}

.load-more-count {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* ============================================
   LISTINGS AREA
   ============================================ */
.listings-area {
  min-width: 0;
}

.listings-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.listings-count {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.listings-count strong {
  color: var(--text-primary);
  font-weight: 700;
}

.listings-sort {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.listings-sort label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.listings-sort select {
  padding: 0.5rem 2rem 0.5rem 0.75rem;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--text-primary);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  cursor: pointer;
}

.listings-sort select:focus {
  outline: none;
  border-color: var(--accent-red);
}

.listings-sort select option {
  background: var(--bg-secondary);
}

.view-toggles {
  display: flex;
  gap: 0.25rem;
}

.view-toggle {
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.view-toggle:hover,
.view-toggle.active {
  color: var(--text-primary);
  background: var(--bg-glass-hover);
}

.view-toggle.active {
  color: var(--accent-red);
}

/* ============================================
   LISTING CARDS — GRID
   ============================================ */
.listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.listing-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-normal);
  cursor: pointer;
  position: relative;
  backdrop-filter: blur(10px);
  content-visibility: auto;
  contain-intrinsic-size: 0 380px;
}

.listing-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-card-hover);
}

.listing-card:hover .listing-image img {
  transform: scale(1.05);
}

.listing-image {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: var(--bg-secondary);
}

.listing-image > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

/* ========== CARD THUMBNAIL (blurred bg + contain) ========== */
.card-thumb-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--bg-secondary);
  background-size: cover;
  background-position: center;
}
.card-thumb-wrap .card-bg {
  position: absolute;
  inset: -15%;
  background-image: inherit;
  background-size: cover;
  background-position: center;
  filter: blur(16px);
}
.card-thumb-wrap img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: transform var(--transition-slow);
}

.listing-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  z-index: 2;
}

.listing-badge.new {
  background: var(--accent-gradient);
  color: white;
}

.listing-badge.top {
  background: rgba(250, 204, 21, 0.2);
  color: #facc15;
  border: 1px solid rgba(250, 204, 21, 0.3);
}

.listing-photo-count {
  position: absolute;
  bottom: 0.6rem;
  right: 0.6rem;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 0.7rem;
  padding: 2px 7px;
  border-radius: 20px;
  z-index: 2;
  backdrop-filter: blur(4px);
}

.listing-favorite {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  border-radius: 50%;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  z-index: 2;
  font-size: 1rem;
}

.listing-favorite:hover {
  background: var(--accent-red);
  transform: scale(1.1);
}

.listing-favorite.favorited {
  background: var(--accent-red);
}

.listing-body {
  padding: 1.125rem;
}

.listing-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.listing-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.875rem;
}

.listing-spec {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
  padding: 0.25rem 0.5rem;
  background: var(--bg-glass);
  border-radius: var(--radius-sm);
}

.listing-spec-icon {
  font-size: 0.8rem;
  opacity: 0.7;
}

.listing-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-subtle);
}

.listing-price {
  font-size: 1.25rem;
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.listing-location {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.listing-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.listing-views {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
  opacity: 0.8;
}

/* ============================================
   LISTING CARDS — LIST VIEW
   ============================================ */
.listings-grid.list-view {
  grid-template-columns: 1fr;
}

.listings-grid.list-view .listing-card {
  display: grid;
  grid-template-columns: 300px 1fr;
}

.listings-grid.list-view .listing-image {
  height: 100%;
  min-height: 180px;
}

.listings-grid.list-view .listing-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ============================================
   NO RESULTS
   ============================================ */
.no-results {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-secondary);
}

.no-results-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.no-results h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.no-results p {
  font-size: 0.9rem;
  max-width: 360px;
  margin: 0 auto;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  margin-top: 4rem;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
}

.footer-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 3rem 2rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
}

.footer-brand {
  max-width: 300px;
}

.footer-brand .logo {
  margin-bottom: 1rem;
}

.footer-brand p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.7;
}


.footer-col h4 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 0.5rem;
}

.footer-col a {
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.footer-col a:hover {
  color: var(--accent-red);
}

.footer-bottom {
  max-width: 1440px;
  margin: 0 auto;
  padding: 1.5rem 2rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ============================================
   SKELETON LOADER
   ============================================ */
@keyframes shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position: 600px 0; }
}

.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-card) 25%,
    var(--bg-secondary) 50%,
    var(--bg-card) 75%
  );
  background-size: 1200px 100%;
  animation: shimmer 1.5s infinite linear;
  border-radius: 4px;
}

.skeleton-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  pointer-events: none;
}

.skeleton-img {
  height: 200px;
  width: 100%;
}

.skeleton-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.skeleton-title  { height: 1rem;   width: 68%; }
.skeleton-sub    { height: 0.8rem; width: 42%; }
.skeleton-price  { height: 1.3rem; width: 32%; margin-top: 0.25rem; }
.skeleton-meta   { height: 0.75rem; width: 55%; }

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Card entrance stagger — desktop only */
@media (min-width: 769px) {
  .listing-card {
    animation: fadeInUp 0.5s ease backwards;
  }
}

.listing-card:nth-child(1) {
  animation-delay: 0.05s;
}

.listing-card:nth-child(2) {
  animation-delay: 0.1s;
}

.listing-card:nth-child(3) {
  animation-delay: 0.15s;
}

.listing-card:nth-child(4) {
  animation-delay: 0.2s;
}

.listing-card:nth-child(5) {
  animation-delay: 0.25s;
}

.listing-card:nth-child(6) {
  animation-delay: 0.3s;
}

.listing-card:nth-child(7) {
  animation-delay: 0.35s;
}

.listing-card:nth-child(8) {
  animation-delay: 0.4s;
}

.listing-card:nth-child(9) {
  animation-delay: 0.45s;
}

/* ============================================
   MOBILE FILTER TOGGLE
   ============================================ */
.mobile-filter-btn {
  display: none;
  width: 100%;
  padding: 0.875rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .main-container {
    grid-template-columns: 1fr;
  }

  .filter-sidebar {
    position: static;
    max-height: none;
    display: none;
  }

  .filter-sidebar.open {
    display: block;
  }

  .mobile-filter-btn {
    display: flex;
  }

  .listings-grid.list-view .listing-card {
    grid-template-columns: 200px 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .header {
    padding: 0 1rem;
    /* Remove blur on mobile — main cause of scroll jank */
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(13, 13, 20, 0.98);
  }

  .nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: rgba(13, 13, 20, 0.98);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: 1px solid var(--border-subtle);
    flex-direction: column;
    padding: 1rem;
    gap: 0.25rem;
  }

  .nav.open {
    display: flex;
  }

  .nav-link,
  .nav-cta {
    width: 100%;
    text-align: center;
  }

  .nav-cta {
    margin-left: 0;
    margin-top: 0.5rem;
  }

  .nav-search-form {
    width: 100%;
  }

  .nav-search-input {
    width: 100%;
  }

  .mobile-toggle {
    display: flex;
  }

  .hero {
    height: 420px;
  }

  .hero h1 {
    font-size: 2.25rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .hero-stats {
    gap: 1.5rem;
  }

  .hero-stat-value {
    font-size: 1.25rem;
  }

  .main-container {
    padding: 1rem;
  }

  .listings-grid {
    grid-template-columns: 1fr;
  }

  .listings-grid.list-view .listing-card {
    grid-template-columns: 1fr;
  }

  .listings-grid.list-view .listing-image {
    height: 200px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .section-tab {
    padding: 0.6rem 0.7rem;
    font-size: 0.78rem;
  }

  .hero {
    height: 380px;
  }

  .hero h1 {
    font-size: 1.75rem;
  }

  .hero-stats {
    flex-direction: column;
    gap: 1rem;
  }

  .listing-image {
    height: 180px;
  }
}

/* ============================================
   MODAL OVERLAY
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal-container {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: fadeInUp 0.4s ease;
  width: 100%;
}

.modal-container::-webkit-scrollbar {
  width: 6px;
}

.modal-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
}

.modal-close {
  position: sticky;
  top: 1rem;
  float: right;
  margin-right: 1rem;
  margin-top: 1rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  font-size: 1.1rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  z-index: 10;
}

.modal-close:hover {
  background: var(--accent-red);
  color: white;
  border-color: var(--accent-red);
}

/* ============================================
   DETAIL MODAL
   ============================================ */
.detail-modal-container {
  max-width: 900px;
}

.detail-hero {
  position: relative;
  width: 100%;
  height: 380px;
  overflow: hidden;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.detail-hero > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(to top, var(--bg-secondary) 0%, transparent 100%);
}

.detail-hero .listing-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
}

.detail-body {
  padding: 0 2rem 2rem;
  margin-top: -2rem;
  position: relative;
  z-index: 1;
}

.detail-title {
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
}

.detail-subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.detail-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.detail-price {
  font-size: 2.25rem;
  font-weight: 900;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.detail-actions {
  display: flex;
  gap: 0.5rem;
}

.detail-action-btn {
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.detail-action-btn.primary {
  background: var(--accent-gradient);
  color: white;
  border: none;
}

.detail-action-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.detail-action-btn.secondary {
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

.detail-action-btn.secondary:hover {
  background: var(--bg-glass-hover);
  border-color: var(--border-hover);
}

.detail-action-btn.delete-btn {
  background: rgba(233, 69, 96, 0.1);
  border: 1px solid rgba(233, 69, 96, 0.3);
  color: #e94560;
}

.detail-action-btn.delete-btn:hover {
  background: #e94560;
  color: white;
  border-color: #e94560;
}

/* Mobile-only contact buttons — hidden on desktop */
.detail-action-btn.mobile-only { display: none !important; }
@media (max-width: 768px) {
  .detail-action-btn.mobile-only { display: inline-flex !important; }
}

.detail-action-btn.owner-edit {
  background: rgba(99, 179, 237, 0.1);
  border: 1px solid rgba(99, 179, 237, 0.35);
  color: #63b3ed;
}
.detail-action-btn.owner-edit:hover {
  background: #63b3ed;
  color: #0d0d1a;
  border-color: #63b3ed;
}
.detail-action-btn.owner-delete {
  background: rgba(233, 69, 96, 0.1);
  border: 1px solid rgba(233, 69, 96, 0.3);
  color: #e94560;
}
.detail-action-btn.owner-delete:hover {
  background: #e94560;
  color: white;
  border-color: #e94560;
}
.detail-action-btn.owner-sold {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #4ade80;
}
.detail-action-btn.owner-sold:hover {
  background: rgba(34, 197, 94, 0.25);
}

/* ========== PRODANO BADGE ========== */
.sold-badge {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) rotate(-12deg);
  background: rgba(220, 38, 38, 0.88);
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  padding: 0.3rem 0.85rem;
  border-radius: 5px;
  border: 2px solid rgba(255,255,255,0.7);
  pointer-events: none;
  z-index: 10;
  box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}
.detail-sold-banner {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) rotate(-12deg);
  background: rgba(220, 38, 38, 0.88);
  color: #fff;
  font-weight: 900;
  font-size: 2.2rem;
  letter-spacing: 0.15em;
  padding: 0.5rem 2rem;
  border-radius: 8px;
  border: 3px solid rgba(255,255,255,0.8);
  z-index: 20;
  pointer-events: none;
  box-shadow: 0 4px 20px rgba(0,0,0,0.6);
}

/* ========== SHARE ROW ========== */
.share-row {
  display: flex;
  gap: 0.5rem;
  margin: 0.75rem 0 1.25rem;
  flex-wrap: wrap;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-secondary);
  transition: background var(--transition-fast), color var(--transition-fast);
}
.share-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.share-btn.whatsapp { border-color: rgba(37,211,102,0.3); color: #25d366; }
.share-btn.whatsapp:hover { background: #25d366; color: #fff; }
.share-btn.facebook { border-color: rgba(24,119,242,0.3); color: #1877f2; }
.share-btn.facebook:hover { background: #1877f2; color: #fff; }

/* User Edit Modal */
.user-edit-modal-container {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: fadeInUp 0.35s ease;
  width: 100%;
  max-width: 680px;
  padding: 2rem;
}
.user-edit-modal-container h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}
.user-edit-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  font-size: 1rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.user-edit-close:hover { background: #e94560; color: white; border-color: #e94560; }
.ue-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.ue-group { display: flex; flex-direction: column; gap: 0.3rem; }
.ue-group.full { grid-column: 1 / -1; }
.ue-group label { font-size: 0.8rem; color: var(--text-secondary); font-weight: 500; }
.ue-group input,
.ue-group select,
.ue-group textarea {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.75rem;
  color: var(--text-primary);
  font-size: 0.9rem;
  width: 100%;
}
.ue-group textarea { resize: vertical; min-height: 80px; }
.ue-group select option { background: var(--bg-secondary); }
.ue-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
}
.ue-btn-cancel {
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}
.ue-btn-cancel:hover { background: rgba(255,255,255,0.07); }
.ue-btn-save {
  padding: 0.6rem 1.5rem;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--accent-red);
  color: white;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}
.ue-btn-save:hover { background: #c73652; }

/* Specs Grid */
.detail-specs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.detail-spec-card {
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: center;
  transition: all var(--transition-fast);
}

.detail-spec-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-glass-hover);
}

.detail-spec-icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.detail-spec-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.25rem;
}

.detail-spec-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* Description */
.detail-description {
  margin-bottom: 2rem;
}

.detail-description h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.detail-description p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

/* Seller Card */
.detail-seller {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.detail-seller h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.seller-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.seller-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  color: white;
  flex-shrink: 0;
}

.seller-details {
  flex: 1;
}

.seller-name {
  font-size: 1.05rem;
  font-weight: 700;
}

.seller-type {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

.seller-contact {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.seller-contact-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--text-primary);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.seller-contact-item:hover {
  border-color: var(--accent-red);
  background: var(--bg-glass-hover);
}

.seller-contact-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.seller-member-since {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 1rem;
  text-align: center;
}

/* ============================================
   ADD LISTING MODAL
   ============================================ */
.add-modal-container {
  max-width: 780px;
}

.add-modal-content {
  padding: 2rem;
}

.modal-title {
  font-size: 1.75rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.modal-subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.form-section {
  margin-bottom: 2rem;
}

.form-section h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-group select,
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.625rem 0.875rem;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--text-primary);
  font-family: inherit;
  transition: all var(--transition-fast);
  appearance: none;
  -webkit-appearance: none;
}

.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
}

.form-group select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-red);
  background: var(--bg-input-focus);
  box-shadow: 0 0 0 3px var(--accent-red-glow);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-group-full {
  grid-column: 1 / -1;
  margin-top: 0.5rem;
}

/* Power kW/HP input row */
.power-input-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.power-input-row input {
  width: 90px;
  flex-shrink: 0;
}
.power-unit {
  color: var(--text-muted);
  font-size: 0.85rem;
}
.power-sep {
  color: var(--text-muted);
  font-size: 0.85rem;
}
.power-hp {
  font-weight: 600;
  color: var(--accent);
  min-width: 2.5rem;
  text-align: right;
}

/* Image Upload */
.image-upload-area {
  width: 100%;
  min-height: 160px;
  border: 2px dashed var(--border-subtle);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  overflow: hidden;
  position: relative;
  background: var(--bg-input);
}

.image-upload-area:hover,
.image-upload-area.dragover {
  border-color: var(--accent-red);
  background: var(--bg-input-focus);
}

.image-upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 2rem;
  text-align: center;
}

.image-upload-icon {
  font-size: 2rem;
  opacity: 0.6;
}

.image-upload-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.image-upload-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.image-upload-preview {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius-md);
}

.add-submit-btn {
  margin-top: 1rem;
  font-size: 1rem;
  padding: 1rem;
}

.consent-checks {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}
.consent-label {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
  line-height: 1.5;
}
.consent-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-width: 16px;
  margin-top: 2px;
  accent-color: var(--accent-red);
  cursor: pointer;
}
.consent-label a {
  color: var(--accent-red);
  text-decoration: underline;
}

/* ============================================
   TOAST
   ============================================ */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--bg-card);
  border: 1px solid rgba(74, 222, 128, 0.3);
  border-radius: var(--radius-md);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  z-index: 3000;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(20px);
  transform: translateY(120%);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.toast.visible {
  transform: translateY(0);
  opacity: 1;
}

.toast-icon {
  font-size: 1.25rem;
}

/* ============================================
   MODAL RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .modal-overlay {
    padding: 0;
    align-items: flex-end;
  }

  .modal-container {
    max-height: 95vh;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  }

  .detail-hero {
    height: 250px;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  }

  .detail-body {
    padding: 0 1.25rem 1.5rem;
  }

  .detail-title {
    font-size: 1.5rem;
  }

  .detail-price {
    font-size: 1.75rem;
  }

  .detail-specs-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .detail-actions {
    flex-direction: column;
    width: 100%;
  }

  .detail-action-btn {
    justify-content: center;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .add-modal-content {
    padding: 1.25rem;
  }

  .modal-title {
    font-size: 1.35rem;
  }
}

/* ============================================
   MOJMOTOR.SI — Section Tabs + Parts
   ============================================ */

/* --- Section Tabs Wrapper --- */
.section-tabs-wrapper {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 70px;
  z-index: 90;
}

.section-tabs {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  gap: 0;
}

.section-tab {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 1.25rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.section-tab:hover {
  color: var(--text-primary);
}

.section-tab.active {
  color: var(--text-primary);
  border-bottom-color: var(--accent-red);
  font-weight: 600;
}

.section-tab-icon {
  font-size: 1.1rem;
}

.section-tab-count {
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--text-muted);
}

.section-tab.active .section-tab-count {
  color: var(--accent-red);
}

/* --- Parts Category Tree --- */
.parts-cat-tree {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.parts-cat-all {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.15s;
  border: 1px solid transparent;
}

.parts-cat-all:hover,
.parts-cat-all.active {
  background: rgba(255, 160, 0, 0.1);
  color: var(--accent-red);
  border-color: rgba(255, 160, 0, 0.2);
}

.parts-cat-group {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 0.25rem;
}

.parts-cat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.75rem;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  background: rgba(255,255,255,0.03);
  user-select: none;
  transition: background 0.15s;
}

.parts-cat-header:hover {
  background: rgba(255,255,255,0.06);
}

.parts-cat-items {
  padding: 0.25rem 0;
  border-top: 1px solid var(--border-subtle);
}

.parts-cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 0.75rem 0.4rem 1.25rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
  border-left: 2px solid transparent;
}

.parts-cat-item:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.03);
}

.parts-cat-item.active {
  color: var(--accent-red);
  border-left-color: var(--accent-red);
  background: rgba(255, 160, 0, 0.05);
}

.pcat-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--bg-card);
  padding: 0.1rem 0.4rem;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
}

.parts-cat-item.active .pcat-count {
  background: rgba(255,160,0,0.15);
  color: var(--accent-red);
}

/* --- Parts Card --- */
.part-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  animation: fadeInUp 0.4s ease both;
  content-visibility: auto;
  contain-intrinsic-size: 0 320px;
}

.part-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
  border-color: var(--border);
}

.part-card-image {
  position: relative;
  height: 180px;
  overflow: hidden;
  background: var(--bg-secondary);
}

.part-card-image > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.part-card:hover .part-card-image img {
  transform: scale(1.05);
}

.part-condition-badge {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  z-index: 2;
}

.part-condition-badge.novo {
  background: rgba(34, 197, 94, 0.9);
  color: #fff;
}

.part-condition-badge.rabljeno {
  background: rgba(100, 116, 139, 0.9);
  color: #fff;
}

.part-condition-badge.poskodovano {
  background: rgba(239, 68, 68, 0.9);
  color: #fff;
}

.part-card-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.part-category-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent-red);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.part-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.part-fits {
  font-size: 0.78rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.part-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.25rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-subtle);
}

.part-price {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--accent-red);
}

.part-location {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* List view for parts */
.list-view .part-card {
  display: grid;
  grid-template-columns: 160px 1fr;
  min-height: 120px;
}

.list-view .part-card-image {
  height: 100%;
  min-height: 120px;
}

.list-view .part-card-body {
  justify-content: center;
}

/* --- No results for parts --- */
.parts-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}

.parts-empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

/* --- Parts sidebar responsive --- */
.parts-sidebar {
  display: flex;
  flex-direction: column;
}

@media (max-width: 1024px) {
  .section-tabs {
    padding: 0 1rem;
    overflow-x: auto;
    gap: 0;
  }

  .section-tab {
    padding: 0.65rem 0.9rem;
    font-size: 0.82rem;
  }

  /* hide count on small tablets to save space */
  .section-tab-count {
    display: none;
  }
  .section-tab.active .section-tab-count {
    display: inline;
  }

  .parts-sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: 85%;
    max-width: 320px;
    height: 100vh;
    overflow-y: auto;
    z-index: 200;
    background: var(--bg-secondary);
    padding: 5rem 1.25rem 2rem;
    transition: left 0.3s ease;
    box-shadow: 4px 0 30px rgba(0,0,0,0.5);
  }

  .parts-sidebar.open {
    left: 0;
  }
}

/* ============================================
   LEAFLET MAP
   ============================================ */
.detail-map {
  height: 220px;
  border-radius: var(--radius-md);
  margin-top: 1.5rem;
  border: 1px solid var(--border-subtle);
  overflow: hidden;
}

.leaflet-container {
  background: var(--bg-secondary) !important;
  font-family: 'Inter', sans-serif !important;
}

.leaflet-popup-content-wrapper {
  background: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: var(--radius-sm) !important;
  box-shadow: var(--shadow-card) !important;
}

.leaflet-popup-tip {
  background: var(--bg-secondary) !important;
}

/* ============================================
   MECHANIC CARDS
   ============================================ */
.mechanic-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  animation: fadeInUp 0.4s ease both;
  content-visibility: auto;
  contain-intrinsic-size: 0 300px;
}

.mechanic-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
  border-color: var(--border-hover);
}

.mechanic-card-image {
  position: relative;
  height: 180px;
  overflow: hidden;
  background: var(--bg-secondary);
}

.mechanic-card-image > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.mechanic-card:hover .mechanic-card-image img {
  transform: scale(1.05);
}

.mechanic-card-body {
  padding: 1.125rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mechanic-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

.mechanic-location {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.mechanic-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.25rem;
}

.spec-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  background: rgba(233, 69, 96, 0.12);
  border: 1px solid rgba(233, 69, 96, 0.25);
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent-red);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.mechanic-phone {
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-subtle);
  margin-top: 0.25rem;
}

/* Mechanic detail */
.mechanic-detail-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.mechanic-detail-spec {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.9rem;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: 50px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* No results for mechanics */
.mechanics-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}

.mechanics-empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

/* ========== MULTI-IMAGE UPLOAD WIDGET ========== */
.multi-img-upload {
  width: 100%;
  min-height: 140px;
  border: 2px dashed var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  cursor: pointer;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}
.multi-img-upload:hover,
.multi-img-upload.dragover {
  border-color: var(--accent-red);
  background: rgba(233, 69, 96, 0.04);
}
/* State: images exist → switch to row layout */
.multi-img-upload.has-images {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  align-content: flex-start;
  justify-content: flex-start;
  gap: 0.625rem;
}
.multi-img-thumbs {
  display: none;
}
.multi-img-upload.has-images .multi-img-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
}
.miu-thumb {
  position: relative;
  width: 100px;
  height: 80px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  flex-shrink: 0;
}
.miu-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.miu-remove {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0,0,0,0.75);
  color: #fff;
  border: none;
  font-size: 0.65rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
}
.miu-cover {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(233,69,96,0.85);
  color: #fff;
  font-size: 0.6rem;
  text-align: center;
  padding: 2px 0;
  font-weight: 600;
  letter-spacing: 0.03em;
}
/* Add button: large placeholder when zone is empty */
.multi-img-add-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.875rem;
  padding: 0.25rem;
  transition: color var(--transition-fast);
}
.multi-img-add-btn:hover { color: var(--accent-red); }
/* Add button: small + box when images exist */
.multi-img-upload.has-images .multi-img-add-btn {
  width: 80px;
  height: 80px;
  border: 2px dashed var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  gap: 0.2rem;
  flex-shrink: 0;
  padding: 0;
  transition: border-color var(--transition-fast), color var(--transition-fast);
}
.multi-img-upload.has-images .multi-img-add-btn:hover { border-color: var(--accent-red); }
.multi-img-add-icon { font-size: 1.5rem; }
.multi-img-upload.has-images .multi-img-add-icon { font-size: 1.25rem; }
.multi-img-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

/* ========== IMAGE CAROUSEL (detail modals) ========== */
.detail-carousel {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.car-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.35s ease;
  will-change: transform;
}
.car-slide {
  position: relative;
  min-width: 100%;
  width: 100%;
  height: 100%;
  flex-shrink: 0;
  overflow: hidden;
}
.car-bg {
  position: absolute;
  inset: -10%;
  background-size: cover;
  background-position: center;
  filter: blur(18px);
  transform: scale(1.1);
  z-index: 0;
}
.car-img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.car-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.55);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  transition: background var(--transition-fast);
  padding: 0;
  line-height: 1;
}
.car-btn:hover { background: rgba(233,69,96,0.8); }
.car-prev { left: 0.75rem; }
.car-next { right: 0.75rem; }
.car-dots {
  position: absolute;
  bottom: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.4rem;
  z-index: 5;
}
.car-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.45);
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast);
}
.car-dot.active {
  background: #fff;
  transform: scale(1.25);
}

/* ========== EDIT MODAL IMAGES ========== */
.ue-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}
.ue-imgs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  align-items: flex-start;
}
.ue-img-thumb {
  position: relative;
  width: 90px;
  height: 72px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  flex-shrink: 0;
}
.ue-img-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ue-img-x {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(0,0,0,0.75);
  color: #fff;
  border: none;
  font-size: 0.6rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.ue-img-cover {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(233,69,96,0.85);
  color: #fff;
  font-size: 0.55rem;
  text-align: center;
  padding: 2px 0;
  font-weight: 600;
}
.ue-img-add {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  width: 90px;
  height: 72px;
  border: 2px dashed var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.7rem;
  transition: border-color var(--transition-fast), color var(--transition-fast);
}
.ue-img-add:hover { border-color: var(--accent-red); color: var(--accent-red); }
.ue-img-add span:first-child { font-size: 1.2rem; line-height: 1; }

/* VIN display in detail modal */
.detail-vin {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: 'Courier New', monospace;
  margin-top: 0.5rem;
  letter-spacing: 0.08em;
}
/* ===== NAJEM (RENTALS) ===== */
.rental-category-badge {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  padding: 0.2rem 0.55rem;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, #0ea5e9, #38bdf8);
  color: white;
  z-index: 2;
}

.rental-price-suffix {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-left: 0.2em;
}

/* ===== REVIEWS & RATINGS ===== */
.reviews-section { margin-top: 2rem; border-top: 1px solid var(--border-subtle); padding-top: 1.5rem; }
.reviews-heading { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.75rem; }
.reviews-summary { margin-bottom: 1rem; min-height: 1.4rem; }
.reviews-avg-row { display: inline-flex; align-items: center; gap: 0.4rem; }
.reviews-avg-num { font-size: 1.1rem; font-weight: 700; color: var(--text-primary); }
.reviews-count { color: var(--text-secondary); font-size: 0.85rem; }
.reviews-none-sm { color: var(--text-secondary); font-size: 0.88rem; }
.review-card { padding: 0.75rem 0; border-bottom: 1px solid rgba(255,255,255,0.06); }
.review-card:last-child { border-bottom: none; }
.review-header { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.25rem; }
.review-author { font-weight: 600; font-size: 0.88rem; }
.review-date { color: var(--text-secondary); font-size: 0.78rem; margin-left: auto; }
.review-comment { color: var(--text-secondary); font-size: 0.88rem; line-height: 1.55; margin: 0; }
.star-icon { font-size: 0.95rem; color: var(--text-secondary); }
.star-icon.filled { color: #f59e0b; }
.review-card-stars .star-icon { font-size: 0.82rem; }
.star-selector { display: flex; align-items: center; gap: 0.15rem; margin-bottom: 0.75rem; flex-wrap: wrap; }
.star-btn { font-size: 1.65rem; cursor: pointer; color: var(--text-secondary); transition: color 0.12s; line-height: 1; user-select: none; }
.star-btn.active { color: #f59e0b; }
.star-btn:hover { color: #fbbf24; }
.star-sel-hint { font-size: 0.8rem; color: var(--text-secondary); margin-left: 0.4rem; min-width: 6rem; }
.review-input, .review-textarea {
  width: 100%; background: var(--bg-secondary); border: 1px solid var(--border-subtle);
  border-radius: 0.5rem; padding: 0.55rem 0.75rem; color: var(--text-primary);
  font-size: 0.88rem; margin-bottom: 0.5rem; box-sizing: border-box; font-family: inherit;
  transition: border-color 0.2s;
}
.review-input:focus, .review-textarea:focus { outline: none; border-color: var(--accent-red); }
.review-textarea { resize: vertical; }
.review-form h4 { font-size: 0.92rem; font-weight: 600; margin: 1.25rem 0 0.6rem; }
.review-submit-btn { width: 100%; margin-top: 0.25rem; }

/* ========== HERO STATS STRIP ========== */
.hero-stats {
  background: linear-gradient(90deg, rgba(229,57,53,0.05) 0%, transparent 70%);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.6rem 2rem;
  margin: 0;
}
.hero-stats-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.hero-stat {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  white-space: nowrap;
  text-align: left;
}
.hero-stat-num {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}
.hero-stat-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  margin-top: 0;
}
.hero-stat-divider {
  width: 1px;
  height: 1rem;
  background: var(--border-subtle);
  flex-shrink: 0;
}
.hero-stat-date {
  margin-left: auto;
  font-size: 0.72rem;
  color: var(--text-secondary);
  opacity: 0.5;
  white-space: nowrap;
}
@media (max-width: 600px) {
  .hero-stats { padding: 0.5rem 1rem; }
  .hero-stat-date { display: none; }
  .hero-stat-label { display: none; }
  .hero-stat-num::after { font-size: 0.65rem; font-weight: 400; color: var(--text-secondary); }
  #hstat-today::after { content: ' danes'; }
  #hstat-3day::after { content: ' / teden'; }
}

/* ========== CALENDAR (DOGODKI) ========== */
.cal-header {
  display: flex; align-items: center; justify-content: center;
  gap: 1.5rem; padding: 1rem 0 0.5rem; margin-bottom: 0.75rem;
}
.cal-month-label {
  font-size: 1.2rem; font-weight: 700; color: var(--text-primary);
  min-width: 200px; text-align: center;
}
.cal-nav-btn {
  background: var(--bg-secondary); border: 1px solid var(--border-subtle);
  border-radius: 50%; width: 2.2rem; height: 2.2rem; font-size: 1.2rem;
  color: var(--text-primary); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, border-color 0.2s;
}
.cal-nav-btn:hover { background: var(--accent-red); border-color: var(--accent-red); color: #fff; }
.cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 2px; background: var(--border-subtle);
  border-radius: 0.5rem; overflow: hidden; margin-bottom: 1.5rem;
}
.cal-day-name {
  background: var(--bg-secondary); padding: 0.5rem 0; text-align: center;
  font-size: 0.75rem; font-weight: 600; color: var(--text-secondary); text-transform: uppercase;
}
.cal-day {
  background: var(--bg-card); padding: 0.5rem; min-height: 3.5rem;
  text-align: center; font-size: 0.88rem; color: var(--text-secondary);
  cursor: default; transition: background 0.15s; position: relative;
}
.cal-day.has-events { color: var(--text-primary); cursor: pointer; font-weight: 600; }
.cal-day.has-events:hover { background: var(--bg-secondary); }
.cal-day.today { color: var(--accent-red); font-weight: 700; }
.cal-day.today::before {
  content: ''; position: absolute; top: 0.2rem; right: 0.2rem;
  width: 5px; height: 5px; background: var(--accent-red); border-radius: 50%;
}
.cal-day.empty { background: var(--bg-secondary); opacity: 0.4; }
.cal-day.selected { background: rgba(229,57,53,0.12); outline: 1px solid var(--accent-red); }
.cal-dots { display: flex; gap: 2px; justify-content: center; margin-top: 0.25rem; flex-wrap: wrap; }
.cal-event-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.cal-events-list { display: flex; flex-direction: column; gap: 0.75rem; }
.cal-event-item {
  display: flex; align-items: flex-start; gap: 0.75rem;
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: 0.75rem; padding: 0.9rem 1rem;
}
.cal-event-color { width: 4px; min-height: 2.5rem; border-radius: 2px; flex-shrink: 0; }
.cal-event-body { flex: 1; min-width: 0; }
.cal-event-title { font-weight: 600; font-size: 0.95rem; color: var(--text-primary); margin-bottom: 0.25rem; }
.cal-event-meta { font-size: 0.8rem; color: var(--text-secondary); line-height: 1.6; }
.cal-event-cat { font-size: 0.75rem; font-weight: 600; margin-top: 0.2rem; text-transform: uppercase; letter-spacing: 0.03em; }
.cal-del-btn {
  background: none; border: none; cursor: pointer; font-size: 1rem;
  opacity: 0.45; transition: opacity 0.2s; padding: 0.25rem; align-self: center;
}
.cal-del-btn:hover { opacity: 1; }
.cal-no-events { color: var(--text-secondary); text-align: center; padding: 2rem; font-size: 0.95rem; }
.cal-del-btn::after { content: '×'; color: var(--text-muted); }

/* ===== DOGODKI TWO-COLUMN LAYOUT ===== */
.dogodki-layout {
  display: grid;
  grid-template-columns: 1fr 270px;
  gap: 1.5rem;
  align-items: start;
}
.dogodki-col-title {
  font-size: 1.05rem; font-weight: 600;
  color: var(--text-primary); margin-bottom: 1rem;
}
.cal-upcoming-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 1rem;
  display: flex; flex-direction: column; gap: 0.75rem;
}
.cal-panel-filters {
  display: flex; gap: 0.5rem; align-items: center;
}
.cal-category-select {
  flex: 1; padding: 0.4rem 0.6rem;
  background: var(--bg-secondary); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm); color: var(--text-primary); font-size: 0.82rem;
  font-family: inherit;
}
.cal-add-btn { width: 100%; }
.cal-upcoming-title {
  font-weight: 600; font-size: 0.88rem;
  color: var(--text-primary);
  padding-top: 0.5rem; border-top: 1px solid var(--border-subtle);
}
.cal-upcoming-item {
  display: flex; gap: 0.65rem; align-items: flex-start;
  padding: 0.5rem 0; border-bottom: 1px solid var(--border-subtle);
  cursor: pointer; transition: opacity 0.15s;
}
.cal-upcoming-item:last-child { border-bottom: none; }
.cal-upcoming-item:hover { opacity: 0.75; }
.cal-upcoming-date { text-align: center; min-width: 34px; flex-shrink: 0; }
.cal-upcoming-day { font-size: 1.15rem; font-weight: 700; line-height: 1; }
.cal-upcoming-mon { font-size: 0.62rem; text-transform: uppercase; color: var(--text-muted); letter-spacing: 0.04em; }
.cal-upcoming-info { flex: 1; min-width: 0; }
.cal-upcoming-name {
  font-size: 0.82rem; font-weight: 500; line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--text-primary);
}
.cal-upcoming-meta { font-size: 0.72rem; color: var(--text-muted); margin-top: 0.1rem; }
@media (max-width: 820px) {
  .dogodki-layout { grid-template-columns: 1fr; }
  .dogodki-upcoming-col { order: -1; }
}

/* ============================================
   PROMETNE INFORMACIJE
   ============================================ */
.promet-section { padding: 0; }
.promet-header {
  padding: 1.5rem 0 1rem;
}
.promet-title-row {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 0.75rem; margin-bottom: 0.75rem;
}
.promet-title { font-size: 1.3rem; font-weight: 700; margin: 0; }
.promet-add-btn { white-space: nowrap; }
.promet-legend {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.1rem; margin-bottom: 0.6rem;
}
.promet-legend-item {
  display: flex; align-items: center; gap: 0.35rem;
  font-size: 0.8rem; color: var(--text-muted);
}
.promet-dot {
  display: inline-block; width: 10px; height: 10px;
  border-radius: 50%; flex-shrink: 0;
}
.promet-hint { font-size: 0.78rem; color: var(--text-muted); margin: 0; }

#promet-map {
  width: 100%; height: 480px;
  border-radius: var(--radius); border: 1px solid var(--border-subtle);
  background: #1a1a2e;
  margin-bottom: 1.5rem;
}

.promet-list-header {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 0.85rem; font-weight: 600; color: var(--text-muted);
  margin-bottom: 0.75rem;
}

#promet-list { display: flex; flex-direction: column; gap: 0.6rem; margin-bottom: 2rem; }

.promet-card {
  display: flex; align-items: flex-start; gap: 0.85rem;
  padding: 0.85rem 1rem;
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm); transition: border-color 0.2s;
}
.promet-card:hover { border-color: var(--border); }
.promet-card-icon {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; flex-shrink: 0;
}
.promet-card-body { flex: 1; min-width: 0; }
.promet-card-type {
  font-size: 0.72rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--text-muted);
}
.promet-card-desc {
  font-size: 0.88rem; color: var(--text-primary);
  margin: 0.15rem 0; line-height: 1.4;
}
.promet-card-meta { font-size: 0.75rem; color: var(--text-muted); }
.promet-card-actions {
  display: flex; flex-direction: column; align-items: flex-end;
  gap: 0.4rem; flex-shrink: 0;
}
.promet-upvote-btn {
  background: none; border: 1px solid var(--border-subtle);
  color: var(--text-muted); border-radius: var(--radius-sm);
  padding: 0.25rem 0.6rem; font-size: 0.78rem; cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.promet-upvote-btn:hover { border-color: var(--accent); color: var(--accent); }
.promet-delete-btn {
  background: none; border: none;
  color: var(--text-muted); font-size: 0.75rem; cursor: pointer;
  padding: 0; opacity: 0.5; transition: opacity 0.2s;
}
.promet-delete-btn:hover { opacity: 1; color: var(--danger, #e94560); }

/* Leaflet popup dark override */
.leaflet-popup-content-wrapper {
  background: var(--bg-card) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: var(--radius-sm) !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5) !important;
}
.leaflet-popup-tip { background: var(--bg-card) !important; }
.leaflet-popup-content { font-family: var(--font-sans); font-size: 0.85rem; }
.traffic-popup-type {
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 0.3rem;
}
.traffic-popup-desc { margin: 0.15rem 0; line-height: 1.4; }
.traffic-popup-meta { font-size: 0.72rem; color: var(--text-muted); margin-top: 0.3rem; }
.traffic-popup-upvote {
  margin-top: 0.5rem; background: none;
  border: 1px solid var(--border-subtle); border-radius: 4px;
  color: var(--text-muted); padding: 0.2rem 0.6rem;
  font-size: 0.75rem; cursor: pointer; width: 100%;
}
.traffic-popup-upvote:hover { border-color: var(--accent); color: var(--accent); }

/* Pulse map border to hint user to click */
@keyframes promet-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(96,165,250,0); border-color: var(--border-subtle); }
  50%       { box-shadow: 0 0 0 6px rgba(96,165,250,0.25); border-color: #60a5fa; }
}
#promet-map.promet-map-pulse {
  animation: promet-pulse 0.7s ease-in-out 3;
}

@media (max-width: 600px) {
  #promet-map { height: 340px; }
}

/* ============================================
   HOMEPAGE EVENTS STRIP
   ============================================ */
.hero-events-strip {
  max-width: 1440px; margin: 0 auto;
  padding: 0.6rem 2rem;
  display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
}
.hero-events-label {
  font-size: 0.75rem; font-weight: 600; color: var(--text-muted); white-space: nowrap;
}
.hero-events-list { display: flex; gap: 0.5rem; flex-wrap: wrap; flex: 1; }
@media (max-width: 600px) {
  .hero-events-strip { display: none; }
}
.hero-event-chip {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.25rem 0.65rem; border: 1px solid; border-radius: var(--radius-sm);
  font-size: 0.75rem; text-decoration: none; background: transparent;
  transition: opacity 0.15s;
}
.hero-event-chip:hover { opacity: 0.75; }
.hero-event-chip-date { font-weight: 700; }
.hero-events-all {
  margin-left: auto; font-size: 0.75rem; color: var(--accent);
  white-space: nowrap; text-decoration: none; flex-shrink: 0;
}
.hero-events-all:hover { text-decoration: underline; }

/* ============================================
   RSVP STYLES
   ============================================ */
.cal-event-desc {
  font-size: 0.78rem; color: var(--text-muted); margin: 0.2rem 0 0.4rem; line-height: 1.4;
}
.cal-event-rsvp { margin-top: 0.55rem; display: flex; flex-direction: column; gap: 0.35rem; align-items: flex-end; }
.cal-rsvp-names { font-size: 0.75rem; color: var(--text-muted); align-self: flex-start; }
.cal-rsvp-form { display: flex; gap: 0.4rem; align-items: center; width: 100%; }
.cal-rsvp-input {
  flex: 1; padding: 0.35rem 0.6rem; background: var(--bg-input, #1a1a2e);
  border: 1px solid var(--border-subtle); border-radius: var(--radius-sm);
  color: var(--text-primary); font-size: 0.8rem; font-family: inherit;
}
.cal-rsvp-submit {
  background: var(--accent, #e94560); border: none; color: #fff; cursor: pointer;
  padding: 0.35rem 0.8rem; border-radius: var(--radius-sm); font-size: 0.8rem; font-weight: 600;
  white-space: nowrap;
}
.cal-rsvp-btn {
  background: var(--accent, #e94560); color: #fff;
  border: none; border-radius: var(--radius-sm);
  padding: 0.35rem 0.85rem;
  font-size: 0.78rem; font-weight: 600; cursor: pointer;
  transition: opacity 0.15s;
}
.cal-rsvp-btn:hover { opacity: 0.82; }
.cal-rsvp-btn.rsvpd {
  background: transparent; border: 1px solid var(--accent, #e94560);
  color: var(--accent, #e94560);
}

/* ========== LIGHTBOX ========== */
.lightbox-overlay {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(0,0,0,0.96);
  display: none; align-items: center; justify-content: center;
}
.lightbox-overlay.open { display: flex; }
.lb-img {
  max-width: 92vw; max-height: 86vh;
  object-fit: contain; border-radius: 4px;
  cursor: default; user-select: none;
}
.lb-close {
  position: absolute; top: 1rem; right: 1rem;
  background: rgba(255,255,255,0.12); border: none;
  color: #fff; font-size: 1.25rem;
  width: 2.5rem; height: 2.5rem;
  border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.lb-prev, .lb-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,0.12); border: none;
  color: #fff; font-size: 2.5rem;
  width: 2.75rem; height: 5rem;
  cursor: pointer; border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.lb-prev { left: 1rem; }
.lb-next { right: 1rem; }
.lb-prev:hover, .lb-next:hover, .lb-close:hover { background: rgba(233,69,96,0.7); }
.lb-counter {
  position: absolute; bottom: 1.25rem;
  color: rgba(255,255,255,0.55); font-size: 0.85rem;
  pointer-events: none;
}

/* ============================================
   PERFORMANCE: reduce motion & mobile blur
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
