/* ════════════════════════════════════════════════════════════════════════
 * Mega-menu — Phase 4 Slice 2 (desktop)
 *
 * The trigger inherits .aor-nav-cta visuals from main.css; this file only
 * adds chevron + dropdown panel styling. Mobile drawer styles ship in Slice 3.
 * ════════════════════════════════════════════════════════════════════════ */

.aor-mm-trigger {
  /* visual: inherits from .aor-nav-cta — only override chevron-related bits */
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  border: none;
}
.aor-mm-trigger[aria-expanded="true"] .aor-mm-chevron { transform: rotate(180deg); }
.aor-mm-chevron { transition: transform 200ms ease; display: inline-block; }

/* Hide legacy "Browse Wheels" CTA (and its hover dropdown) when Phase 4 is on. */
body.aor-phase-4 .aor-cta-browse-wheels-legacy { display: none; }

/* ── Dropdown panel ──────────────────────────────────────────────────── */
.aor-mm-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #0b1220;
  color: #e2e8f0;
  border-top: 2px solid var(--aor-red, #db0000);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  z-index: 1000;
  display: none;
}
.aor-mm-dropdown[data-open="true"] { display: block; }

.aor-mm-grid {
  max-width: 1140px;
  margin: 0 auto;
  padding: 16px 20px;
  display: grid;
  grid-template-columns: 0.6fr 0.8fr 1.6fr;
  gap: 16px;
}

.aor-mm-col h4 {
  color: #94a3b8;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0 0 8px 0;
  font-weight: 700;
}
.aor-mm-col-label {
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: block;
  margin: 12px 0 4px;
}
.aor-mm-col-label:first-of-type { margin-top: 0; }

.aor-mm-col a {
  color: #cbd5e1;
  font-size: 13px;
  display: block;
  padding: 3px 0;
  text-decoration: none;
}
.aor-mm-col a:hover,
.aor-mm-col a:focus-visible { color: #fff; outline: none; }

.aor-mm-view-all {
  color: #60a5fa !important;
  font-weight: 600;
  font-size: 12px !important;
  margin-top: 8px;
}

/* Search input in left column */
.aor-mm-search-input {
  background: #1e293b;
  border: 1px solid #475569;
  color: #cbd5e1;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 12px;
  width: 100%;
  box-sizing: border-box;
  margin: 6px 0;
}
.aor-mm-search-input::placeholder { color: #64748b; }
.aor-mm-search-input:focus {
  outline: none;
  border-color: var(--aor-red, #db0000);
}

/* ── Featured cards (right column) ───────────────────────────────────── */
.aor-mm-feat-card {
  display: flex;
  gap: 8px;
  background: #1e293b;
  padding: 8px;
  border-radius: 4px;
  margin-bottom: 6px;
  text-decoration: none;
  color: inherit;
}
.aor-mm-feat-card:hover { background: #2d3a52; }

.aor-mm-feat-thumb {
  width: 48px;
  height: 48px;
  border-radius: 3px;
  background: linear-gradient(135deg,#475569,#1e293b);
  flex-shrink: 0;
  object-fit: cover;
}

.aor-mm-feat-name {
  font-size: 12px;
  color: #e2e8f0 !important;
  font-weight: 600;
  padding: 0;
}
.aor-mm-feat-meta { font-size: 11px; color: #64748b; }
.aor-mm-feat-pinned { color: #fbbf24; font-size: 9px; font-weight: 700; margin-left: 4px; }

/* ── Reduced motion ──────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .aor-mm-chevron { transition: none; }
}

/* ════════════════════════════════════════════════════════════════════════
 * Mobile drawer (≤900px) — Slice 3
 * ════════════════════════════════════════════════════════════════════════ */

@media (max-width: 900px) {
  body.aor-phase-4 .aor-mm-trigger { display: none; }
  body.aor-phase-4 .aor-mm-hamburger { display: inline-flex; }

  .aor-mm-dropdown { display: none !important; } /* desktop dropdown hidden on mobile */
}
@media (min-width: 901px) {
  body.aor-phase-4 .aor-mm-hamburger { display: none; }
}

.aor-mm-hamburger {
  background: transparent;
  border: 1px solid #475569;
  color: #e2e8f0;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 18px;
  cursor: pointer;
  display: none; /* default hidden, mobile breakpoint shows it */
  align-items: center;
}
.aor-mm-hamburger:hover { background: #1e293b; }

.aor-mm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
}
.aor-mm-overlay[data-open="true"] {
  opacity: 1;
  pointer-events: auto;
}

.aor-mm-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 90vw;
  max-width: 360px;
  background: #0b1220;
  color: #e2e8f0;
  z-index: 1101;
  transform: translateX(100%);
  transition: transform 250ms ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.aor-mm-drawer[data-open="true"] { transform: translateX(0); }

.aor-mm-drawer-header {
  padding: 12px 16px;
  background: #1e293b;
  border-bottom: 1px solid #334155;
  display: flex;
  align-items: center;
  gap: 12px;
}
.aor-mm-drawer-title { font-weight: 700; flex-grow: 1; }
.aor-mm-drawer-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 22px;
  cursor: pointer;
  padding: 0 6px;
  line-height: 1;
}
.aor-mm-drawer-close:hover { color: #e2e8f0; }

.aor-mm-drawer-body { overflow-y: auto; flex-grow: 1; }
.aor-mm-drawer-section {
  border-bottom: 1px solid #1e293b;
  padding: 10px 14px;
}
.aor-mm-drawer-section h4 {
  color: #94a3b8;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0 0 8px 0;
  font-weight: 700;
}
.aor-mm-drawer-section.aor-mm-featured-section { background: rgba(220,38,38,0.04); }

.aor-mm-acc-toggle {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid #1e293b;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}
.aor-mm-acc-toggle:hover { background: #0f172a; }
.aor-mm-acc-toggle .chevron {
  color: #475569;
  transition: transform 200ms ease;
}
.aor-mm-acc-toggle[aria-expanded="true"] .chevron { transform: rotate(180deg); }

.aor-mm-acc-panel { display: none; padding: 8px 14px 12px; background: #060c17; border-bottom: 1px solid #1e293b; }
.aor-mm-acc-panel[data-open="true"] { display: block; }
.aor-mm-acc-panel a {
  color: #cbd5e1;
  font-size: 13px;
  display: block;
  padding: 6px 0;
  text-decoration: none;
}
.aor-mm-acc-panel a:hover { color: #fff; }
.aor-mm-acc-panel .aor-mm-view-all { margin-top: 8px; padding-top: 8px; border-top: 1px solid #1e293b; }

.aor-mm-year-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin-bottom: 4px; }
.aor-mm-year-grid a { background: #1e293b; padding: 6px 10px; border-radius: 4px; text-align: center; font-weight: 600; }
.aor-mm-year-grid a:hover { background: #334155; }

.aor-mm-acc-panel .aor-mm-search-input {
  width: 100%;
  padding: 8px 10px;
  background: #0b1220;
  border: 1px solid #334155;
  border-radius: 4px;
  color: #e2e8f0;
  font-size: 13px;
  margin-bottom: 8px;
  box-sizing: border-box;
}
.aor-mm-acc-panel .aor-mm-search-input:focus { outline: 2px solid var(--aor-red, #db0000); outline-offset: 1px; }

/* Featured cards in drawer reuse desktop .aor-mm-feat-card layout but tighter */
.aor-mm-drawer .aor-mm-feat-card {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  text-decoration: none;
  border-bottom: 1px solid #1e293b;
}
.aor-mm-drawer .aor-mm-feat-card:last-of-type { border-bottom: none; }
.aor-mm-drawer .aor-mm-feat-thumb {
  width: 44px;
  height: 44px;
  border-radius: 4px;
  background: linear-gradient(135deg,#475569,#1e293b);
  flex-shrink: 0;
  object-fit: cover;
}
.aor-mm-drawer .aor-mm-feat-name { font-size: 13px; color: #e2e8f0; font-weight: 600; }
.aor-mm-drawer .aor-mm-feat-meta { font-size: 11px; color: #64748b; }

.aor-mm-drawer .aor-mm-view-all {
  display: block;
  margin-top: 10px;
  color: var(--aor-red, #db0000);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}
.aor-mm-drawer .aor-mm-view-all:hover { color: #fff; }

/* "Quick" section — Search button, Account link (with avatar), Cart link (with count). */
.aor-mm-quick-section { padding: 10px 14px 6px; }
.aor-mm-quick-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: transparent;
  border: none;
  padding: 12px 0;
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid #1e293b;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  gap: 12px;
}
.aor-mm-quick-link:last-of-type { border-bottom: none; }
.aor-mm-quick-link:hover { color: #fff; }
.aor-mm-quick-link:focus-visible { outline: 2px solid var(--aor-red, #db0000); outline-offset: 1px; }

.aor-mm-quick-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.aor-mm-quick-icon {
  color: #94a3b8;
  flex-shrink: 0;
}
.aor-mm-quick-link:hover .aor-mm-quick-icon { color: #fff; }

.aor-mm-quick-hint {
  color: #64748b;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}

.aor-mm-quick-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Account avatar — circular, matches the header treatment */
.aor-mm-quick-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, #475569 0%, #1e293b 100%);
  border: 1px solid rgba(255,255,255,0.15);
  color: #cbd5e1;
}
.aor-mm-quick-avatar img,
.aor-mm-quick-avatar .aor-account-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}

/* Cart count pill — cyan gradient like the header */
.aor-mm-quick-cart-count {
  background: linear-gradient(180deg, #44e8ff 0%, #00d4ff 25%, #0099cc 50%, #007aaa 75%, #005c80 100%);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  min-width: 22px;
  height: 22px;
  border-radius: 11px;
  padding: 0 6px;
  box-shadow:
    0 0 0 2px #0b1220,
    0 0 6px rgba(0, 212, 255, 0.5),
    0 2px 4px rgba(0,0,0,0.4);
}

/* "More" section — flat link list (About / Help) */
.aor-mm-more-section { padding-top: 14px; }
.aor-mm-flat-link {
  display: block;
  padding: 10px 0;
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid #1e293b;
}
.aor-mm-flat-link:last-of-type { border-bottom: none; }
.aor-mm-flat-link:hover { color: #fff; }

@media (prefers-reduced-motion: reduce) {
  .aor-mm-overlay,
  .aor-mm-drawer,
  .aor-mm-acc-toggle .chevron { transition: none; }
}

/* ════════════════════════════════════════════════════════════════════════
 * Product hub-links pill grid — Slice 5
 * Renders inside <main> on /rim/{sku}/ pages, between the spec/fitment
 * columns and </main>. 3-column grid on desktop, 2-column ≤700px.
 * ════════════════════════════════════════════════════════════════════════ */
.aor-product-hub-links {
  max-width: 1100px;
  margin: 28px auto 12px;
  padding: 0 20px;
}
.aor-phl-label {
  color: #94a3b8;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0 0 10px 0;
  font-weight: 700;
}
.aor-phl-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.aor-phl-pill {
  background: linear-gradient(180deg, #1e293b, #0f172a);
  border: 1px solid #334155;
  border-radius: 4px;
  padding: 12px 14px;
  color: #cbd5e1;
  text-decoration: none;
  transition: transform 200ms ease, border-color 200ms ease, color 200ms ease;
  display: block;
}
.aor-phl-pill:hover,
.aor-phl-pill:focus-visible {
  border-color: var(--aor-red, #db0000);
  transform: translateY(-1px);
  color: #fff;
  outline: none;
}
.aor-phl-pill:focus-visible { box-shadow: 0 0 0 2px rgba(219, 0, 0, 0.35); }
.aor-phl-axis {
  color: #64748b;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 4px;
  font-weight: 700;
}
.aor-phl-name {
  color: #fff;
  font-weight: 600;
  font-size: 12px;
  line-height: 1.35;
}

@media (max-width: 700px) {
  .aor-phl-grid { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .aor-phl-pill { transition: none; }
  .aor-phl-pill:hover { transform: none; }
}

/* ════════════════════════════════════════════════════════════════════════
 * Make-hub cross-link extension — Slice 6
 * Appears below the existing "Browse Other Makes" strip on /{make}-rims/
 * pages with: top-{make}-year combos + recent years + 3 hub-index chips.
 * ════════════════════════════════════════════════════════════════════════ */
.mh-extension-strip {
  max-width: 1100px;
  margin: 18px auto 0;
  padding: 0 20px;
}
.mh-strip-label {
  color: #94a3b8;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0 0 8px;
  font-weight: 700;
}
.mh-strip-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.mh-chip {
  background: #1e293b;
  padding: 8px 14px;
  border-radius: 4px;
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: background 200ms ease, color 200ms ease;
}
.mh-chip:hover { background: #334155; color: #fff; }
.mh-chip:focus-visible {
  outline: 2px solid var(--aor-red, #db0000);
  outline-offset: 1px;
}
.mh-chip.mh-chip-blue {
  background: linear-gradient(180deg, #3b82f6, #1d4ed8);
  color: #fff;
}
.mh-chip.mh-chip-blue:hover { filter: brightness(1.1); }

.mh-extension-strip-indexes { margin-bottom: 24px; }

@media (prefers-reduced-motion: reduce) {
  .mh-chip { transition: none; }
}
