/* ============================================
   ARICA — Brands Page
   ============================================ */

.brands-page {
  --brands-section-pad: clamp(4rem, 8vw, 6rem);
  overflow-x: hidden;
}

/* ---- Page Hero — static, gradient driven by category filter ---- */
.brands-hero {
  position: relative;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.brands-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(135deg, #010c3a 0%, #0a2560 40%, #056cf3 100%);
  transition: background 0.9s var(--ease);
}

/* Diagonal shimmer sweep */
.brands-hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    115deg,
    transparent 20%,
    rgba(255, 255, 255, 0.07) 50%,
    transparent 80%
  );
  background-size: 200% 200%;
  animation: brandsShimmer 5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes brandsShimmer {
  0%   { background-position: 200% 200%; }
  50%  { background-position: 0% 0%; }
  100% { background-position: 200% 200%; }
}

.brands-hero__bg-texture {
  position: absolute;
  inset: 0;
  opacity: 0.1;
  mix-blend-mode: overlay;
}

.brands-hero__bg-texture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Sliding glow orb */
.brands-hero__bg-glow {
  position: absolute;
  top: -30%;
  width: 55%;
  height: 160%;
  border-radius: 50%;
  background: radial-gradient(ellipse 100% 100% at 50% 50%, rgba(255, 255, 255, 0.11) 0%, transparent 70%);
  pointer-events: none;
  animation: brandsGlowSlide 8s ease-in-out infinite alternate;
  filter: blur(8px);
}

@keyframes brandsGlowSlide {
  0%   { left: -15%; }
  100% { left: 65%; }
}

.brands-hero__content {
  position: relative;
  z-index: 1;
  padding-top: calc(var(--header-h) + var(--topbar-h) + clamp(1.5rem, 3vw, 2.25rem));
  padding-bottom: clamp(1.5rem, 3vw, 2.25rem);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  color: var(--white);
  width: 100%;
}

/* Left text column */
.brands-hero__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
}

/* Right SVG visual panel */
.brands-hero__visual {
  position: relative;
  width: 200px;
  height: 200px;
  flex-shrink: 0;
}

.brands-hero__svg {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.55s ease;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brands-hero__svg.is-active {
  opacity: 1;
}

.brands-hero__svg svg {
  width: 100%;
  height: 100%;
}

/* DNA — fade edges so scroll loop is seamless */
.brands-hero__svg[data-svg="Neuropathy"] svg {
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,1) 18%, rgba(0,0,0,1) 82%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,1) 18%, rgba(0,0,0,1) 82%, transparent 100%);
}

/* ---- SVG animation keyframes ---- */

/* Floating pills (Anti Diabetic) */


/* DNA: continuous upward scroll (period = 60px) */
.bhv-dna-scroll {
  animation: bhvDnaScroll 2s linear infinite;
}
@keyframes bhvDnaScroll {
  from { transform: translateY(0); }
  to   { transform: translateY(-60px); }
}

/* Flask bubbles: rise and fade */


/* Liver: double-beat heartbeat pulse */


.brands-hero__tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  padding: 0.3rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
}

.brands-hero__heading {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0;
}

.brands-hero__desc {
  font-size: clamp(0.875rem, 1.4vw, 1rem);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.78);
  max-width: 80%;
  margin: 0;
}

/* ---- Category Filter Tabs ---- */
.brands-filter {
  background: var(--white);
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
  position: sticky;
  top: var(--header-h);
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.brands-filter__tabs {
  display: flex;
  justify-content: center;
  gap: 0.25rem;
  overflow-x: auto;
  padding: 0.75rem 0;
  scrollbar-width: none;
}

.brands-filter__tabs::-webkit-scrollbar { display: none; }

.brands-filter__tab {
  flex-shrink: 0;
  padding: 0.5rem 1.25rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  background: transparent;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-600);
  cursor: pointer;
  transition: all 0.25s var(--ease);
  white-space: nowrap;
}

.brands-filter__tab:hover {
  color: var(--brand-blue);
  border-color: rgba(19, 120, 243, 0.25);
  background: rgba(19, 120, 243, 0.05);
}

.brands-filter__tab--active {
  color: var(--white);
  background: var(--brand-blue);
  border-color: var(--brand-blue);
}

.brands-filter__tab--active:hover {
  background: var(--brand-blue-dark);
  border-color: var(--brand-blue-dark);
  color: var(--white);
}

/* ---- Breadcrumb ---- */
.brands-breadcrumb {
  padding: 0.85rem 0;
  background: var(--gray-100);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.brands-breadcrumb__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brands-breadcrumb__back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-800);
  background: var(--gray-100);
  border: 1.5px solid rgba(0, 0, 0, 0.08);
  padding: 0.45rem 1.1rem 0.45rem 0.85rem;
  border-radius: 999px;
  transition: background 0.25s, border-color 0.25s, color 0.25s, transform 0.25s;
}

.brands-breadcrumb__back svg {
  transition: transform 0.25s var(--ease);
}

.brands-breadcrumb__back:hover {
  background: var(--white);
  border-color: rgba(19, 120, 243, 0.3);
  color: var(--brand-blue);
  transform: translateX(-2px);
}

.brands-breadcrumb__back:hover svg {
  transform: translateX(-3px);
}

.brands-breadcrumb__list {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--gray-600);
  list-style: none;
  padding: 0;
  margin: 0;
}

.brands-breadcrumb__list a {
  transition: color 0.25s;
}

.brands-breadcrumb__list a:hover {
  color: var(--brand-blue);
}

.brands-breadcrumb__sep {
  opacity: 0.4;
}

.brands-breadcrumb__current {
  color: var(--gray-800);
  font-weight: 600;
}

/* ---- Brands Grid Section ---- */
.brands-section {
  /* layout handled by .listing-section */
  padding-top: clamp(2.75rem, 5vw, 4rem);
}

.brands-section__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.brands-section__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
}

.brands-section__orb--1 {
  width: 420px;
  height: 420px;
  top: -120px;
  right: -80px;
  background: rgba(19, 120, 243, 0.08);
}

.brands-section__orb--2 {
  width: 360px;
  height: 360px;
  bottom: -100px;
  left: -60px;
  background: rgba(227, 103, 108, 0.06);
}

.brands-section__header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3rem;
  position: relative;
  z-index: 1;
}

.brands-section__title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.brands-section__title {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--gray-800);
  margin: 0;
}

.brands-section__desc {
  font-size: 1rem;
  color: var(--gray-600);
  line-height: 1.65;
}

.brands-section__count {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 1rem;
  background: var(--green-lime);
  color: var(--brand-blue-dark);
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 999px;
}

.brands-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  position: relative;
  z-index: 1;
}

.brand-card {
  display: block;
  background: var(--white);
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 4px 24px rgba(10, 37, 96, 0.06);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s;
  cursor: pointer;
}

.brand-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(10, 37, 96, 0.12);
  border-color: rgba(19, 120, 243, 0.2);
}

.brand-card__image-wrap {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: linear-gradient(145deg, #f0f4fa 0%, #e8f0fe 100%);
}

.brand-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}

.brand-card:hover .brand-card__image {
  transform: scale(1.06);
}

.brand-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(1, 7, 40, 0.15) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.4s;
}

.brand-card:hover .brand-card__overlay {
  opacity: 1;
}

.brand-card__body {
  padding: 1.1rem 1rem 1.25rem;
  text-align: center;
}

.brand-card__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-800);
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
}

.brand-card__category {
  font-size: 0.75rem;
  color: var(--gray-400);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.brand-card.is-hidden {
  display: none !important;
}

/* ---- CTA strip ---- */
.brands-cta {
  position: relative;
  padding: 3.5rem 0;
  background: linear-gradient(135deg, var(--brand-navy) 0%, #0a2560 100%);
  color: var(--white);
  text-align: center;
  overflow: hidden;
}

.brands-cta__inner {
  position: relative;
  z-index: 1;
}

.brands-cta h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}

.brands-cta p {
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 1.5rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.brands-cta .btn-white {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  background: var(--white);
  color: var(--brand-navy);
  font-weight: 600;
  border-radius: 999px;
  transition: transform 0.3s, box-shadow 0.3s;
}

.brands-cta .btn-white:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .brands-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
  }
}

@media (max-width: 768px) {
  .brands-hero {
    height: 240px;
  }

  .brands-hero__visual {
    display: none;
  }

  .brands-hero__content {
    flex-direction: column;
    align-items: flex-start;
  }

  .brands-hero__heading {
    font-size: clamp(1.75rem, 6.5vw, 2.25rem);
  }

  .brands-hero__desc {
    font-size: 0.875rem;
  }

  .brands-filter {
    top: var(--header-h);
  }

  .brands-section__count {
    display: flex;
    justify-content: center;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
  }

  .brands-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .brand-card__body {
    padding: 0.85rem 0.75rem 1rem;
  }

  .brand-card__title {
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .brands-hero {
    height: 220px;
  }

  .brands-hero__desc {
    display: none;
  }

  .brands-filter__tab {
    font-size: 0.8rem;
    padding: 0.45rem 1rem;
  }

  .brands-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
  }

  .brand-card {
    border-radius: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .brands-hero__visual img {
    animation: none;
  }

  .brand-card:hover .brand-card__image {
    transform: none;
  }
}
