/*
 * Brands and Regions pages (frontend/components/brands, frontend/components/region).
 * The body already starts below the old 52px bar (site-header.css), so pages only add
 * the category links row (--sg-strip) on top.
 */
.sgx { --ink: #12161C; --ink-2: #3A424D; --muted: #5B6470; --line: #E3E7EC; --bg: #F4F6F8; --link: #0062A8; --green: #098342; --r: 12px;
  background: var(--bg); color: var(--ink); font: 14px/1.5 Poppins, system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased;
  padding: calc(var(--sg-hdr-old, 52px) + var(--sg-strip, 0px)) 0 48px; }
.sgx *, .sgx *::before, .sgx *::after { box-sizing: border-box; }
.sgx :where(h1, h2, h3, p, ul, li) { margin: 0; padding: 0; list-style: none; font-family: inherit; text-transform: none; color: inherit; line-height: inherit; }
.sgx :where(a) { color: inherit; text-decoration: none; }
.sgx a:hover { text-decoration: none; }
.sgx [hidden] { display: none !important; }
.sgx .i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sgx .i-sm { width: 16px; height: 16px; }
.sgx a:focus-visible, .sgx button:focus-visible, .sgx input:focus-visible { outline: 3px solid #4DA3E0; outline-offset: 2px; }
.sgx-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.sgx-wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

.sgx-crumb { font-size: 12px; color: var(--muted); padding: 18px 0 12px; }
.sgx-crumb a { color: var(--link); }
.sgx-crumb span { margin: 0 6px; }

.sgx-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.sgx-head h1 { font-size: 30px; line-height: 1.2; font-weight: 700; letter-spacing: -.3px; }
.sgx-head p { color: var(--ink-2); margin-top: 6px; max-width: 620px; }
.sgx-head p b { color: var(--ink); font-weight: 600; }

.sgx-find { position: relative; display: block; margin: 0; font-weight: 400; }
.sgx-find .i { position: absolute; left: 14px; top: 50%; margin-top: -9px; color: var(--muted); }
.sgx-find input { width: 100%; height: 46px; border: 1px solid #CDD5DD; border-radius: 10px; padding: 0 14px 0 42px; font: inherit; font-size: 14px; background: #fff; color: var(--ink); margin: 0; box-shadow: none; }
.sgx-find input:focus { outline: 3px solid rgba(77, 163, 224, .5); border-color: #4DA3E0; }
.sgx-find-head { width: 340px; flex: none; }

.sgx-empty { padding: 40px 0; text-align: center; color: var(--muted); }
.sgx-empty b { display: block; color: var(--ink); font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.sgx-empty a { color: var(--link); font-weight: 600; }

.sgx-cross { margin-top: 40px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 24px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); }
.sgx-cross b { font-size: 15px; font-weight: 600; }
.sgx-cross p { color: var(--muted); font-size: 13px; }
.sgx-cross a { flex: none; color: var(--link); font-weight: 600; display: flex; align-items: center; gap: 6px; }

/* Brands */
.sgx-own { flex: none; width: 300px; padding: 16px 18px; border-radius: var(--r); background: #fff; border: 1px solid var(--line); }
.sgx-own b { display: block; font-size: 14px; font-weight: 600; }
.sgx-own p { font-size: 13px; color: var(--muted); margin: 4px 0 10px; }
.sgx-own a { color: var(--green); font-weight: 600; font-size: 13px; display: inline-flex; align-items: center; gap: 4px; }
.sgx-tools { position: sticky; top: 0; z-index: 5; background: var(--bg); padding: 16px 0 12px; display: grid; grid-template-columns: 300px 1fr; gap: 16px; align-items: center; border-bottom: 1px solid var(--line); }
.sgx-az { display: flex; flex-wrap: wrap; gap: 2px; }
.sgx-az a, .sgx-az span { width: 27px; height: 32px; display: grid; place-items: center; border-radius: 6px; font-weight: 600; font-size: 13px; }
.sgx-az a { color: var(--link); }
.sgx-az a:hover { background: #E4EFF9; }
.sgx-az span, .sgx-az a.is-off { color: #B5BEC8; pointer-events: none; }
.sgx-count { font-size: 13px; color: var(--muted); padding-top: 14px; }
.sgx-group { display: grid; grid-template-columns: 64px 1fr; gap: 8px; padding: 22px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 80px; }
.sgx-group h2 { font-size: 30px; font-weight: 700; color: #C3CBD4; line-height: 1; position: sticky; top: 92px; align-self: start; }
.sgx-brands { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 14px; }
.sgx-brand { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 10px; min-width: 0; }
.sgx-brand:hover { background: #fff; box-shadow: 0 0 0 1px var(--line); }
.sgx-logo { width: 46px; height: 46px; border-radius: 10px; flex: none; display: grid; place-items: center; font-weight: 700; font-size: 15px; letter-spacing: .3px; overflow: hidden; border: 1px solid rgba(0, 0, 0, .05); }
.sgx-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sgx-logo.c0 { background: #E4EFF9; color: #0B4F86; } .sgx-logo.c1 { background: #E6F4E1; color: #2D6A1C; } .sgx-logo.c2 { background: #FDF0DC; color: #8A5200; }
.sgx-logo.c3 { background: #EEF0F3; color: #3A424D; } .sgx-logo.c4 { background: #E3F4F2; color: #126B60; } .sgx-logo.c5 { background: #F6E8EC; color: #8C2F4B; }
.sgx-bt { min-width: 0; }
.sgx-bt b { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sgx-bt small { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sgx-bt small em { font-style: normal; color: var(--ink-2); }

/* Regions */
.sgx-busy { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 18px 0 4px; font-size: 13px; color: var(--muted); }
.sgx-busy a { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 8px; background: #fff; border: 1px solid var(--line); color: var(--ink); font-weight: 500; }
.sgx-busy a:hover { border-color: #9DBFDD; }
.sgx-busy em { font-style: normal; color: var(--link); font-weight: 600; }
.sgx-tabs { display: flex; gap: 6px; padding: 18px 0 16px; flex-wrap: wrap; }
.sgx-tabs button { height: 36px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line); background: #fff; font: 500 13px Poppins, system-ui, sans-serif; color: var(--ink-2); cursor: pointer; }
.sgx-tabs button span { color: var(--muted); margin-left: 6px; }
.sgx-tabs button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.sgx-tabs button[aria-pressed="true"] span { color: #C3CBD4; }
.sgx-regions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.sgx-region { background: #fff; border: 1px solid var(--line); border-radius: var(--r); }
.sgx-rhead { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 18px 20px 14px; border-bottom: 1px solid var(--line); }
.sgx-rhead h2 { font-size: 18px; font-weight: 700; }
.sgx-rhead p { font-size: 12px; color: var(--muted); margin-top: 2px; }
.sgx-rhead a { font-size: 13px; font-weight: 600; color: var(--link); white-space: nowrap; display: flex; align-items: center; gap: 2px; padding-top: 2px; }
.sgx-towns { padding: 6px 8px; }
.sgx-towns a { display: flex; justify-content: space-between; align-items: center; padding: 9px 12px; border-radius: 8px; font-weight: 500; }
.sgx-towns a:hover { background: var(--bg); }
.sgx-towns em { font-style: normal; font-size: 12px; font-weight: 600; color: var(--link); background: #E4EFF9; border-radius: 6px; padding: 1px 8px; }
.sgx-quiet { padding: 12px 20px 16px; border-top: 1px dashed var(--line); font-size: 13px; color: var(--muted); }
.sgx-region > .sgx-none + .sgx-quiet { border-top: 0; padding-top: 0; }
.sgx-quiet h3 { font-size: 12px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.sgx-quiet p a { color: var(--ink-2); }
.sgx-quiet p a:hover { color: var(--link); text-decoration: underline; }
.sgx .sgx-quiet p a::before { content: none; }
.sgx .sgx-quiet p a:not([hidden]) ~ a:not([hidden])::before { content: ", "; color: var(--muted); position: static; display: inline; width: auto; height: auto; font-size: inherit; line-height: inherit; margin: 0; background: none; }
.sgx-quiet button { border: 0; background: none; padding: 0; margin-top: 6px; color: var(--link); font: 600 13px Poppins, system-ui, sans-serif; cursor: pointer; }
.sgx-none { padding: 14px 20px; font-size: 13px; color: var(--muted); }
.sgx-none a { color: var(--link); font-weight: 600; }
.sgx mark { background: #FFE9A8; color: inherit; border-radius: 2px; padding: 0; }

@media (max-width: 991.98px) {
  .sgx-brands { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sgx-regions { grid-template-columns: 1fr; }
}
@media (max-width: 767.98px) {
  .sgx { padding-bottom: 96px; }
  .sgx-wrap { padding: 0 16px; }
  .sgx-head { flex-direction: column; align-items: stretch; gap: 16px; }
  .sgx-head h1 { font-size: 24px; }
  .sgx-own, .sgx-find-head { width: auto; }
  .sgx-find input { font-size: 16px; }
  .sgx-cross { flex-direction: column; align-items: flex-start; }

  .sgx-tools { grid-template-columns: 1fr; gap: 10px; padding: 12px 0 10px; }
  .sgx-az { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px; scrollbar-width: none; }
  .sgx-az::-webkit-scrollbar { display: none; }
  .sgx-az a, .sgx-az span { flex: none; width: 34px; height: 36px; }
  .sgx-group { grid-template-columns: 1fr; padding: 16px 0; scroll-margin-top: 130px; }
  .sgx-group h2 { position: static; font-size: 22px; color: var(--muted); }
  .sgx-brands { grid-template-columns: 1fr; gap: 2px; }
  .sgx-brand { padding: 10px 0; }
  .sgx-brand:hover { box-shadow: none; background: none; }

  .sgx-busy, .sgx-tabs { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; scrollbar-width: none; }
  .sgx-busy { padding: 14px 16px 2px; }
  .sgx-tabs { padding: 14px 16px; }
  .sgx-busy::-webkit-scrollbar, .sgx-tabs::-webkit-scrollbar { display: none; }
  .sgx-busy > *, .sgx-tabs button { flex: none; }
  .sgx-tabs button { height: 40px; }
  .sgx-rhead { padding: 16px 16px 12px; }
  .sgx-quiet { padding: 12px 16px 14px; }
  .sgx-none { padding: 14px 16px; }
}
