.brand-hero {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  background: linear-gradient(160deg, #f8fafc 0%, #f1f5f9 60%, #e9eef4 100%);
  margin-bottom: 1rem;
}

.brand-hero-media {
  min-height: 240px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.brand-hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.05) 0%, rgba(15, 23, 42, 0.65) 100%);
}

.brand-hero-media:not([style*="background-image"])::after {
  display: none;
}

.brand-hero-body {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  gap: 1rem;
  min-height: 240px;
  padding: 1.25rem;
  color: #fff;
}

.brand-logo-frame {
  width: 88px;
  height: 88px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.brand-logo-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-logo-fallback {
  font-weight: 700;
  font-size: 1.1rem;
  color: #0f172a;
}

.brand-hero-title {
  margin: 0;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-hero-tagline {
  margin: 0.2rem 0 0.1rem 0;
  opacity: 0.95;
  font-weight: 500;
}

.brand-hero-description {
  margin: 0;
  opacity: 0.9;
  max-width: 820px;
}

.brand-hero-stat {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.5rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.35);
  font-size: 0.82rem;
  color: var(--stat-color, rgba(255, 255, 255, 0.9));
  border-color: var(--stat-color, rgba(255, 255, 255, 0.35));
}

.brand-mini-nav {
  margin: -0.15rem 0 1rem 0;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  background: #fff;
  position: sticky;
  top: 12px;
  z-index: 20;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

.brand-mini-nav-header {
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid #f1f3f5;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.brand-mini-nav-title {
  font-size: 0.78rem;
  color: #6c757d;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin: 0;
}

.brand-mini-nav-crumbs {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-left: auto;
  font-size: 0.75rem;
}

.brand-mini-nav-crumb {
  border: none;
  background: transparent;
  color: #64748b;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}

.brand-mini-nav-crumb.active {
  color: #0f172a;
  font-weight: 700;
}

.brand-mini-nav-sep {
  color: #94a3b8;
  font-size: 0.68rem;
}

.brand-mini-nav-scroll {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  padding: 0.65rem 0.75rem;
  scrollbar-width: thin;
  scroll-snap-type: x proximity;
}

.brand-mini-nav-link,
.brand-mini-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  max-width: 320px;
  padding: 0.4rem 0.72rem;
  border-radius: 999px;
  border: 1px solid #dce3ea;
  background: #f8fafc;
  color: #334155;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  font-size: 0.78rem;
  line-height: 1.2;
  scroll-snap-align: start;
  cursor: pointer;
}

.brand-mini-nav-btn {
  font-family: inherit;
  text-align: left;
}

.brand-mini-nav-link:hover,
.brand-mini-nav-btn:hover {
  border-color: #cbd5e1;
  background: #eef2f7;
  color: #0f172a;
}

.brand-mini-nav-link.active,
.brand-mini-nav-btn.active {
  border-color: #111827;
  background: #f3f4f6;
  color: #111827;
  font-weight: 700;
}

.brand-mini-nav-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-mini-nav-count {
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 600;
}

.brand-mini-nav-back {
  border: 1px solid #dce3ea;
  background: #fff;
  color: #334155;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.2;
}

.brand-mini-nav-back.hidden {
  visibility: hidden;
  pointer-events: none;
}

.brand-mini-nav-empty {
  color: #6b7280;
  font-size: 0.8rem;
  padding: 0.15rem 0.25rem;
}

.brand-hero-text-on-light {
  color: #1f2937;
}

.brand-hero-text-on-light .brand-hero-stat {
  background: rgba(15, 23, 42, 0.05);
}

[dir="rtl"] .brand-mini-nav-btn {
  text-align: right;
}

[dir="rtl"] .brand-mini-nav-crumbs {
  margin-left: 0;
  margin-right: auto;
}

@media (max-width: 767.98px) {
  .brand-hero-media,
  .brand-hero-body {
    min-height: 200px;
  }

  .brand-logo-frame {
    width: 72px;
    height: 72px;
  }

  .brand-mini-nav {
    top: 8px;
  }
}
