/* Search results page — search.css */

:root {
  --navy: #0f172a; --slate: #1e293b; --muted: #64748b; --border: #e2e8f0;
  --surface: #f8fafc; --white: #ffffff; --amber: #f59e0b; --amber-d: #d97706;
  --emerald: #10b981; --indigo: #6366f1;
  --radius: 12px; --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(15,23,42,.08);
  --shadow-md: 0 4px 20px rgba(15,23,42,.1);
  --shadow-lg: 0 12px 40px rgba(15,23,42,.12);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif; color: var(--slate); background: var(--surface); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ─── Header ─── */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 0 24px; background: var(--navy);
  box-shadow: 0 1px 24px rgba(0,0,0,.15);
}
.header__inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; gap: 20px; height: 64px;
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.logo__icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--amber), var(--amber-d));
  color: var(--white); font-weight: 800; font-size: 16px;
  display: flex; align-items: center; justify-content: center; border-radius: 10px;
}
.logo__text { font-size: 18px; font-weight: 800; color: var(--white); letter-spacing: -.02em; }
.logo__accent { color: var(--amber); }

.header__auth { display: flex; align-items: center; flex-shrink: 0; }
.header__auth-btn { display: inline-flex; align-items: center; padding: 8px 16px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); color: var(--white); font-size: 13px; font-weight: 600; border-radius: 8px; text-decoration: none; white-space: nowrap; }
.header__auth-btn:hover { background: rgba(255,255,255,.16); }
.header__user { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.15); border-radius: 50px; text-decoration: none; }
.header__user-avatar { width: 28px; height: 28px; background: linear-gradient(135deg,var(--amber),var(--amber-d)); color: var(--navy); font-size: 12px; font-weight: 800; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.header__user-name { font-size: 13px; font-weight: 600; color: var(--white); max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mobile-nav__user { display: flex; align-items: center; gap: 12px; padding: 12px 0 16px; margin-bottom: 8px; border-bottom: 1px solid var(--border); font-weight: 700; color: var(--slate); }
.mobile-nav__user-avatar { width: 36px; height: 36px; background: linear-gradient(135deg,var(--amber),var(--amber-d)); color: var(--navy); font-size: 15px; font-weight: 800; border-radius: 50%; display: flex; align-items: center; justify-content: center; }

.burger { display: none; background: none; border: none; cursor: pointer; padding: 8px; margin-left: auto; flex-shrink: 0; }
.burger span { display: block; width: 22px; height: 2px; background: var(--white); margin: 5px 0; }

.mobile-nav { display: none; position: fixed; inset: 0; background: rgba(15,23,42,.6); z-index: 200; }
.mobile-nav.is-open { display: block; }
.mobile-nav__panel {
  position: absolute; right: 0; top: 0; bottom: 0;
  width: min(320px, 90vw); background: var(--white); padding: 24px;
  box-shadow: -8px 0 40px rgba(0,0,0,.15);
}
.mobile-nav__close { background: none; border: none; font-size: 32px; cursor: pointer; color: var(--slate); margin-bottom: 16px; }
.mobile-nav__panel a {
  display: block; padding: 14px 0; text-decoration: none;
  font-weight: 600; font-size: 16px; color: var(--slate); border-bottom: 1px solid var(--border);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 28px; font-size: 15px; font-weight: 700; font-family: inherit;
  border-radius: 10px; border: 2px solid transparent; cursor: pointer;
  text-decoration: none; transition: transform .2s, box-shadow .2s, background .2s;
}
.btn--primary { background: linear-gradient(135deg, var(--amber), var(--amber-d)); color: var(--navy); }
.btn--primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(245,158,11,.3); }
.btn--block { width: 100%; }

/* ─── Header search bar ─── */
.sr-search-wrap { flex: 1; min-width: 0; max-width: 720px; }
.sr-search {
  display: flex; background: var(--white); border-radius: 10px;
  overflow: visible; position: relative; box-shadow: var(--shadow-sm);
}
.sr-search__field {
  flex: 1; display: flex; align-items: center; gap: 8px; padding: 10px 14px;
}
.sr-search__field--loc,
.sr-search__field--biz { position: relative; }
.sr-search__field svg { color: var(--muted); flex-shrink: 0; }
.sr-search__field input {
  border: none; outline: none; font-size: 14px; font-family: inherit;
  width: 100%; color: var(--slate); background: transparent;
}
.sr-search__field input::placeholder { color: var(--muted); }
.sr-search__divider { width: 1px; background: var(--border); align-self: stretch; margin: 8px 0; }
.sr-search__btn {
  padding: 10px 28px; background: linear-gradient(135deg, var(--amber), var(--amber-d));
  color: var(--navy); font-size: 14px; font-weight: 700; font-family: inherit;
  border: none; border-radius: 0 10px 10px 0; cursor: pointer; white-space: nowrap;
  transition: background .2s;
}
.sr-search__btn:hover { background: var(--amber-d); }

/* Autocomplete dropdowns */
.loc-dropdown, .biz-dropdown {
  display: none; position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  min-width: 280px; background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  z-index: 300; max-height: 280px; overflow-y: auto; scrollbar-width: thin;
}
.loc-dropdown.is-open, .biz-dropdown.is-open { display: block; }
.loc-dropdown__item, .biz-dropdown__item {
  display: flex; align-items: center; gap: 10px; padding: 11px 16px;
  cursor: pointer; font-size: 14px; color: var(--slate); transition: background .15s;
}
.loc-dropdown__item:hover, .biz-dropdown__item:hover { background: var(--surface); }
.loc-dropdown__item svg, .biz-dropdown__item svg { color: var(--amber); flex-shrink: 0; }
.biz-dropdown__item b { color: var(--amber-d); font-weight: 700; }

/* ─── Category nav ─── */
.cat-nav {
  position: fixed; top: 64px; left: 0; right: 0; z-index: 90;
  background: var(--white); border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.cat-nav__inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: stretch; gap: 4px; overflow-x: auto;
  scrollbar-width: none;
}
.cat-nav__inner::-webkit-scrollbar { display: none; }
.cat-nav__item {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 12px 14px; min-width: 72px; text-decoration: none;
  color: var(--muted); font-size: 11px; font-weight: 600;
  transition: color .2s, background .2s; white-space: nowrap;
}
.cat-nav__item svg { width: 22px; height: 22px; color: var(--slate); transition: color .2s; }
.cat-nav__item:hover { color: var(--amber-d); background: var(--surface); }
.cat-nav__item:hover svg { color: var(--amber-d); }

/* ─── Main content ─── */
.sr-main { padding: 140px 0 64px; min-height: 70vh; }

.sr-breadcrumb {
  font-size: 13px; color: var(--muted); margin-bottom: 8px;
}
.sr-breadcrumb a {
  color: var(--indigo); text-decoration: none;
}
.sr-breadcrumb a:hover { text-decoration: underline; }
.sr-breadcrumb span { margin: 0 6px; color: var(--border); }

.sr-title {
  font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800;
  color: var(--slate); margin: 0 0 20px; letter-spacing: -.02em;
}

/* ─── Toolbar ─── */
.sr-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px; margin-bottom: 20px;
  padding-bottom: 16px; border-bottom: 1px solid var(--border);
}
.sr-toolbar__left { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sr-toolbar__count { font-size: 13px; color: var(--muted); margin-left: 8px; }

.sr-view {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; font-size: 13px; font-weight: 600; font-family: inherit;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--white); color: var(--muted); cursor: pointer;
  transition: all .2s;
}
.sr-view:hover { border-color: var(--amber); color: var(--slate); }
.sr-view--active { background: var(--navy); color: var(--white); border-color: var(--navy); }
.sr-view--active svg { color: var(--amber); }

.sr-sort {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--muted);
}
.sr-sort select {
  padding: 7px 12px; font-size: 13px; font-family: inherit;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--white); color: var(--slate); cursor: pointer;
}

/* ─── Two-column layout ─── */
.sr-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 28px;
  align-items: start;
}

/* ─── Result list cards ─── */
.sr-results { display: flex; flex-direction: column; gap: 0; }

.result-card {
  position: relative;
  display: grid;
  grid-template-columns: 120px 1fr 180px;
  gap: 20px;
  padding: 20px;
  background: var(--white);
  border: 1px solid var(--border);
  border-bottom: none;
  transition: box-shadow .2s, border-color .2s;
}

.result-card:first-child { border-radius: var(--radius) var(--radius) 0 0; }
.result-card:last-child { border-bottom: 1px solid var(--border); border-radius: 0 0 var(--radius) var(--radius); }
.result-card:only-child { border-radius: var(--radius); border-bottom: 1px solid var(--border); }
.result-card:hover { box-shadow: var(--shadow-md); z-index: 1; position: relative; }

.result-card--sponsored {
  border-left: 3px solid var(--indigo);
  background: linear-gradient(90deg, rgba(99,102,241,.03), var(--white) 40%);
}

.result-card__media {
  width: 120px; height: 100px;
  border-radius: 10px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border);
  flex-shrink: 0;
}
.result-card__media img {
  width: 100%; height: 100%; object-fit: cover;
}

.result-card__main { min-width: 0; }

.result-card__name {
  margin: 0 0 6px; font-size: 18px; font-weight: 700; line-height: 1.3;
}
.result-card__media {
  display: block;
  text-decoration: none;
}
.result-card__name a {
  color: var(--indigo); text-decoration: none;
  pointer-events: auto;
  position: relative;
  z-index: 1;
}
.result-card__name a:hover { text-decoration: underline; color: var(--amber-d); }

.result-card__media {
  pointer-events: auto;
}

.result-card__cats {
  margin: 0 0 8px; font-size: 13px; color: var(--muted); line-height: 1.4;
}

.result-card__rating--below-title {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 4px 0 6px;
  font-size: 13px;
}

.result-card__rating--below-title .result-card__rating-num {
  font-size: 13px;
}

.result-card__rating {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 10px; font-size: 13px;
}
.result-card__stars { color: var(--amber); letter-spacing: 1px; }
.result-card__rating-num { font-weight: 700; color: var(--slate); }
.result-card__reviews { color: var(--muted); }

.result-card__links {
  display: flex; flex-wrap: wrap; gap: 4px 16px;
}
.result-card__links a {
  font-size: 13px; font-weight: 600; color: var(--indigo);
  text-decoration: none;
}
.result-card__links a:hover { text-decoration: underline; color: var(--amber-d); }
.result-card__links a::after {
  content: "|"; margin-left: 16px; color: var(--border); font-weight: 400;
}
.result-card__links a:last-child::after { display: none; }

.result-card__contact {
  display: flex; flex-direction: column; align-items: flex-end;
  text-align: right; gap: 6px;
}
.result-card__phone {
  font-size: 17px; font-weight: 800; color: var(--slate);
  text-decoration: none; letter-spacing: -.01em;
}
.result-card__phone:hover { color: var(--amber-d); }

.result-card__addr {
  margin: 0; font-size: 12px; color: var(--muted); line-height: 1.4;
  max-width: 180px;
}

.result-card__badge {
  margin-top: auto;
  padding: 3px 10px; border-radius: 50px;
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: var(--white);
}

/* ─── Sidebar ─── */
.sr-sidebar { display: flex; flex-direction: column; gap: 20px; }

.sr-subcats {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.sr-subcats__title {
  margin: 0;
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 700;
  color: var(--slate);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.sr-subcats__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 16px;
}

.sr-subcats__item {
  display: inline-flex;
  padding: 7px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--slate);
  text-decoration: none;
  transition: background .15s, border-color .15s, color .15s;
}

.sr-subcats__item:hover {
  background: rgba(245,158,11,.1);
  border-color: rgba(245,158,11,.35);
  color: var(--amber-d);
}

.sr-featured {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.sr-featured__title {
  margin: 0; padding: 14px 16px;
  font-size: 14px; font-weight: 700; color: var(--slate);
  background: var(--surface); border-bottom: 1px solid var(--border);
}
.sr-featured__list { padding: 0; }

.featured-item {
  padding: 14px 16px; border-bottom: 1px solid var(--border);
}
.featured-item:last-child { border-bottom: none; }
.featured-item__name {
  margin: 0 0 4px; font-size: 14px; font-weight: 700;
}
.featured-item__name a { color: var(--indigo); text-decoration: none; }
.featured-item__name a:hover { text-decoration: underline; }
.featured-item__rating {
  font-size: 12px; color: var(--amber); margin-bottom: 6px;
}
.featured-item__phone {
  display: block; font-size: 14px; font-weight: 700;
  color: var(--slate); text-decoration: none; margin-bottom: 4px;
}
.featured-item__phone:hover { color: var(--amber-d); }
.featured-item__addr { font-size: 11px; color: var(--muted); margin: 0 0 8px; line-height: 1.4; }
.featured-item__links { display: flex; gap: 12px; }
.featured-item__links a {
  font-size: 12px; font-weight: 600; color: var(--indigo); text-decoration: none;
}
.featured-item__links a:hover { text-decoration: underline; }

.sr-ad-slot {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; min-height: 250px; background: var(--white);
  border: 1px dashed var(--border); border-radius: var(--radius);
  color: var(--muted); font-size: 13px;
}
.sr-ad-slot svg { color: var(--border); }

.sr-claim {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px 20px; text-align: center;
}
.sr-claim h3 {
  margin: 0 0 8px; font-size: 18px; font-weight: 800; color: var(--slate);
}
.sr-claim h3 em {
  font-style: normal; color: var(--amber-d);
  text-decoration: underline; text-decoration-color: rgba(245,158,11,.3);
  text-underline-offset: 3px;
}
.sr-claim p {
  margin: 0 0 16px; font-size: 14px; color: var(--muted); line-height: 1.5;
}
.sr-claim__phone {
  display: block; margin-top: 12px; font-size: 13px; color: var(--muted);
}

/* ─── Empty state ─── */
.sr-empty {
  text-align: center; padding: 80px 24px; color: var(--muted);
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
}
.sr-empty svg { margin: 0 auto 16px; color: var(--border); }
.sr-empty h3 { font-size: 20px; color: var(--slate); margin: 0 0 8px; }
.sr-empty p { margin: 0 0 24px; }

/* ─── Footer ─── */
.footer { background: var(--navy); color: rgba(255,255,255,.7); }
.footer__bottom {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px; padding: 24px 0;
}
.footer__legal { display: flex; gap: 8px 20px; }
.footer__legal a { font-size: 13px; color: rgba(255,255,255,.4); text-decoration: none; }
.footer__legal a:hover { color: var(--amber); }
.footer__copy { font-size: 13px; color: rgba(255,255,255,.3); margin: 0; }

/* ─── Responsive ─── */
@media (max-width: 960px) {
  .sr-layout { grid-template-columns: 1fr; }
  .sr-sidebar { order: -1; }
  .sr-featured__list {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }
  .featured-item { border-right: 1px solid var(--border); }
  .sr-ad-slot { min-height: 120px; }
}

@media (max-width: 720px) {
  .result-card {
    grid-template-columns: 80px 1fr;
    gap: 14px;
  }
  .result-card__media { width: 80px; height: 80px; }
  .result-card__contact {
    grid-column: 1 / -1; flex-direction: row;
    align-items: center; justify-content: space-between;
    text-align: left; padding-top: 10px;
    border-top: 1px solid var(--border);
  }
  .result-card__addr { max-width: none; text-align: right; }
  .sr-search-wrap { display: none; }
  .header__auth { display: none; }
  .burger { display: block; }
  .cat-nav__item { min-width: 60px; padding: 10px 10px; font-size: 10px; }
  .sr-main { padding: 128px 0 48px; }
}

@media (max-width: 480px) {
  .result-card { grid-template-columns: 1fr; }
  .result-card__media { width: 100%; height: 140px; }
  .result-card__contact { flex-direction: column; align-items: flex-start; }
  .result-card__addr { text-align: left; }
}
