:root {
  --primary: #0483c6;
  --primary-dark: #04138a;
  --ink: #0f2033;
  --muted: #5b6b7b;
  --bg: #f4f7fb;
  --card: #ffffff;
  --line: #e3ebf3;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(4, 19, 138, 0.08);
  --shadow-hover: 0 18px 44px rgba(4, 19, 138, 0.16);
}

* { box-sizing: border-box; }

html { overflow-x: hidden; }

body {
  margin: 0;
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

img { max-width: 100%; height: auto; }

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header ------------------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; line-height: 1.1; }
.brand:hover { text-decoration: none; }
.brand-logo {
  height: 46px;
  width: 46px;
  object-fit: contain;
  display: block;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-mark {
  font-weight: 900;
  font-size: 1.35rem;
  letter-spacing: 2px;
  color: var(--primary);
}
.brand-sub { font-size: 0.75rem; color: var(--muted); letter-spacing: 1px; }
.site-nav { display: flex; gap: 18px; margin-left: auto; }
.nav-link { font-weight: 600; color: var(--ink); }
.nav-link.active { color: var(--primary); }
.call-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: var(--shadow);
}
.call-btn:hover { text-decoration: none; filter: brightness(1.05); }
.call-ico { font-size: 1.05em; }

/* Header actions (search toggle, call, menu) */
.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.icon-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  color: var(--ink);
  cursor: pointer;
}
.icon-btn:hover { border-color: var(--primary); color: var(--primary); }
.menu-bars { display: flex; flex-direction: column; gap: 4px; justify-content: center; }
.menu-bars i { display: block; width: 20px; height: 2px; background: currentColor; border-radius: 2px; }
.mobile-menu-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 32, 51, 0.45);
  z-index: 48;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.mobile-menu-backdrop.show { opacity: 1; pointer-events: all; }

/* Header search ------------------------------------------------------------ */
.header-search {
  position: relative;
  flex: 1 1 240px;
  max-width: 420px;
  display: flex;
  align-items: center;
}
.header-search input {
  width: 100%;
  padding: 10px 44px 10px 16px;
  font-size: 0.95rem;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  outline: none;
  background: var(--bg);
}
.header-search input:focus { border-color: var(--primary); background: #fff; }
.header-search button {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--primary);
  color: #fff;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.9rem;
}
.header-search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  margin: 0;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-hover);
  max-height: 70vh;
  overflow-y: auto;
  z-index: 60;
  display: block;
}
.header-search-results[hidden] { display: none; }
.header-search-results .search-results { display: block; margin: 0; }
.header-search-results .search-item { margin-bottom: 6px; }
.header-search-results .search-more { display: block; }

/* Homepage: one search only (the hero one). Hide the header search there. */
body.is-home .header-search { display: none; }

/* Hero search -------------------------------------------------------------- */
.hero-search {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 560px;
  margin: 0 0 22px;
}
.hero-search input {
  width: 100%;
  padding: 16px 130px 16px 20px;
  font-size: 1.02rem;
  border: none;
  border-radius: 999px;
  outline: none;
  box-shadow: 0 8px 24px rgba(4, 19, 138, 0.25);
}
.hero-search button {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border: none;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}
.hero-search .header-search-results {
  top: calc(100% + 8px);
  left: 0;
  right: 0;
}

main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}

/* Breadcrumb -------------------------------------------------------------- */
.breadcrumb {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 4px 0 20px;
}

/* Hero band --------------------------------------------------------------- */
.hero-band {
  background: linear-gradient(135deg, #eaf4fb, #ffffff 70%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 28px;
  box-shadow: var(--shadow);
}
.hero-band h1 { margin: 0 0 10px; font-size: 2rem; }
.hero-band p { margin: 0 0 18px; color: var(--muted); max-width: 70ch; }

/* Buttons ----------------------------------------------------------------- */
.btn-primary, .btn-secondary {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 700;
  margin: 6px 8px 6px 0;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: var(--shadow);
}
.btn-primary:hover { text-decoration: none; filter: brightness(1.05); }
.btn-secondary {
  background: #fff;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn-secondary:hover { text-decoration: none; background: #eef7fd; }
.btn-viber {
  background: #7360f2;
  color: #fff;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
}
.btn-viber:hover { text-decoration: none; background: #665ca7; }
.btn-viber .ico { color: #fff; }
.btn-primary svg, .btn-secondary svg, .card-viber svg, .card-call svg { vertical-align: -2px; }
.card-viber, .card-call { display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
/* Viber official logo (src/img/viber.svg) — always shown white (used on purple/dark) */
.viber-ico { display: inline-block; vertical-align: -3px; filter: brightness(0) invert(1); }

/* OLX official logo (src/img/olx.svg) */
.olx-ico { display: inline-block; vertical-align: -3px; object-fit: contain; }
.footer-olx { filter: brightness(0) invert(1); }

/* Toast (Viber fallback hint) --------------------------------------------- */
.rikambi-toast {
  position: fixed;
  left: 50%;
  bottom: calc(80px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(20px);
  background: #0f2033;
  color: #fff;
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  max-width: 90vw;
  text-align: center;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 300;
}
.rikambi-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Grid + cards ------------------------------------------------------------ */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px;
}
.card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }
.card-media {
  display: block;
  aspect-ratio: 4 / 3;
  background: #eef2f7;
  overflow: hidden;
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.card:hover .card-media img { transform: scale(1.06); }
.card-body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-title { margin: 0; font-size: 1rem; line-height: 1.35; }
.card-title a { color: var(--ink); }
.card-price { margin: 2px 0 0; font-size: 1.25rem; font-weight: 900; color: var(--primary); }
.card-note { margin: 0; font-size: 0.8rem; color: var(--muted); }
.card-call {
  margin-top: auto;
  padding-top: 10px;
  font-weight: 700;
  font-size: 0.9rem;
}

/* Listing detail ---------------------------------------------------------- */
.listing {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 32px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}
.listing-gallery { align-content: start; }
.gallery-viewer { display: flex; flex-direction: column; gap: 10px; }
.gallery-main {
  position: relative;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #eef2f7;
  cursor: zoom-in;
  aspect-ratio: 4 / 3;
}
.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.gallery-counter {
  position: absolute;
  right: 10px;
  bottom: 10px;
  background: rgba(15, 32, 51, 0.75);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}
.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  gap: 8px;
}
.gallery-thumb {
  padding: 0;
  border: 2px solid transparent;
  border-radius: 10px;
  overflow: hidden;
  background: #eef2f7;
  cursor: pointer;
  aspect-ratio: 1;
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-thumb.active { border-color: var(--primary); }
.gallery-thumb:hover { border-color: var(--primary); }

/* Lightbox ----------------------------------------------------------------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(8, 15, 26, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.lightbox[hidden] { display: none; }
.lightbox-img {
  max-width: 94vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}
.lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.3); }
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 2.2rem;
  line-height: 1;
  cursor: pointer;
}
.lightbox-nav:hover { background: rgba(255, 255, 255, 0.3); }
.lightbox-prev { left: 14px; }
.lightbox-next { right: 14px; }
.lightbox-counter {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 6px 14px;
  border-radius: 999px;
}
.listing-info h1 { margin-top: 0; font-size: 1.7rem; }
.listing-price { font-size: 1.7rem; font-weight: 900; color: var(--primary); margin: 6px 0; }
.listing-avail {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  color: #0a7a3f;
  background: #e6f7ec;
  border-radius: 999px;
  padding: 4px 12px;
  margin: 0 0 14px;
}
.specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 20px;
  margin: 22px 0;
  padding: 16px;
  background: var(--bg);
  border-radius: 12px;
}
.spec { margin: 0; }
.spec dt { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); }
.spec dd { margin: 2px 0 0; font-weight: 600; }
.listing-info h2 { font-size: 1.15rem; margin: 22px 0 6px; }
.listing-desc { color: var(--ink); }
.related { margin: 24px 0 0; }
.related a { font-weight: 700; }

/* Prose (terms) ----------------------------------------------------------- */
.prose {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  max-width: 820px;
}
.prose h1 { margin-top: 0; }
.prose h2 { font-size: 1.2rem; margin-top: 26px; }

/* Pager ------------------------------------------------------------------- */
.pager { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 34px 0 0; }
.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-weight: 600;
  color: var(--ink);
}
.page-link.current { background: var(--primary); color: #fff; border-color: var(--primary); }
.page-link.page-nav { font-weight: 800; }
.page-gap { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; color: var(--muted); }

/* Sticky mobile call bar -------------------------------------------------- */
.mobile-call {
  display: none;
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 60;
  gap: 8px;
  border-radius: 14px;
}
.mobile-call-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 10px;
  border-radius: 14px;
  color: #fff;
  font-weight: 800;
  font-size: 0.98rem;
  text-decoration: none;
  box-shadow: 0 8px 30px rgba(4, 19, 138, 0.3);
}
.mobile-call-btn:hover { text-decoration: none; }
.mobile-call-phone { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); }
.mobile-call-viber { background: #7360f2; }

/* Footer ------------------------------------------------------------------ */
/* Layout with left sidebar ------------------------------------------------- */
.layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 28px;
  align-items: start;
}
.layout-side { position: sticky; top: 84px; }
.layout-main { min-width: 0; }

.filters-toggle { display: none; }
.filters-backdrop { display: none; }
.cat-chips { display: none; }

.sidebar {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  max-height: calc(100vh - 110px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 800;
  font-size: 1rem;
  color: var(--ink);
}
.sidebar-close {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
}
.side-search input {
  width: 100%;
  padding: 12px 14px;
  font-size: 0.95rem;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  outline: none;
}
.side-search input:focus { border-color: var(--primary); }
.side-group { display: flex; flex-direction: column; min-height: 0; }
.side-title {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin: 0 0 8px;
}
.side-scroll {
  overflow-y: auto;
  max-height: 220px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.side-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.92rem;
  color: var(--ink);
  white-space: normal;
  line-height: 1.3;
}
.side-link:hover { background: #eef6fc; text-decoration: none; }
.side-link.active { background: var(--primary); color: #fff; font-weight: 700; }
.side-link.active .side-count { background: #fff; color: var(--primary); opacity: 1; }
.side-count {
  font-size: 0.75rem;
  color: var(--muted);
  background: var(--bg);
  border-radius: 999px;
  padding: 1px 8px;
  flex-shrink: 0;
}
.side-reset {
  width: 100%;
  padding: 10px;
  border: 1.5px solid var(--line);
  background: #fff;
  border-radius: 10px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
}
.side-reset:hover { border-color: var(--primary); color: var(--primary); }
.side-count-live { text-align: center; font-size: 0.85rem; color: var(--muted); margin: 8px 0 0; }

.no-results { grid-column: 1 / -1; text-align: center; padding: 40px; color: var(--muted); }

/* Card actions ------------------------------------------------------------ */
.card-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 10px; }
.card-call, .card-viber {
  flex: 1;
  text-align: center;
  padding: 9px 0;
  border-radius: 9px;
  font-weight: 700;
  font-size: 0.9rem;
}
.card-call { background: var(--primary); color: #fff; }
.card-call:hover { text-decoration: none; filter: brightness(1.05); }
.card-viber { background: #7360f2; color: #fff; }
.card-viber:hover { text-decoration: none; background: #665ca7; }

/* Listing CTA row --------------------------------------------------------- */
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0; }
.cta-row .btn-primary,
.cta-row .btn-secondary {
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.btn-ghost {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 700;
  background: transparent;
  color: var(--muted);
  border: 1.5px dashed var(--line);
}
.btn-ghost:hover { text-decoration: none; border-color: var(--primary); color: var(--primary); }
.brand-links { margin: 10px 0; font-size: 0.95rem; }

/* Chips + brand tiles ----------------------------------------------------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip {
  display: inline-block;
  padding: 7px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
}
.chip:hover { text-decoration: none; border-color: var(--primary); color: var(--primary); }
.brand-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}
.brand-logo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}
.brand-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 128px;
  padding: 22px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  text-align: center;
}
.brand-tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary);
  text-decoration: none;
}
.brand-logo-box {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 56px;
  width: 100%;
}
.brand-tile-logo img {
  width: auto;
  height: 52px;
  max-width: 110px;
  max-height: 52px;
  object-fit: contain;
  filter: grayscale(0.15);
  transition: filter 0.2s;
  display: block;
}
.brand-tile:hover.brand-tile-logo img { filter: grayscale(0); }
.brand-tile-text {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 56px;
  width: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-weight: 900;
  font-size: 1.3rem;
  letter-spacing: 1px;
}
.brand-tile-name { font-size: 0.92rem; font-weight: 700; color: var(--ink); }
.brand-tile-count { font-size: 0.75rem; color: var(--muted); }
.home-more { margin: 16px 0 0; }

/* Home page --------------------------------------------------------------- */
.home-hero {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(4, 131, 198, 0.92), rgba(4, 19, 138, 0.92)),
    radial-gradient(circle at 20% 20%, #0a9fe6, #04138a);
  color: #fff;
  padding: 64px 40px;
  margin-bottom: 40px;
  box-shadow: var(--shadow-hover);
}
.home-hero-inner { max-width: 760px; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.8rem;
  font-weight: 700;
  opacity: 0.85;
  margin: 0 0 12px;
}
.home-hero h1 { font-size: 2.5rem; margin: 0 0 16px; line-height: 1.15; }
.home-lead { font-size: 1.15rem; opacity: 0.95; margin: 0 0 26px; }
.home-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.home-cta .btn-primary { background: #fff; color: var(--primary-dark); }
.home-cta .btn-secondary { background: transparent; color: #fff; border-color: #ffffffaa; }

.home-block { margin: 0 0 48px; }
.home-block h2 { font-size: 1.7rem; margin: 0 0 18px; }
.home-sub { color: var(--muted); margin: -8px 0 16px; }

.cat-grouped {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px 40px;
}
.cat-family-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--primary);
  margin: 0 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
.cat-rows { display: flex; flex-direction: column; }
.cat-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 8px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  transition: background 0.15s, color 0.15s;
}
.cat-row:last-child { border-bottom: none; }
.cat-row:hover { background: #eef6fc; text-decoration: none; color: var(--primary); }
.cat-row-ico {
  font-size: 1.15rem;
  width: 28px;
  text-align: center;
  flex-shrink: 0;
}
.cat-row-name { flex: 1; font-weight: 600; }
.cat-row-count {
  font-size: 0.8rem;
  color: var(--muted);
  background: var(--bg);
  border-radius: 999px;
  padding: 2px 10px;
}
.cat-row-arrow { color: var(--primary); opacity: 0.5; flex-shrink: 0; }
.cat-row:hover .cat-row-arrow { opacity: 1; }

.features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.feature {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.feature h3 { margin: 0 0 8px; font-size: 1.05rem; color: var(--primary); }
.feature p { margin: 0; color: var(--muted); font-size: 0.95rem; }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}
.contact-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
}
.contact-card h3 { margin-top: 0; }
.contact-card p { margin: 6px 0; }

.faq details {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 4px 20px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
}
.faq summary {
  cursor: pointer;
  font-weight: 700;
  padding: 14px 0;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; float: right; color: var(--primary); font-weight: 900; }
.faq details[open] summary::after { content: '−'; }
.faq p { margin: 0 0 14px; color: var(--muted); }

/* Home search ------------------------------------------------------------- */
.home-search {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px;
  margin-bottom: 48px;
}
.home-search h2 { margin: 0 0 6px; font-size: 1.5rem; }
.home-search-box {
  position: relative;
  display: flex;
  align-items: center;
  margin-top: 14px;
  max-width: 640px;
}
.home-search-box input {
  width: 100%;
  padding: 16px 48px 16px 20px;
  font-size: 1.05rem;
  border: 2px solid var(--line);
  border-radius: 14px;
  outline: none;
  transition: border-color 0.2s;
}
.home-search-box input:focus { border-color: var(--primary); }
.search-results {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}
.search-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdff;
  transition: border-color 0.2s, background 0.2s;
}
.search-item:hover { border-color: var(--primary); background: #fff; text-decoration: none; }
.search-item img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  background: #eef2f7;
}
.search-item-body { display: flex; flex-direction: column; min-width: 0; }
.search-item-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.search-item-price { font-size: 0.9rem; font-weight: 800; color: var(--primary); margin-top: 2px; }
.search-more {
  grid-column: 1 / -1;
  text-align: center;
  padding: 12px;
  font-weight: 700;
  border: 1px dashed var(--line);
  border-radius: 12px;
}
.search-empty { grid-column: 1 / -1; color: var(--muted); text-align: center; padding: 20px; }

/* Search page -------------------------------------------------------------- */
.home-search-submit {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 11px 20px;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
}
.home-search-box { position: relative; }
.searchpage-box { max-width: 640px; }
.search-status { margin: 0 0 14px; color: var(--muted); font-size: 0.92rem; }
.search-page-more { text-align: center; margin: 26px 0 0; }
.search-page-more .btn-secondary { cursor: pointer; }

/* Features ----------------------------------------------------------------- */
.feature-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: linear-gradient(135deg, #eaf4fb, #d5ecfa);
  color: var(--primary-dark);
  font-weight: 900;
  font-size: 1.05rem;
  margin-bottom: 10px;
}

/* About block -------------------------------------------------------------- */
.about-block { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 36px; }
.about-inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: 36px; align-items: center; }
.eyebrow-dark {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--primary);
  margin: 0 0 8px;
}
.about-text h2 { margin: 0 0 14px; font-size: 1.7rem; }
.about-text p { color: var(--ink); }
.about-list { list-style: none; padding: 0; margin: 16px 0 22px; }
.about-list li { position: relative; padding-left: 26px; margin: 8px 0; color: var(--ink); }
.about-list li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 6px;
  width: 7px;
  height: 12px;
  border: solid var(--primary);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}
.about-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.stat {
  background: linear-gradient(135deg, #f1f8fd, #e6f2fb);
  border: 1px solid #d5e8f6;
  border-radius: 14px;
  padding: 20px 14px;
  text-align: center;
}
.stat-num { display: block; font-size: 1.9rem; font-weight: 900; color: var(--primary-dark); line-height: 1; }
.stat-label { display: block; font-size: 0.82rem; color: var(--muted); margin-top: 6px; }

/* FAQ grid ----------------------------------------------------------------- */
.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}
.faq-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 6px 20px;
  box-shadow: var(--shadow);
  transition: border-color 0.2s;
}
.faq-card[open] { border-color: var(--primary); }
.faq-card summary {
  cursor: pointer;
  font-weight: 700;
  padding: 16px 0;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.faq-card summary::-webkit-details-marker { display: none; }
.faq-card summary::after { content: '+'; color: var(--primary); font-weight: 900; font-size: 1.3rem; flex-shrink: 0; }
.faq-card[open] summary::after { content: '−'; }
.faq-card p { margin: 0 0 16px; color: var(--muted); }
.faq-cta {
  margin-top: 22px;
  padding: 24px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: var(--radius);
  color: #fff;
  text-align: center;
  box-shadow: var(--shadow);
}
.faq-cta p { margin: 0 0 14px; font-size: 1.1rem; }
.faq-cta .btn-primary { background: #fff; color: var(--primary-dark); }
.faq-cta .btn-secondary { background: transparent; color: #fff; border-color: #ffffffaa; }

@media (max-width: 720px) {
  .home-hero { padding: 40px 22px; }
  .home-hero h1 { font-size: 1.8rem; }
  .contact-grid { grid-template-columns: 1fr; }
  .about-inner { grid-template-columns: 1fr; gap: 24px; }
  .about-block { padding: 24px; }
  .faq-grid { grid-template-columns: 1fr; }
}

.site-footer {
  background: #0f2033;
  color: #cdd8e4;
  margin-top: 40px;
}
.footer-inner { max-width: 1180px; margin: 0 auto; padding: 40px 20px 28px; }
.footer-cols {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 28px;
}
.footer-col h4 {
  color: #fff;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin: 0 0 14px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 1px;
  line-height: 1.15;
  color: #fff;
}
.footer-brand img { filter: brightness(0) invert(1); opacity: 0.95; }
.footer-muted { color: #8ea1b5; font-size: 0.88rem; margin: 0; max-width: 34ch; }
.footer-line {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #cdd8e4;
  font-size: 0.9rem;
  margin: 0 0 10px;
}
a.footer-line:hover { color: #fff; text-decoration: none; }
.footer-line .ico { color: #7fc4ee; flex-shrink: 0; }
.footer-social { display: flex; gap: 10px; margin-bottom: 12px; }
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: #cdd8e4;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}
.footer-social a:hover {
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  transform: translateY(-2px);
}
.copyright {
  font-size: 0.78rem;
  color: #8ea1b5;
  margin: 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive -------------------------------------------------------------- */
@media (max-width: 860px) {
  .listing { grid-template-columns: 1fr; }
  /* Collapse the inline nav into the toggle menu on tablets/phones */
  .icon-btn.menu-toggle { display: inline-flex; }
  .site-header .site-nav {
    position: absolute;
    top: 100%;
    left: 12px;
    right: 12px;
    order: 6;
    display: none;
    width: auto;
    flex-direction: column;
    gap: 0;
    margin: 6px 0 0;
    padding: 6px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow-hover);
    z-index: 60;
  }
  .site-header .site-nav.open { display: flex; }
  .site-header .site-nav .nav-link {
    padding: 13px 14px;
    border-radius: 10px;
    font-size: 1rem;
    white-space: normal;
  }
  .site-header .site-nav .nav-link:hover { background: #eef6fc; }
  .site-header .site-nav .nav-link + .nav-link { border-top: 1px solid var(--line); }
  .mobile-menu-backdrop { display: block; }
}

@media (max-width: 600px) {
  html { -webkit-text-size-adjust: 100%; }
  main {
    padding: 16px 14px calc(96px + env(safe-area-inset-bottom));
  }

  /* Header: single compact bar on mobile */
  .site-header {
    padding: 8px 12px;
    gap: 8px;
    row-gap: 8px;
    flex-wrap: wrap;
    align-items: center;
  }
  .brand { gap: 8px; }
  .brand-logo { height: 40px; width: 40px; }
  .brand-mark { font-size: 1.15rem; letter-spacing: 1px; }
  .brand-sub { font-size: 0.66rem; }
  .header-actions { margin-left: auto; gap: 8px; }
  .icon-btn { display: inline-flex; }
  /* Call becomes icon-only on mobile */
  .call-btn { padding: 0; width: 44px; height: 44px; justify-content: center; }
  .call-btn .call-text { display: none; }
  /* Search hidden until toggled; overlays below the bar (no content push) */
  .header-search {
    order: 5;
    position: absolute;
    top: 100%;
    left: 12px;
    right: 12px;
    flex: none;
    max-width: none;
    width: auto;
    margin: 6px 0 0;
    display: none;
  }
  .site-header.search-open .header-search { display: flex; }
  /* Nav collapses into an overlaid dropdown panel (does not push content) */
  .site-header .site-nav {
    position: absolute;
    top: 100%;
    left: 12px;
    right: 12px;
    width: auto;
    margin: 6px 0 0;
    padding: 6px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow-hover);
    z-index: 60;
  }
  .site-nav.open { display: flex; }
  .site-nav .nav-link {
    padding: 13px 14px;
    border-radius: 10px;
    font-size: 1rem;
    white-space: normal;
  }
  .site-nav .nav-link:hover { background: #eef6fc; }
  .site-nav .nav-link + .nav-link { border-top: 1px solid var(--line); }
  .mobile-menu-backdrop { display: block; }
  .header-search-results { max-height: 60vh; }

  /* Hero + headings */
  .hero-band { padding: 20px 16px; }
  .hero-band h1 { font-size: 1.4rem; }
  .breadcrumb { font-size: 0.82rem; margin-bottom: 14px; }

  /* Grid: fit small phones (2 up where space allows) */
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .card-body { padding: 12px; gap: 4px; }
  .card-title { font-size: 0.92rem; }
  .card-price { font-size: 1.1rem; }
  .card-call, .card-viber { font-size: 0.82rem; padding: 8px 0; }

  /* Filters become a slide-out drawer */
  .layout { display: block; }
  .layout-side { position: static; }

  /* Mobile category chip bar — instant category browsing like desktop sidebar */
  .cat-chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 0 12px;
    margin: 0 -14px 12px;
    padding-left: 14px;
    padding-right: 14px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .cat-chips::-webkit-scrollbar { display: none; }
  .cat-chip {
    flex: 0 0 auto;
    padding: 9px 15px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--ink);
    white-space: nowrap;
    box-shadow: var(--shadow);
  }
  .cat-chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }
  .cat-chip:hover { text-decoration: none; }

  .filters-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    margin-bottom: 16px;
    background: #fff;
    border: 1.5px solid var(--primary);
    color: var(--primary);
    border-radius: 12px;
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
  }
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 86%;
    max-width: 360px;
    max-height: none;
    border-radius: 0 18px 18px 0;
    z-index: 200;
    transform: translateX(-105%);
    transition: transform 0.25s ease;
    overflow-y: auto;
    padding-top: calc(16px + env(safe-area-inset-top));
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-close { display: block; }
  .filters-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 32, 51, 0.5);
    z-index: 199;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }
  .filters-backdrop.show { opacity: 1; pointer-events: all; }
  .side-scroll { max-height: 34vh; }
  .f-count { flex-basis: 100%; margin-left: 0; text-align: right; }

  /* Listing detail */
  .listing { padding: 16px; gap: 20px; }
  .listing-info h1 { font-size: 1.3rem; }
  .gallery-thumbs { grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); }
  .specs { grid-template-columns: 1fr; padding: 14px; }
  .cta-row { flex-direction: column; }
  .cta-row .btn-primary,
  .cta-row .btn-secondary,
  .cta-row .btn-ghost { width: 100%; text-align: center; margin: 0; }

  /* Home page */
  .home-hero { padding: 34px 20px; border-radius: 18px; margin-bottom: 28px; }
  .home-hero h1 { font-size: 1.55rem; }
  .home-lead { font-size: 1rem; }
  .home-cta { flex-direction: column; }
  .home-cta .btn-primary,
  .home-cta .btn-secondary { width: 100%; text-align: center; margin: 0; }
  .home-block { margin-bottom: 34px; }
  .home-block h2 { font-size: 1.35rem; }
  .cat-grouped { grid-template-columns: 1fr; gap: 20px; }
  .features { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-card { padding: 18px; }
  .home-search { padding: 18px; margin-bottom: 34px; }
  .home-search h2 { font-size: 1.25rem; }
  .hero-search { max-width: 100%; margin-bottom: 16px; }
  .hero-search input {
    padding: 15px 56px 15px 18px;
    font-size: 1rem;
    text-overflow: ellipsis;
  }
  .hero-search button {
    padding: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0;
    right: 6px;
  }
  .hero-search button .ico { width: 20px; height: 20px; }
  .search-results { grid-template-columns: 1fr; }
  .about-block { padding: 22px; }
  .about-text h2 { font-size: 1.4rem; }
  .about-stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-num { font-size: 1.6rem; }
  .faq-cta { padding: 20px; }
  .brand-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .brand-logo-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .brand-tile { min-height: 104px; padding: 14px 10px; }
  .brand-logo-box { height: 42px; }
  .brand-tile-logo img { max-height: 40px; max-width: 80px; }
  .brand-tile-text { height: 44px; width: 44px; font-size: 1.05rem; }
  .brand-tile-name { font-size: 0.82rem; }
  .brand-tile-count { font-size: 0.7rem; }

  /* Full-width touch-friendly buttons */
  .btn-primary, .btn-secondary, .btn-ghost { padding: 13px 20px; }

  /* Sticky mobile call bar with safe-area */
  .mobile-call {
    display: flex;
    left: 10px;
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom));
  }

  .prose { padding: 20px; }
  .footer-inner { padding: 26px 16px; }
  .footer-cols { grid-template-columns: 1fr; gap: 24px; }
  .footer-social a { width: 46px; height: 46px; }

  .pager { gap: 6px; }
  .page-link { min-width: 38px; height: 38px; }
}

@media (max-width: 380px) {
  .grid { grid-template-columns: 1fr; }
  .brand-grid { grid-template-columns: 1fr; }
  .home-hero h1 { font-size: 1.35rem; }
}

/* Touch / hover niceties -------------------------------------------------- */
@media (hover: none) {
  .card:hover { transform: none; }
  .card:hover .card-media img { transform: none; }
  .card:active { transform: scale(0.98); }
}
button:active, .btn-primary:active, .btn-secondary:active, .card-call:active, .card-viber:active {
  transform: scale(0.98);
}
