/* =========================================================
 Featured Brands Page Styles
 ========================================================= */

/* ---- Design tokens ---- */
:root {
  --bg-page: #f4f5f7;
  --header-bg: #072908;

  --card-bg: #ffffff;
  --card-border: #e5e7eb;
  --surface-1: rgba(0,0,0,0.03);
  --surface-2: rgba(0,0,0,0.06);
  --surface-3: rgba(0,0,0,0.12);

  --text-primary: #111827;
  --text-secondary: #374151;
  --text-muted: #6b7280;

  --radius-lg: 10px;
  --shadow-outer: 0 6px 16px rgba(0,0,0,.10);
}

/* ---- Full-page background ---- */
html, body {
  height: 100%;
  min-height: 100vh;
}

body {
  background-color: var(--bg-page);

  margin: 0;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text-secondary);
}

/* =========================================================
 Brand Header
 ========================================================= */
.brand-header {
  position: sticky; top: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px;
  background: var(--header-bg);
  border-bottom: 1px solid rgba(0,0,0,.08);
  backdrop-filter: blur(6px);
  color: var(--text-primary);
  flex-wrap: wrap;
  gap: 8px;
}

.brand-logo {
  height: 65px; max-width: 250px; object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.15));
  cursor: pointer; transition: transform .25s ease;
}
.brand-logo:hover { transform: scale(1.02); }

.brand-actions {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text-primary);
  flex-wrap: wrap;
}

.auth-status {
  font-weight: 600;
  color: #fff;
  opacity: 0.85;
  margin-right: 12px;
  white-space: nowrap;
}

/* Pill button */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 8px 14px; border-radius: 999px;
  font-weight: 600; border: 1px solid rgba(255,255,255,0.2);
  cursor: pointer; line-height: 1;
  transition: background-color .15s ease, color .15s ease, box-shadow .15s ease, transform .08s ease;
  text-decoration: none;
}
/* Mobile label swap */
.btn-label-short { display: none; }

.btn-secondary {
  background: transparent;
  color: #fff;
  border: none;
  box-shadow: none;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
}
.btn-secondary:hover {
  background: transparent;
  color: rgba(255,255,255,0.75);
  transform: none;
}

/* Beta feedback button — prominent in header */
.btn-feedback { background: #e8a020; color: #fff; border: none; font-size: 14px; text-decoration: none; }
.btn-feedback:hover { background: #d18f18; color: #fff; transform: none; text-decoration: none; }

/* =========================================================
 Main page content
 ========================================================= */
.featured-brands-page {
  max-width: 1500px;
  margin: 0 auto;
  padding: 48px 60px 80px;
}

/* Promo Banner */
.promo-banner {
  background: #FFFFFF;
  color: #000;
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 12px;
  padding: 28px 36px;
  margin-bottom: 28px;
  box-shadow: 0 6px 16px rgba(0,0,0,.10), inset 0 1px 1px rgba(255,255,255,.60);
  text-align: center;
}

.promo-text {
  font-size: 18px;
  font-weight: 500;
  line-height: 1.6;
  margin: 0;
  color: var(--text-secondary);
}

.promo-text strong {
  font-weight: 800;
  color: #000;
}

.promo-code {
  display: inline-block;
  background: #072908;
  color: #fff;
  padding: 2px 10px;
  border-radius: 6px;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: 1.5px;
}

/* Score Mode Toggle */
.score-mode-container {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.score-mode {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  user-select: none;
}

.score-mode__label {
  color: #222;
  opacity: 0.9;
  font-weight: 600;
}

/* iOS-style checkbox switch */
.score-switch {
  --w: 42px;
  --h: 24px;
  --p: 3px;
  appearance: none;
  width: var(--w);
  height: var(--h);
  background: #c9c9c9;
  border-radius: var(--h);
  position: relative;
  outline: none;
  cursor: pointer;
  transition: background 120ms ease;
}

.score-switch::after {
  content: '';
  position: absolute;
  top: var(--p);
  left: var(--p);
  width: calc(var(--h) - 2*var(--p));
  height: calc(var(--h) - 2*var(--p));
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.35);
  transition: transform 120ms ease;
}

.score-switch:checked {
  background: #0b4f2d;
}

.score-switch:checked::after {
  transform: translateX(calc(var(--w) - var(--h)));
}

/* Loading and Empty States */
.loading-state,
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  font-size: 18px;
}

/* Products Grid */
.products-container {
  margin-top: 8px;
  padding-bottom: 16px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

/* Product Card styles are in ../styles/product-card.css */

/* Responsive */
@media (max-width: 900px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* (breadcrumb removed – logo navigates home) */

/* =========================================================
 Brand Summary Card (match supplier page exactly)
 ========================================================= */
.brand-summary-card {
  background: #FFFFFF;
  color: #000;
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 12px;
  padding: 18px;
  margin: 0 auto 20px;
  max-width: 1200px;
  box-shadow: 0 6px 16px rgba(0,0,0,.10), inset 0 1px 1px rgba(255,255,255,.60);
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
  grid-template-areas:
    "header"
    "summary"
    "peers"
    "checks";
}

@media (min-width: 900px) {
  .brand-summary-card {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "header header"
      "summary summary"
      "peers checks";
  }
}

.brand-summary-header {
  grid-area: header;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: center;
}

.brand-score-circle {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-info-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.brand-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

@media (max-width: 540px) {
  .brand-title-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

.brand-info-title {
  color: #000;
  font-weight: 700;
  font-size: 28px;
  font-family: Montserrat, Inter;
  margin: 0;
}

.brand-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Dual score display (percentile + raw side by side) — matches supplier page */
.score-dual-display { display: flex; gap: 12px; align-items: flex-start; }
.score-dual-item { display: flex; flex-direction: column; align-items: center; }
.score-dual-label { font-size: 10px; color: #777; margin-top: 2px; font-weight: 500; letter-spacing: 0.3px; text-transform: uppercase; }

/* Leif Verified badge — matches supplier page */
.leif-certified-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 14px;
  vertical-align: middle;
  position: relative;
  top: -2px;
}
.leif-certified-badge .certified-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}
.leif-certified-badge .certified-text {
  font-size: 0.85rem;
  font-weight: 700;
  color: #1a7a1a;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Parent company / subsidiary badge — matches supplier page */
.parent-company-badge {
  display: inline-block;
  font-size: 0.85rem;
  color: #555;
  margin-top: 4px;
  padding: 3px 10px;
  background: rgba(9, 73, 34, 0.08);
  border-radius: 12px;
  line-height: 1.4;
}
.parent-company-badge strong {
  color: #094922;
  font-weight: 600;
}
.parent-company-badge .certified-icon-mini {
  width: 18px;
  height: 18px;
  vertical-align: middle;
  margin-left: 4px;
  position: relative;
  top: -1px;
}
.parent-company-badge .badge-hint {
  font-size: 0.72rem;
  color: #888;
  margin-left: 5px;
  font-style: italic;
}

/* User Score toggle (match supplier page) */
.score-mode {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  user-select: none;
}

.score-mode__label {
  color: #222;
  opacity: 0.9;
  font-weight: 600;
}

/* Brand sections (match supplier sections) */
.brand-section {
  margin-bottom: 0;
}

.brand-section--summary {
  grid-area: summary;
  background: rgba(0,0,0,0.03);
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 10px;
  padding: 16px;
}

.brand-section--peers {
  grid-area: peers;
  background: rgba(0,0,0,0.03);
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 10px;
  padding: 16px;
}

.brand-section--attributes {
  grid-area: checks;
  background: rgba(0,0,0,0.03);
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 10px;
  padding: 16px;
}

.brand-section-title {
  font-size: 16px;
  font-weight: 700;
  color: #000;
  margin: 0 0 12px 0;
}

.brand-section--summary p {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: 14.5px;
  line-height: 1.75;
  color: #2c2c2c;
  letter-spacing: 0.01em;
  margin: 0;
}

/* Detailed score breakdown — three pillar circles with sub-category rows.
   Mirrors the supplier page layout (extension/supplier/supplier.css). */
.pillar-hint {
  font-size: 12.5px;
  font-style: italic;
  color: #6b7280;
  margin: -4px 0 12px;
}
.peers-container.pillar-circles-row {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  flex-wrap: nowrap;
}
.pillar-circle-col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.pillar-circle-wrap {
  width: 100%;
  border: 2px solid rgba(0,0,0,0.15);
  border-radius: 12px;
  padding: 14px 8px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #fff;
  box-sizing: border-box;
}
.pillar-wheel-holder {
  display: flex;
  align-items: center;
  justify-content: center;
}
.pillar-circle-label {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #1a1a1a;
  text-align: center;
  line-height: 1.2;
}
.pillar-circle-wrap .pillar-tier-badge {
  margin-top: 8px;
  min-width: 88px;
  height: 32px;
  border-radius: 8px;
  font-size: 11px;
  padding: 0 8px;
}

/* Sub-category panel under each pillar circle */
.pillar-sub-panel {
  width: 100%;
  margin-top: 10px;
  padding: 10px 0 0;
  border-top: 1px solid rgba(0,0,0,0.08);
}
.pillar-sub-row {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 2px 10px;
  padding: 6px 4px;
  border-radius: 6px;
}
.pillar-sub-row:hover { background: rgba(0,0,0,0.02); }
.pillar-sub-label {
  font-size: 12.5px;
  font-weight: 600;
  color: #222;
  grid-column: 1;
  grid-row: 1;
}
.pillar-sub-scores {
  font-size: 11.5px;
  font-weight: 600;
  color: #555;
  text-align: right;
  grid-column: 2;
  grid-row: 1;
  white-space: nowrap;
}
.pillar-sub-bar-wrap {
  grid-column: 1 / -1;
  grid-row: 2;
  height: 5px;
  background: rgba(0,0,0,0.08);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 2px;
}
.pillar-sub-bar {
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s ease;
}

/* Tier badge in the brand summary header (sits next to the raw score wheel) */
.brand-tier-badge {
  min-width: 80px;
  height: 56px;
  border-radius: 12px;
  font-size: 12px;
  padding: 0 8px;
}

.checks-subtitle {
  font-size: 12.5px; color: #6b7280; line-height: 1.5;
  margin: -4px 0 12px; font-style: italic;
}

/* Attributes container (categorized pill chips — matching supplier page) */
.attributes-container {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.attr-group { margin-bottom: 10px; }
.attr-group:last-child { margin-bottom: 0; }

.attr-group-label {
  width: 100%; margin: 8px 0 4px; padding: 0;
  font-size: 12px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.05em; color: #888;
}
.attr-group:first-of-type .attr-group-label { margin-top: 0; }

.attr-pill-wrap { display: flex; flex-wrap: wrap; gap: 8px; }

.attr-pill {
  display: inline-flex; align-items: center;
  padding: 8px 16px; border-radius: 999px;
  font-size: 13px; font-weight: 700; line-height: 1;
  user-select: none;
}

.attr-pill--yes {
  background: #072908; border: 2px solid #072908; color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.20);
}

.attr-pill--no {
  background: #fafafa; border: 2px solid rgba(0,0,0,0.10); color: #374151;
}

.checks-toggle {
  display: flex; align-items: center; gap: 6px;
  width: 100%; padding: 8px 12px; margin-top: 8px;
  background: none; border: 1px dashed rgba(0,0,0,0.15); border-radius: 8px;
  font-size: 13px; font-weight: 600; color: #777;
  cursor: pointer; transition: color 0.15s, border-color 0.15s;
}
.checks-toggle:hover { color: #333; border-color: rgba(0,0,0,0.3); }
.checks-toggle__arrow { font-size: 14px; }
.checks-no-group { margin-top: 6px; }

/* AI typing experience for the Summary section (from supplier.css) */
.ai-loader {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #072908;
  font-weight: 700;
  font-size: 14px;
  user-select: none;
}

.ai-loader__spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(0,0,0,0.18);
  border-top-color: #072908;
  animation: ai-spin .8s linear infinite;
}

@keyframes ai-spin { to { transform: rotate(360deg); } }

.ai-dots {
  display: inline-flex;
  gap: 4px;
}
.ai-dots > i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #072908;
  opacity: .25;
  animation: ai-dot 1s ease-in-out infinite;
}
.ai-dots > i:nth-child(2) { animation-delay: .15s; }
.ai-dots > i:nth-child(3) { animation-delay: .30s; }

@keyframes ai-dot {
  0%, 80%, 100% { transform: translateY(0); opacity: .25; }
  40%          { transform: translateY(-3px); opacity: 1;   }
}

.ai-typed {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* Products Section Title */
.products-section-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 16px;
  padding-top: 8px;
  text-align: center;
}

.products-section-title span {
  color: var(--header-bg);
}

/* =========================================================
   Toolbar (Filter button + User Score toggle)
   ========================================================= */
.toolbar {
  display: flex; justify-content: center; align-items: center;
  gap: 16px; margin: 16px 0; flex-wrap: wrap;
}

.filter-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 16px; font-weight: 700; font-size: 14px;
  background: #ffffff; color: #000000;
  border: none;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  cursor: pointer; transition: background-color 0.2s ease, transform 0.2s ease;
}
.filter-toggle svg { flex-shrink: 0; }
.filter-toggle:hover { background-color: #f4f4f4; transform: translateY(-1px); }
.filter-count-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 999px; background: #072908; color: #fff;
  font-size: 11px; font-weight: 700; line-height: 1;
}

/* =========================================================
   Filter Overlay + Drawer
   ========================================================= */
.filter-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1100;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
}
.filter-overlay.active { opacity: 1; pointer-events: auto; }

.filter-drawer {
  position: fixed; top: 0; left: 0;
  width: 340px; max-width: 85vw; height: 100vh;
  background: #ffffff;
  z-index: 1200;
  display: flex; flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
}
.filter-drawer.open { transform: translateX(0); }

.drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  flex-shrink: 0;
}
.drawer-header-left { display: flex; align-items: center; gap: 8px; }
.drawer-title {
  font-size: 14px; font-weight: 800;
  letter-spacing: 1px; color: #1a1a1a;
}
.drawer-filter-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: 999px; background: #072908; color: #fff;
  font-size: 11px; font-weight: 700;
}
.drawer-filter-count:empty { display: none; }
.drawer-close {
  width: 32px; height: 32px; border: none; background: none;
  font-size: 24px; color: #666; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px; transition: background 0.15s ease;
}
.drawer-close:hover { background: rgba(0,0,0,0.06); color: #333; }

/* Drawer active pills */
.drawer-active-pills {
  padding: 10px 20px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  flex-shrink: 0;
}
.drawer-active-pills-list { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.drawer-pills-clear {
  background: none; border: none;
  color: #072908; font-size: 12px; font-weight: 700;
  cursor: pointer; text-decoration: underline; padding: 0;
}

/* Drawer body */
.drawer-body { flex: 1; overflow-y: auto; padding: 4px 0; }

/* Drawer sections */
.drawer-section { padding: 14px 20px; }
.drawer-section-title {
  font-size: 12px; font-weight: 800;
  letter-spacing: 0.8px; color: #1a1a1a;
  margin-bottom: 10px;
}
.drawer-divider { height: 1px; background: rgba(0, 0, 0, 0.06); margin: 0 20px; }

/* Drawer footer */
.drawer-footer {
  display: flex; gap: 12px;
  padding: 16px 20px;
  border-top: 1px solid rgba(0,0,0,0.1);
  background: #fff; flex-shrink: 0;
}
.drawer-btn-clear {
  flex: 0 0 auto; padding: 12px 24px;
  border: 2px solid rgba(0,0,0,0.15); border-radius: 999px;
  background: #fff; color: #1a1a1a;
  font-size: 13px; font-weight: 700; letter-spacing: 0.5px;
  cursor: pointer; transition: all 0.15s ease;
}
.drawer-btn-clear:hover { border-color: rgba(0,0,0,0.3); }
.drawer-btn-view {
  flex: 1; padding: 12px 24px;
  border: none; border-radius: 999px;
  background: #072908; color: #fff;
  font-size: 13px; font-weight: 700; letter-spacing: 0.5px;
  cursor: pointer; transition: all 0.15s ease;
}
.drawer-btn-view:hover { background: #016b34; }

/* Active filter pill (shared) */
.active-filter-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 10px; border-radius: 999px;
  background: #f3f4f6; border: 1px solid rgba(0,0,0,0.2);
  font-size: 12px; font-weight: 600; color: #072908;
  white-space: nowrap;
}
.active-filter-pill .pill-remove {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; border-radius: 50%;
  background: rgba(0,0,0,0.15); border: none;
  color: #072908; font-size: 12px; font-weight: 700; line-height: 1;
  cursor: pointer; padding: 0; margin-left: 2px;
  transition: background 0.15s ease;
}
.active-filter-pill .pill-remove:hover { background: rgba(0,0,0,0.3); }

/* Active filters bar (inline, below toolbar) */
.active-filters-bar {
  display: flex; align-items: center; gap: 8px;
  justify-content: center; flex-wrap: wrap;
  max-width: 1000px; margin: 0 auto;
  padding: 8px 0 4px;
}
.active-filters-list { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.active-filters-clear {
  background: none; border: none;
  color: #072908; font-size: 12px; font-weight: 700;
  cursor: pointer; text-decoration: underline; padding: 2px 4px;
}

/* =========================================================
   Drawer form controls (fp-select, fp-tags, fp-pills)
   ========================================================= */
.fp-select {
  padding: 9px 32px 9px 12px;
  border-radius: 8px;
  border: 1.5px solid rgba(0, 0, 0, 0.12);
  font-size: 13px; font-weight: 600;
  background: #ffffff; color: #1a1a1a;
  cursor: pointer; transition: all 0.15s ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23666' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
.fp-select:hover { border-color: rgba(0, 0, 0, 0.35); }
.fp-select:focus { outline: none; border-color: #072908; box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.12); }
.fp-select--full { width: 100%; }

.fp-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.fp-tag {
  display: inline-flex !important; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 8px;
  border: 1.5px solid rgba(0, 0, 0, 0.2);
  background: #ffffff; font-size: 12px !important; font-weight: 700;
  color: #2d3e35 !important; cursor: pointer;
  transition: all 0.15s ease; margin: 0 !important; user-select: none;
}
.fp-tag:hover { border-color: #072908; background: #f3f4f6; }
.fp-tag:has(input:checked) {
  background: #072908; color: #fff !important;
  border-color: #072908; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
.fp-tag input[type="checkbox"] {
  width: 0; height: 0; opacity: 0; position: absolute; pointer-events: none;
}

.fp-pills { display: flex; flex-wrap: wrap; gap: 5px; }
.fp-pill {
  display: inline-flex !important; align-items: center;
  padding: 4px 10px; border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: #ffffff; font-size: 11px !important; font-weight: 600;
  color: #555 !important; cursor: pointer;
  transition: all 0.15s ease; margin: 0 !important;
  user-select: none; line-height: 1.4;
}
.fp-pill:hover { border-color: #072908; color: #072908 !important; background: #f5faf7; }
.fp-pill:has(input:checked) {
  background: #072908; color: #fff !important;
  border-color: #072908; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}
.fp-pill input[type="checkbox"] {
  width: 0; height: 0; opacity: 0; position: absolute; pointer-events: none;
}

/* =========================================================
   Sub-category Chips
   ========================================================= */
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 8px 0 16px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  border-radius: 999px;
  border: 1.5px solid rgba(0,0,0,0.25);
  background: #fff;
  color: #072908;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.filter-chip:hover {
  background: rgba(0,0,0,0.06);
  border-color: rgba(0,0,0,0.4);
}

.filter-chip.active {
  background: #072908;
  color: #fff;
  border-color: #072908;
}

.filter-chip.active:hover {
  background: #016b34;
  border-color: #016b34;
}

/* Product tags are in ../styles/product-card.css */

/* =========================================================
 Responsive Design
 ========================================================= */
@media (max-width: 900px) {
  .featured-brands-page {
    padding: 32px 24px 60px;
  }

  .brand-sections-row {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .brand-title-row {
    flex-direction: column;
    align-items: center;
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .promo-banner {
    padding: 22px 24px;
  }

  .promo-text {
    font-size: 16px;
  }

  .brand-summary-card {
    padding: 16px;
  }

  .brand-info-title {
    font-size: 24px;
  }
}

/* Hide "Cart" label on desktop */
.cart-label { display: none; }

@media (max-width: 640px) {
  /* --- Header: oval pill buttons with icons + text --- */
  .btn-label-full { display: none; }
  .btn-label-short { display: inline; }
  .brand-header { padding: 12px 16px 10px; gap: 0; flex-wrap: wrap; }
  .brand-logo { height: 48px; max-width: 130px; order: 1; }
  .brand-actions { order: 2; margin-left: auto; gap: 6px; flex-wrap: nowrap; }
  .brand-header .auth-status { display: none; }
  .brand-header .btn-secondary {
    padding: 5px 8px; font-size: 12px; gap: 5px; white-space: nowrap;
  }
  .brand-header .btn-secondary svg { width: 14px; height: 14px; flex-shrink: 0; }
  .cart-btn { padding: 4px 6px !important; font-size: 10px !important; }
  .cart-label { display: inline !important; font-size: 9px !important; font-weight: 700 !important; }
  .cart-btn svg { width: 11px !important; height: 11px !important; }
  .btn-feedback {
    font-size: 0 !important;
    padding: 6px !important;
    gap: 0 !important;
    border: none;
  }
  .btn-feedback svg { width: 16px; height: 16px; flex-shrink: 0; }
  #tutorialBtn { font-size: 11px; }

  .products-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }


  .promo-banner {
    padding: 20px 16px;
  }

  .promo-text {
    font-size: 15px;
  }

  .featured-brands-page {
    padding: 24px 12px 60px;
  }

  .filter-toggle {
    padding: 12px 16px;
  }

  .fp-select {
    padding: 12px 32px 12px 12px;
  }

  .toolbar {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 12px 0;
  }
  .toolbar .filter-toggle {
    align-self: center;
  }

  .filter-drawer {
    width: 100%; max-width: 100%;
  }

  .filter-chips {
    gap: 6px;
  }

  .filter-chip {
    padding: 5px 12px;
    font-size: 12px;
  }

  .fp-tag {
    font-size: 11px !important;
    padding: 5px 10px;
  }
  .fp-pill {
    font-size: 10px !important;
    padding: 3px 8px;
  }

  .brand-summary-card {
    padding: 14px;
    gap: 14px;
  }

  /* Stack score circle above title, centered (match supplier mobile) */
  .brand-summary-header {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 10px;
  }

  .brand-info-title {
    font-size: 20px;
    text-align: center;
  }

  .brand-title-row {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }

  /* Tighter section padding */
  .brand-section--summary,
  .brand-section--peers,
  .brand-section--attributes {
    padding: 12px;
  }

  /* Stack pillar columns vertically on small screens */
  .peers-container.pillar-circles-row {
    flex-direction: column;
    gap: 12px;
  }

  .brand-info-name {
    font-size: 20px;
  }

  .brand-sections-row {
    gap: 20px;
  }
}

/* =========================================================
 Product Modal (for supplier preview)
 ========================================================= */
.product-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.product-modal .modal-content {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  max-width: 600px;
  width: 90%;
  box-shadow: 0 6px 24px rgba(0,0,0,0.3);
  animation: fadeInModal 0.3s ease forwards;
}

.product-modal .modal-content--supplier-preview {
  max-width: 960px; width: 92vw; height: min(80vh, 720px);
  display: flex; flex-direction: column; padding: 0;
  position: relative; border: 8px solid #fff;
}

.btn-primary {
  background: #072908; color: #fff; border-color: rgba(0,0,0,0.35);
}
.btn-primary:hover {
  background: #0b4f2d; box-shadow: 0 2px 8px rgba(0,0,0,0.18); transform: translateY(-1px);
}
.btn-primary:focus-visible { outline: 2px solid #57b58c; outline-offset: 2px; }

.modal-frame { display: block; width: 100%; height: 100%; border: 0; border-radius: 12px; }

@keyframes fadeInModal {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
