/* ============================================================
   NexGenTrend — brand pages and the "Shop by brand" grid.
   Uses only the design-system tokens from styles.css, so the
   colour scheme is identical to the rest of the store.
   ============================================================ */

/* ---- brand page hero ---- */
.bhero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  min-height: clamp(420px, 62vh, 640px);
  padding-block: calc(var(--hdr-h) + 3rem) 3.5rem;
  background: var(--cream-2);
  color: var(--ink);
  overflow: hidden;
}

.bhero__img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 82% 50%; /* keep the product side in view on phones */
}

.bhero__shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  /* light cream wash behind the text only; the photo stays fully visible on the right */
  background: linear-gradient(90deg, rgba(250, 245, 238, 0.82) 0%, rgba(250, 245, 238, 0.5) 42%, rgba(250, 245, 238, 0) 72%);
}

.bhero__in { position: relative; }

.bhero__title {
  font-size: clamp(2.4rem, 6.4vw, 4.6rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-block: 0.9rem 0.9rem;
  max-width: 16ch;
}

.bhero__sub {
  max-width: 52ch;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  color: #4a3a2c;
}

.bhero .chip {
  color: var(--ink);
  background: rgba(22, 17, 13, 0.06);
  border-color: rgba(22, 17, 13, 0.16);
}

.bhero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-block-start: 1.8rem;
}

.bhero .btn--ghost { border-color: rgba(22, 17, 13, 0.28); }

@media (max-width: 640px) {
  .bhero { min-height: 480px; padding-block-end: 2.5rem; }
  .bhero__shade {
    background: linear-gradient(0deg, rgba(250, 245, 238, 0.9) 0%, rgba(250, 245, 238, 0.6) 45%, rgba(250, 245, 238, 0) 80%);
  }
}

/* ---- "Shop by brand" grid on the main page ---- */
.brandgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 1.4rem;
}

.brandcard {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 260px;
  border-radius: var(--r-l);
  overflow: hidden;
  background: var(--ink-2);
  color: var(--cream);
  text-decoration: none;
  box-shadow: var(--sh-m);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}

.brandcard img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease);
}

.brandcard::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(22, 17, 13, 0.85) 0%, rgba(22, 17, 13, 0.1) 65%);
}

.brandcard:hover { transform: translateY(-6px); box-shadow: var(--sh-l); }
.brandcard:hover img { transform: scale(1.07); }

.brandcard__body {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.35rem;
  padding: 1.3rem 1.4rem;
}

.brandcard__h {
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.15;
}

.brandcard__go {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--gold);
}

.brandcard__go svg { width: 18px; height: 18px; }

@media (prefers-reduced-motion: reduce) {
  .brandcard, .brandcard img { transition: none; }
}

/* Golden dust (from app.js) floats above the banner shade but under the text. */
#hero.bhero .hero-dust { z-index: 0; }

/* ---- banner-only mode: the image carries its own lettering ---- */
.bhero--art {
  display: block;
  min-height: 0;
  padding: var(--hdr-h) 0 0;
  background: var(--ink);
}

.bhero--art .bhero__img {
  position: static;
  z-index: auto;
  display: block;
  width: 100%;
  height: auto;
}

.bhero--art .hero-dust { display: none; }

.bhero__bar {
  background: var(--ink);
  padding-block: 1rem;
}

.bhero__bar .bhero__cta { margin-block-start: 0; }

/* visible to screen readers and search engines, not on screen */
.bhero__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* The brand hero is light, so the transparent header needs dark text until it sticks. */
body.ngt-brand-page .hdr:not(.is-stuck) { color: var(--ink); }
