/* ==========================================================================
   MZF Store — Header & Navigation (Phase 2)
   ========================================================================== */

/* ---------- Promo top bar with phone ---------- */
.mzf-promo {
  background: var(--brand);
  color: #fff;
  font-size: var(--fs-sm);
  font-weight: 600;
}
.mzf-promo__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 0;
}
.mzf-promo__message {
  flex: 1 1 auto;
}
.mzf-promo__right {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-shrink: 0;
}
.mzf-promo__hours,
.mzf-promo__phone {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .15);
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  transition: background .18s ease;
}
.mzf-promo__phone:hover {
  background: rgba(255, 255, 255, .25);
}
.mzf-promo__hours svg,
.mzf-promo__phone svg {
  flex-shrink: 0;
}

/* ---------- Main header ---------- */
.mzf-header { position: sticky; top: 0; z-index: 100; }
.mzf-header__main { background: var(--header-bg); color: var(--header-fg); }
.mzf-header__row {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 36px);
  padding: 14px 0;
}

/* Logo */
.mzf-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  color: #fff;
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: .3px;
}
.mzf-logo:hover { color: #fff; }
.mzf-logo__mark {
  display: inline-grid;
  place-items: center;
  width: 40px; height: 40px;
  background: var(--brand);
  border-radius: 10px;
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  box-shadow: var(--shadow-brand);
}
.mzf-logo img { max-height: 44px; width: auto; }

/* Real site logo in the header */
.mzf-logo--img { gap: 0; }
.mzf-logo__img {
  height: 46px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  display: block;
}
@media (max-width: 600px) {
  .mzf-logo__img { height: 36px; max-width: 150px; }
}

/* Search - takes all available space in the middle */
.mzf-search { 
  flex: 1 1 auto;
  max-width: 720px;
  margin: 0 auto;
}
.mzf-search__form {
  display: flex;
  background: #fff;
  border-radius: var(--r-pill);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.mzf-search__field {
  flex: 1;
  border: 0;
  padding: 13px 20px;
  font-family: inherit;
  font-size: var(--fs-body);
  color: var(--ink);
  background: transparent;
  outline: none;
}
.mzf-search__field::placeholder { color: var(--ink-muted); }
.mzf-search__btn {
  border: 0;
  background: var(--brand);
  color: #fff;
  padding: 0 22px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background .15s ease;
}
.mzf-search__btn:hover { background: var(--brand-600); }
.mzf-search__btn svg { width: 20px; height: 20px; }

/* Header actions (account + cart only, phone moved to promo bar) */
.mzf-header__actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-shrink: 0;
}

.mzf-iconlink {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--header-fg);
  font-size: var(--fs-sm);
}
.mzf-iconlink:hover { color: #fff; }
.mzf-iconlink svg { width: 26px; height: 26px; }
.mzf-iconlink__label { display: flex; flex-direction: column; line-height: 1.25; }
.mzf-iconlink__label b { font-size: .95rem; }
.mzf-iconlink__label small { color: #c8ced4; }

/* Cart bubble */
.mzf-cart { position: relative; }
.mzf-cart__count {
  position: absolute;
  top: -6px; inset-inline-start: -6px;
  min-width: 18px; height: 18px;
  padding: 0 5px;
  background: var(--brand);
  color: #fff;
  border-radius: var(--r-pill);
  font-size: .7rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.mzf-cart__count[data-empty="1"] { display: none; }

/* ---------- Category nav bar ---------- */
.mzf-nav { background: var(--header-bg-2); }
.mzf-nav__list {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  align-items: stretch;
  gap: 2px;
  flex-wrap: nowrap;
  overflow: hidden;
}
.mzf-nav__list > li { flex: 0 0 auto; }
.mzf-nav__list > li > a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 14px;
  color: var(--header-fg);
  font-size: var(--fs-sm);
  font-weight: 600;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: background .15s ease, border-color .15s ease;
}
.mzf-nav__list > li > a:hover {
  background: rgba(255,255,255,.06);
  color: #fff;
  border-bottom-color: var(--brand);
}
.mzf-nav__all > a {
  background: var(--brand);
  color: #fff !important;
}
.mzf-nav__all > a:hover { background: var(--brand-600); border-bottom-color: transparent; }
.mzf-nav__badge {
  font-size: .65rem;
  background: var(--accent);
  color: #fff;
  padding: 1px 7px;
  border-radius: var(--r-pill);
}

/* ---------- Mobile toggle ---------- */
.mzf-burger {
  display: none;
  background: transparent;
  border: 0;
  color: #fff;
  cursor: pointer;
  padding: 8px;
}
.mzf-burger svg { width: 28px; height: 28px; }

/* ---------- Mobile Responsive (≤768px) ---------- */
@media (max-width: 768px) {
  /* Promo bar - compact on mobile */
  .mzf-promo__message { font-size: .8rem; }
  .mzf-promo__right { display: none; }
  .mzf-promo__inner { justify-content: center; text-align: center; padding: 7px 0; }

  /* Header row - horizontal layout: logo (right), spacer, phone + cart (left) */
  .mzf-header__row {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
  }

  /* Logo - right side, smaller */
  .mzf-logo {
    order: 1;
    flex-shrink: 0;
  }
  .mzf-logo__img { height: 32px; max-width: 130px; }
  .mzf-logo span.mzf-logo__text { display: none; }

  /* Search - hidden on mobile */
  .mzf-search { display: none; }

  /* Actions - left side, only phone + cart */
  .mzf-header__actions {
    order: 2;
    gap: 12px;
    flex-shrink: 0;
  }
  .mzf-header__actions .mzf-iconlink__label { display: none; }
  .mzf-iconlink svg { width: 24px; height: 24px; }
  
  /* Hide account link on mobile (it's in bottom nav) */
  .mzf-header__actions .mzf-iconlink:not(.mzf-cart) { display: none; }

  /* Show phone icon in mobile header (not in promo bar) */
  .mzf-headphone { 
    display: inline-flex;
    padding: 7px; 
    gap: 0; 
    border: 0; 
    background: transparent; 
  }
  .mzf-headphone__text { display: none; }
  .mzf-headphone__icon { width: 30px; height: 30px; }

  /* Cart - keep visible */
  .mzf-cart svg { width: 26px; height: 26px; }

  /* Hide desktop burger since bottom-nav replaces it */
  .mzf-burger { display: none !important; }

  /* Hide old nav */
  .mzf-nav { display: none; }
}

/* Tablet adjustments (769-900px) */
@media (min-width: 769px) and (max-width: 900px) {
  .mzf-header__row { gap: 14px; }
  .mzf-search { max-width: 400px; }
  .mzf-header__actions .mzf-iconlink__label { display: none; }
  .mzf-headphone__text { display: none; }
  .mzf-headphone { padding: 6px; gap: 0; }
}

/* Very small phones (≤360px) */
@media (max-width: 360px) {
  .mzf-logo__img { height: 30px; max-width: 120px; }
  .mzf-search__field { padding: 10px 14px; font-size: .85rem; }
  .mzf-header__actions { gap: 10px; }
}
