/* =========================================================================
   LEO UX — mega menu + rich footer   (Hermes-owned; safe to delete)
   Loads after the theme stylesheet. Uses the theme design tokens when present.
   ========================================================================= */

.leo-mega,
.leo-footer-v2 {
  --ux-navy: var(--leo-ink, #0B0B0C);
  --ux-navy-dark: var(--leo-ink, #0B0B0C);
  --ux-brand: var(--leo-accent, #FF4A1C);
  --ux-green: var(--leo-green, #177d45);
  --ux-ink: var(--leo-ink, #231F20);
  --ux-muted: var(--leo-muted, #5b6472);
  --ux-line: var(--leo-line, #e6e9ef);
  --ux-soft: var(--leo-bg-soft, #f7f8fb);
  --ux-radius: 14px;
  --ux-shadow: 0 18px 40px rgba(16, 30, 54, .14);
  --ux-font: var(--leo-font, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif);
  font-family: var(--ux-font);
  color: var(--ux-ink);
}

/* ---------------------------------------------------------------- top bar */
.leo-mega {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 0 1 auto;
  max-width: 100%;
}

.leo-mega-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px 4px;
  margin: 0;
  padding: 0;
  list-style: none;
  flex-wrap: wrap;
  max-width: 100%;
}

.leo-mega-item { position: relative; margin: 0; }

.leo-top-link,
.leo-top-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 11px;
  border: 0;
  background: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--ux-navy);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.leo-top-link:hover,
.leo-top-btn:hover { background: var(--ux-soft); color: var(--ux-navy-dark); }
.leo-mega-item.is-open > .leo-top-link,
.leo-mega-item.is-open > .leo-top-btn { background: var(--ux-soft); }

.leo-top-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(22, 41, 79, .08);
  font-size: 11px;
  font-weight: 700;
  color: var(--ux-muted);
}

.leo-top-btn { display: none; width: 100%; }

/* ----------------------------------------------------------- mega panels */
.leo-panel {
  position: fixed;
  top: var(--leo-top, 84px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  z-index: 999;
  width: min(1180px, 96vw);
  padding: 0 12px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
}
.leo-mega-item.is-open > .leo-panel {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.leo-panel-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 264px;
  gap: 22px;
  padding: 22px 24px 16px;
  background: #fff;
  border: 1px solid var(--ux-line);
  border-radius: var(--ux-radius);
  box-shadow: var(--ux-shadow);
}
.leo-panel-main {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 18px 22px;
}

.leo-col-title {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ux-muted);
}
.leo-col-title.leo-mt { margin-top: 14px; }

.leo-col-list { margin: 0; padding: 0; list-style: none; }
.leo-col-list li { margin: 0 0 2px; }
.leo-col-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 5px 8px;
  margin-left: -8px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--ux-ink);
  text-decoration: none;
}
.leo-col-list a:hover { background: var(--ux-soft); color: var(--ux-navy-dark); }
.leo-n {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 700;
  color: var(--ux-muted);
  background: var(--ux-soft);
  border-radius: 999px;
  padding: 1px 7px;
}
.leo-col-guides a { color: var(--ux-navy); }

.leo-col-cta {
  padding: 14px;
  border-radius: 12px;
  background: linear-gradient(180deg, #f4f7fc, #eef3fa);
  border: 1px solid var(--ux-line);
}
.leo-cta-text { margin: 0 0 10px; font-size: 13px; line-height: 1.5; color: var(--ux-muted); }
.leo-cta-btn {
  display: inline-block;
  padding: 9px 14px;
  border-radius: 10px;
  background: var(--ux-green, #177d45);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
.leo-cta-btn:hover { background: var(--leo-green-dark, #0f5e33); color: #fff; }

/* feature tiles — the part that makes the menu feel full */
.leo-tiles { display: grid; gap: 12px; align-content: start; }
.leo-tiles-2 { grid-template-rows: repeat(2, 1fr); }
.leo-tiles-3 { grid-template-rows: repeat(3, 1fr); }
.leo-tile {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--ux-line);
  text-decoration: none;
  min-height: 92px;
}
.leo-tile img { display: block; width: 100%; height: 100%; min-height: 92px; object-fit: cover; }
.leo-tile-body {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 22px 10px 8px;
  background: linear-gradient(180deg, rgba(10, 20, 36, 0), rgba(10, 20, 36, .82));
  color: #fff;
  font-size: 12px;
}
.leo-tile-title {
  font-weight: 600;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.leo-tile-price { font-weight: 700; white-space: nowrap; }
.leo-tile-price ins { text-decoration: none; }
.leo-tile:hover img { transform: scale(1.04); transition: transform .3s ease; }

.leo-panel-foot {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--ux-line);
}
.leo-all { font-size: 13px; font-weight: 700; color: var(--ux-navy); text-decoration: none; }
.leo-all:hover { text-decoration: underline; }
.leo-all-guides { color: var(--ux-muted); }

.leo-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.leo-chip,
.leo-chip-static {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--ux-line);
  background: var(--ux-soft);
  font-size: 12.5px;
  color: var(--ux-navy);
  text-decoration: none;
}
.leo-chip:hover { background: #eef3fa; border-color: #cfdcef; }
.leo-chip-count { font-size: 11px; font-weight: 700; color: var(--ux-muted); }

/* mobile burger + drawer */
.leo-mega-burger { display: none; }
.leo-burger-bars {
  width: 16px;
  height: 2px;
  background: var(--ux-navy);
  box-shadow: 0 5px 0 var(--ux-navy), 0 -5px 0 var(--ux-navy);
  border-radius: 2px;
}

/* --------------------------------------------------------------- footer */
.leo-footer-v2 {
  margin-top: 56px;
  padding: 46px 0 22px;
  background: #0f1c33;
  color: #dfe6f1;
  font-size: 14px;
}
.leo-fwrap {
  max-width: var(--leo-max, 1200px);
  margin: 0 auto;
  padding: 0 20px;
}
.leo-fbrand { max-width: 640px; margin-bottom: 26px; }
.leo-fbrand-name { margin: 0 0 8px; font-size: 22px; font-weight: 800; color: #fff; }
.leo-fbrand-line { margin: 0 0 14px; line-height: 1.6; color: #b9c6db; }
.leo-badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; padding: 0; list-style: none; }
.leo-badges li {
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .14);
  font-size: 12.5px;
  color: #eaf1ff;
}
.leo-ftrust { margin: 0 0 10px; color: #b9c6db; }
.leo-fpay { margin: 0; font-size: 12.5px; letter-spacing: .04em; color: #8fa2c0; }

.leo-fgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 26px 30px;
  padding: 26px 0 6px;
  border-top: 1px solid rgba(255, 255, 255, .1);
}
.leo-fcol-title {
  margin: 0 0 10px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: #8fa2c0;
}
.leo-fcol-list { margin: 0; padding: 0; list-style: none; }
.leo-fcol-list li { margin: 0 0 6px; }
.leo-fcol-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #dfe6f1;
  text-decoration: none;
}
.leo-fcol-list a:hover { color: #fff; text-decoration: underline; }
.leo-fcol-list .leo-n { background: rgba(255, 255, 255, .1); color: #9fb0ca; }

.leo-fsearches { padding: 22px 0 8px; border-top: 1px solid rgba(255, 255, 255, .1); }
.leo-footer-v2 .leo-chip {
  background: rgba(255, 255, 255, .07);
  border-color: rgba(255, 255, 255, .14);
  color: #e6eefc;
}
.leo-footer-v2 .leo-chip:hover { background: rgba(255, 255, 255, .14); }
.leo-footer-v2 .leo-chip-count { color: #9fb0ca; }

.leo-fbottom {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  justify-content: space-between;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, .1);
  font-size: 12.5px;
  color: #9fb0ca;
}
.leo-fbottom p { margin: 0; }
.leo-fbottom a { color: #cfdcef; text-decoration: none; }
.leo-fbottom a:hover { text-decoration: underline; }

/* ------------------------------------------------------------ responsive */
/* header row: keep the menu on one line without crushing the search box */
.leo-header-row { gap: 12px; }
.leo-mega { flex: 0 1 auto; min-width: 0; }

@media (max-width: 1400px) {
  .leo-top-count { display: none; }
  .leo-top-link, .leo-top-btn { padding: 10px 9px; font-size: 14px; }
}

@media (max-width: 1023px) {
  .leo-mega { width: 100%; }
  .leo-mega-burger {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 10px 14px;
    border: 1px solid var(--ux-line);
    border-radius: 10px;
    background: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    color: var(--ux-navy);
    cursor: pointer;
  }
  .leo-mega-bar {
    position: fixed;
    top: var(--leo-top, 84px);
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 998;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    overflow-y: auto;
    padding: 10px 14px 40px;
    background: #fff;
    border-top: 1px solid var(--ux-line);
  }
  .leo-mega-bar.is-open { display: flex; }
  .leo-mega-item { border-bottom: 1px solid var(--ux-line); }
  .leo-top-link { display: none; }
  .leo-top-btn { display: flex; justify-content: space-between; padding: 14px 4px; font-size: 16px; }
  .leo-top-btn .leo-top-count { display: inline-flex; }
  .leo-top-btn::after { content: "+"; font-size: 18px; color: var(--ux-muted); }
  .leo-mega-item.is-open .leo-top-btn::after { content: "–"; }
  .leo-panel {
    position: static;
    width: auto;
    padding: 0;
    transform: none;
    opacity: 1;
    visibility: visible;
    display: none;
  }
  .leo-mega-item.is-open .leo-panel { display: block; transform: none; }
  .leo-panel-inner { grid-template-columns: 1fr; padding: 12px 0 16px; border: 0; box-shadow: none; }
  .leo-panel-main { grid-template-columns: 1fr 1fr; }
  .leo-tiles { grid-template-columns: 1fr 1fr; grid-template-rows: none; grid-column: 1 / -1; }
  .leo-panel-foot { flex-direction: column; align-items: flex-start; gap: 8px; }
}
