/* brick-market theme — classifieds style, off-white + brick red */
:root {
  --bm-bg:    #f4f1ec;
  --bm-surf:  #ffffff;
  --bm-surf2: #ece8e1;
  --bm-bdr:   #d8d2c8;
  --bm-bdr2:  #c4bbaf;
  --bm-acc:   #b73a2a;
  --bm-acc-h: #992b1d;
  --bm-ink:   #1a1410;
  --bm-muted: #7a6e64;
  --bm-tag:   #e8e2d9;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bm-bg);
  color: var(--bm-ink);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
}

a { color: var(--bm-acc); text-decoration: none; }
a:hover { color: var(--bm-acc-h); text-decoration: underline; }
img { max-width: 100%; display: block; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 1rem; }

/* ─── HEADER ─── */
.header {
  background: var(--bm-surf);
  border-bottom: 2px solid var(--bm-bdr);
  position: sticky;
  top: 0;
  z-index: 200;
}
.header__inner {
  display: flex;
  align-items: center;
  height: 52px;
  gap: 1.25rem;
}
.header__logo {
  font-size: .95rem;
  font-weight: 700;
  color: var(--bm-ink);
  letter-spacing: -.01em;
  white-space: nowrap;
  border-left: 4px solid var(--bm-acc);
  padding-left: .6rem;
}
.header__logo:hover { color: var(--bm-acc); text-decoration: none; }
.header__nav { display: flex; gap: 1rem; flex: 1; }
.header__nav a {
  font-size: .82rem;
  font-weight: 500;
  color: var(--bm-muted);
  text-decoration: none;
  padding: .2rem 0;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.header__nav a:hover { color: var(--bm-ink); border-color: var(--bm-acc); }
.header__cta-btn {
  background: var(--bm-acc);
  color: #fff;
  font-size: .8rem;
  font-weight: 700;
  padding: .4rem 1rem;
  border-radius: 4px;
  white-space: nowrap;
  text-decoration: none;
  transition: background .15s;
  letter-spacing: .02em;
}
.header__cta-btn:hover { background: var(--bm-acc-h); color: #fff; text-decoration: none; }
.header__search { position: relative; }
.header__search-input {
  background: var(--bm-bg);
  border: 1px solid var(--bm-bdr);
  border-radius: 4px;
  color: var(--bm-ink);
  font-size: .82rem;
  font-family: inherit;
  padding: .38rem .7rem;
  width: 170px;
  outline: none;
  transition: border-color .15s;
}
.header__search-input:focus { border-color: var(--bm-acc); }
.header__search-btn { display: none; }
.search-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--bm-surf);
  border: 1px solid var(--bm-bdr);
  border-radius: 4px;
  z-index: 999;
  box-shadow: 0 4px 12px rgba(0,0,0,.1);
}
.search-dropdown a {
  display: block;
  padding: .5rem .75rem;
  font-size: .82rem;
  color: var(--bm-ink);
  border-bottom: 1px solid var(--bm-bdr);
  text-decoration: none;
}
.search-dropdown a:last-child { border-bottom: none; }
.search-dropdown a:hover { background: var(--bm-bg); color: var(--bm-acc); }

/* ─── MAIN ─── */
.main { padding: 1.5rem 0 3rem; }

/* ─── BREADCRUMB ─── */
.breadcrumb {
  font-size: .75rem;
  color: var(--bm-muted);
  margin-bottom: 1.25rem;
}
.breadcrumb a { color: var(--bm-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--bm-acc); }

/* ─── CARDS — compact horizontal rows (classifieds style) ─── */
.cards-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--bm-bdr);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}
.card {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  gap: 0;
  background: var(--bm-surf);
  border-bottom: 1px solid var(--bm-bdr);
  transition: background .12s;
  position: relative;
}
.card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: transparent;
  transition: background .15s;
}
.card:hover { background: #fdfcfa; }
.card:hover::before { background: var(--bm-acc); }
.card:last-child { border-bottom: none; }
.card__img-wrap { overflow: hidden; }
.card__img {
  width: 90px;
  height: 90px;
  object-fit: cover;
  display: block;
}
.card__body {
  padding: .7rem .85rem;
  min-width: 0;
}
.card__name {
  font-size: .9rem;
  font-weight: 700;
  color: var(--bm-ink);
  display: block;
  margin-bottom: .15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card__name:hover { color: var(--bm-acc); text-decoration: underline; }
.card__sub {
  font-size: .75rem;
  color: var(--bm-muted);
  margin-bottom: .35rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card__city {
  font-size: .72rem;
  color: var(--bm-muted);
}
.card__city::before { content: '📍 '; font-size: .7rem; }
.card__side {
  padding: .7rem .75rem;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: .4rem;
  flex-shrink: 0;
}
.card__badge {
  font-size: .65rem;
  font-weight: 700;
  color: var(--bm-acc);
  background: rgba(183,58,42,.1);
  border: 1px solid rgba(183,58,42,.2);
  border-radius: 3px;
  padding: .15rem .45rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  white-space: nowrap;
}
.card__link {
  font-size: .72rem;
  font-weight: 600;
  color: var(--bm-acc);
  white-space: nowrap;
}
.card__link:hover { color: var(--bm-acc-h); }

@media (max-width: 540px) {
  .card { grid-template-columns: 70px 1fr; }
  .card__side { display: none; }
  .card__img { width: 70px; height: 70px; }
}

/* ─── PAGINATION ─── */
.pagination { display: flex; gap: .3rem; flex-wrap: wrap; }
.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 .5rem;
  font-size: .82rem;
  font-weight: 600;
  border: 1px solid var(--bm-bdr);
  border-radius: 3px;
  color: var(--bm-muted);
  text-decoration: none;
  transition: all .12s;
}
.pagination a:hover { border-color: var(--bm-acc); color: var(--bm-acc); background: #fff; text-decoration: none; }
.pagination .current { background: var(--bm-acc); color: #fff; border-color: var(--bm-acc); }

/* ─── FOOTER ─── */
.footer { background: var(--bm-surf); border-top: 2px solid var(--bm-bdr); padding: 2rem 0 1.25rem; margin-top: 2.5rem; }
.footer__inner { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin-bottom: 1.25rem; }
.footer__col h4 { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--bm-muted); margin-bottom: .6rem; border-bottom: 1px solid var(--bm-bdr); padding-bottom: .35rem; }
.footer__col p { font-size: .82rem; color: var(--bm-muted); line-height: 1.6; }
.footer__col ul { list-style: none; }
.footer__col ul li { margin-bottom: .3rem; }
.footer__col ul li a { font-size: .82rem; color: var(--bm-muted); text-decoration: none; }
.footer__col ul li a:hover { color: var(--bm-acc); text-decoration: underline; }
.footer__bottom { text-align: center; font-size: .75rem; color: var(--bm-muted); padding-top: 1.25rem; border-top: 1px solid var(--bm-bdr); }

@media (max-width: 700px) { .footer__inner { grid-template-columns: 1fr; } }
