/* ─── System font stack ─── */
:root {
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, 'Helvetica Neue', Arial, sans-serif;
}

/* ─── Light theme (default) ─── */
:root {
  --brand: #E8541A;
  --brand-hover: #cc4615;
  --brand-light: rgba(232,84,26,.1);
  --bg: #f5f4f1;
  --bg2: #ffffff;
  --bg3: #eceae5;
  --card: #ffffff;
  --card-hover: #f9f8f5;
  --border: rgba(0,0,0,.09);
  --border-hover: rgba(0,0,0,.18);
  --text: #1a1a1a;
  --text-muted: #5a5a5a;
  --text-dim: #9a9a9a;
  --green: #16a34a;
  --blue: #2563eb;
  --red: #dc2626;
  --yellow: #d97706;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 8px rgba(0,0,0,.08), 0 4px 24px rgba(0,0,0,.05);
  --shadow-card: 0 1px 3px rgba(0,0,0,.06), 0 4px 12px rgba(0,0,0,.04);
  --nav-bg: #ffffff;
  --nav-border: rgba(0,0,0,.08);
}

/* ─── Dark theme ─── */
[data-theme="dark"] {
  --bg: #141820;
  --bg2: #1c2030;
  --bg3: #232840;
  --card: #1e2436;
  --card-hover: #252c42;
  --border: rgba(255,255,255,.08);
  --border-hover: rgba(255,255,255,.16);
  --text: #eef0f7;
  --text-muted: #8a93b0;
  --text-dim: #4e5673;
  --shadow: 0 2px 16px rgba(0,0,0,.4);
  --shadow-card: 0 2px 12px rgba(0,0,0,.3);
  --nav-bg: #1c2030;
  --nav-border: rgba(255,255,255,.07);
}

/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background .2s, color .2s;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
input, select, textarea, button { font-family: inherit; }
img { max-width: 100%; height: auto; }
hr { border: none; border-top: 1px solid var(--border); margin: 24px 0; }
.hidden { display: none !important; }

/* ─── Layout ─── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
main { flex: 1; }
.page { display: none; }
.page.active { display: block; }

/* ─── Notice bar ─── */
#notice-bar {
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
  height: 28px;
  overflow: hidden;
  position: sticky;
  top: 58px;
  z-index: 99;
  cursor: pointer;
  transition: background .2s;
}
#notice-bar:hover { background: var(--brand-light); }
#notice-bar.hidden { display: none; }

.notice-inner {
  display: flex;
  align-items: center;
  height: 100%;
  position: relative;
}

.notice-track-wrap {
  flex: 1;
  overflow: hidden;
  height: 100%;
  display: flex;
  align-items: center;
  mask-image: linear-gradient(to right, transparent 0%, black 60px, black calc(100% - 60px), transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 60px, black calc(100% - 60px), transparent 100%);
}

.notice-track {
  display: flex;
  white-space: nowrap;
  animation: notice-scroll 55s linear infinite;
}
.notice-track:hover { animation-play-state: paused; }

.notice-item {
  font-size: 11.5px;
  color: var(--text-muted);
  letter-spacing: .01em;
  padding-right: 0;
  flex-shrink: 0;
}

@keyframes notice-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.notice-close {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 11px;
  cursor: pointer;
  transition: color .15s;
  z-index: 1;
}
.notice-close:hover { color: var(--text); }

/* ─── Navbar ─── */
.nav {
  background: var(--nav-bg);
  border-bottom: 1px solid var(--nav-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 0 var(--nav-border);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  height: 58px;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

/* Logo – bez tarpų */
.logo { display: inline-flex; align-items: center; gap: 0; text-decoration: none; white-space: nowrap; flex-shrink: 0; }
.logo:hover { text-decoration: none; opacity: .85; }
.logo-icon { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; }
.logo-e { position: absolute; font-size: 17px; font-weight: 700; color: #E8541A; line-height: 1; margin-top: 3px; }
.logo-word { font-size: 22px; font-weight: 700; color: var(--text); letter-spacing: -0.5px; }
.logo-lt { font-weight: 700; color: var(--text-muted); font-size: 22px; }

.nav-search {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: clamp(200px, 36%, 500px);
  display: flex;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}
.nav-search:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-light);
}
.nav-search input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text);
  padding: 8px 12px;
  font-size: 14px;
  outline: none;
  min-width: 0;
}
.nav-search input::placeholder { color: var(--text-dim); }
.nav-search button {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: color .2s;
  flex-shrink: 0;
}
.nav-search button:hover { color: var(--brand); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  flex-shrink: 0;
}

/* Navbar right group: theme-toggle + avatar/user-menu */
.nav-right-group {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 3px;
}
.nav-right-group #user-menu { gap: 8px; }
.nav-right-group .btn-add { border-radius: 8px; padding: 7px 14px; font-size: 13px; }

/* Theme toggle */
.theme-toggle {
  background: transparent;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 15px;
  transition: background .2s;
  flex-shrink: 0;
}
.theme-toggle:hover { background: rgba(0,0,0,.07); }
[data-theme="dark"] .theme-toggle:hover { background: rgba(255,255,255,.09); }

.btn-outline-sm {
  background: transparent;
  border: 1px solid var(--border-hover);
  color: var(--text-muted);
  padding: 7px 13px;
  border-radius: 7px;
  font-size: 13px;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
}
.btn-outline-sm:hover { border-color: var(--brand); color: var(--brand); }

.btn-primary-sm {
  background: var(--brand);
  color: #fff;
  border: none;
  padding: 7px 13px;
  border-radius: 7px;
  font-size: 13px;
  cursor: pointer;
  font-weight: 600;
  transition: background .2s;
  white-space: nowrap;
}
.btn-primary-sm:hover { background: var(--brand-hover); }

.btn-add {
  background: var(--brand);
  color: #fff !important;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background .2s, box-shadow .2s;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(232,84,26,.25);
  letter-spacing: 0.1px;
}
.btn-add:hover { background: var(--brand-hover); box-shadow: 0 4px 14px rgba(232,84,26,.35); }

#auth-btns { display: flex; gap: 6px; align-items: center; }

.avatar-wrap { position: relative; }
.avatar-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--brand-light);
  border: 2px solid var(--brand);
  color: var(--brand);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
#user-menu { display: flex; align-items: center; gap: 6px; }

.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--card);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius);
  padding: 6px;
  min-width: 180px;
  box-shadow: var(--shadow);
  z-index: 200;
}
.dropdown-name {
  padding: 8px 12px 6px;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.user-dropdown a {
  display: block;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
  color: var(--text);
  transition: background .15s;
}
.user-dropdown a:hover { background: var(--bg3); text-decoration: none; }
.logout-link { color: var(--red) !important; }

.burger {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: transparent;
  border: none;
  padding: 6px;
  cursor: pointer;
  flex-shrink: 0;
}
.burger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-muted);
  border-radius: 2px;
  transition: all .2s;
}

.mobile-menu {
  background: var(--nav-bg);
  border-top: 1px solid var(--nav-border);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mobile-menu input {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  width: 100%;
}
.mobile-menu a {
  color: var(--text);
  padding: 9px 4px;
  font-size: 15px;
  border-bottom: 1px solid var(--border);
}
.mobile-menu a:hover { color: var(--brand); text-decoration: none; }
#mobile-auth, #mobile-user { display: flex; flex-direction: column; gap: 8px; padding-top: 6px; }

/* ─── Hero ─── */
.hero {
  background: linear-gradient(160deg, #fff9f7 0%, #fef0e8 35%, #fff5f0 65%, #fffaf8 100%);
  padding: 40px 16px 44px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
[data-theme="dark"] .hero {
  background: #1c2030;
  border-bottom-color: rgba(255,255,255,.06);
}
.hero-pattern {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: rgba(232,84,26,.06);
  pointer-events: none;
  z-index: 0;
}
[data-theme="dark"] .hero-pattern { display: none; }
[data-theme="dark"] .hero-stat-pill { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.08); }
.hero-content { max-width: 620px; margin: 0 auto; position: relative; z-index: 1; }
.hero h1 { font-size: clamp(22px, 4vw, 38px); font-weight: 800; line-height: 1.25; margin-bottom: 10px; letter-spacing: -0.8px; }
.hero h1 span { color: var(--brand); }
.hero-name { color: var(--brand); font-style: italic; font-family: Georgia, 'Times New Roman', serif; }
.hero-content p.hero-tagline { font-size: clamp(15px, 2.5vw, 20px); font-weight: 700; letter-spacing: .3px; margin: 0 0 22px; line-height: 1.5; color: inherit; text-align: center; }
.tagline-words { display: inline-flex; align-items: center; gap: 6px; }
.hero-kw-free { color: var(--green); }
.hero-kw-fast { color: var(--blue); }
.hero-kw-safe { color: var(--brand); }
.hero-content > p { color: var(--text-muted); font-size: 15px; margin-bottom: 24px; }
.hero-stats-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.hero-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--text-muted);
  background: rgba(255,255,255,.75);
  border: 1px solid var(--border-hover);
  border-radius: 20px;
  padding: 5px 14px;
  white-space: nowrap;
}
[data-theme="dark"] .hero-stat-pill { background: rgba(255,255,255,.06); }
.hero-search {
  display: flex;
  background: var(--card);
  border: 1.5px solid var(--border-hover);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
  transition: border-color .2s;
}
.hero-search:focus-within { border-color: var(--brand); }
.hero-search select {
  background: var(--bg3);
  border: none;
  border-right: 1px solid var(--border);
  color: var(--text-muted);
  padding: 13px 14px;
  font-size: 14px;
  outline: none;
  cursor: pointer;
  min-width: 155px;
}
.hero-search input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  color: var(--text);
  padding: 13px 14px;
  font-size: 15px;
  outline: none;
}
.hero-search input::placeholder { color: var(--text-dim); }
.hero-search button {
  background: var(--brand);
  color: #fff;
  border: none;
  padding: 13px 22px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s;
  white-space: nowrap;
}
.hero-search button:hover { background: var(--brand-hover); }
/* .hero-stats kept for JS compatibility – see .hero-stats-row above */
.hero-stats { display: contents; }

/* ─── Sections ─── */
.cats-section, .listings-section { padding: 28px 0; }
.section-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.section-hdr h1, .section-hdr h2 { font-size: 19px; font-weight: 700; letter-spacing: -0.3px; }
.section-hdr a { color: var(--brand); font-size: 14px; }

/* ─── Categories ─── */
.cats-section { padding: 20px 0 24px; }
.cats-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); margin-bottom: 12px; }
.cats-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
}
.cat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 18px 6px 15px;
  border-radius: 14px;
  border: 1.5px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.cat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(0,0,0,.11);
  border-color: var(--brand) !important;
  text-decoration: none;
}
.cat-card:active { transform: translateY(-1px); }
.cat-icon { width: 32px; height: 32px; flex-shrink: 0; transition: transform .18s; }
.cat-icon svg { width: 100%; height: 100%; display: block; }
.cat-card:hover .cat-icon { transform: scale(1.12); }
.cat-name {
  font-size: 11px;
  color: var(--text);
  line-height: 1.3;
  font-weight: 600;
  text-align: center;
  word-break: break-word;
  hyphens: auto;
}

/* Category pastel colors + icon colors */
.cat-c-transport { background: rgba(37,99,235,.08);   border-color: rgba(37,99,235,.15); }
.cat-c-transport .cat-icon { color: #2563eb; }
.cat-c-nt        { background: rgba(22,163,74,.08);   border-color: rgba(22,163,74,.15); }
.cat-c-nt        .cat-icon { color: #16a34a; }
.cat-c-el        { background: rgba(124,58,237,.08);  border-color: rgba(124,58,237,.15); }
.cat-c-el        .cat-icon { color: #7c3aed; }
.cat-c-butas     { background: rgba(120,53,15,.07);   border-color: rgba(120,53,15,.13); }
.cat-c-butas     .cat-icon { color: #92400e; }
.cat-c-mada      { background: rgba(219,39,119,.08);  border-color: rgba(219,39,119,.15); }
.cat-c-mada      .cat-icon { color: #db2777; }
.cat-c-darbas    { background: rgba(234,88,12,.08);   border-color: rgba(234,88,12,.15); }
.cat-c-darbas    .cat-icon { color: #ea580c; }
.cat-c-vaikams   { background: rgba(202,138,4,.08);   border-color: rgba(202,138,4,.15); }
.cat-c-vaikams   .cat-icon { color: #ca8a04; }
.cat-c-sportas   { background: rgba(5,150,105,.08);   border-color: rgba(5,150,105,.15); }
.cat-c-sportas   .cat-icon { color: #059669; }
.cat-c-gyvunai   { background: rgba(20,184,166,.08);  border-color: rgba(20,184,166,.15); }
.cat-c-gyvunai   .cat-icon { color: #0d9488; }
.cat-c-paslaugos { background: rgba(100,116,139,.07); border-color: rgba(100,116,139,.15); }
.cat-c-paslaugos .cat-icon { color: #475569; }
.cat-c-maistas   { background: rgba(132,204,22,.08);  border-color: rgba(132,204,22,.15); }
.cat-c-maistas   .cat-icon { color: #65a30d; }
.cat-c-kolekcija { background: rgba(168,85,247,.08);  border-color: rgba(168,85,247,.15); }
.cat-c-kolekcija .cat-icon { color: #a855f7; }
.cat-c-kita      { background: rgba(100,116,139,.05); border-color: rgba(100,116,139,.10); }
.cat-c-kita      .cat-icon { color: #64748b; }

/* Dark mode – vienodos tamsios kortelės, be spalvotų fonų */
[data-theme="dark"] .cat-card {
  background: var(--card) !important;
  border-color: rgba(255,255,255,.08) !important;
  box-shadow: 0 1px 4px rgba(0,0,0,.25);
}
[data-theme="dark"] .cat-card:hover {
  background: var(--card-hover) !important;
  border-color: var(--brand) !important;
  box-shadow: 0 6px 20px rgba(0,0,0,.35) !important;
}

/* ─── Listings grid ─── */
.listings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.listing-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: all .2s;
  position: relative;
  box-shadow: var(--shadow-card);
}
.listing-card:hover {
  border-color: var(--brand);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0,0,0,.13), 0 4px 10px rgba(232,84,26,.07);
}
.listing-img {
  height: 160px;
  background: var(--bg3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  overflow: hidden;
  position: relative;
}
.listing-img img { width: 100%; height: 100%; object-fit: cover; }
.listing-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 5px;
}
.tag-sell { background: rgba(22,163,74,.12); color: #15803d; border: 1px solid rgba(22,163,74,.2); }
.tag-buy { background: rgba(37,99,235,.12); color: #1d4ed8; border: 1px solid rgba(37,99,235,.2); }
.tag-rent { background: rgba(232,84,26,.12); color: var(--brand); border: 1px solid rgba(232,84,26,.2); }
.tag-free { background: rgba(217,119,6,.12); color: #b45309; border: 1px solid rgba(217,119,6,.2); }
.tag-exchange { background: rgba(124,58,237,.12); color: #6d28d9; border: 1px solid rgba(124,58,237,.2); }
[data-theme="dark"] .tag-sell { background: rgba(22,163,74,.18); color: #4ade80; }
[data-theme="dark"] .tag-buy { background: rgba(37,99,235,.18); color: #60a5fa; }
[data-theme="dark"] .tag-rent { background: rgba(232,84,26,.18); color: #fb923c; }
[data-theme="dark"] .tag-free { background: rgba(217,119,6,.18); color: #fbbf24; }
[data-theme="dark"] .tag-exchange { background: rgba(124,58,237,.18); color: #a78bfa; }

.fav-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(255,255,255,.9);
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  cursor: pointer;
  color: var(--text-dim);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
  line-height: 1;
  box-shadow: 0 1px 4px rgba(0,0,0,.15);
}
.fav-btn:hover { color: var(--red); transform: scale(1.1); }
.fav-btn.active { color: var(--red); }
[data-theme="dark"] .fav-btn { background: rgba(0,0,0,.5); }

.listing-body { padding: 11px 13px 13px; }
.listing-title { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.listing-price { font-size: 17px; font-weight: 700; color: var(--brand); margin-bottom: 6px; }
.listing-meta { font-size: 12px; color: var(--text-dim); display: flex; flex-wrap: wrap; gap: 8px; }

/* Skeleton */
.skeleton-card {
  border-radius: var(--radius);
  height: 240px;
  background: linear-gradient(90deg, var(--card) 25%, var(--card-hover) 50%, var(--card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.6s ease-in-out infinite;
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ─── Listings page ─── */
.listings-layout { padding: 24px 0; }

/* ─── Top Filter Bar ─── */
.fbar {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin: 16px 0 12px;
  box-shadow: var(--shadow-card);
}
.fbar-main {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
}
.fbar-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.fbar-group > label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .4px;
  white-space: nowrap;
}
.fbar-group select,
.fbar-group > input {
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: border-color .15s;
  outline: none;
}
.fbar-group select:focus,
.fbar-group > input:focus { border-color: var(--brand); }
.fbar-group:first-child select { min-width: 165px; }
.fbar-group > input { width: 130px; }
#f-sort { min-width: 110px; }

.fbar-price { display: flex; align-items: center; gap: 4px; }
.fbar-price input { width: 80px; height: 36px; padding: 0 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); font-size: 13px; font-family: inherit; outline: none; }
.fbar-price input:focus { border-color: var(--brand); }
.fbar-price span { color: var(--text-dim); font-size: 13px; }

.fbar-types { display: flex; flex-wrap: wrap; gap: 4px; }
.fbar-type-lbl {
  display: flex; align-items: center;
  padding: 0 10px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg);
  white-space: nowrap;
  transition: all .15s;
  user-select: none;
}
.fbar-type-lbl:hover { border-color: var(--brand); color: var(--brand); }
.fbar-type-lbl:has(input:checked) { border-color: var(--brand); background: var(--brand-light); color: var(--brand); font-weight: 700; }
.fbar-type-lbl input { display: none; }

.fbar-reset {
  height: 36px; width: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  align-self: flex-end;
  flex-shrink: 0;
  transition: all .15s;
  display: flex; align-items: center; justify-content: center;
  user-select: none;
  -webkit-user-select: none;
}
.fbar-reset:hover { border-color: var(--brand); color: var(--brand); }

.fbar-subcats { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }

.fbar-extra {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.fbar-extra:empty { display: none; padding: 0; margin: 0; border: 0; }
.fbar-extra .filter-group {
  display: flex; flex-direction: column; gap: 3px; margin: 0;
}
.fbar-extra .filter-group label {
  font-size: 11px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .4px;
}
.fbar-extra .filter-group select {
  height: 36px; min-width: 110px; max-width: 170px;
  padding: 0 10px;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--bg); color: var(--text);
  font-size: 13px; font-family: inherit; cursor: pointer; outline: none;
}
.fbar-extra .filter-group select:focus { border-color: var(--brand); }

/* Mobiliajame – filtrai susisuka į 2-3 eilutes */
@media (max-width: 860px) {
  .fbar-group:first-child select { min-width: 140px; }
  .fbar-group > input { width: 110px; }
  .fbar-price input { width: 70px; }
}
@media (max-width: 560px) {
  .fbar { padding: 10px 12px; }
  .fbar-main { gap: 8px; }
  .fbar-types { gap: 3px; }
  .fbar-type-lbl { padding: 0 8px; font-size: 11px; }
  .fbar-group:first-child select { min-width: 120px; }
}
.sidebar { position: sticky; top: 74px; align-self: start; }
.filter-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-card);
}
.filter-hdr { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.filter-hdr h3 { font-size: 15px; font-weight: 700; }
.btn-reset { background: transparent; border: none; color: var(--text-dim); font-size: 12px; cursor: pointer; }
.btn-reset:hover { color: var(--brand); }
.filter-group { margin-bottom: 16px; }
.filter-group > label { display: block; font-size: 11px; font-weight: 700; color: var(--text-dim); text-transform: uppercase; letter-spacing: .6px; margin-bottom: 8px; }
.filter-group select,
.filter-group input[type=text],
.filter-group input[type=number] {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 11px;
  border-radius: 7px;
  font-size: 14px;
  outline: none;
  transition: border-color .2s;
}
.filter-group select:focus,
.filter-group input:focus { border-color: var(--brand); }
.filter-checks { display: flex; flex-direction: column; gap: 7px; }
.filter-checks label { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text); cursor: pointer; font-weight: 400; }
.filter-checks input[type=radio] { accent-color: var(--brand); width: 15px; height: 15px; cursor: pointer; }
.price-inputs { display: flex; align-items: center; gap: 6px; }
.price-inputs input { flex: 1; }
.price-inputs span { color: var(--text-dim); flex-shrink: 0; }

.main-content { min-width: 0; }
.results-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; font-size: 14px; color: var(--text-muted); }
.sidebar-toggle { display: none; background: var(--brand); border: none; color: #fff; padding: 8px 14px; border-radius: 7px; cursor: pointer; font-size: 13px; font-weight: 600; gap: 6px; }
.filter-close-btn { display: none; background: transparent; border: none; color: var(--text-muted); font-size: 18px; cursor: pointer; padding: 2px 6px; line-height: 1; }
.filter-apply-btn { display: none; width: 100%; margin-top: 8px; }
.filter-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 49; }
.filter-backdrop.active { display: block; }

/* ─── Subkategorijų chips ─── */
.subcat-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.subcat-chip { padding: 5px 11px; border-radius: 20px; border: 1px solid var(--border); font-size: 12px; font-weight: 500; cursor: pointer; background: transparent; color: var(--text); transition: all .15s; line-height: 1.4; }
.subcat-chip:hover { border-color: var(--brand); color: var(--brand); }
.subcat-chip.active { background: var(--brand); border-color: var(--brand); color: #fff; }

.pagination { display: flex; gap: 6px; justify-content: center; padding: 24px 0; flex-wrap: wrap; }
.page-btn { background: var(--card); border: 1px solid var(--border); color: var(--text-muted); padding: 7px 13px; border-radius: 7px; cursor: pointer; font-size: 14px; transition: all .2s; }
.page-btn:hover { border-color: var(--brand); color: var(--brand); }
.page-btn.active { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ─── Detail ─── */
.back-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 7px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  margin: 18px 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all .2s;
}
.back-btn:hover { border-color: var(--brand); color: var(--brand); }
.detail-layout { display: grid; grid-template-columns: 60% 1fr; gap: 32px; padding-bottom: 40px; align-items: start; }
.detail-img-wrap { position: relative; }
.detail-main-img { width: 100%; max-height: 440px; height: auto; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg3); display: block; }
.img-nav { position: absolute; top: 0; bottom: 0; width: 40%; display: flex; align-items: center; cursor: pointer; z-index: 2; color: #fff; font-size: 48px; font-weight: 300; line-height: 1; opacity: 0; transition: opacity .2s; user-select: none; }
.img-nav-left { left: 0; justify-content: flex-start; padding-left: 12px; background: linear-gradient(to right, rgba(0,0,0,.35), transparent); border-radius: var(--radius) 0 0 var(--radius); }
.img-nav-right { right: 0; justify-content: flex-end; padding-right: 12px; background: linear-gradient(to left, rgba(0,0,0,.35), transparent); border-radius: 0 var(--radius) var(--radius) 0; }
.detail-img-wrap:hover .img-nav { opacity: 1; }
.detail-img-placeholder { width: 100%; height: 380px; background: var(--bg3); border-radius: var(--radius); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 80px; }
.detail-thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.detail-thumb { width: 76px; height: 58px; object-fit: cover; border-radius: 6px; border: 2px solid transparent; cursor: pointer; transition: border-color .2s; }
.detail-thumb:hover, .detail-thumb.active { border-color: var(--brand); }
.detail-info { display: flex; flex-direction: column; gap: 12px; }
.detail-info h1 { font-size: 21px; font-weight: 700; line-height: 1.3; }
.detail-price-big { font-size: 26px; font-weight: 700; color: var(--brand); }
.detail-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.detail-meta-row { display: flex; flex-wrap: wrap; gap: 12px; font-size: 14px; color: var(--text-muted); }
.detail-desc { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; font-size: 15px; line-height: 1.7; color: var(--text); white-space: pre-wrap; }
.detail-seller { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-card); }
.detail-seller h3 { font-size: 11px; font-weight: 700; color: var(--text-dim); text-transform: uppercase; letter-spacing: .6px; margin-bottom: 10px; }
.seller-name { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.contact-btn { display: flex; align-items: center; gap: 8px; width: 100%; background: var(--brand); color: #fff; border: none; padding: 11px 16px; border-radius: var(--radius-sm); font-size: 15px; font-weight: 700; cursor: pointer; justify-content: center; margin-top: 10px; transition: background .2s; text-decoration: none; }
.contact-btn:hover { background: var(--brand-hover); text-decoration: none; color: #fff; }

/* ─── Message form ─── */
.msg-form { margin-top: 12px; }
.msg-textarea { width: 100%; background: var(--bg3); border: 1px solid var(--border); color: var(--text); padding: 10px 13px; border-radius: var(--radius-sm); font-size: 14px; font-family: inherit; resize: vertical; min-height: 80px; outline: none; transition: border-color .2s; }
.msg-textarea:focus { border-color: var(--brand); }
.msg-textarea::placeholder { color: var(--text-dim); }
.msg-send-btn { margin-top: 8px; }
.msg-login-btn { background: var(--dark3); border: 1px solid var(--border); color: var(--text); margin-top: 12px; }
.msg-login-btn:hover { background: var(--brand); border-color: var(--brand); color: #fff; }
.msg-sent-ok { font-size: 14px; color: var(--text-muted); padding: 12px 0; margin: 0; }

/* ─── Phone reveal ─── */
.phone-reveal-wrap { margin-top: 10px; }
.phone-masked { display: block; font-size: 14px; color: var(--text-muted); letter-spacing: 1px; margin-bottom: 6px; }
.phone-reveal-btn { background: var(--dark3); border: 1px solid var(--border); color: var(--text); }
.phone-reveal-btn:hover { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ─── Owner actions ─── */
.owner-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.btn-outline-sm { padding: 7px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: transparent; color: var(--text); font-size: 13px; font-weight: 600; cursor: pointer; transition: all .15s; white-space: nowrap; }
.btn-outline-sm:hover { border-color: var(--brand); color: var(--brand); }
.btn-outline-sm.btn-active { border-color: var(--brand); color: var(--brand); background: rgba(232,84,26,.08); }
.btn-danger-sm { padding: 7px 12px; border-radius: var(--radius-sm); border: 1px solid #e53; background: transparent; color: #e53; font-size: 13px; font-weight: 600; cursor: pointer; transition: all .15s; white-space: nowrap; }
.btn-danger-sm:hover { background: #e53; color: #fff; }

/* ─── Hidden listing ─── */
.hidden-banner { background: #fef3c7; border: 1px solid #f59e0b; color: #92400e; padding: 10px 14px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 14px; font-weight: 600; }
.listing-hidden { opacity: 0.65; }
.hidden-tag { position: absolute; top: 36px; left: 8px; background: rgba(0,0,0,.65); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 4px; }

/* ─── Forms ─── */
.form-page { max-width: 660px; margin: 0 auto; padding: 32px 0 48px; }
.form-page h1 { font-size: 24px; font-weight: 700; margin-bottom: 24px; letter-spacing: -0.4px; }
.form-page h3 { font-size: 16px; font-weight: 700; margin: 8px 0 16px; }
.form-group { margin-bottom: 18px; }
.form-group > label { display: block; font-size: 13px; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--border-hover);
  color: var(--text);
  padding: 10px 13px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-light);
}
.form-group input:disabled { opacity: .5; cursor: not-allowed; }
.form-group textarea { resize: vertical; min-height: 120px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 24px; }

.type-btns { display: flex; flex-wrap: wrap; gap: 7px; }
.type-btn { cursor: pointer; }
.type-btn input { display: none; }
.type-btn span { display: inline-block; padding: 7px 15px; border-radius: 8px; border: 1.5px solid var(--border-hover); font-size: 13px; color: var(--text-muted); transition: all .2s; font-weight: 500; }
.type-btn input:checked + span { border-color: var(--brand); background: var(--brand-light); color: var(--brand); }
.type-btn:hover span { border-color: var(--brand); color: var(--brand); }

.upload-zone {
  border: 2px dashed var(--border-hover);
  border-radius: var(--radius);
  padding: 28px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--brand);
  background: var(--brand-light);
}
.upload-zone p { font-size: 15px; color: var(--text-muted); margin: 10px 0 4px; }
.upload-zone span { font-size: 12px; color: var(--text-dim); }

.img-preview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 8px; margin-top: 12px; }
.preview-item { position: relative; border-radius: 8px; overflow: hidden; aspect-ratio: 1; }
.preview-item img { width: 100%; height: 100%; object-fit: cover; }
.preview-item .remove-img { position: absolute; top: 3px; right: 3px; background: rgba(0,0,0,.6); border: none; border-radius: 50%; width: 20px; height: 20px; color: #fff; cursor: pointer; font-size: 11px; display: flex; align-items: center; justify-content: center; }

.gdpr-check label { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-muted); cursor: pointer; font-weight: 400; }
.gdpr-check input { flex-shrink: 0; accent-color: var(--brand); width: 15px; height: 15px; cursor: pointer; }

.info-box { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin: 16px 0; }
.info-box h3 { font-size: 15px; margin-bottom: 8px; }
.info-box p { font-size: 14px; color: var(--text-muted); margin-bottom: 12px; }
.danger-zone { border: 1px solid rgba(220,38,38,.25); border-radius: var(--radius); padding: 16px; margin: 16px 0; background: rgba(220,38,38,.04); }
.danger-zone h3 { color: var(--red); font-size: 15px; margin-bottom: 8px; }
.danger-zone p { font-size: 14px; color: var(--text-muted); margin-bottom: 12px; }

/* ─── Buttons ─── */
.btn-primary { background: var(--brand); color: #fff !important; border: none; padding: 10px 20px; border-radius: var(--radius-sm); font-size: 15px; font-weight: 700; cursor: pointer; transition: background .2s; text-decoration: none; }
.btn-primary:hover { background: var(--brand-hover); }
.btn-primary.full { width: 100%; padding: 12px; }
.btn-outline { background: transparent; border: 1px solid var(--border-hover); color: var(--text-muted); padding: 10px 20px; border-radius: var(--radius-sm); font-size: 15px; cursor: pointer; transition: all .2s; }
.btn-outline:hover { border-color: var(--brand); color: var(--brand); }
.btn-danger { background: transparent; border: 1px solid var(--red); color: var(--red); padding: 8px 16px; border-radius: var(--radius-sm); font-size: 14px; cursor: pointer; transition: all .2s; }
.btn-danger:hover { background: var(--red); color: #fff; }
.btn-secondary { background: var(--bg3); border: 1px solid var(--border); color: var(--text-muted); padding: 8px 13px; border-radius: 7px; font-size: 13px; cursor: pointer; transition: all .2s; white-space: nowrap; }
.btn-secondary:hover { border-color: var(--brand); color: var(--brand); }

/* ─── Modals ─── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  backdrop-filter: blur(3px);
}
.modal {
  background: var(--card);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius);
  padding: 26px;
  width: 100%;
  max-width: 420px;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 8px 40px rgba(0,0,0,.15);
}
.modal h2 { font-size: 20px; font-weight: 700; margin-bottom: 20px; }
.modal-close { position: absolute; top: 14px; right: 14px; background: var(--bg3); border: none; color: var(--text-muted); font-size: 16px; cursor: pointer; line-height: 1; padding: 5px 9px; border-radius: 6px; }
.modal-close:hover { color: var(--text); }
.modal-footer { text-align: center; font-size: 14px; color: var(--text-muted); margin-top: 14px; }
.form-error { background: rgba(220,38,38,.07); border: 1px solid rgba(220,38,38,.2); color: var(--red); padding: 9px 13px; border-radius: 7px; font-size: 14px; margin-bottom: 14px; }
.form-success { background: rgba(34,197,94,.08); border: 1px solid rgba(34,197,94,.25); color: #16a34a; padding: 9px 13px; border-radius: 7px; font-size: 14px; margin-bottom: 14px; }

/* ─── Cookie banner ─── */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--card);
  border-top: 1px solid var(--border-hover);
  z-index: 400;
  padding: 14px 16px;
  box-shadow: 0 -4px 20px rgba(0,0,0,.08);
}
.cookie-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.cookie-text { flex: 1; min-width: 220px; }
.cookie-text strong { font-size: 14px; }
.cookie-text p { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.cookie-options { display: flex; flex-wrap: wrap; gap: 12px; }
.cookie-check { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-muted); cursor: pointer; }
.cookie-check input { accent-color: var(--brand); width: 14px; height: 14px; }
.cookie-btns { display: flex; flex-wrap: wrap; gap: 7px; }

.cookie-detail-item { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.cookie-detail-item:last-of-type { border-bottom: none; }
.cookie-detail-item p { font-size: 13px; color: var(--text-muted); margin-top: 3px; }
.badge-always { background: var(--brand-light); color: var(--brand); font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 20px; white-space: nowrap; flex-shrink: 0; }

.toggle { position: relative; flex-shrink: 0; cursor: pointer; }
.toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-track { display: block; width: 40px; height: 22px; background: var(--bg3); border: 1.5px solid var(--border-hover); border-radius: 11px; transition: background .2s; position: relative; }
.toggle-track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; background: var(--text-dim); border-radius: 50%; transition: transform .2s, background .2s; }
.toggle input:checked + .toggle-track { background: var(--brand-light); border-color: var(--brand); }
.toggle input:checked + .toggle-track::after { transform: translateX(18px); background: var(--brand); }

/* ─── Toast ─── */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--card);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-sm);
  padding: 11px 16px;
  font-size: 14px;
  z-index: 600;
  box-shadow: var(--shadow);
  max-width: 320px;
  font-weight: 500;
}
.toast.success { border-color: #16a34a; color: #15803d; }
.toast.error { border-color: var(--red); color: var(--red); }
[data-theme="dark"] .toast.success { color: #4ade80; }
[data-theme="dark"] .toast.error { color: #f87171; }

/* ─── Legal pages ─── */
.legal-page { max-width: 760px; margin: 0 auto; padding: 32px 0 60px; }
.legal-page h1 { font-size: 28px; font-weight: 700; margin-bottom: 6px; }
.legal-meta { color: var(--text-muted); font-size: 14px; margin-bottom: 32px; }
.legal-page h2 { font-size: 17px; font-weight: 700; margin: 28px 0 10px; color: var(--text); border-bottom: 1px solid var(--border); padding-bottom: 6px; }
.legal-page p { font-size: 15px; color: var(--text-muted); line-height: 1.75; margin-bottom: 10px; }
.legal-page ul { padding-left: 20px; margin-bottom: 10px; }
.legal-page li { font-size: 15px; color: var(--text-muted); line-height: 1.75; margin-bottom: 5px; }
.legal-page a { color: var(--brand); }
.legal-table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 12px 0 20px; }
.legal-table th { text-align: left; padding: 9px 12px; background: var(--bg3); border: 1px solid var(--border); font-weight: 600; font-size: 13px; }
.legal-table td { padding: 9px 12px; border: 1px solid var(--border); color: var(--text-muted); }
.contact-cards { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin: 24px 0 36px; }
.contact-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px 20px; text-align: center; }
.contact-icon { font-size: 32px; margin-bottom: 10px; }
.contact-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.contact-card p { font-size: 13px; color: var(--text-muted); margin-bottom: 10px; }
.contact-link { font-size: 14px; font-weight: 600; color: var(--brand); word-break: break-all; }
.faq-list { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; margin-bottom: 4px; }
.faq-item { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; }
.faq-item strong { display: block; font-size: 15px; font-weight: 700; margin-bottom: 6px; color: var(--text); }
.faq-item p { margin: 0; font-size: 14px; color: var(--text-muted); line-height: 1.65; }
.faq-contact-cta { margin-top: 40px; padding: 28px 24px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); text-align: center; }
.faq-contact-cta p { font-size: 16px; font-weight: 600; margin-bottom: 14px; color: var(--text); }
@media (max-width: 640px) {
  .contact-cards { grid-template-columns: 1fr; }
  .legal-page h1 { font-size: 22px; }
}

/* ─── Footer ─── */
.footer { background: var(--bg2); border-top: 1px solid var(--border); padding: 22px 16px; margin-top: auto; }
.footer-inner { max-width: 1200px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; }
.logo-text { font-size: 15px; font-weight: 700; color: var(--text); }
.logo-text strong { color: var(--brand); }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand p { font-size: 13px; color: var(--text-dim); margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 14px; }
.footer-links a { font-size: 13px; color: var(--text-dim); }
.footer-links a:hover { color: var(--brand); }

/* ─── Touch – greitas paspaudimas visuose įrenginiuose ─── */
a, button, [role="button"], .cat-card, .listing-card, .type-btn, .page-btn {
  touch-action: manipulation;
}

/* ─── Responsive – planšetė ─── */
@media (max-width: 900px) {
  .listings-layout { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; top: 0; left: -100%; width: 80%; max-width: 320px;
    height: 100dvh; overflow-y: auto; z-index: 50;
    transition: left .28s cubic-bezier(.4,0,.2,1);
    box-shadow: 4px 0 24px rgba(0,0,0,.18);
  }
  .sidebar.open { left: 0; }
  .sidebar-toggle { display: flex; align-items: center; }
  .filter-close-btn { display: block; }
  .filter-apply-btn { display: block; }
  .detail-layout { grid-template-columns: 1fr; }
}

/* ─── Responsive – mobilusis ─── */
@media (max-width: 640px) {

  /* ── Navbar ── */
  .nav-inner { padding: 0 12px; height: 52px; gap: 6px; }
  .nav-search { display: none; }
  .burger { display: flex; }
  #auth-btns { display: none; }
  .logo svg { width: 22px; height: 22px; }
  .logo-text { font-size: 15px; }
  .nav-right-group { padding: 2px; gap: 1px; }
  .nav-right-group .btn-add { display: none; } /* meniu mobiliam */

  /* ── Mobile menu ── */
  .mobile-menu a { padding: 13px 4px; font-size: 15px; min-height: 44px; display: flex; align-items: center; }
  #mobile-auth, #mobile-user { gap: 10px; }
  #mobile-auth .btn-outline-sm,
  #mobile-auth .btn-primary-sm { padding: 12px 16px; font-size: 14px; width: 100%; text-align: center; border-radius: 9px; }
  #mobile-user .btn-primary-sm { padding: 12px 16px; font-size: 14px; width: 100%; border-radius: 9px; }

  /* ── Hero ── */
  .hero { padding: 28px 16px 36px; }
  .hero h1 { font-size: clamp(22px, 6vw, 32px); }
  .hero-sub { font-size: 13px; margin-top: 5px; }
  .hero-content > p { font-size: 14px; margin-bottom: 20px; }
  .hero-stats-row { gap: 6px; }
  .hero-stat-pill { font-size: 12px; padding: 4px 11px; }
  .hero-search { flex-direction: column; }
  .hero-search select {
    border-right: none;
    border-bottom: 1px solid var(--border);
    min-width: auto;
    font-size: 16px; /* neleidžia iOS priartinti */
  }
  .hero-search input { font-size: 16px; padding: 13px 14px; }
  .hero-search button { width: 100%; padding: 14px; }

  /* ── Kategorijos ── */
  .cats-section { padding: 20px 0 16px; }
  .cats-grid { grid-template-columns: repeat(5, 1fr); gap: 8px; }
  .cat-card { padding: 14px 4px 12px; gap: 7px; border-radius: 12px; }
  .cat-icon { width: 26px; height: 26px; }
  .cat-name { font-size: 10px; }

  /* ── Skelbimai ── */
  .listings-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .listing-img { height: 130px; }
  .listing-body { padding: 9px 10px 11px; }
  .listing-title { font-size: 13px; }
  .listing-price { font-size: 15px; margin-bottom: 4px; }
  .listing-meta { font-size: 11px; gap: 5px; }
  .skeleton-card { height: 210px; }

  /* ── Detalė ── */
  .back-btn { margin: 12px 0; font-size: 13px; padding: 8px 12px; }
  .detail-main-img, .detail-img-placeholder { height: 220px; }
  .detail-info h1 { font-size: 18px; }
  .detail-price-big { font-size: 22px; }
  .detail-thumbs { gap: 6px; }
  .detail-thumb { width: 58px; height: 46px; }
  .detail-meta-row { gap: 8px; font-size: 13px; }
  .contact-btn { padding: 13px 16px; font-size: 15px; min-height: 52px; }
  .img-nav { opacity: 0.7; }

  /* ── Formos ── */
  .form-page { padding: 18px 0 32px; }
  .form-page h1 { font-size: 20px; margin-bottom: 16px; }
  .form-row { grid-template-columns: 1fr; }
  /* Blokuoja iOS auto-zoom kai focus ant input */
  .form-group input,
  .form-group select,
  .form-group textarea,
  .filter-group input,
  .filter-group select { font-size: 16px; }
  .type-btn span { padding: 10px 14px; min-height: 44px; display: flex; align-items: center; justify-content: center; }

  /* ── Filtrai (skelbimai) ── */
  .listings-layout { padding: 16px 0; }
  .results-bar { margin-bottom: 10px; }

  /* ── Modalai – bottom sheet ── */
  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal {
    border-radius: 18px 18px 0 0;
    max-width: 100%;
    width: 100%;
    max-height: 92vh;
    padding: 20px 16px 32px;
  }
  .modal h2 { font-size: 18px; margin-bottom: 16px; }
  .modal-close { top: 12px; right: 12px; }
  /* Rankena viršuje */
  .modal::before {
    content: '';
    display: block;
    width: 36px;
    height: 4px;
    background: var(--border-hover);
    border-radius: 2px;
    margin: 0 auto 16px;
  }

  /* ── Toast ── */
  .toast { left: 12px; right: 12px; bottom: 12px; max-width: none; font-size: 13px; }

  /* ── Footer ── */
  .footer { padding: 18px 16px; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 10px; }
  .footer-links { gap: 10px; flex-wrap: wrap; }

  /* ── Cookie ── */
  .cookie-inner { flex-direction: column; }
  .cookie-btns { flex-wrap: wrap; }
  .cookie-btns .btn-secondary, .cookie-btns .btn-primary { flex: 1; min-width: 120px; text-align: center; }

  /* ── Admin ── (jei reikia) */
  .admin-stats { grid-template-columns: 1fr 1fr; }
}

/* ─── Extra fields forma ─── */
.extra-fields-section { margin-top: 4px; padding: 16px 20px; background: var(--bg3); border-radius: var(--radius); border: 1px solid var(--border); }
.extra-fields-section h3 { font-size: 13px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; margin: 0 0 14px; }
.extra-fields-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
@media (max-width: 600px) { .extra-fields-grid { grid-template-columns: 1fr; } }

/* ─── Extra fields rodoma lentelė ─── */
.params-table { width: 100%; border-collapse: collapse; margin-top: 6px; font-size: 14px; }
.params-table tr:nth-child(odd)  td { background: var(--bg3); }
.params-table tr:nth-child(even) td { background: var(--card); }
.params-table td { padding: 7px 12px; border: 1px solid var(--border); color: var(--text-muted); line-height: 1.4; }
.params-table td:first-child { font-weight: 600; color: var(--text); white-space: nowrap; width: 40%; }
.params-section { margin-top: 20px; }
.params-section h3 { font-size: 13px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; margin: 0 0 8px; }

/* ─── Skelbimo detalė – naujas maketas ─── */
.det-header { margin-bottom: 18px; }
.det-cat-badge { background: var(--bg3); color: var(--text-muted); border: 1px solid var(--border); padding: 3px 10px; border-radius: 6px; font-size: 12px; font-weight: 500; display: inline-block; }
.det-title { font-size: 24px; font-weight: 800; margin: 8px 0 12px; line-height: 1.25; color: var(--text); }
.det-price-row { display: flex; align-items: baseline; gap: 20px; flex-wrap: wrap; }
.det-meta-chips { display: flex; gap: 14px; flex-wrap: wrap; }
.det-meta-chips span { font-size: 13px; color: var(--text-muted); }

.det-body-grid { display: grid; grid-template-columns: 55% 1fr; gap: 24px; margin-bottom: 20px; align-items: start; }
.det-left-col { display: flex; flex-direction: column; gap: 14px; }
.det-images-col {}
.det-side-col { display: flex; flex-direction: column; gap: 14px; }

/* Parametrų kortelė */
.det-params-box { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; }
.det-section-lbl { font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .6px; margin-bottom: 12px; }
.det-params-chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.det-param { background: var(--bg3); border-radius: 8px; padding: 8px 12px; min-width: 0; overflow: hidden; }
.det-param-lbl { display: block; font-size: 11px; color: var(--text-dim); margin-bottom: 3px; text-transform: capitalize; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.det-param-val { display: block; font-size: 13px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Pardavėjo kortelė */
.det-seller-box { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; }

/* Aprašymas */
.det-desc-box { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 32px; }
.det-desc-body { font-size: 15px; line-height: 1.75; color: var(--text-muted); white-space: pre-wrap; margin-top: 10px; }

@media (max-width: 820px) {
  .det-body-grid { grid-template-columns: 1fr; }
  .det-side-col { gap: 12px; }
  .det-params-chips { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .det-title { font-size: 19px; }
  .detail-price-big { font-size: 22px; }
  .det-params-chips { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 400px) {
  .det-params-chips { grid-template-columns: 1fr 1fr; }
}

/* ─── Multi-checkbox (papildomai) ─── */
.ef-multi-wrap { margin-top: 4px; }
.ef-multi-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.ef-multi-item { display: flex; align-items: center; gap: 6px; background: var(--bg3); border: 1px solid var(--border); border-radius: 8px; padding: 7px 12px; cursor: pointer; font-size: 13px; transition: border-color .15s, background .15s; user-select: none; }
.ef-multi-item:hover { border-color: var(--brand); }
.ef-multi-item input[type="checkbox"] { accent-color: var(--brand); width: 15px; height: 15px; cursor: pointer; }
.ef-multi-item:has(input:checked) { border-color: var(--brand); background: var(--brand-light); }

/* ─── Extra fields filtrai sidebar'e ─── */
#f-extra-fields .filter-group { margin-top: 0; }
#f-extra-fields label { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .3px; }

/* ─── Messaging ─── */
.nav-badge { background:var(--brand); color:#fff; font-size:10px; font-weight:700; padding:1px 6px; border-radius:10px; margin-left:4px; vertical-align:middle; }
.nav-badge.hidden { display:none; }

.avatar-msg-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--brand);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid var(--nav-bg);
  cursor: pointer;
  z-index: 10;
  line-height: 1;
  animation: badge-pop .25s ease;
  pointer-events: auto;
}
.avatar-msg-badge.hidden { display: none; }
@keyframes badge-pop {
  0%   { transform: scale(0); }
  70%  { transform: scale(1.2); }
  100% { transform: scale(1); }
}

#messages-layout { display:grid; grid-template-columns:300px 1fr; gap:0; min-height:500px; border:1px solid var(--border); border-radius:var(--radius); overflow:hidden; background:var(--card); margin:16px 0 32px; }

.msg-sidebar { border-right:1px solid var(--border); display:flex; flex-direction:column; overflow:hidden; }
.msg-sidebar-hdr { padding:16px; border-bottom:1px solid var(--border); flex-shrink:0; }
.msg-sidebar-hdr h2 { font-size:16px; font-weight:700; }
#conv-list-items { overflow-y:auto; flex:1; }

.conv-item { padding:12px 16px; border-bottom:1px solid var(--border); cursor:pointer; transition:background .15s; }
.conv-item:hover, .conv-item.active { background:var(--brand-light); }
.conv-item-top { display:flex; justify-content:space-between; align-items:baseline; gap:8px; margin-bottom:3px; }
.conv-name { font-size:14px; font-weight:600; color:var(--text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.conv-name.conv-unread { color:var(--brand); }
.conv-time { font-size:11px; color:var(--text-dim); flex-shrink:0; }
.conv-listing { font-size:11px; color:var(--text-muted); margin-bottom:4px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.conv-preview { font-size:12px; color:var(--text-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; display:flex; align-items:center; gap:6px; }
.conv-preview.conv-unread { color:var(--text); font-weight:600; }
.conv-badge { background:var(--brand); color:#fff; font-size:10px; font-weight:700; padding:1px 6px; border-radius:10px; flex-shrink:0; }

.msg-main { display:flex; flex-direction:column; overflow:hidden; }
.msg-empty-state { display:flex; flex-direction:column; align-items:center; justify-content:center; flex:1; padding:40px; }
.msg-thread-hdr { padding:14px 16px; border-bottom:1px solid var(--border); flex-shrink:0; background:var(--card); }
.msg-thread-name { font-size:15px; font-weight:700; }
.msg-thread-listing { margin-top:2px; }
.msg-bubbles { flex:1; overflow-y:auto; padding:16px; display:flex; flex-direction:column; gap:10px; max-height:420px; }
.msg-bubble-wrap { display:flex; }
.msg-bubble-wrap.mine { justify-content:flex-end; }
.msg-bubble { max-width:70%; background:var(--bg3); border-radius:12px 12px 12px 2px; padding:10px 14px; }
.msg-bubble.mine { background:var(--brand); color:#fff; border-radius:12px 12px 2px 12px; }
.msg-bubble-text { font-size:14px; line-height:1.6; white-space:pre-wrap; word-break:break-word; }
.msg-bubble-meta { font-size:11px; margin-top:4px; opacity:.7; display:flex; align-items:center; gap:6px; }
.msg-del-btn { background:none; border:none; cursor:pointer; font-size:12px; opacity:.6; padding:0 2px; color:inherit; }
.msg-del-btn:hover { opacity:1; }
.msg-reply-box { padding:12px; border-top:1px solid var(--border); flex-shrink:0; background:var(--card); }
.msg-reply-input { width:100%; background:var(--bg3); border:1px solid var(--border); color:var(--text); padding:10px 12px; border-radius:8px; font-size:14px; font-family:inherit; resize:none; outline:none; }
.msg-reply-input:focus { border-color:var(--brand); }
.msg-reply-footer { display:flex; justify-content:space-between; align-items:center; margin-top:8px; }

@media (max-width:700px) {
  #messages-layout { grid-template-columns:1fr; }
  .msg-sidebar { max-height:250px; border-right:none; border-bottom:1px solid var(--border); }
  .msg-bubbles { max-height:300px; }
}

/* ─── Maži telefonai (≤ 400px) ─── */
@media (max-width: 400px) {
  .listings-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .listing-img { height: 115px; }
  .listing-body { padding: 8px; }
  .listing-title { font-size: 12px; }
  .listing-price { font-size: 14px; }
  .hero h1 { font-size: 21px; }
  .hero-stat-pill { font-size: 11px; padding: 3px 9px; }
  .cats-grid { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .cat-card { padding: 12px 3px 10px; gap: 6px; border-radius: 10px; }
  .cat-icon { width: 22px; height: 22px; }
  .cat-name { font-size: 9.5px; }
}

@media (max-width: 360px) {
  .cats-grid { grid-template-columns: repeat(4, 1fr); gap: 5px; }
  .cat-name { font-size: 9px; }
}
