/**
 * AE Designers index — shared stylesheet for `/men/designers/` and `/women/designers/`.
 *
 * Lifted from design-proposals/{men,women}-designers/{Men,Women} Designers.html
 * (the editorial A–Z directory). Selectors are prefixed `.ae-md-*` so the file
 * cannot leak to the rest of the site; the `.ae-md-page` wrapper hosts the page
 * tokens. Both /men/designers/ and /women/designers/ render under this same
 * scope — the only PHP-side difference is the hero image, eyebrow text, and
 * brand list (driven by the live `test_products` query in the page template).
 *
 * Pattern mirrors `men-homepage.css` / `women-homepage.css` (page-scoped CSS
 * vars, no global :root pollution, fonts loaded only on these pages via the
 * `ae-designers-fonts` enqueue in functions.php).
 */

.ae-md-page {
  --ae-md-paper:      #f5f1ea;
  --ae-md-canvas:     #ffffff;
  --ae-md-ink:        #111111;
  --ae-md-ink-muted:  rgba(17, 17, 17, 0.6);
  --ae-md-ink-faint:  rgba(17, 17, 17, 0.4);
  --ae-md-line:       rgba(17, 17, 17, 0.08);
  --ae-md-accent:     #5e4a33;
  --ae-md-ease:       cubic-bezier(0.2, 0.7, 0.2, 1);
  --ae-md-font-edit:  "Cormorant Garamond", Georgia, serif;
  --ae-md-font-body:  "Inter", -apple-system, BlinkMacSystemFont, sans-serif;

  font-family: var(--ae-md-font-body);
  color: var(--ae-md-ink);
  background: var(--ae-md-canvas);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
.ae-md-page * { box-sizing: border-box; }
.ae-md-page ::selection { background: var(--ae-md-ink); color: var(--ae-md-canvas); }
.ae-md-page a { color: inherit; }

/* ============================================================
   1. HERO — full-bleed editorial cover with overlay
   ============================================================ */
.ae-md-hero {
  position: relative;
  height: clamp(360px, 42vh, 480px);
  overflow: hidden;
  background: #1a1a1a;
}
.ae-md-hero-img {
  position: absolute; inset: 0;
  background-size: cover;
  /* background-image + background-position set inline in PHP per page */
}
.ae-md-hero-shade {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.45) 100%);
}
.ae-md-hero-content {
  position: relative; z-index: 2;
  height: 100%;
  display: flex; flex-direction: column;
  justify-content: center; align-items: center;
  text-align: center; color: #fff;
  padding: 0 32px;
}
.ae-md-hero-eyebrow {
  font-family: var(--ae-md-font-body);
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  font-weight: 500;
  opacity: 0.85;
  margin: 0 0 22px;
}
.ae-md-hero-title {
  font-family: var(--ae-md-font-edit);
  font-weight: 300;
  font-size: clamp(56px, 8vw, 124px);
  line-height: 0.96;
  letter-spacing: -0.02em;
  margin: 0;
  color: #fff;
  text-shadow: 0 1px 36px rgba(0,0,0,0.3);
}
.ae-md-hero-title em { font-style: italic; }

/* ============================================================
   2. A–Z DIRECTORY
   ============================================================ */
.ae-md-az {
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 32px 96px;
}
.ae-md-az-inner {
  margin-left: clamp(0px, 6vw, 110px);
  margin-right: clamp(0px, 6vw, 110px);
}

/* Alphabet jump bar */
.ae-md-az-alpha {
  display: flex;
  gap: 0;
  border-top: 1px solid var(--ae-md-line);
  border-bottom: 1px solid var(--ae-md-line);
  margin-bottom: 56px;
}
.ae-md-az-l {
  flex: 1;
  text-align: center;
  font-family: var(--ae-md-font-body);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ae-md-ink);
  text-decoration: none;
  padding: 16px 4px;
  min-width: 24px;
  transition: color 120ms var(--ae-md-ease);
  position: relative;
}
.ae-md-az-l:hover:not(.is-empty) { color: var(--ae-md-accent); }
.ae-md-az-l.is-empty {
  color: var(--ae-md-ink-faint);
  opacity: 0.35;
  cursor: default;
}
.ae-md-az-l.is-active::after {
  content: "";
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 1px;
  background: var(--ae-md-ink);
}

/* Letter blocks */
.ae-md-az-body {
  display: flex;
  flex-direction: column;
  gap: 56px;
}
.ae-md-az-head {
  padding-bottom: 20px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--ae-md-line);
}
.ae-md-az-letter {
  font-family: var(--ae-md-font-edit);
  font-weight: 300;
  font-style: italic;
  font-size: 44px;
  line-height: 1;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--ae-md-ink);
}

/* Designer list — 3 columns desktop, dense rhythm */
.ae-md-az-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 48px;
  row-gap: 0;
}
.ae-md-az-list a {
  display: block;
  padding: 9px 0;
  text-decoration: none;
  color: var(--ae-md-ink);
  font-family: var(--ae-md-font-body);
  font-weight: 400;
  font-size: 15px;
  transition: color 160ms var(--ae-md-ease);
}
.ae-md-az-list a:hover { color: var(--ae-md-accent); }

/* ============================================================
   3. PARTNER STORES — bottom band
   ============================================================ */
.ae-md-partners {
  border-top: 1px solid var(--ae-md-line);
  border-bottom: 1px solid var(--ae-md-line);
  background: var(--ae-md-canvas);
  padding: 32px;
}
.ae-md-partners-inner {
  max-width: 1480px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 32px;
  align-items: center;
}
.ae-md-partners-label {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ae-md-ink);
}
.ae-md-partners-list {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 36px;
}
.ae-md-partner-name {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ae-md-ink);
  text-decoration: none;
  transition: color 160ms var(--ae-md-ease);
}
.ae-md-partner-name:hover { color: var(--ae-md-accent); }

/* ============================================================
   4. BACK-TO-TOP BUTTON
   ------------------------------------------------------------
   Circular icon-only button placed between the directory and
   the partner stores band. Inline (not floating) — the
   directory is long enough that a deliberate footer-rail
   button reads better than a sticky overlay.
   ============================================================ */
.ae-md-to-top {
  display: flex;
  justify-content: center;
  padding: 40px 32px 56px;
  background: var(--ae-md-canvas);
}
.ae-md-to-top button {
  appearance: none;
  -webkit-appearance: none;
  background: var(--ae-md-paper);
  border: 0;
  color: var(--ae-md-ink);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 160ms var(--ae-md-ease), transform 160ms var(--ae-md-ease);
}
.ae-md-to-top button svg {
  width: 20px;
  height: 20px;
  display: block;
  color: var(--ae-md-ink);
}
.ae-md-to-top button:hover {
  background: #ece6dc;
  transform: translateY(-2px);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .ae-md-az-list {
    grid-template-columns: 1fr 1fr;
    column-gap: 24px;
  }
}

@media (max-width: 700px) {
  .ae-md-hero {
    height: 32vh;
    min-height: 240px;
    max-height: 320px;
  }

  .ae-md-to-top {
    padding: 28px 20px 40px;
  }
  .ae-md-to-top button {
    width: 50px;
    height: 50px;
  }
  .ae-md-to-top button svg {
    width: 18px;
    height: 18px;
  }

  .ae-md-partners { padding: 24px 20px; }
  .ae-md-partners-inner {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .ae-md-partners-list {
    font-size: 11px;
    gap: 12px 24px;
  }

  .ae-md-az { padding: 0 20px 64px; }
  .ae-md-az-inner {
    margin-left: 0;
    margin-right: 0;
  }

  .ae-md-az-alpha {
    margin-bottom: 32px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .ae-md-az-alpha::-webkit-scrollbar { display: none; }
  .ae-md-az-l {
    font-size: 11px;
    padding: 12px 2px;
    min-width: 22px;
    letter-spacing: 0.06em;
  }

  .ae-md-az-letter { font-size: 32px; }
  .ae-md-az-list {
    grid-template-columns: 1fr;
    column-gap: 0;
  }
  .ae-md-az-list a {
    padding: 13px 0;
    font-size: 14px;
    border-bottom: 1px solid var(--ae-md-line);
  }
  .ae-md-az-body { gap: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  .ae-md-az-l,
  .ae-md-az-list a,
  .ae-md-partner-name,
  .ae-md-to-top button {
    transition: none;
  }
  .ae-md-to-top button:hover {
    transform: none;
  }
  .ae-md-az-list a:focus-visible,
  .ae-md-az-l:focus-visible,
  .ae-md-partner-name:focus-visible,
  .ae-md-to-top button:focus-visible {
    outline: 2px solid var(--ae-md-accent);
    outline-offset: 2px;
  }
}
