/* ============================================
   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: #010c3a;
}

.brands-hero__bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center right;
}

.brands-hero__bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(1, 12, 58, 0.78) 0%,
    rgba(1, 12, 58, 0.48) 40%,
    rgba(1, 12, 58, 0.15) 70%,
    transparent 100%
  );
  pointer-events: none;
}

.brands-hero__bg-sheen {
  position: absolute;
  inset: -25%;
  background: linear-gradient(120deg,
    rgba(19, 120, 243, 0) 0%,
    rgba(19, 120, 243, 0.35) 35%,
    rgba(140, 205, 255, 0.28) 50%,
    rgba(19, 120, 243, 0) 65%);
  background-size: 250% 250%;
  animation: brandsSheenShift 11s ease-in-out infinite;
  mix-blend-mode: screen;
  pointer-events: none;
}

.brands-hero__bubbles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.brands-hero__bubbles span {
  position: absolute;
  bottom: -10%;
  display: block;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.9), rgba(150, 205, 255, 0.18) 60%, rgba(150, 205, 255, 0) 76%);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 0 6px 1px rgba(110, 190, 255, 0.55), 0 0 16px 4px rgba(19, 120, 243, 0.35);
  filter: drop-shadow(0 0 4px rgba(140, 205, 255, 0.5));
  opacity: 0;
  animation: brandsBubbleRise linear infinite;
}

.brands-hero__bubbles span:nth-child(1)  { left: 6%;  width: 9px;  height: 9px;  --drift: 22px;  animation-duration: 8.5s;  animation-delay: 0s; }
.brands-hero__bubbles span:nth-child(2)  { left: 16%; width: 14px; height: 14px; --drift: -18px; animation-duration: 11s;   animation-delay: 1.2s; }
.brands-hero__bubbles span:nth-child(3)  { left: 27%; width: 7px;  height: 7px;  --drift: 12px;  animation-duration: 7.5s;  animation-delay: 2.6s; }
.brands-hero__bubbles span:nth-child(4)  { left: 40%; width: 12px; height: 12px; --drift: -20px; animation-duration: 10s;   animation-delay: 0.6s; }
.brands-hero__bubbles span:nth-child(5)  { left: 52%; width: 8px;  height: 8px;  --drift: 16px;  animation-duration: 9s;    animation-delay: 3.4s; }
.brands-hero__bubbles span:nth-child(6)  { left: 63%; width: 15px; height: 15px; --drift: -14px; animation-duration: 12.5s; animation-delay: 1.8s; }
.brands-hero__bubbles span:nth-child(7)  { left: 74%; width: 6px;  height: 6px;  --drift: 10px;  animation-duration: 7s;    animation-delay: 4.2s; }
.brands-hero__bubbles span:nth-child(8)  { left: 84%; width: 11px; height: 11px; --drift: -22px; animation-duration: 10.5s; animation-delay: 2.2s; }
.brands-hero__bubbles span:nth-child(9)  { left: 92%; width: 9px;  height: 9px;  --drift: 18px;  animation-duration: 8s;    animation-delay: 0.9s; }
.brands-hero__bubbles span:nth-child(10) { left: 97%; width: 13px; height: 13px; --drift: -16px; animation-duration: 11.5s; animation-delay: 3.8s; }

@keyframes brandsSheenShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes brandsBubbleRise {
  0% { transform: translateY(0) translateX(0) scale(0.6); opacity: 0; }
  12% { opacity: 0.6; }
  55% { opacity: 0.35; }
  100% { transform: translateY(-320px) translateX(var(--drift, 16px)) scale(1); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .brands-hero__bg-sheen,
  .brands-hero__bubbles span {
    animation: none;
  }

  .brands-hero__bubbles {
    display: none;
  }
}

.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%;
  min-height: clamp(260px, 34vw, 400px);
}

/* Left text column */
.brands-hero__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  flex: 0 1 70%;
  width: 70%;
  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 {
    min-height: 0;
  }

  .brands-hero__bg-img {
    object-position: 75% center;
  }

  .brands-hero__content {
    flex-direction: column;
    align-items: flex-start;
    min-height: clamp(220px, 52vw, 300px);
  }

  .brands-hero__text {
    width: 100%;
    flex: 1;
  }

  .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__content {
    min-height: 200px;
  }

  .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;
  }
}
