/* Bazarly — category × city browse pages (browse.php).
   Extracted rather than inlined so it is cached once across all 20+ pages
   in the matrix. Same visual language as listings.php. */

:root {
  --primary: #354BA5;
  --primary-dark: #2a3c85;
  --ink: #1c2333;
  --muted: #5a6478;
  --bg: #f6f7fb;
  --line: #e7eaf1;
  --card-shadow: 0 2px 12px rgba(28, 35, 51, .05);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
}
a { color: var(--primary); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* --- header --- */
.topbar {
  background: #fff; border-bottom: 1px solid var(--line);
  padding: 10px 16px; display: flex; align-items: center; gap: 10px;
}
.topbar .brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.topbar img { width: 34px; height: 34px; border-radius: 8px; display: block; }
.topbar .name { font-weight: 700; font-size: 17px; }
.topbar .tagline { color: var(--muted); font-size: 13px; margin-inline-start: auto; display: none; }
@media (min-width: 560px) { .topbar .tagline { display: block; } }

.wrap { max-width: 1080px; margin: 0 auto; padding: 16px; }

/* --- breadcrumb --- */
.crumbs { font-size: 13px; color: var(--muted); margin: 4px 0 10px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

h1 { font-size: 24px; margin: 6px 0 10px; line-height: 1.25; }
@media (min-width: 640px) { h1 { font-size: 30px; } }

.intro { color: var(--muted); margin: 0 0 12px; max-width: 68ch; }
.count { font-size: 14px; font-weight: 600; margin: 0 0 14px; }

/* --- sibling-link chips: the internal mesh --- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 14px 0 18px; }
.chip-label { font-size: 13px; color: var(--muted); margin-inline-end: 2px; }
.chip {
  display: inline-block; padding: 6px 13px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line); color: var(--primary);
  font-size: 13.5px; font-weight: 600; text-decoration: none;
}
.chip:hover { border-color: var(--primary); background: #f0f2fb; }

/* --- listing grid --- */
.listings-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 480px) { .listings-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 800px) { .listings-grid { grid-template-columns: repeat(4, 1fr); } }

.listing-card {
  display: block; text-decoration: none; color: inherit;
  border-radius: 14px; overflow: hidden; background: #fff; box-shadow: var(--card-shadow);
}
.listing-card img {
  width: 100%; height: auto; aspect-ratio: 1 / 1;
  object-fit: cover; display: block; background: var(--line);
}
.listing-card .lc-body { padding: 10px; }
.listing-card .lc-title {
  font-size: 14px; line-height: 1.3; margin: 0 0 4px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.listing-card .lc-price { font-size: 14px; font-weight: 700; color: var(--primary); margin: 0; }
.listing-card .lc-loc { font-size: 12px; color: var(--muted); margin: 3px 0 0; }

/* --- cards --- */
.card { background: #fff; border-radius: 14px; padding: 18px; margin-top: 16px; box-shadow: var(--card-shadow); }
.card h2 { font-size: 18px; margin: 0 0 10px; }

.tips ul { margin: 0; padding-inline-start: 20px; }
.tips li { margin-bottom: 9px; color: var(--ink); }
.tips li:last-child { margin-bottom: 0; }
.tips-link { display: inline-block; margin-top: 12px; font-size: 14px; font-weight: 600; text-decoration: none; }
.tips-link:hover { text-decoration: underline; }

/* --- pagination --- */
.pagination { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; gap: 8px; }
.pagination a {
  padding: 10px 18px; border-radius: 10px; font-weight: 600; font-size: 14px;
  text-decoration: none; background: var(--primary); color: #fff;
}
.pagination a:hover { background: var(--primary-dark); }
.pagination .disabled {
  padding: 10px 18px; border-radius: 10px; font-weight: 600; font-size: 14px;
  background: var(--line); color: var(--muted);
}
.pagination .page-info { color: var(--muted); font-size: 13px; }

/* --- empty + CTA --- */
.empty { text-align: center; color: var(--muted); padding: 32px 16px; }
.empty p { margin: 0 0 16px; }
.cta { text-align: center; }
.cta p { color: var(--muted); margin: 0 0 16px; }
.openapp {
  display: inline-block; background: var(--primary); color: #fff; text-decoration: none;
  padding: 14px 28px; border-radius: 10px; font-weight: 700; font-size: 16px;
}
.openapp:hover { background: var(--primary-dark); }
.badges { display: flex; justify-content: center; gap: 12px; margin-top: 16px; flex-wrap: wrap; align-items: center; }
.badges img { height: 48px; width: auto; }
.gallery-link { font-size: 13px; margin-top: 10px; display: block; }

/* --- footer --- */
footer { text-align: center; color: var(--muted); font-size: 13px; padding: 22px 16px 30px; }
.lang-switch { margin-top: 10px; }
.lang-switch a, .lang-switch span { margin: 0 4px; }
.lang-switch span.current { font-weight: 700; color: var(--ink); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
