/**
 * brands-menu.css — Light theme matching design mockup.
 *
 * Key overrides from your theme:
 *   --bm-nav-height: 60px  ← match your actual header height
 *   --bm-left-width: 25%  ← left column (col-3 of 12)
 */

/* ── Custom properties ─────────────────────────────────────── */
.brands-mega-nav {
  --bm-accent:       #c8621a;   /* orange active color */
  --bm-bg:           #e0ded7;   /* warm light gray background */
  --bm-bg-left:      #e0ded7;   /* left col background */
  --bm-bg-right:     #e0ded7;   /* right col background */
  --bm-text:         #1a1a1a;   /* primary dark text */
  --bm-muted:        #666666;   /* secondary gray text */
  --bm-border:       #d0ccc6;   /* divider lines */
  --bm-active-row:   rgba(180, 150, 100, 0.18); /* active row highlight */
  --bm-left-width:   25%;
  --bm-nav-height:   60px;
  position: relative;
}

/* ── Nav trigger ───────────────────────────────────────────── */
.brands-nav-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  color: inherit;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  padding: 8px 0;
  font-family: inherit;
  transition: color 0.2s;
}
.brands-nav-trigger:hover { color: var(--bm-accent); }
.brands-nav-trigger[aria-expanded="true"] { color: var(--bm-accent); }

.brands-chevron {
  width: 13px; height: 13px;
  transition: transform 0.3s ease;
}
.brands-nav-trigger[aria-expanded="true"] .brands-chevron { transform: rotate(180deg); }

/* ── Mega-menu panel ───────────────────────────────────────── */
.brands-mega-menu {
  position: fixed !important;
  top: var(--bm-nav-height) !important;
  left: 0 !important;
  right: 0 !important;
  height: calc(100vh - var(--bm-nav-height)) !important;
  background: var(--bm-bg);
  z-index: 99999 !important;
  display: flex !important;
  flex-direction: column !important;
  box-shadow: 0 4px 32px rgba(0,0,0,0.12);
  clip-path: inset(0 0 100% 0) !important;
  pointer-events: none !important;
  overflow: hidden;
}
.brands-mega-menu.is-open {
  clip-path: inset(0 0 0 0) !important;
  pointer-events: all !important;
}

/* ── Filter bar — plain text links, no pills ───────────────── */
.brands-filter-bar {
  display: flex !important;
  align-items: center;
  gap: 2.5rem;
  padding: 18px 2.5rem 14px;
  background: var(--bm-bg);
  border-bottom: 1px solid var(--bm-border);
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}

/* Hide the "Edition" label — design uses just the links */
.brands-filter-label { display: none; }

.brands-filter-pills { display: flex; gap: 2rem; flex-wrap: wrap; }

/* Render pills as plain text nav links */
.brands-filter-pill {
  padding: 0;
  border-radius: 0;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--bm-text);
  font-size: 14px;
  letter-spacing: 0.3px;
  font-weight: 500;
  text-transform: none;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.2s, border-color 0.2s;
  padding-bottom: 3px;
}
.brands-filter-pill:hover { color: var(--bm-accent); }
.brands-filter-pill.is-active {
  color: var(--bm-accent);
  border-bottom: 2px solid var(--bm-accent);
  font-weight: 600;
  background: transparent;
}

/* ── Two-column inner ──────────────────────────────────────── */
.brands-inner {
  display: flex !important;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

/* ── Left column ───────────────────────────────────────────── */
.brands-left-col {
  width: var(--bm-left-width);
  flex-shrink: 0;
  border-right: 1px solid var(--bm-border);
  overflow-y: auto !important;
  overflow-x: hidden;
  background: var(--bm-bg-left);
  scrollbar-width: thin;
  scrollbar-color: #bbb transparent;
  padding: 8px 0;
}
.brands-left-col::-webkit-scrollbar { width: 4px; }
.brands-left-col::-webkit-scrollbar-thumb { background: #bbb; border-radius: 4px; }

/* ── Brand row ─────────────────────────────────────────────── */
.brand-item {
  position: relative;
  display: flex !important;
  align-items: center;
  gap: 18px;
  padding: 10px 24px 10px 16px;
  cursor: pointer;
  overflow: hidden;
  outline: none;
  background: transparent;
  transition: background 0.2s;
}
.brand-item:focus-visible { outline: 2px solid var(--bm-accent); outline-offset: -2px; }

/* Active row highlight — warm tan behind thumbnail area */
.brand-item-highlight {
  position: absolute;
  inset: 0;
background-image: url(/sites/default/files/images/menu-bkg.png);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.brand-item:hover .brand-item-highlight { opacity: 0.6; }
.brand-item.is-active .brand-item-highlight { opacity: 1; }
.brand-item.is-active {
  /*border-left: 3px solid var(--bm-accent);*/
  padding-left: 13px;
}

/* Thumbnail — landscape RV image, wider than tall */
.brand-thumb {
  width: 160px;
  height: 90px;
  flex-shrink: 0;
  overflow: hidden;
  /*background: #d8d4ce;*/
  display: flex !important;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  border-radius: 3px;
}
.brand-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.brand-thumb-placeholder {
  color: #999;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 1px;
}

/* Text beside thumbnail */
.brand-text {
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 1;
  display: flex !important;
  flex-direction: column;
  gap: 4px;
  text-align: right;
}
.brand-name {
  display: block;
  color: var(--bm-text);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  white-space: normal;
  line-height: 1.2;
  transition: color 0.2s;
}
.brand-item.is-active .brand-name { color: var(--bm-text); }
.brand-tagline {
  display: block;
  color: var(--bm-muted);
  font-size: 12px;
  line-height: 1.4;
  white-space: normal;
}

.brands-no-results { padding: 2rem; color: #999; font-size: 13px; text-align: center; }

/* ── Right column ──────────────────────────────────────────── */
.brands-right-col {
  flex: 1 1 auto;
  display: flex !important;
  flex-direction: column;
  overflow-y: auto;
  min-height: 0;
  background: var(--bm-bg-right);
  position: relative;
  scrollbar-width: thin;
  scrollbar-color: #bbb transparent;
}
.brands-right-col::-webkit-scrollbar { width: 4px; }
.brands-right-col::-webkit-scrollbar-thumb { background: #bbb; border-radius: 4px; }

/* ── Hero image — no separate image block, RV floats right ── */
/* The hero image sits as a large float-right in the detail body */
.brands-detail-img-wrap--hero {
  display: none !important; /* hero shown via background in detail area instead */
}
.brands-detail-hero-img,
.brands-detail-hero-overlay { display: none !important; }

/* ── Title image block — hidden, design doesn't use it ──────── */
.brands-detail-img-wrap--title { display: none !important; }

/* ── Detail body — flex column, normal flow ────────────────── */
.brands-detail-body {
  flex: 1;
  display: flex !important;
  flex-direction: column;
  overflow-y: auto;
  min-height: 0;
  color: var(--bm-text);
  padding-bottom: 60px; /* space for pinned links bar */
}


/* Hero image — flex item, fills available space */
.brands-detail-hero-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brands-detail-hero-img-el {
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.brands-detail-meta { display: flex !important; flex-direction: column; gap: 4px; }

/* Edition label — hide, design doesn't show it */
.brands-detail-edition { display: none; }

.brands-detail-title {
  font-size: 36px !important;
  font-weight: 800 !important;
  color: var(--bm-text) !important;
  letter-spacing: 1px;
  text-transform: uppercase;
  line-height: 1;
  margin: 0;
  position: relative;
  z-index: 1;
  padding-bottom: 20px;
}

.brands-detail-tagline { display: none; } /* tagline shown in left col only */

.brands-detail-desc {
  color: var(--bm-text);
  font-size: 24px;
  line-height: 1.5;
  max-width: 100%;
  margin: 0;
  position: relative;
  z-index: 1;
  padding-bottom: 40px;
}

/* ── Build Your RV button — outlined black rectangle ───────── */
.brands-build-btn {
color: #292929;
  text-decoration: none;
  background-color: transparent;
  border: solid 2px #292929;
  border-radius: 5px;
  padding: 15px 15px;
  font-weight: 900;
  text-transform: uppercase;
  font-size: 13px;
}
.brands-build-btn svg { display: none; } /* no arrow icon in this design */
.brands-build-btn:hover {
  background: var(--bm-text);
  color: #fff !important;
}
.brands-build-btn[href="#"], .brands-build-btn[href=""] { display: none !important; }

/* ── Bottom links — pinned to bottom of right col ─────────── */
.brands-detail-links {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex !important;
  gap: 2rem;
  padding: 1rem 2.5rem;
  border-top: 1px solid var(--bm-border);
  background: var(--bm-bg);
  flex-wrap: wrap;
  z-index: 3;
  flex-shrink: 0;
}
.brands-detail-link {
  color: #292929 !important;
  font-size: 13px;
  letter-spacing: 0.3px;
  text-transform: none;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  transition: color 0.2s;
  font-weight: 500;
}

.brands-detail-link svg { display: none; } /* no icons in this design */
.brands-detail-link:hover { color: var(--bm-accent) !important; }

/* ── Close button — top right, text style ──────────────────── */
.brands-close-btn {
  position: absolute;
  top: 16px;
  right: 24px;
  background: transparent;
  border: none;
  border-radius: 0;
  width: auto;
  height: auto;
  padding: 6px 0;
  display: flex !important;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: var(--bm-text);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.5px;
  z-index: 10;
  transition: color 0.2s;
}
/* Add "Close" text via pseudo-element */
.brands-close-btn::after {
  content: 'Close';
  font-family: inherit;
}
.brands-close-btn svg { width: 14px; height: 14px; }
.brands-close-btn:hover { color: var(--bm-accent); }

/* ── Callout images ────────────────────────────────────────── */
/*
 * Callouts are positioned absolute within .brands-detail-body
 * which already has position:relative.
 * Callout 1 sits top-right, Callout 2 sits bottom-right.
 * Both sit above the hero ::after pseudo-element (z-index: 2).
 */
/* Top row: text group left, callout 1 right */
.brands-top-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 150px;
  padding: 2rem 2.5rem 1.5rem;
  flex-shrink: 0;
}

/* Text group — title, desc, button */
.brands-text-group {

  max-width: 600px;

}

/* Callout 1 — right side of top row */
.brands-callout-row--1 {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  flex: 1;
}

/* Callout 2 — below hero, right-aligned */
.brands-callout-row--2 {
  display: flex;
  justify-content: flex-end;
  padding: 0.5rem 2.5rem;
  flex-shrink: 0;
  padding-right: 130px;
  padding-bottom: 50px;
}

.brands-callout {
  display: block;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.12));
}
.brands-callout-row--1 .brands-callout {
  max-width: 400px;
  padding-top: 55px;
}
.brands-callout-row--2 .brands-callout {
  max-width: 150px;
}
/* ── Right panel transition ────────────────────────────────── */
.brands-top-row,
.brands-callout-row,
.brands-detail-hero-wrap,
.brands-detail-hero-img-el {
  opacity: 1;
  transform: translateX(0);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.brands-right-col.is-transitioning .brands-top-row,
.brands-right-col.is-transitioning .brands-callout-row,
.brands-right-col.is-transitioning .brands-detail-hero-wrap,
.brands-right-col.is-transitioning .brands-detail-hero-img-el {
  opacity: 0;
  transform: translateX(12px);
}

/* ── Tablet: 768px – 1023px ───────────────────────────────── */
@media (min-width: 768px) and (max-width: 1023px) {
  .brands-mega-nav {
    --bm-left-width: 40%;
  }

  .brands-mega-menu {
    height: 70vh !important;
  }

  /* Slightly smaller brand name in right panel */
  .brands-detail-title {
    font-size: 26px !important;
  }

  /* Tighter padding on right panel */
  .brands-detail-body {
    padding: 2rem 2rem 1.5rem 2rem;
  }

  /* Tighter filter bar */
  .brands-filter-bar {
    gap: 1.5rem;
    padding: 14px 1.5rem 12px;
  }

  /* Smaller thumbnail to fit narrower left col */
  .brand-thumb {
    width: 120px;
    height: 68px;
  }

  /* Callouts narrower to fit tablet viewport */
  .brands-callout {
    max-width: 160px;
  }
}

/* ── Mobile: below 768px ───────────────────────────────────── */
@media (max-width: 767px) {

  /* Menu still shows but full screen */
  .brands-mega-nav {
    --bm-left-width: 100%;
  }

  .brands-mega-menu {
    height: 100vh !important;
    height: 100dvh !important; /* dynamic viewport for mobile browsers */
  }

  /* Filter bar — scrollable horizontal pills if many editions */
  .brands-filter-bar {
    gap: 1.2rem;
    padding: 12px 1rem 10px;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .brands-filter-pills {
    flex-wrap: nowrap;
    gap: 1rem;
  }

  /* Hide right column entirely */
  .brands-right-col { display: none !important; }

  /* Left column fills full width */
  .brands-left-col {
    width: 100% !important;
    border-right: none;
  }

  /* Each brand-item is a full-width link — larger touch target */
  .brand-item {
    padding: 16px 1.25rem;
    text-decoration: none;
    display: flex !important;
  }

  /* Mobile thumbnail */
  .brand-thumb {
    width: 150px;
    height: 85px;
  }

  .brand-name {
    font-size: 24px;
  }

  .brand-tagline {
    font-size: 16px;
  }

  /* Active highlight still shows for current page brand */
  .brand-item.is-active {
    border-left: 3px solid var(--bm-accent);
    padding-left: calc(1.25rem - 3px);
  }

  /* Close button stays top-right */
  .brands-close-btn {
    top: 12px;
    right: 16px;
  }

  /* Padding at bottom of brand list so last item isn't clipped */
  .brands-left-col {
    padding-bottom: 80px;
  }
}