/* ============================================================
   Floating Premium Header
   Sticky pill header, editable via the Primary Menu + Customizer.
   ============================================================ */

:root {
  --fh-yellow: #F9900F;
  --fh-yellow-hover: #D97A0B;
  --fh-black: #000;
  --fh-gray-bg: #F4F4F4;
  --fh-ink: #111;
  --fh-radius: 24px;
}

/* ---------- Header shell ---------- */
.fh-header {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  width: calc(100% - 16px);
  max-width: 1440px;
  background: #fff;
  border: none;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .08);
  z-index: 1000;
  transition: none;
}
/* Pinned + solid once the user scrolls past the hero */
.fh-header.is-collapsed {
  position: fixed;
  top: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
}
.fh-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
}
.fh-header.is-collapsed .fh-bar { padding: 9px 24px; }

/* ---------- Brand / logo ---------- */
.fh-brand,
.custom-logo-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.fh-brand .custom-logo,
.custom-logo { height: 42px; width: auto; }
.fh-logo-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 42px;
  background: var(--fh-yellow);
  border-radius: 9999px;
  color: #000;
}
.fh-logo-text {
  font-weight: 900;
  font-size: 16px;
  letter-spacing: -.02em;
}
.fh-brand:hover .fh-logo-pill { transform: scale(1.04); transition: transform .2s ease; }

/* ---------- Desktop nav ---------- */
.fh-nav {
  display: none;
  align-items: center;
  gap: 2px;
  flex: 1;
  justify-content: center;
}
@media (min-width: 1024px) {
  .fh-nav { display: flex; }
}
.fh-nav-item { position: relative; }
.fh-nav-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  font-size: 14px;
  color: #000;
  border-radius: 9999px;
  text-decoration: none;
  transition: background .2s ease;
}
.fh-nav-pill:hover { background: var(--fh-gray-bg); }
.fh-chev {
  font-size: 10px;
  color: #999;
  transition: transform .2s ease;
}
.fh-nav-item.group:hover .fh-chev { transform: rotate(180deg); color: #000; }

/* ---------- Mega menu (hover) ---------- */
.fh-mega {
  position: absolute;
  left: 0;
  top: 100%;
  margin-top: 10px;
  width: 600px;
  max-width: calc(100vw - 48px);
  background: #fff;
  border: 1px solid #f0f0f0;
  border-radius: var(--fh-radius);
  box-shadow: 0 24px 48px rgba(0, 0, 0, .14);
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s;
  z-index: 1001;
}
.fh-nav-item.group:hover .fh-mega {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.fh-mega-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 24px;
}
.fh-mega-col { min-width: 0; }
.fh-mega-head {
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #000;
}
.fh-mega-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.fh-mega-link {
  font-size: 14px;
  color: #555;
  text-decoration: none;
  transition: color .2s ease;
}
.fh-mega-link:hover { color: var(--fh-yellow-hover); }

/* ---------- Promo card ---------- */
.fh-promo {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(249, 144, 15, .12);
  border: 1px solid rgba(249, 144, 15, .4);
  border-radius: 16px;
  padding: 16px;
}
.fh-promo-badge {
  align-self: flex-start;
  background: var(--fh-yellow);
  color: #000;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 3px 10px;
  border-radius: 9999px;
}
.fh-promo h5 { margin: 4px 0 0; font-size: 15px; font-weight: 800; color: #000; }
.fh-promo p { margin: 0; font-size: 13px; color: #666; line-height: 1.4; }
.fh-promo-link {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #000;
  text-decoration: none;
}
.fh-promo-link:hover { text-decoration: underline; }

/* ---------- Action buttons ---------- */
.fh-actions {
  display: flex;
  align-items: center;
  gap: 2px;
}
@media (min-width: 768px) { .fh-actions { gap: 6px; } }
.fh-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: none;
  background: transparent;
  border-radius: 9999px;
  color: #000;
  font-size: 16px;
  cursor: pointer;
  text-decoration: none;
  position: relative;
  transition: background .2s ease;
}
.fh-icon-btn:hover { background: var(--fh-gray-bg); }
.fh-cart-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: var(--fh-yellow);
  color: #000;
  font-size: 9px;
  font-weight: 800;
  border: 2px solid #fff;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fh-recharge {
  display: none;
  align-items: center;
  margin-left: 4px;
  padding: 11px 20px;
  background: #000;
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  border-radius: 9999px;
  text-decoration: none;
  transition: background .2s ease, color .2s ease;
}
@media (min-width: 768px) { .fh-recharge { display: inline-flex; } }
.fh-recharge:hover { background: var(--fh-yellow); color: #000; }
.fh-hamburger { display: inline-flex; }
@media (min-width: 1024px) { .fh-hamburger { display: none; } }

/* ---------- Search overlay ---------- */
.fh-search-overlay {
  max-height: 0;
  overflow: hidden;
  border-top: 1px solid transparent;
  background: #fff;
  transition: max-height .3s ease, border-color .3s ease;
}
.fh-search-overlay.is-open {
  max-height: 140px;
  border-top: 1px solid #f0f0f0;
}
.fh-search-box {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 24px;
}
.fh-search-icon { color: #999; }
.fh-search-box input {
  flex: 1;
  border: none;
  outline: none;
  padding: 8px 0;
  font-family: inherit;
  font-size: 16px;
  color: var(--fh-ink);
}
.fh-search-btn {
  border: none;
  background: var(--fh-yellow);
  color: #000;
  font-weight: 700;
  font-family: inherit;
  padding: 10px 22px;
  border-radius: 9999px;
  cursor: pointer;
}
.fh-search-btn:hover { background: var(--fh-yellow-hover); }

/* ---------- Mobile drawer ---------- */
.fh-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .45);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease;
  z-index: 1100;
}
.fh-drawer-overlay.is-open { opacity: 1; visibility: visible; }
.fh-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: 82%;
  max-width: 360px;
  background: #fff;
  z-index: 1101;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  box-shadow: -10px 0 40px rgba(0, 0, 0, .2);
  transform: translateX(100%);
  transition: transform .3s ease;
}
.fh-drawer.is-open { transform: translateX(0); }
.fh-drawer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #f0f0f0;
}
.fh-drawer-nav { flex: 1; padding: 8px 0; }
.fh-acc { border-bottom: 1px solid #f0f0f0; }
.fh-acc-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  color: #000;
  text-align: left;
}
.fh-acc-icon { font-size: 12px; color: #999; transition: transform .25s ease; }
.fh-acc-btn.is-open .fh-acc-icon { transform: rotate(45deg); color: #000; }
.fh-acc-panel { display: none; flex-direction: column; padding: 0 20px 12px; }
.fh-acc-panel.is-open { display: flex; }
.fh-acc-link {
  padding: 10px 0;
  font-size: 14px;
  color: #555;
  text-decoration: none;
  border-bottom: 1px solid #f7f7f7;
}
.fh-acc-link:hover { color: var(--fh-yellow-hover); }
.fh-recharge-full {
  display: inline-flex;
  justify-content: center;
  margin: 16px 20px;
}

/* ---------- Layout helpers ---------- */
body.menu-open { overflow: hidden; }
