/* =====================================================================
   Store header (inc/header.php): a slim info strip, the main bar (logo, search, account, wishlist, cart) and a
   white bar with "All departments" (opens .hdr-mega), the brands and Hot deals. Phones: menu button, logo,
   wishlist and cart, and the search below; the menu button opens the side menu (.msb, inc/head.php).
   The header is fixed and slides away while scrolling down (script in inc/header.php).
   ===================================================================== */
:root {
  --hdr-navy: var(--bg-dark);
  --hdr-navy2: var(--bg-dark-soft);
  --hdr-gold: var(--accent-gold);
  --hdr-line: #e6eaee;
  --hdr-soft: #f1f4f7;
  --hdr-muted: #6b7a83;
  --header-accent: var(--hdr-gold);
}

/* The old white top bar (inc/topbar.php) is replaced by the strip inside the header. */
body .top-bar { display: none !important; }

.pc-header.hdr {
  position: sticky;
  top: 0;
  z-index: 1150;
  color: #fff;
  font-family: inherit;
}
.pc-header.hdr a { text-decoration: none; }
.pc-header.hdr button { font: inherit; }
.hdr-wrap {
  /* Same side space as the page (--page-x in css/styles.css), so the header lines up with the content. */
  padding-left: var(--page-x, 24px);
  padding-right: var(--page-x, 24px);
}

/* ---- Info strip ---- */
.hdr-top { background: var(--bg-darker, #0a1f28); color: rgba(255, 255, 255, .75); font-size: 13px; }
.hdr-top .hdr-wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 36px; }
.hdr-top-left { display: flex; align-items: center; gap: 22px; }
.pc-header.hdr .hdr-top a { display: inline-flex; align-items: center; gap: 7px; color: rgba(255, 255, 255, .78); white-space: nowrap; }
.pc-header.hdr .hdr-top a:hover { color: var(--hdr-gold); }
.hdr-top b { color: #fff; font-weight: 600; }
.pc-header.hdr .hdr-top a:hover b { color: var(--hdr-gold); }

/* ---- Main bar ---- */
.hdr-main { background: linear-gradient(180deg, var(--hdr-navy2), var(--hdr-navy)); }
.hdr-main .hdr-wrap { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 28px; height: 92px; }
.pc-header.hdr .hdr-logo { display: flex; align-items: center; gap: 10px; color: #fff; }
.hdr-logo img { height: 56px; width: auto; }
.hdr-logo span { color: #fff; font-size: 30px; font-weight: 900; line-height: 1; letter-spacing: .5px; white-space: nowrap; }
.hdr-logo span b { color: var(--hdr-gold); font-weight: 900; }

.hdr-search-wrap { min-width: 0; }
.pc-header.hdr .hdr-search {
  position: relative;
  display: flex;
  align-items: center;
  height: 52px;
  margin: 0;
  padding: 5px 5px 5px 22px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
}
.pc-header.hdr .hdr-search:focus-within { box-shadow: 0 0 0 3px rgba(242, 194, 48, .45), 0 6px 18px rgba(0, 0, 0, .18); }
.pc-header.hdr .hdr-search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  box-shadow: none;
  color: var(--hdr-navy);
  font: inherit;
  font-size: 15.5px;
}
.pc-header.hdr .hdr-search input::placeholder { color: #8a97a0; }
.pc-header.hdr .hdr-search > button[type="submit"] {
  display: grid;
  place-items: center;
  flex: none;
  width: 42px;
  height: 42px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--hdr-gold);
  color: var(--hdr-navy);
  font-size: 17px;
  cursor: pointer;
}
.pc-header.hdr .hdr-search > button[type="submit"]:hover { filter: brightness(1.05); }
.pc-header.hdr .search-box > .search-suggestions { z-index: 1160; }

.hdr-actions { display: flex; align-items: center; gap: 4px; }
.hdr-actions .cart-wrapper { position: relative; }
.pc-header.hdr .hdr-act {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: 14px;
  color: #fff;
  transition: background-color .15s;
}
.pc-header.hdr .hdr-act:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.hdr-act-ic { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: rgba(255, 255, 255, .09); color: #fff; font-size: 18px; }
.hdr-act-ic.is-gold { background: var(--hdr-gold); color: var(--hdr-navy); }
.hdr-act-text small { display: block; color: rgba(255, 255, 255, .62); font-size: 12px; line-height: 1.3; white-space: nowrap; }
.hdr-act-text strong { display: block; color: #fff; font-size: 14.5px; line-height: 1.3; white-space: nowrap; }

/* Counts (set by updateHeaderCounts() in js/script.js: is-zero, is-wide) */
.pc-header.hdr .count-badge {
  box-sizing: border-box;
  position: absolute;
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--hdr-gold);
  color: var(--hdr-navy);
  box-shadow: 0 0 0 2px var(--hdr-navy), 0 2px 6px rgba(0, 0, 0, .25);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 11.5px;
  font-weight: 800;
  line-height: 20px;
  font-variant-numeric: tabular-nums;
  text-align: center;
  pointer-events: none;
}
.pc-header.hdr .count-badge:empty,
.pc-header.hdr .count-badge.is-zero { display: none; }
.pc-header.hdr .hdr-act .count-badge { top: 2px; left: 38px; }
.pc-header.hdr .hdr-act.is-cart .count-badge { background: #fff; }

/* ---- White bar ---- */
.hdr-nav { position: relative; background: #fff; border-bottom: 1px solid var(--hdr-line); box-shadow: 0 6px 16px rgba(14, 42, 54, .06); color: var(--hdr-navy); }
.hdr-nav-row { display: flex; align-items: center; gap: 10px; height: 58px; }
.pc-header.hdr .hdr-dept {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 12px;
  background: var(--hdr-navy);
  color: #fff;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
}
.pc-header.hdr .hdr-dept:hover { background: var(--hdr-navy2); }
.hdr-dept .hdr-chev { font-size: 11px; transition: transform .2s; }
.hdr-dept[aria-expanded="true"] .hdr-chev { transform: rotate(180deg); }
.hdr-sep { width: 1px; height: 24px; margin: 0 6px; background: var(--hdr-line); }
.hdr-brands-label { color: var(--hdr-muted); font-size: 12px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.pc-header.hdr .hdr-brand {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 15px;
  border: 1px solid var(--hdr-line);
  border-radius: 999px;
  color: #33444d;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  transition: border-color .15s, background-color .15s;
}
.pc-header.hdr .hdr-brand:hover { border-color: #cfd8de; background: var(--hdr-soft); color: var(--hdr-navy); }
.pc-header.hdr .hdr-deals {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 40px;
  margin-left: auto;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--accent-tint, #fff4d1);
  color: #8a5a00;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}
.pc-header.hdr .hdr-deals:hover { background: var(--accent-tint-strong, #ffecb0); color: var(--accent-ink, #7a4f00); }

/* ---- All departments menu ---- */
.hdr-mega {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  padding: 10px var(--page-x, 24px) 0;
  margin: 0 auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .16s, transform .16s, visibility .16s;
}
.hdr-mega.is-open { opacity: 1; visibility: visible; transform: none; }
.hdr-mega-card {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--hdr-line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 28px 60px rgba(14, 42, 54, .2);
  box-shadow: 0 28px 60px color-mix(in srgb, var(--bg-dark) 20%, transparent);
  color: var(--hdr-navy);
}
.hdr-mega-quick { padding: 18px; background: #f7f9fa; border-right: 1px solid var(--hdr-line); }
.hdr-mega-title { margin: 0 0 10px; color: var(--hdr-muted); font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.pc-header.hdr .hdr-quick { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; color: var(--hdr-navy); font-size: 14.5px; font-weight: 700; line-height: 1.25; }
.pc-header.hdr .hdr-quick:hover { background: #fff; box-shadow: 0 2px 8px rgba(14, 42, 54, .08); color: var(--hdr-navy); }
.hdr-qi { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 10px; background: #fff; color: var(--hdr-navy); font-size: 15px; box-shadow: inset 0 0 0 1px var(--hdr-line); }
.hdr-quick.is-hot .hdr-qi { background: var(--accent-tint, #fff4d1); color: #b45309; box-shadow: none; }
.hdr-quick small { display: block; color: var(--hdr-muted); font-size: 12px; font-weight: 600; }
.hdr-mega-groups { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px 22px; padding: 22px 26px; }
.hdr-group h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; font-size: 15px; font-weight: 800; }
.pc-header.hdr .hdr-group h3 a { color: var(--hdr-navy); }
.pc-header.hdr .hdr-group h3 a:hover { color: var(--accent-ink, #9a6b00); }
.hdr-gi { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 10px; background: var(--hdr-navy); color: var(--hdr-gold); font-size: 14px; }
.hdr-group ul { margin: 0; padding: 0; list-style: none; }
.pc-header.hdr .hdr-group li a { display: block; padding: 6px 0 6px 44px; color: #44535b; font-size: 14px; font-weight: 600; transition: color .12s, transform .12s; }
.pc-header.hdr .hdr-group li a:hover { color: var(--hdr-navy); transform: translateX(3px); }
.pc-header.hdr .hdr-group li a.hdr-all { color: var(--accent-ink, #9a6b00); font-weight: 800; }
.hdr-mega-foot { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 26px; border-top: 1px solid var(--hdr-line); color: var(--hdr-muted); font-size: 13.5px; }
.pc-header.hdr .hdr-mega-foot a { color: var(--hdr-navy); font-weight: 800; }
.pc-header.hdr .hdr-mega-foot a:hover { color: #128c4b; }
.hdr-shade { position: fixed; inset: 0; z-index: 1140; background: rgba(14, 42, 54, .35); opacity: 0; visibility: hidden; transition: opacity .16s, visibility .16s; }
.hdr-shade.is-open { opacity: 1; visibility: visible; }

/* ---- Phone parts (hidden on computers) ---- */
.pc-header.hdr .hdr-phone-only { display: none; }
.pc-header.hdr .hdr-icon-btn {
  position: relative;
  place-items: center;
  flex: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, .09);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}
.pc-header.hdr .hdr-icon-btn.is-gold { background: var(--hdr-gold); color: var(--hdr-navy); }
.pc-header.hdr .hdr-icon-btn .count-badge { top: -6px; right: -6px; min-width: 19px; height: 19px; padding: 0 5px; font-size: 11px; line-height: 19px; }
.pc-header.hdr .hdr-icon-btn.is-gold .count-badge { background: #fff; }

/* ---- In between: shorter labels ---- */
@media (max-width: 1240px) {
  .hdr-act-text small { display: none; }
  .hdr-mega-groups { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1060px) {
  .hdr-act-text { display: none; }
  .hdr-logo span { font-size: 25px; }
  .hdr-brands-label { display: none; }
  .hdr-top-left a:nth-child(2) { display: none; }
}
@media (max-width: 900px) {
  .hdr-mega-card { grid-template-columns: 1fr; }
  .hdr-mega-quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; border-right: 0; border-bottom: 1px solid var(--hdr-line); }
  .hdr-mega-quick .hdr-mega-title { grid-column: 1 / -1; }
}

/* ---- Phones ---- */
@media (max-width: 786px) {
  .hdr-top, .hdr-nav, .hdr-actions { display: none; }
  .hdr-main .hdr-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; height: auto; padding-top: 12px; padding-bottom: 12px; }
  .pc-header.hdr .hdr-phone-only { display: grid; }
  .pc-header.hdr .hdr-logo { flex: 1; min-width: 0; gap: 7px; }
  .hdr-logo img { height: 36px; }
  .hdr-logo span { font-size: 19px; }
  .hdr-search-wrap { order: 5; flex: 0 0 100%; }
  .pc-header.hdr .hdr-search { height: 46px; padding: 4px 4px 4px 16px; }
  .pc-header.hdr .hdr-search > button[type="submit"] { width: 38px; height: 38px; font-size: 15px; }
  .pc-header.hdr .hdr-search input { font-size: 16px; }
  .hdr-shade { display: none; }
}
@media (max-width: 360px) {
  .hdr-logo span { font-size: 16px; }
  .pc-header.hdr .hdr-icon-btn { width: 38px; height: 38px; }
}

/* Staff and admins see the store without the cart and wishlist (js/script.js stripAdminCommerceUi). */
body.team-viewer .pc-header.hdr .hdr-act[href*="wishlist"],
body.team-viewer .pc-header.hdr .cart-wrapper { display: none; }

/* =====================================================================
   Phone side menu (drawer) - markup in inc/head.php (.msb)
   ===================================================================== */
body .mobile-sidebar-panel.msb {
  left: 0;
  width: min(86vw, 340px);
  padding: 0;
  background: #f4f6f8;
  box-shadow: 18px 0 40px rgba(8, 20, 26, 0.28);
  transform: translateX(-105%);
  transition: transform 0.28s cubic-bezier(0.22, 0.8, 0.3, 1);
  overscroll-behavior: contain;
}

body .mobile-sidebar-panel.msb.open {
  transform: none;
}

body .mobile-sidebar-backdrop {
  background: rgba(8, 20, 26, 0.55);
  backdrop-filter: blur(2px);
}

/* The old gold hover/active colours do not apply to the new drawer */
body .mobile-sidebar-panel.msb a:hover,
body .mobile-sidebar-panel.msb a:focus,
body .mobile-sidebar-panel.msb a:active,
body .mobile-sidebar-panel.msb summary:hover,
body .mobile-sidebar-panel.msb summary:focus,
body .mobile-sidebar-panel.msb summary:active {
  color: inherit !important;
  -webkit-text-fill-color: currentColor !important;
  background-color: transparent !important;
}

body .mobile-sidebar-panel.msb a {
  display: flex;
  padding: 0;
  border: 0;
  text-decoration: none;
  color: var(--bg-dark);
}

/* Header */
.msb .msb-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 14px 16px 16px;
  border: 0;
  background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-dark-soft) 100%);
}

body .mobile-sidebar-panel.msb .msb-brand {
  align-items: center;
  gap: 8px;
  color: #fff;
}

.msb .msb-brand img {
  width: auto;
  height: 34px;
}

.msb .msb-brand span {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #fff;
  white-space: nowrap;
}

.msb .msb-brand b {
  color: var(--accent-gold);
}

body .mobile-sidebar-panel.msb .msb-close {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 17px;
}

/* Body */
.msb .msb-body {
  padding: 16px 14px 8px;
}

.msb .msb-quick {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

body .mobile-sidebar-panel.msb .msb-tile {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 84px;
  padding: 10px 6px;
  border: 1px solid #e6eaee;
  border-radius: 16px;
  background: #fff;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.msb .msb-tile i {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  font-size: 16px;
}

.msb .msb-tile.is-hot i { background: #fde2e2; color: #dc2626; }
.msb .msb-tile.is-new i { background: var(--accent-tint, #fff4cc); color: var(--accent-ink, #b7791f); }
.msb .msb-tile.is-pc i { background: #e0ecff; color: #1d4ed8; }

.msb .msb-label {
  margin: 20px 4px 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b7a83;
}

.msb .msb-list {
  overflow: hidden;
  border: 1px solid #e6eaee;
  border-radius: 18px;
  background: #fff;
}

body .mobile-sidebar-panel.msb .msb-item {
  border: 0;
  border-bottom: 1px solid #eef1f4;
}

body .mobile-sidebar-panel.msb .msb-item:last-child {
  border-bottom: 0;
}

body .mobile-sidebar-panel.msb .msb-item > summary,
body .mobile-sidebar-panel.msb .msb-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 8px 52px 8px 12px;
  font-size: 15px;
  font-weight: 600;
  color: var(--bg-dark);
  list-style: none;
  cursor: pointer;
}

.msb .msb-item > summary::-webkit-details-marker {
  display: none;
}

.msb .msb-ico {
  display: grid;
  flex: none;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: #f1f4f7;
  color: var(--bg-dark-soft);
  font-size: 15px;
}

.msb .msb-text {
  min-width: 0;
}

/* Chevron: a round button on groups (tapping it expands), a plain arrow on links */
body .mobile-sidebar-panel.msb .msb-item > summary::after,
body .mobile-sidebar-panel.msb .msb-link::after {
  content: "\f078";
  position: absolute;
  top: 50%;
  right: 12px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #f1f4f7;
  color: #6b7a83;
  font-family: "Font Awesome 6 Free";
  font-size: 11px;
  font-weight: 900;
  transform: translateY(-50%);
  transition: transform 0.2s ease, background-color 0.2s ease;
}

body .mobile-sidebar-panel.msb .msb-link::after {
  content: "\f054";
  background: transparent;
}

body .mobile-sidebar-panel.msb .msb-item[open] > summary::after {
  background: var(--accent-gold);
  color: var(--bg-dark);
  transform: translateY(-50%) rotate(180deg);
}

body .mobile-sidebar-panel.msb .msb-item[open] > summary .msb-ico {
  background: var(--bg-dark);
  color: var(--accent-gold);
}

.msb .msb-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 2px 12px 14px 60px;
}

body .mobile-sidebar-panel.msb .msb-sub a {
  padding: 7px 12px;
  border: 1px solid #e6eaee;
  border-radius: 999px;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: #34454e;
}

body .mobile-sidebar-panel.msb .msb-sub a:active,
body .mobile-sidebar-panel.msb .msb-tile:active,
body .mobile-sidebar-panel.msb .msb-brands a:active {
  border-color: var(--accent-gold);
  background-color: var(--accent-tint, #fff8de) !important;
}

.msb .msb-brands {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

body .mobile-sidebar-panel.msb .msb-brands a {
  justify-content: center;
  padding: 12px 6px;
  border: 1px solid #e6eaee;
  border-radius: 14px;
  background: #fff;
  font-size: 14px;
  font-weight: 800;
}

/* Footer */
.msb .msb-foot {
  position: sticky;
  bottom: 0;
  margin-top: 12px;
  padding: 12px 14px 16px;
  border-top: 1px solid #e6eaee;
  background: #fff;
}

.msb .msb-foot-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

/* Phone menu: "Track your order" across the full width, above My account and Store location */
body .mobile-sidebar-panel.msb .msb-foot-links a.is-wide { grid-column: 1 / -1; }

body .mobile-sidebar-panel.msb .msb-foot-links a {
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border-radius: 12px;
  background: #f1f4f7;
  font-size: 13px;
  font-weight: 700;
}

body .mobile-sidebar-panel.msb .msb-whatsapp {
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  border-radius: 14px;
  background: #25D366;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
}

body .mobile-sidebar-panel.msb .msb-whatsapp:hover,
body .mobile-sidebar-panel.msb .msb-whatsapp:active {
  color: #fff !important;
  background-color: #1ebe5b !important;
}

.msb .msb-whatsapp i {
  font-size: 20px;
}

@media (max-width: 992px) {
  body .mobile-sidebar-panel.msb {
    display: flex;
    flex-direction: column;
  }

  .msb .msb-body {
    flex: 1 0 auto;
  }
}

html.msb-lock,
html.msb-lock body {
  overflow: hidden;
}

/* Team members order nothing on their own account: no orders link (header strip, phone menu, footer). */
body.team-viewer [data-orders-link],
body.team-viewer li:has(> [data-orders-link]) { display: none !important; }
