/* RUN Filter by Brand V2.1.1 — right-logo card polish + mobile responsive guard.
   Additive UI only: brand/category/search/filter business logic is intentionally untouched. */
#catalog .brand-filter-separator {
  flex: 0 0 1px;
  width: 1px;
  height: 30px;
  align-self: center;
  margin: 0 2px 0 4px;
  background: rgba(159, 203, 255, 0);
}

#catalog .brand-filter-button,
#catalog .selected-brand-chip {
  flex: 0 0 auto;
  min-height: 46px;
  border-radius: 14px;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .14s ease, border-color .14s ease, background-color .14s ease, box-shadow .14s ease;
}

#catalog .brand-filter-button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 18px 0 12px;
  border: 1px solid rgba(173, 207, 247, .40);
  background: #ffffff;
  color: #d90000;
  text-transform: uppercase;
  letter-spacing: .03em;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 8px 20px rgba(5, 20, 45, .10);
}

#catalog .brand-filter-button:hover,
#catalog .brand-filter-button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(230, 0, 0, .42);
  background: #fffafa;
  box-shadow: 0 10px 24px rgba(230, 0, 0, .12);
  outline: none;
}

#catalog .brand-filter-button.active {
  border-color: rgba(230, 0, 0, .72);
  background: #ffffff;
  color: #d90000;
  box-shadow: 0 12px 28px rgba(230, 0, 0, .14);
}

#catalog .brand-filter-button-mark {
  display: inline-grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 8px;
  background: #fff2f2;
  color: #d90000;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .04em;
}

#catalog .selected-brand-chip {
  padding: 0 15px;
  border: 1px solid rgba(245, 124, 0, .34);
  background: #fff;
  color: #d96b00;
  box-shadow: 0 7px 18px rgba(6, 26, 54, .12);
}

#catalog .selected-brand-chip:hover,
#catalog .selected-brand-chip:focus-visible {
  border-color: #f57c00;
  background: #fff8ef;
  outline: none;
}

.brand-browser-lock { overflow: hidden !important; }

.brand-browser-page {
  position: fixed;
  inset: 0;
  z-index: 25000;
  overflow-y: auto;
  overscroll-behavior: contain;
  background:
    radial-gradient(circle at 18% 0%, rgba(24, 119, 255, .18), transparent 38%),
    linear-gradient(145deg, #071a34 0%, #08152d 55%, #141124 100%);
  color: #fff;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .12s ease, transform .12s ease;
}

.brand-browser-page.open { opacity: 1; transform: none; }

.brand-browser-shell {
  width: min(1240px, calc(100% - 48px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 34px 0 64px;
}

.brand-browser-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 24px;
  padding-bottom: 26px;
  border-bottom: 1px solid rgba(178, 211, 249, .18);
}

.brand-browser-back,
.brand-browser-close,
.brand-browser-clear {
  border: 1px solid rgba(178, 211, 249, .24);
  background: rgba(255,255,255,.07);
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.brand-browser-back {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 12px;
}

.brand-browser-close {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  font-size: 26px;
  line-height: 1;
}

.brand-browser-back:hover,
.brand-browser-back:focus-visible,
.brand-browser-close:hover,
.brand-browser-close:focus-visible,
.brand-browser-clear:hover,
.brand-browser-clear:focus-visible {
  background: rgba(31,124,255,.20);
  border-color: rgba(126,187,255,.68);
  outline: none;
}

.brand-browser-heading { min-width: 0; }
.brand-browser-eyebrow {
  display: block;
  margin-bottom: 8px;
  color: #77b8ff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .14em;
}
.brand-browser-heading h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.02;
  letter-spacing: -.03em;
}
.brand-browser-heading p {
  max-width: 720px;
  margin: 10px 0 0;
  color: #b9cbe2;
  font-size: 15px;
  line-height: 1.6;
}

.brand-browser-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  margin-top: 28px;
}

.brand-browser-search {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 0 18px;
  border: 1px solid rgba(178, 211, 249, .22);
  border-radius: 16px;
  background: rgba(3, 17, 37, .62);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.brand-browser-search > span { color: #9fcaff; font-size: 22px; }
.brand-browser-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 16px;
}
.brand-browser-search input::placeholder { color: #8fa7c3; }
.brand-browser-clear {
  min-height: 58px;
  padding: 0 20px;
  border-radius: 16px;
}

.brand-browser-summary {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin: 18px 2px 16px;
  color: #9fb4ce;
  font-size: 13px;
}
.brand-browser-summary p { margin: 0; }
.brand-browser-hint { text-align: right; }

.brand-browser-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.brand-browser-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 104px;
  align-items: center;
  gap: 20px;
  min-height: 120px;
  padding: 16px 18px 16px 22px;
  border: 1px solid #eef4fb;
  border-radius: 18px;
  background: #ffffff;
  color: #102743;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(0,0,0,.10);
  transition: transform .13s ease, border-color .13s ease, box-shadow .13s ease;
}
.brand-browser-card:hover,
.brand-browser-card:focus-visible {
  transform: translateY(-2px);
  border-color: #5ca7ff;
  box-shadow: 0 14px 30px rgba(0,0,0,.18), 0 0 0 2px rgba(55,143,255,.10);
  outline: none;
}
.brand-browser-card[aria-pressed="true"] {
  border-color: #E60000;
  box-shadow: 0 12px 28px rgba(230,0,0,.18), 0 0 0 2px rgba(230,0,0,.10);
}

.brand-browser-logo {
  position: relative;
  display: grid;
  place-items: center;
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  width: 104px;
  height: 84px;
  overflow: visible;
  border-radius: 0;
  background: transparent;
  border: 0;
}
.brand-browser-logo img {
  position: absolute;
  inset: 2px;
  width: calc(100% - 4px);
  height: calc(100% - 4px);
  object-fit: contain;
  background: transparent;
  opacity: 1;
}
.brand-browser-logo.has-image .brand-browser-wordmark-fallback { opacity: 0; }
.brand-browser-wordmark-fallback {
  display: -webkit-box;
  overflow: hidden;
  color: #0b3768;
  font-size: 15px;
  font-weight: 950;
  line-height: 1.05;
  letter-spacing: -.01em;
  text-align: center;
  text-transform: uppercase;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  transition: opacity .12s ease;
}
.brand-browser-wordmark-fallback.is-long { font-size: 12px; line-height: 1.08; }
.brand-browser-wordmark-fallback.is-very-long { font-size: 10px; line-height: 1.10; }
.brand-browser-card-copy {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  align-self: center;
}
.brand-browser-card-copy strong {
  display: block;
  overflow: hidden;
  color: #08294f;
  font-size: 19px;
  line-height: 1.28;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  white-space: normal;
}
.brand-browser-card-copy small {
  display: block;
  margin-top: 8px;
  color: #365f8d;
  font-size: 15px;
  font-weight: 900;
}
.brand-browser-empty {
  grid-column: 1 / -1;
  padding: 48px 20px;
  border: 1px dashed rgba(173,207,247,.26);
  border-radius: 16px;
  color: #b8cbe1;
  text-align: center;
}

@media (max-width: 980px) {
  .brand-browser-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .brand-browser-card { grid-template-columns: minmax(0, 1fr) 88px; min-height: 108px; padding: 14px 16px 14px 18px; gap: 16px; }
  .brand-browser-logo { width: 88px; height: 72px; border-radius: 0; }
  .brand-browser-card-copy strong { font-size: 18px; }
  .brand-browser-card-copy small { font-size: 14px; }
  .brand-browser-wordmark-fallback { font-size: 13px; }
  .brand-browser-wordmark-fallback.is-long { font-size: 11px; }
  .brand-browser-wordmark-fallback.is-very-long { font-size: 9px; }
  .brand-browser-header { grid-template-columns: 1fr auto; }
  .brand-browser-back { grid-column: 1 / -1; justify-self: start; }
  .brand-browser-heading { grid-column: 1; }
  .brand-browser-close { grid-column: 2; grid-row: 2; }
}

@media (max-width: 700px) {
  #catalog .brand-filter-separator { height: 26px; }
  #catalog .brand-filter-button,
  #catalog .selected-brand-chip { min-height: 42px; font-size: 13px; }

  .brand-browser-shell { width: min(100% - 28px, 680px); padding-top: 18px; }
  .brand-browser-header { gap: 14px; padding-bottom: 20px; }
  .brand-browser-back { min-height: 42px; }
  .brand-browser-heading h2 { font-size: 32px; }
  .brand-browser-heading p { font-size: 14px; }
  .brand-browser-toolbar { grid-template-columns: 1fr; }
  .brand-browser-search,
  .brand-browser-clear { min-height: 54px; }
  .brand-browser-summary { display: block; }
  .brand-browser-hint { margin-top: 7px !important; text-align: left; }
  .brand-browser-grid { grid-template-columns: 1fr; gap: 11px; }
  .brand-browser-card { grid-template-columns: minmax(0, 1fr) 76px; min-height: 94px; padding: 12px 14px 12px 16px; gap: 13px; }
  .brand-browser-logo { width: 76px; height: 62px; border-radius: 0; }
  .brand-browser-card-copy strong { font-size: 17px; line-height: 1.25; }
  .brand-browser-wordmark-fallback { font-size: 12px; }
  .brand-browser-wordmark-fallback.is-long { font-size: 10px; }
  .brand-browser-wordmark-fallback.is-very-long { font-size: 8.5px; }
  .brand-browser-card-copy small { margin-top: 6px; font-size: 14px; }
}


@media (max-width: 430px) {
  .brand-browser-shell { width: calc(100% - 20px); }
  .brand-browser-card { grid-template-columns: minmax(0, 1fr) 68px; min-height: 88px; padding: 11px 12px 11px 14px; gap: 11px; border-radius: 16px; }
  .brand-browser-logo { width: 68px; height: 56px; border-radius: 0; }
  .brand-browser-card-copy strong { font-size: 16px; font-weight: 900; color: #08294f; }
  .brand-browser-card-copy small { font-size: 13px; font-weight: 900; color: #365f8d; }
}

@media (prefers-reduced-motion: reduce) {
  .brand-browser-page,
  .brand-browser-card,
  #catalog .brand-filter-button,
  #catalog .selected-brand-chip { transition: none !important; }
}


/* V2.4 MOBILE LIVE HOTFIX — expose Brand Filter outside the mobile-hidden category chip row. */
.mobile-brand-filter-row { display: none; }
@media (max-width: 700px) {
  #catalog .mobile-brand-filter-row {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-width: 0;
    grid-column: 1 !important;
  }
  #catalog .mobile-brand-filter-button {
    display: inline-flex !important;
    visibility: visible !important;
    pointer-events: auto !important;
    flex: 0 0 auto;
    min-height: 46px;
    padding: 0 15px 0 11px;
    border-radius: 13px;
    background: #fff;
    color: #d90000;
    border: 1px solid rgba(230,0,0,.34);
    text-transform: uppercase;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: .02em;
  }
  #catalog .mobile-selected-brand-chip {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    max-width: 48%;
    min-height: 46px;
    padding: 0 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
  }
  #catalog .mobile-selected-brand-chip[hidden] { display: none !important; }
}
