/*
 * Brand page /brands/{slug} (frontend/dashboard/seller_page). Ad cards come from
 * home.css (frontend/home-sections/_card). The body already starts below the old
 * 52px bar (site-header.css); the page adds the category links row (--sg-strip).
 */
.sgs { --ink: #12161C; --ink-2: #3A424D; --muted: #5B6470; --line: #E3E7EC; --bg: #F4F6F8; --blue: #066CB5; --link: #0062A8; --green: #098342; --r: 14px;
  background: var(--bg); color: var(--ink); font: 14px/1.55 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 56px; }
.sgs *, .sgs *::before, .sgs *::after { box-sizing: border-box; }
.sgs :where(h1, h2, h3, p, ul, li) { margin: 0; padding: 0; list-style: none; font-family: inherit; text-transform: none; color: inherit; }
.sgs :where(a) { color: inherit; text-decoration: none; }
.sgs a::before, .sgs a::after { content: none; }
.sgs .i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sgs .i-sm { width: 16px; height: 16px; }
.sgs button, .sgs input, .sgs select { font-family: inherit; }
.sgs a:focus-visible, .sgs button:focus-visible, .sgs input:focus-visible, .sgs select:focus-visible { outline: 3px solid #4DA3E0; outline-offset: 2px; }
.sgs-wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

.sgs-flash { margin-top: 16px !important; padding: 10px 14px; border-radius: 10px; background: #E9F5EE; color: #1E6B3A; font-weight: 500; }
.sgs-crumb { font-size: 12px; color: var(--muted); padding: 18px 0 12px; }
.sgs-crumb a { color: var(--link); }
.sgs-crumb span { margin: 0 8px; }

.sgs-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 42px; padding: 0 18px; border-radius: 10px; font-weight: 600; font-size: 14px; cursor: pointer; border: 0; }
.sgs-btn.is-g { background: var(--green); color: #fff !important; }
.sgs-btn.is-g:hover { background: #07703A; }
.sgs-btn.is-o { background: #fff; border: 1px solid #C9D3DC; color: var(--ink); }
.sgs-btn.is-o:hover { border-color: #9DBFDD; }
.sgs-full { width: 100%; margin-top: 12px; }

/* Header */
.sgs-top { background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.sgs-cover { height: 180px; background: linear-gradient(120deg, #0B4F86, #066CB5) center / cover no-repeat; }
.sgs-id { display: flex; align-items: flex-end; gap: 20px; padding: 0 28px 20px; }
.sgs-logo { flex: none; width: 112px; height: 112px; margin-top: -48px; border-radius: 18px; background: #fff; border: 4px solid #fff; box-shadow: 0 4px 16px rgba(18, 22, 28, .12); display: grid; place-items: center; overflow: hidden; font-size: 34px; font-weight: 700; color: #0B4F86; background-color: #E4EFF9; }
.sgs-logo img { width: 100%; height: 100%; object-fit: cover; display: block; background: #fff; }
.sgs-name { flex: 1; min-width: 0; padding-top: 14px; }
.sgs-name h1 { font-size: 28px; line-height: 1.2; font-weight: 700; letter-spacing: -.3px; }
.sgs-facts { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 6px !important; color: var(--muted); font-size: 13px; }
.sgs-facts span { display: inline-flex; align-items: center; gap: 5px; }
.sgs-facts i { width: 8px; height: 8px; border-radius: 50%; background: #B5BEC8; }
.sgs-facts .is-on { color: var(--green); font-weight: 500; }
.sgs-facts .is-on i { background: #22A85A; box-shadow: 0 0 0 3px rgba(34, 168, 90, .2); }
.sgs-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px !important; }
.sgs-badge { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px; background: #EAF6E4; color: #2D6A1C; font-size: 12px; font-weight: 600; }
.sgs-badge.is-star { background: #FFF4DB; color: #8A5200; }
.sgs-act { display: flex; gap: 8px; flex: none; }
.sgs-tabs { display: flex; gap: 4px; padding: 0 20px; border-top: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.sgs-tabs::-webkit-scrollbar { display: none; }
.sgs-tabs a { flex: none; display: flex; align-items: center; gap: 6px; padding: 13px 10px; font-weight: 600; color: var(--ink-2); border-bottom: 2px solid transparent; }
.sgs-tabs a:hover { color: var(--ink); border-bottom-color: #C9D3DC; }
.sgs-tabs a span { font-size: 12px; color: var(--muted); background: var(--bg); border-radius: 999px; padding: 0 8px; }

/* Layout */
.sgs-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; margin-top: 24px; }
.sgs-main { display: grid; gap: 24px; min-width: 0; }
.sgs-box { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 22px 24px; scroll-margin-top: 16px; }
.sgs-bhead { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.sgs-bhead h2, .sgs-side h2 { font-size: 19px; font-weight: 700; }
.sgs-bhead p { color: var(--muted); font-size: 13px; white-space: nowrap; }

.sgs-filter { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: 10px; align-items: end; margin: 0 0 16px; }
.sgs-filter label { display: grid; gap: 5px; margin: 0; font-size: 12px; font-weight: 600; color: var(--ink-2); min-width: 0; }
.sgs-filter input, .sgs-filter select { width: 100%; height: 44px; border: 1px solid #CDD5DD; border-radius: 10px; padding: 0 12px; font-size: 14px; font-weight: 400; color: var(--ink); background: #fff; margin: 0; box-shadow: none; }
.sgs-filter input:focus, .sgs-filter select:focus { outline: 3px solid rgba(77, 163, 224, .5); border-color: #4DA3E0; }
.sgs-filter button { height: 44px; padding: 0 20px; border: 0; border-radius: 10px; background: var(--blue); color: #fff; font-weight: 600; font-size: 14px; cursor: pointer; }
.sgs-filter button:hover { background: #055A97; }
.sgs-clear { margin: -6px 0 14px !important; font-size: 13px; }
.sgs-clear a { color: var(--link); font-weight: 600; }

/* Ad cards (home.css) inside the white box */
.sgs-ads.sgd { background: none; padding: 0; }
.sgs-ads .sgd-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.sgs-pages { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 18px; font-size: 13px; color: var(--muted); }
.sgs-pages a, .sgs-pages .is-off { height: 38px; padding: 0 14px; display: inline-flex; align-items: center; border-radius: 8px; border: 1px solid var(--line); font-weight: 600; color: var(--link); background: #fff; }
.sgs-pages .is-off { color: #B5BEC8; }
.sgs-empty { padding: 30px 0; text-align: center; color: var(--muted); }
.sgs-empty b { display: block; color: var(--ink); font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.sgs-empty a { color: var(--link); font-weight: 600; }
.sgs-about { color: var(--ink-2); font-size: 15px; line-height: 1.75; max-width: 720px; }

/* Sidebar */
.sgs-side { position: sticky; top: 16px; display: grid; gap: 16px; }
.sgs-side h2 { display: flex; align-items: center; gap: 8px; margin-bottom: 10px !important; }
.sgs-contact li { padding: 10px 0; border-top: 1px solid var(--line); color: var(--ink); overflow-wrap: anywhere; }
.sgs-contact li:first-child { border-top: 0; padding-top: 0; }
.sgs-contact li > span:first-child { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 2px; }
.sgs-contact a { color: var(--link); }
.sgs-days { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.sgs-days b { font-size: 11px; font-weight: 600; padding: 2px 6px; border-radius: 6px; background: var(--bg); color: #9AA5B1; }
.sgs-days b.is-open { background: #EAF6E4; color: #2D6A1C; }
.sgs-go { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px !important; }
.sgs-social { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px !important; }
.sgs-social a { font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 999px; background: var(--bg); color: var(--ink-2); }
.sgs-social a:hover { background: #E4EFF9; color: var(--link); }
.sgs-muted { color: var(--muted); font-size: 13px; }
.sgs-safe { background: #F7FBF8; border-color: #D3ECC8; }
.sgs-safe h2 { font-size: 15px; color: var(--green); }
.sgs-safe p { color: var(--ink-2); font-size: 13px; }
.sgs-safe a { display: inline-block; margin-top: 8px; color: var(--link); font-weight: 600; font-size: 13px; }

/* Tablets and phones */
@media (max-width: 991.98px) {
  .sgs-layout { grid-template-columns: 1fr; }
  .sgs-side { position: static; grid-template-columns: 1fr 1fr; align-items: start; }
  .sgs-filter { grid-template-columns: 1fr 1fr; }
  .sgs-f-q { grid-column: 1 / -1; }
  .sgs-ads .sgd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767.98px) {
  .sgs { padding-bottom: 96px; }
  .sgs-wrap { padding: 0 16px; }
  .sgs-top { margin: 0 -16px; border-radius: 0; border-left: 0; border-right: 0; }
  .sgs-cover { height: 120px; }
  .sgs-id { flex-direction: column; align-items: flex-start; gap: 8px; padding: 0 16px 16px; }
  .sgs-logo { width: 84px; height: 84px; margin-top: -40px; font-size: 26px; }
  .sgs-name { padding-top: 0; }
  .sgs-name h1 { font-size: 23px; }
  .sgs-act { width: 100%; }
  .sgs-act .sgs-btn { flex: 1; }
  .sgs-tabs { padding: 0 8px; }
  .sgs-box { padding: 18px 16px; }
  .sgs-filter { grid-template-columns: 1fr; }
  .sgs-filter input, .sgs-filter select { font-size: 16px; }
  .sgs-ads .sgd-grid { gap: 10px; }
  .sgs-side { grid-template-columns: 1fr; }
}
