/* Brand Page — redesigned 2026-09-26
   ------------------------------------------------------------
   Two problems fixed at once:
   1. Dark-mode text was invisible. The old rules read --card-bg / --text2 /
      --border, none of which exist in the storefront theme (globals.css defines
      --card / --text-2 / --line). Undefined vars fell back to their light literal
      (#fff card) while --text resolved to #fff in dark mode → white on white.
      Everything now reads the REAL storefront tokens so cards follow the theme.
   2. The page should feel like the brand's own landing page: the merchant's cover
      image is reused as a heavily blurred, darkened backdrop behind every section,
      and the content panels float on top as translucent "glass" surfaces. */

.brand-page {
  position: relative;
  isolation: isolate;
  width: 100%;
  padding: 0 0 60px;
  --brand-accent: #c82b25;
}

/* Blurred cover backdrop — fixed so it fills the viewport behind all content. */
.brand-backdrop {
  position: fixed;
  inset: -60px;                 /* bleed past edges so the blur has no hard seam */
  z-index: -2;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  filter: blur(46px) saturate(1.25) brightness(0.7);
  transform: scale(1.08);
  opacity: 0.55;
  pointer-events: none;
}
/* Scrim between the blur and the content keeps text readable in both themes. */
.brand-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 50% 0%, rgba(5,5,5,.15), rgba(5,5,5,.78));
}
html[data-theme="light"] .brand-backdrop { opacity: 0.28; filter: blur(46px) saturate(1.15) brightness(1.05); }
html[data-theme="light"] .brand-backdrop::after {
  background: radial-gradient(120% 90% at 50% 0%, rgba(255,255,255,.35), rgba(255,255,255,.82));
}

/* Centered content column that floats above the backdrop. */
.brand-shell {
  position: relative;
  z-index: 1;
  width: min(1296px, calc(100% - 40px));
  margin: 14px auto 0;
}

/* ---------- Hero cover with the brand identity overlaid on it ---------- */
.brand-cover {
  position: relative;
  aspect-ratio: 2800 / 1200;   /* matches the homepage herobanner (2.33:1) so the
                                   same 2800x1200 artwork drops in without cropping */
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand-accent) 70%, #000), #0a0e16);
  box-shadow: 0 24px 60px rgba(0,0,0,.45);
}
.brand-cover img.cover-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Bottom-up scrim so the overlaid identity stays legible over any banner. */
.brand-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.15) 0%, rgba(0,0,0,.35) 45%, rgba(0,0,0,.82) 100%);
}
.brand-cover-inner {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  gap: 20px;
  flex-wrap: wrap;
  padding: 26px 30px;
}
.brand-identity {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 240px;
}
.brand-identity-logo {
  width: 76px;
  height: 76px;
  border-radius: 18px;
  background: #fff;
  display: grid;
  place-items: center;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
}
.brand-identity-logo img { width: 100%; height: 100%; object-fit: contain; }
.brand-identity-logo-fallback { font: 800 30px Arial, sans-serif; color: var(--brand-accent); }
.brand-identity-text h1 {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 800;
  margin: 0;
  color: #fff;
  line-height: 1.15;
  letter-spacing: -.5px;
  text-shadow: 0 2px 14px rgba(0,0,0,.55);
}
.brand-official-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #fff;
  background: var(--brand-accent);
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,.35);
}
.brand-tagline {
  font-size: 14px;
  color: rgba(255,255,255,.82);
  margin: 6px 0 0;
  text-shadow: 0 1px 8px rgba(0,0,0,.5);
}
.brand-services {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-self: center;
}
.brand-services div {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: #fff;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18);
  padding: 8px 14px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
}
.brand-services span {
  width: 20px; height: 20px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--line-green, #06c755);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

/* ---------- Shared glass panel used by every section below the hero ---------- */
.brand-panel {
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  border: 1px solid var(--line);
  border-radius: 18px;
  backdrop-filter: blur(16px) saturate(1.1);
  box-shadow: 0 12px 40px rgba(0,0,0,.28);
}
html[data-theme="light"] .brand-panel {
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  box-shadow: 0 10px 30px rgba(22,35,48,.08);
}

/* ---------- Hero promo slider ---------- */
.brand-hero-slider {
  position: relative;
  /* Height follows each banner's own aspect ratio (no forced 2.33:1 canvas) so a
     herobanner of ANY ratio — including the 3:1 (1200x400) slides in use here —
     shows in full instead of being cropped on the left/right by a fixed box. */
  margin-top: 16px;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
}
.brand-hero-slider.dragging { cursor: grabbing; }
.brand-hero-track { display: flex; align-items: flex-start; will-change: transform; }
.brand-hero-slide { position: relative; flex: 0 0 100%; min-width: 100%; }
.brand-hero-slide img { width: 100%; height: auto; display: block; pointer-events: none; }
.brand-hero-slide::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,.6), rgba(0,0,0,.1) 60%, transparent);
}
.brand-hero-copy {
  position: absolute;
  left: 6%;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  color: #fff;
  text-shadow: 0 2px 14px rgba(0,0,0,.6), 0 1px 3px rgba(0,0,0,.5);
  max-width: 60%;
}
.brand-hero-copy .label {
  display: block;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--brand-accent);
  margin-bottom: 12px;
}
.brand-hero-copy h2 { font-size: clamp(30px, 4vw, 50px); font-weight: 800; margin: 0 0 8px; letter-spacing: -.5px; line-height: 1.1; }
.brand-hero-copy p { font-size: 17px; margin: 0 0 20px; color: rgba(255,255,255,.9); }
.brand-hero-copy a {
  display: inline-block;
  padding: 11px 30px;
  border-radius: 30px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  background: var(--brand-accent);
  border: 2px solid rgba(255,255,255,.2);
  transition: .2s;
}
.brand-hero-copy a:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0,0,0,.35); }
.brand-slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px; height: 44px;
  border: none; border-radius: 50%;
  background: rgba(0,0,0,.45);
  color: #fff; font-size: 20px;
  cursor: pointer; z-index: 5;
  opacity: 0; transition: .2s;
  display: grid; place-items: center;
}
.brand-hero-slider:hover .brand-slider-arrow { opacity: 1; }
.brand-slider-arrow:hover { background: rgba(0,0,0,.7); }
.brand-slider-arrow.prev { left: 12px; }
.brand-slider-arrow.next { right: 12px; }
.brand-slider-dots {
  position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 8px; z-index: 5;
}
.brand-slider-dots button {
  width: 9px; height: 9px; border: 2px solid #fff;
  background: rgba(255,255,255,.25); border-radius: 50%; padding: 0; cursor: pointer; transition: .2s;
}
.brand-slider-dots button.active { background: #fff; width: 22px; border-radius: 6px; }

/* ---------- About / SEO section ---------- */
.brand-seo {
  margin-top: 16px;
  padding: 34px 38px;
  display: grid;
  grid-template-columns: minmax(240px, .8fr) minmax(0, 1.6fr);
  gap: 44px;
}
.brand-seo-heading .label {
  font-size: 12px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase;
  color: var(--brand-accent);
}
.brand-seo-heading h2 {
  font-size: clamp(22px, 2.3vw, 30px); line-height: 1.35; margin: 10px 0 0;
  color: var(--text); font-weight: 800; letter-spacing: -.4px;
}
.brand-seo-copy p { font-size: 14.5px; line-height: 1.9; color: var(--text-2); margin: 0 0 12px; }
.brand-seo-copy a {
  display: inline-flex; gap: 8px; align-items: center; margin-top: 8px;
  font-size: 14px; font-weight: 700; color: var(--brand-accent);
}

/* ---------- Section header used by featured / all-products ---------- */
.brand-section-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 14px; flex-wrap: wrap; margin-bottom: 20px;
}
.brand-section-head h2 {
  font-size: 22px; margin: 0; color: var(--text); font-weight: 800; letter-spacing: -.4px;
  display: flex; align-items: center; gap: 10px;
}
.brand-section-head h2::before {
  content: ""; width: 6px; height: 22px; border-radius: 3px; background: var(--brand-accent);
}
.brand-section-head a { font-size: 14px; color: var(--brand-accent); font-weight: 700; text-decoration: none; }
.brand-count {
  font-size: 12px; font-weight: 700; color: var(--muted);
  background: var(--surface-2); border: 1px solid var(--line);
  padding: 2px 9px; border-radius: 999px;
}

/* ---------- Featured / all products panels ---------- */
.brand-featured, .brand-all-products {
  margin-top: 16px;
  padding: 28px;
}
.brand-products-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 18px; flex-wrap: wrap; gap: 12px;
}
.brand-products-header h2 { font-size: 22px; margin: 0; color: var(--text); font-weight: 800; display: flex; align-items: center; gap: 10px; }
.brand-products-header h2::before { content: ""; width: 6px; height: 22px; border-radius: 3px; background: var(--brand-accent); }
.brand-products-header select {
  padding: 9px 14px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--text); font-size: 14px; outline: none; cursor: pointer;
}

/* ---------- Product grid ---------- */
.brand-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}
/* Keep the shared product card on its own solid surface so it never turns into
   an unreadable glass panel over the busy blurred backdrop. */
.brand-page .product-card { border-radius: 14px; }
/* On a brand page every card is that brand and the logo already sits in the
   photo corner, so the duplicated brand-name text under the image is removed. */
.brand-page .product-brand-explorer { display: none; }
.brand-page .product-brand-explorer img {
  width: 20px !important; height: 20px !important;
  max-width: 20px !important; max-height: 20px !important;
  border-radius: 4px; flex-shrink: 0;
}

/* ---------- Category tabs ---------- */
.brand-cat-tabs {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--line);
}
.brand-cat-tab {
  padding: 8px 18px; border: 1px solid var(--line); border-radius: 999px;
  background: transparent; color: var(--text-2); font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all 0.2s ease; white-space: nowrap;
}
.brand-cat-tab:hover { border-color: var(--brand-accent); color: var(--brand-accent); }
.brand-cat-tab.active { background: var(--brand-accent); border-color: var(--brand-accent); color: #fff; }

/* ---------- Brand articles ---------- */
.brand-articles { margin-top: 16px; padding: 30px 28px; }
.brand-articles-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px; margin-top: 18px;
}
.brand-article-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  overflow: hidden; text-decoration: none; color: inherit;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  display: flex; flex-direction: column;
}
.brand-article-card:hover {
  transform: translateY(-3px); border-color: var(--brand-accent);
  box-shadow: 0 12px 28px rgba(0,0,0,.25);
}
.brand-article-img { height: 150px; display: flex; align-items: center; justify-content: center; }
.brand-article-body { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.brand-article-body h3 {
  font-size: 14.5px; font-weight: 700; line-height: 1.45; margin: 0 0 8px; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.brand-article-body p {
  font-size: 12.5px; color: var(--muted); line-height: 1.6; margin: 0 0 12px; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.brand-article-body span {
  font-size: 12px; font-weight: 700; color: var(--brand-accent);
  display: inline-flex; align-items: center; gap: 4px;
}

/* ---------- Empty states ---------- */
.brand-empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.brand-empty i { font-size: 34px; margin-bottom: 14px; display: block; opacity: .5; }
.brand-empty button { color: var(--brand-accent); font-weight: 700; background: none; border: none; cursor: pointer; font-size: 14px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .brand-hero-copy { left: 5%; max-width: 72%; }
  .brand-seo { grid-template-columns: 1fr; gap: 22px; padding: 24px; }
}
@media (max-width: 560px) {
  .brand-shell { width: 100%; margin-top: 0; }
  .brand-cover { border-radius: 0; border-left: none; border-right: none; }
  .brand-cover-inner { padding: 16px; gap: 12px; }
  .brand-identity-logo { width: 56px; height: 56px; border-radius: 14px; }
  .brand-services { width: 100%; }
  .brand-hero-slider { border-radius: 0; }
  .brand-hero-copy h2 { font-size: 26px; }
  .brand-hero-copy p { font-size: 14px; }
  .brand-product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .brand-featured, .brand-all-products, .brand-articles { border-radius: 0; padding: 16px; }
  .brand-seo { border-radius: 0; padding: 20px; }
}

/* ---------- Entrance animations (CSS only, GSAP avoided) ---------- */
@keyframes brandFadeUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes brandFadeLeft { from { opacity: 0; transform: translateX(-18px); } to { opacity: 1; transform: translateX(0); } }

.brand-cover { animation: brandFadeUp 0.6s ease-out both; }
.brand-hero-slider { animation: brandFadeUp 0.6s 0.15s ease-out both; }
.brand-hero-copy .label { animation: brandFadeLeft 0.4s 0.4s ease-out both; }
.brand-hero-copy h2 { animation: brandFadeLeft 0.5s 0.5s ease-out both; }
.brand-hero-copy p { animation: brandFadeLeft 0.4s 0.6s ease-out both; }
.brand-hero-copy a { animation: brandFadeLeft 0.4s 0.7s ease-out both; }
.brand-seo, .brand-articles, .brand-featured, .brand-all-products { animation: brandFadeUp 0.6s 0.3s ease-out both; }

@media (prefers-reduced-motion: reduce) {
  .brand-cover, .brand-hero-slider, .brand-hero-copy .label, .brand-hero-copy h2,
  .brand-hero-copy p, .brand-hero-copy a, .brand-seo, .brand-articles,
  .brand-featured, .brand-all-products { animation: none !important; }
}
