/* IAK Wholesale — Brands Directory (/brands)
 *
 * Scoped to #product-manufacturer.brands-page. The page carries its own design
 * tokens (--b-*) because the shared theme tokens live in page-specific
 * stylesheets that aren't loaded here, and selectors are anchored to the page id
 * so theme rules such as `[data-theme="dark"] a` can't reach into the cards.
 *
 * Loaded via document->addStyle() in catalog/controller/product/manufacturer.php
 */
#product-manufacturer .brands-hero {
	padding:40px 0;
}

#product-manufacturer .brands-toolbar{
	top:113px !important;
	padding: 30px 0;
}

#product-manufacturer.brands-page .brands-body{
	padding-top:60px !important;
	padding-bottom:60px !important;
}

#product-manufacturer.brands-page .btn-primary{
	color:#fff !important;
}

#product-manufacturer .brands-rail-btn[disabled] {
    color: var(--b-ink-mute);
}

#product-manufacturer .brands-rail-btn.is-active{
	color:#fff !important;
}

#product-manufacturer.brands-page .btn-ghost{
	color: var(--b-ink-mute) !important;
}

@media(max-width:1024px){
	#product-manufacturer .brands-toolbar{
		top: 60px !important;
	}
}

@media(max-width:900px){
#product-manufacturer.brands-page .brands-body{
		grid-template-columns:1fr;
	}
}

@media(max-width:768px){
	#product-manufacturer .brands-spacer{
		display:none !important;
	}
	#product-manufacturer .brands-toolbar-right{
		margin-left: 0 !important;
	}
	#product-manufacturer .brands-toolbar{
		position:static !important;
	}
}

@media(max-width:576px){
	#product-manufacturer .brands-movers{
		grid-template-columns: 1fr !important;
	}
}
/* ── Design tokens ──
   Scoped to this page: the shared theme tokens (--bg-elev, --header-h, radii, shadows)
   live in page-specific stylesheets that aren't loaded on /brands, so the directory
   carries its own copy of the IAK token set. */
.brands-page {
  --b-red: #C13538;
  --b-red-deep: #A1282B;
  --b-peach: #FDDCC3;

  --b-bg: #FFFFFF;
  --b-bg-soft: #FFF8F0;
  --b-bg-sunken: #FAF1E5;
  --b-bg-elev: #FFFFFF;

  --b-ink: #18181a;
  --b-ink-2: #2c2c2e;
  --b-ink-3: #5a5a5e;
  --b-ink-mute: #848688;
  --b-ink-soft: #b3b3b6;

  --b-line: rgba(20, 20, 23, 0.08);
  --b-line-2: rgba(20, 20, 23, 0.14);

  --b-accent: var(--b-red);
  --b-accent-soft: var(--b-peach);
  --b-accent-ink: var(--b-red-deep);
  --b-success: #1f8a5b;

  --b-r-sm: 6px;
  --b-r-md: 10px;
  --b-r-lg: 14px;

  --b-shadow-2: 0 4px 10px rgba(20,20,23,0.06), 0 2px 4px rgba(20,20,23,0.04);

  /* Overwritten at runtime with the measured sticky-header height */
  --b-header-h: 146px;

  background: var(--b-bg);
  color: var(--b-ink);
}

/* iak-home.css sets `#product-manufacturer { margin-top: 50px }`, which left a
   cream gap between the site header and the hero band. The hero is full-bleed
   and must sit flush against the header. */
#product-manufacturer.brands-page {
  margin: 0;
  padding: 0;
  text-align: left;
}

[data-theme="dark"] .brands-page {
  --b-bg: #0f0f10;
  --b-bg-soft: #161617;
  --b-bg-sunken: #1c1c1e;
  --b-bg-elev: #222224;

  --b-ink: #f5f5f7;
  --b-ink-2: #e4e4e7;
  --b-ink-3: #b8b8bb;
  --b-ink-mute: #8a8a8e;
  --b-ink-soft: #5e5e62;

  --b-line: rgba(255, 255, 255, 0.08);
  --b-line-2: rgba(255, 255, 255, 0.14);

  --b-accent: #E0524F;
  --b-accent-soft: rgba(241, 137, 87, 0.18);
  --b-accent-ink: #F1A08A;

  --b-shadow-2: 0 4px 10px rgba(0,0,0,0.4), 0 2px 4px rgba(0,0,0,0.3);
}

/* padding-inline only — a `padding` shorthand here would out-specify and wipe
   the padding-block set by .brands-hero-inner / .brands-toolbar-inner / .brands-body */
#product-manufacturer.brands-page .container { max-width: 1440px; margin: 0 auto; padding-inline: 32px; }
#product-manufacturer.brands-page .tabular { font-variant-numeric: tabular-nums; }
#product-manufacturer.brands-page button { font-family: inherit; cursor: pointer; }
#product-manufacturer.brands-page a { text-decoration: none; color: inherit; }
#product-manufacturer.brands-page [hidden] { display: none !important; }

/* ── Hero ── */
#product-manufacturer .brands-hero { background: #18181a; color: #fff; }
#product-manufacturer.brands-page .brands-hero-inner { padding-block: 40px; }
#product-manufacturer .brands-crumb {
  font-size: 12px; color: rgba(255,255,255,0.55);
  margin-bottom: 12px; display: flex; gap: 6px; align-items: center;
}
#product-manufacturer .brands-crumb a { color: inherit; cursor: pointer; }
#product-manufacturer .brands-crumb-here { color: rgba(255,255,255,0.9); font-weight: 600; }

#product-manufacturer .brands-hero-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
#product-manufacturer .brands-hero-title {
  font-size: 36px; font-weight: 800; letter-spacing: -0.02em;
  margin: 0 0 10px; line-height: 1.1; color: #fff;
}
#product-manufacturer .brands-hero-sub {
  color: rgba(255,255,255,0.72); font-size: 15px;
  margin: 0; max-width: 520px; line-height: 1.6;
}
#product-manufacturer .brands-stats { display: flex; gap: 28px; margin-top: 24px; flex-wrap: wrap; }
#product-manufacturer .brands-stat-v { font-size: 24px; font-weight: 800; }
#product-manufacturer .brands-stat-l {
  font-size: 11.5px; color: rgba(255,255,255,0.55);
  text-transform: uppercase; letter-spacing: 0.07em; font-weight: 600;
}

#product-manufacturer .brands-movers-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.09em; color: rgba(255,255,255,0.5); margin-bottom: 10px;
}
#product-manufacturer .brands-movers { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
#product-manufacturer .brands-mover {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border: 1px solid rgba(255,255,255,0.14); border-radius: var(--b-r-md);
  background: rgba(255,255,255,0.06); color: #fff;
  text-align: left; transition: background .15s;
}
#product-manufacturer .brands-mover:hover { background: rgba(255,255,255,0.14); }
#product-manufacturer .brands-mover-badge {
  width: 34px; height: 34px; border-radius: var(--b-r-sm); background: var(--b-accent);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px; flex-shrink: 0;
}
#product-manufacturer .brands-mover-text { min-width: 0; }
#product-manufacturer .brands-mover-name {
  display: block; font-size: 13px; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#product-manufacturer .brands-mover-meta { display: block; font-size: 11px; color: rgba(255,255,255,0.55); }

/* ── Sticky toolbar ── */
#product-manufacturer .brands-toolbar {
  position: sticky; top: var(--b-header-h); z-index: 60;
  /* Opaque by default — a translucent background let the brand cards scroll
     through the bar. The blurred variant is only applied where it's supported. */
  background: var(--b-bg);
  border-bottom: 1px solid var(--b-line);
}
/* The rail is sticky too and must not be overlapped by the cards */
#product-manufacturer .brands-rail { z-index: 10; }
#product-manufacturer.brands-page .brands-toolbar-inner {
  display: flex; align-items: center; gap: 12px;
  padding-block: 12px; flex-wrap: wrap;
}
/* Form controls + surfaces, self-contained so the page doesn't inherit theme chrome */
#product-manufacturer.brands-page .brands-search-input, #product-manufacturer.brands-page .brands-sort {
  border: 1px solid var(--b-line-2);
  border-radius: var(--b-r-md);
  background: var(--b-bg);
  color: var(--b-ink);
  width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
#product-manufacturer.brands-page .brands-search-input:focus, #product-manufacturer.brands-page .brands-sort:focus {
  outline: none;
  border-color: var(--b-accent);
  box-shadow: 0 0 0 3px rgba(193, 53, 56, 0.14);
}
#product-manufacturer.brands-page .brands-search-input::placeholder { color: var(--b-ink-soft); }
#product-manufacturer.brands-page .brands-search-input::-webkit-search-cancel-button { display: none; }

#product-manufacturer.brands-page .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: var(--b-r-md);
  border: 1px solid transparent;
  font-weight: 600; font-size: 14px; letter-spacing: 0.01em;
  background: var(--b-bg-elev); color: var(--b-ink);
  transition: background .15s, border-color .15s, color .15s;
  white-space: nowrap;
}

#product-manufacturer .brands-rail-btn[disabled] {
    color: var(--b-ink-mute) !important;
}
#product-manufacturer.brands-page .btn { text-transform: none; width: auto; margin: 0; }
#product-manufacturer.brands-page .btn-primary { background: var(--b-accent); color: #fff; }
#product-manufacturer.brands-page .btn-primary:hover { background: var(--b-red-deep); color: #fff; }
#product-manufacturer.brands-page .btn-ghost { background: transparent; border-color: var(--b-line-2); }
#product-manufacturer.brands-page .btn-ghost:hover { background: var(--b-bg-sunken); }


#product-manufacturer .brands-search { position: relative; width: 300px; }
#product-manufacturer .brands-search-icon { position: absolute; left: 12px; top: 12px; color: var(--b-ink-mute); }
#product-manufacturer .brands-search-input { padding-left: 36px; height: 40px; font-size: 13.5px; }
#product-manufacturer .brands-search-clear {
  position: absolute; right: 8px; top: 8px; width: 24px; height: 24px;
  border: 0; background: transparent; color: var(--b-ink-mute);
  display: inline-flex; align-items: center; justify-content: center;
}
#product-manufacturer .brands-pills { display: flex; gap: 6px; flex-wrap: wrap; }
#product-manufacturer .brands-pill {
  padding: 7px 13px; border-radius: 999px;
  border: 1px solid var(--b-line-2); background: transparent;
  color: var(--b-ink-2); font-size: 12.5px; font-weight: 600; white-space: nowrap;
}
#product-manufacturer .brands-pill.is-active {
  border-color: var(--b-accent); background: var(--b-accent-soft); color: var(--b-accent-ink);
}
#product-manufacturer .brands-spacer { flex: 1; }
#product-manufacturer .brands-toolbar-right {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--b-ink-mute);
  white-space: nowrap; margin-left: auto;
}
#product-manufacturer .brands-shown { font-weight: 600; color: var(--b-ink-2); }
#product-manufacturer .brands-sort { height: 36px; width: auto; font-size: 12.5px; padding-inline: 10px; }

/* ── Body ── */
#product-manufacturer.brands-page .brands-body {
  display: grid; grid-template-columns: 44px 1fr;
  gap: 28px; padding-block: 32px; align-items: start;
}
#product-manufacturer .brands-rail {
  position: sticky; top: calc(var(--b-header-h) + 76px);
  display: flex; flex-direction: column; gap: 1px;
  max-height: calc(100vh - 240px); overflow-y: auto; scrollbar-width: none;
}
#product-manufacturer .brands-rail::-webkit-scrollbar { display: none; }
#product-manufacturer .brands-rail-btn {
  width: 32px; height: 26px; border: 0; border-radius: 6px;
  font-size: 12px; font-weight: 700;
  background: transparent; color: var(--b-ink-2); transition: background .12s;
}

#product-manufacturer .brands-rail-btn[disabled]
Specificity: (1,2,0)
 {
    color: var(--b-ink-mute) !important;
}
@media (max-width: 900px) {
    #product-manufacturer.brands-page .brands-body {
        grid-template-columns: 1fr !important;
    }
}
#product-manufacturer.brands-page .btn-primary {
    color: #fff !important;
    font-size: 13px !important;
}
#product-manufacturer .brands-rail-btn.is-active { background: var(--b-accent); color: #fff; }
#product-manufacturer .brands-rail-btn[disabled] { color: var(--b-line-2); cursor: default; }

#product-manufacturer .brands-sections { display: flex; flex-direction: column; gap: 30px; }
#product-manufacturer .brands-section-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; }
#product-manufacturer .brands-section-letter {
  font-size: 22px; font-weight: 800; color: var(--b-accent); letter-spacing: -0.02em;
}
#product-manufacturer .brands-section-rule { height: 1px; flex: 1; background: var(--b-line); align-self: center; }
#product-manufacturer .brands-section-count { font-size: 11.5px; color: var(--b-ink-mute); }

#product-manufacturer .brands-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(265px, 1fr)); gap: 10px; }

/* ── Brand card ── */
#product-manufacturer .bdir-card {
  display: flex; align-items: center; gap: 12px; padding: 13px 14px;
  border: 1px solid var(--b-line-2); border-radius: var(--b-r-lg);
  background: var(--b-bg-elev); color: var(--b-ink); text-align: left;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
#product-manufacturer .bdir-card:hover {
  border-color: var(--b-accent); box-shadow: var(--b-shadow-2); transform: translateY(-1px);
}
#product-manufacturer .bdir-card-badge {
  width: 40px; height: 40px; border-radius: var(--b-r-md); flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px;
  background: var(--b-accent-soft); color: var(--b-accent-ink);
  transition: background .15s, color .15s;
}
#product-manufacturer .bdir-card:hover .bdir-card-badge { background: var(--b-accent); color: #fff; }
#product-manufacturer .bdir-card-body { flex: 1; min-width: 0; }
#product-manufacturer .bdir-card-top { display: flex; align-items: center; gap: 6px; }
#product-manufacturer .bdir-card-name {
  font-size: 13.5px; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#product-manufacturer .bdir-card-shield { color: var(--b-success); flex-shrink: 0; }
#product-manufacturer .bdir-card-meta {
  display: flex; align-items: baseline; gap: 0;
  font-size: 11.5px; color: var(--b-ink-mute); margin-top: 2px;
  white-space: nowrap; min-width: 0;
}
#product-manufacturer .bdir-card-cat { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
#product-manufacturer .bdir-card-rest { flex-shrink: 0; }
#product-manufacturer .bdir-card-restock { color: var(--b-accent); font-weight: 600; }
#product-manufacturer .bdir-card-chev { color: var(--b-ink-mute); flex-shrink: 0; transition: color .15s; }
#product-manufacturer .bdir-card:hover .bdir-card-chev { color: var(--b-accent); }

/* ── Empty state ── */
#product-manufacturer .brands-empty { text-align: center; padding: 56px 20px; color: var(--b-ink-mute); }
#product-manufacturer .brands-empty-title { font-size: 16px; font-weight: 700; color: var(--b-ink); margin: 12px 0 4px; }
#product-manufacturer .brands-empty-body { font-size: 13px; margin-bottom: 16px; }

/* ── Bottom CTA ── */
#product-manufacturer.brands-page .brands-cta {
  background: var(--b-bg-elev);
  border: 1px solid var(--b-line);
  border-radius: var(--b-r-lg);
  margin-top: 44px; padding: 22px 26px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap; background: var(--b-bg-soft);
  text-align: left; width: auto;
}
#product-manufacturer .brands-cta-title { font-weight: 700; font-size: 15px; margin-bottom: 3px; }
#product-manufacturer .brands-cta-body { font-size: 13px; color: var(--b-ink-3); }

@media (max-width: 900px) {
#product-manufacturer .brands-hero-grid { grid-template-columns: 1fr; gap: 28px; }
#product-manufacturer .brands-hero-title { font-size: 28px; }
#product-manufacturer .brands-body { grid-template-columns: 1fr; }
#product-manufacturer .brands-rail { display: none; }
#product-manufacturer .brands-search { width: 100%; }
}

@media (max-width: 768px) {
    #product-manufacturer .brands-spacer {
        display: none !important;
    }
}

@media (max-width: 768px) {
    #product-manufacturer .brands-toolbar {
        position: static !important;
    }
}
/* ── Dark theme: explicit values ──
   The theme's own dark rules reach into these elements, so the dark appearance is
   stated directly here rather than relying on the inherited custom properties. */
[data-theme="dark"] #product-manufacturer .bdir-card {
  background: #222224 !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
  color: #f5f5f7;
}
[data-theme="dark"] #product-manufacturer .bdir-card:hover {
  border-color: #E0524F;
}
[data-theme="dark"] #product-manufacturer .bdir-card-name { color: #f5f5f7; }
[data-theme="dark"] #product-manufacturer .bdir-card-meta { color: #8a8a8e; }
[data-theme="dark"] #product-manufacturer .bdir-card-badge {
  background: rgba(241, 137, 87, 0.18) !important;
  color: #F1A08A !important;
}
[data-theme="dark"] #product-manufacturer .bdir-card:hover .bdir-card-badge {
  background: #E0524F;
  color: #fff;
}
[data-theme="dark"] #product-manufacturer .bdir-card-restock { color: #E0524F; }
[data-theme="dark"] #product-manufacturer .bdir-card-chev { color: #8a8a8e; }
[data-theme="dark"] #product-manufacturer .brands-pill { color: #e4e4e7; }
[data-theme="dark"] #product-manufacturer .brands-pill.is-active { color: #F1A08A; }
[data-theme="dark"] #product-manufacturer .brands-search-input,
[data-theme="dark"] #product-manufacturer .brands-sort {
  background: #1a1a1c; color: #f5f5f7; border-color: rgba(255,255,255,0.14);
}
[data-theme="dark"] #product-manufacturer .brands-cta-title { color: #f5f5f7; }
