/* =========================================================
   MyFindZo site shell — header, drawer, footer (app theme)
   Tokens come from custom.css (:root --mf-*)
   ========================================================= */

.mfh,
.mff {
  --mfs-primary: #f52c94;
  --mfs-primary-dark: #d41a7a;
  --mfs-primary-light: #ff6eb4;
  --mfs-ink: #1a1d26;
  --mfs-muted: #6b7280;
  --mfs-border: #e8ecf2;
  --mfs-wrap: none;
}

.mfh__wrap,
.mff__wrap {
  width: 100%;
  max-width: none;
  margin-inline: 0;
  padding-left: var(--mf-gutter, 16px);
  padding-right: var(--mf-gutter, 16px);
  box-sizing: border-box;
}

/* ---------- Header shell ---------- */
.mfh {
  position: relative;
  z-index: 900;
  background: #fff;
  font-family: inherit;
}

/* Topbar */
.mfh__top {
  background: linear-gradient(90deg, var(--mfs-primary-dark), var(--mfs-primary) 45%, var(--mfs-primary-light));
  color: #fff;
  font-size: 12.5px;
}

.mfh__top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 40px;
  flex-wrap: wrap;
}

.mfh__top-contact,
.mfh__top-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.mfh__top a {
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.18s ease;
}

.mfh__top a:hover { color: #fff; }

.mfh__top-cta {
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 3px 12px;
  border-radius: 999px;
  font-weight: 700;
}

.mfh__top-social {
  display: inline-flex;
  gap: 10px;
  padding-left: 14px;
  border-left: 1px solid rgba(255, 255, 255, 0.28);
}

/* Main bar */
.mfh__main {
  position: sticky;
  top: 0;
  z-index: 950;
  background: #fff;
  border-bottom: 1px solid var(--mfs-border);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.05);
}

.mfh__main-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 64px;
}

.mfh__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0 10px;
  border: 1px solid var(--mfs-border);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
}

.mfh__burger span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--mfs-ink);
}

.mfh__logo {
  flex-shrink: 0;
  display: block;
}

.mfh__logo img {
  height: 42px;
  width: auto;
  object-fit: contain;
}

.mfh__tabs--bar {
  flex: 1;
  justify-content: center;
}

.mfh__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.mfh__icon-btn {
  position: relative;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  border: 1px solid var(--mfs-border);
  background: #fff;
  color: var(--mfs-ink) !important;
  font-size: 19px;
  text-decoration: none !important;
  transition: border-color 0.18s ease, color 0.18s ease;
}

.mfh__icon-btn:hover {
  border-color: var(--mfs-primary);
  color: var(--mfs-primary) !important;
}


.mfh__badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--mfs-primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.mfh__signin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--mfs-primary), var(--mfs-primary-light));
  color: #fff !important;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none !important;
  box-shadow: 0 6px 16px rgba(245, 44, 148, 0.28);
}
.mfh__signin .mf-ico,
.mfh__signin i {
  display: block;
  flex-shrink: 0;
  line-height: 1;
  margin: 0;
}

.mfh__user { position: relative; }

.mfh__user-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--mfs-border);
  border-radius: 14px;
  background: #fff;
  color: var(--mfs-ink);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
}

.mfh__avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--mfs-primary), var(--mfs-primary-light));
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
}

.mfh__user-name {
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mfh__user-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  min-width: 190px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--mfs-border);
  border-radius: 14px;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.14);
  display: none;
}

.mfh__user-menu.is-open { display: block; }

.mfh__user-menu a {
  display: block;
  padding: 9px 12px;
  border-radius: 10px;
  color: var(--mfs-ink) !important;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none !important;
}

.mfh__user-menu a:hover { background: #fff0f7; color: var(--mfs-primary) !important; }

/* Nav row */
.mfh__nav {
  border-bottom: 1px solid var(--mfs-border);
  background: #fff;
}

.mfh__nav-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 52px;
}

.mfh__mega { position: relative; }

.mfh__mega-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--mfs-primary), var(--mfs-primary-light));
  color: #fff;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.mfh__mega-panel {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  width: min(920px, 88vw);
  max-height: 70vh;
  overflow-y: auto;
  padding: 20px;
  display: none;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 18px 24px;
  background: #fff;
  border: 1px solid var(--mfs-border);
  border-radius: 18px;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.16);
}

.mfh__mega-panel.is-open { display: grid; }

.mfh__mega-col h4 {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 800;
  color: var(--mfs-primary);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.mfh__mega-col ul { margin: 0; padding: 0; list-style: none; }

.mfh__mega-col li + li { margin-top: 4px; }

.mfh__mega-col a {
  color: var(--mfs-muted) !important;
  font-size: 13px;
  text-decoration: none !important;
}

.mfh__mega-col a:hover { color: var(--mfs-primary) !important; }

.mfh__tabs {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}

.mfh__tabs::-webkit-scrollbar { display: none; }

.mfh__tabs a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  border-radius: 10px;
  color: var(--mfs-ink) !important;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none !important;
  transition: background 0.18s ease, color 0.18s ease;
}

.mfh__tabs a:hover { background: #fff0f7; color: var(--mfs-primary) !important; }

.mfh__tabs a.is-active {
  background: #fff0f7;
  color: var(--mfs-primary) !important;
  font-weight: 800;
}

.mfh__nav-cta {
  flex-shrink: 0;
  padding: 8px 16px;
  border: 1px solid #2196f3;
  border-radius: 10px;
  color: #1976d2 !important;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none !important;
  white-space: nowrap;
}

/* ---------- Drawer ---------- */
.mfh-scrim {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(15, 23, 42, 0.5);
  opacity: 0;
  transition: opacity 0.24s ease;
}

.mfh-scrim.is-open { opacity: 1; }

.mfh-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 1110;
  width: min(320px, 86vw);
  padding: 16px 16px 32px;
  background: #fff;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 12px 0 32px rgba(15, 23, 42, 0.16);
}

.mfh-drawer.is-open { transform: translateX(0); }

.mfh-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--mfs-border);
}

.mfh-drawer__head img { height: 34px; width: auto; }

.mfh-drawer__close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: #f5f6fa;
  font-size: 24px;
  line-height: 1;
  color: var(--mfs-ink);
  cursor: pointer;
}

.mfh-drawer__user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 0;
  border-bottom: 1px solid var(--mfs-border);
  flex-wrap: wrap;
}

.mfh-drawer__user strong { display: block; font-size: 14px; }

.mfh-drawer__user a { font-size: 12.5px; color: var(--mfs-primary); }

.mfh-drawer__nav { display: flex; flex-direction: column; padding: 8px 0; }

.mfh-drawer__nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 10px;
  border-radius: 10px;
  color: var(--mfs-ink) !important;
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none !important;
}

.mfh-drawer__nav a.is-active { background: #fff0f7; color: var(--mfs-primary) !important; }

.mfh-drawer__label {
  margin: 12px 0 6px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--mfs-muted);
}

.mfh-drawer__cats { border-top: 1px solid var(--mfs-border); padding-top: 8px; }

.mfh-drawer__cats details { border-bottom: 1px solid #f1f5f9; }

.mfh-drawer__cats summary {
  padding: 11px 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.mfh-drawer__cats summary::-webkit-details-marker { display: none; }

.mfh-drawer__cats summary::after { content: "＋"; float: right; color: var(--mfs-muted); }

.mfh-drawer__cats details[open] summary::after { content: "－"; }

.mfh-drawer__cats ul { margin: 0 0 8px; padding: 0 10px 0 22px; list-style: none; }

.mfh-drawer__cats li a {
  display: block;
  padding: 7px 0;
  font-size: 13px;
  color: var(--mfs-muted) !important;
  text-decoration: none !important;
}

/* App-shell pages can be very short (e.g. logged-out Account); keep the
   footer pinned to the bottom instead of leaving a blank strip below it. */
body:has(.mf-home) {
  height: auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body:has(.mf-home) .mff { margin-top: auto; }

/* ---------- Footer ---------- */
.mff {
  margin-top: 40px;
  background: radial-gradient(1000px 420px at 12% -10%, rgba(245, 44, 148, 0.22), transparent 60%), #12141c;
  color: #cbd2dd;
  font-size: 14px;
}

.mff__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr 1.3fr;
  gap: 32px;
  padding-top: 52px;
  padding-bottom: 40px;
}

.mff__brand p {
  margin: 14px 0 18px;
  line-height: 1.7;
  color: #98a2b3;
  font-size: 13.5px;
}

.mff__logo img {
  height: 42px;
  width: auto;
  object-fit: contain;
}

.mff__social { display: flex; gap: 10px; }

.mff__social a {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff !important;
  font-size: 16px;
  transition: transform 0.18s ease, background 0.18s ease;
}

.mff__social a:hover { transform: translateY(-2px); }
.mff__social-facebook:hover { background: #1877f2; }
.mff__social-twitter:hover { background: #1da1f2; }
.mff__social-instagram:hover { background: #e4405f; }
.mff__social-linkedin:hover { background: #0a66c2; }

.mff h3 {
  margin: 0 0 16px;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  position: relative;
  padding-bottom: 10px;
}

.mff h3::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 32px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--mfs-primary), var(--mfs-primary-light));
}

.mff__col ul { margin: 0; padding: 0; list-style: none; }

.mff__col li + li { margin-top: 10px; }

.mff__col a {
  color: #98a2b3 !important;
  font-size: 13.5px;
  text-decoration: none !important;
  transition: color 0.18s ease, padding-left 0.18s ease;
}

.mff__col a:hover { color: #fff !important; padding-left: 4px; }

.mff__contact a,
.mff__contact p {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 12px;
  color: #98a2b3 !important;
  font-size: 13.5px;
  line-height: 1.6;
  text-decoration: none !important;
}

.mff__contact i {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(245, 44, 148, 0.15);
  color: var(--mfs-primary-light);
  font-size: 14px;
}

.mff__contact a:hover { color: #fff !important; }

.mff__contact .mff__cta {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  margin-top: 4px;
  padding: 11px 22px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--mfs-primary), var(--mfs-primary-light));
  color: #fff !important;
  font-weight: 700;
  font-size: 13.5px;
  box-shadow: 0 8px 20px rgba(245, 44, 148, 0.3);
}

.mff__bar {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.25);
}

.mff__bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 18px;
  padding-bottom: 18px;
  flex-wrap: wrap;
}

.mff__bar p { margin: 0; font-size: 13px; color: #8b94a5; }
.mff__bar strong { color: #fff; }

.mff__bar-links { display: flex; gap: 18px; }

.mff__bar-links a {
  color: #8b94a5 !important;
  font-size: 13px;
  text-decoration: none !important;
}

.mff__bar-links a:hover { color: #fff !important; }

/* ---------- Responsive ---------- */
@media (max-width: 1199.98px) {
  .mff__grid { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; }
  .mff__col:nth-child(4) { grid-column: span 1; }
}

@media (max-width: 991.98px) {
  .mfh__top { display: none; }
  .mfh__tabs--bar { display: none; }
  .mfh__burger { display: flex; }
  .mfh__main-inner { min-height: 56px; gap: 10px; }
  .mfh__logo img { height: 34px; }
  .mfh__actions { margin-left: auto; }
  .mfh__user-name { display: none; }
  .mff__grid { grid-template-columns: 1fr 1fr; gap: 28px; padding-top: 40px; padding-bottom: 32px; }
  .mff__brand { grid-column: 1 / -1; }
}

@media (max-width: 575.98px) {
  .mfh__icon-btn { width: 40px; height: 40px; border-radius: 12px; }
  .mfh__signin {
    width: 40px;
    height: 40px;
    padding: 0;
    gap: 0;
  }
  .mfh__signin span { display: none; }
  .mff__grid { grid-template-columns: 1fr 1fr; }
  .mff__brand,
  .mff__contact { grid-column: 1 / -1; }
  .mff__bar-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 419.98px) {
  .mff__grid { grid-template-columns: 1fr; }
}

/* Keep the last row clear of the fixed mobile bottom nav (64px + safe area) */
@media (max-width: 991.98px) {
  .mff__bar-inner { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
}
