/* ZeroPanel 2027 — Flagship 10/10 Header, Bento MegaMenu, Mini-Cart & Mobile App Bar */
.zph3-header {
  position: sticky !important; top: 0 !important; z-index: 90 !important;
  height: 66px !important; display: flex !important; align-items: center !important;
  background: rgba(9, 10, 15, 0.78) !important;
  backdrop-filter: blur(18px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(18px) saturate(160%) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07) !important;
  transition: height .2s ease, background .2s ease, box-shadow .2s ease !important;
}
.zph3-header.is-scrolled {
  height: 60px !important;
  background: rgba(9, 10, 15, 0.92) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), 0 1px 0 rgba(249, 115, 22, 0.16) !important;
}
:root:not(.dark) .zph3-header {
  background: rgba(255, 255, 255, 0.86) !important;
  border-bottom-color: rgba(15, 23, 42, 0.08) !important;
}
:root:not(.dark) .zph3-header.is-scrolled {
  background: rgba(255, 255, 255, 0.96) !important;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08) !important;
}

.zph3-in {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: nowrap; min-width: 0;
}

/* Brand */
.zph3-brand {
  display: inline-flex; align-items: center; gap: 9px; text-decoration: none;
  flex-shrink: 0; white-space: nowrap;
}
.zph3-logo-box {
  width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(145deg, rgba(249,115,22,.16), rgba(249,115,22,.04));
  border: 1px solid rgba(249, 115, 22, 0.28);
}
.zph3-logo-box img { width: 23px; height: 23px; object-fit: contain; display: block; }
.zph3-brand-name {
  font-family: var(--font-display, IRANYekanX, sans-serif);
  font-size: 1.06rem; font-weight: 900; color: var(--fg); letter-spacing: -0.02em;
}

/* Center Floating Nav Pill (Strict Single-Line, Zero Wrapping) */
.zph3-nav { display: flex; align-items: center; justify-content: center; flex: 0 1 auto; }
.zph3-nav-pill {
  display: inline-flex; align-items: center; gap: 3px; padding: 4px;
  border-radius: 14px; background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.075);
}
:root:not(.dark) .zph3-nav-pill {
  background: rgba(15, 23, 42, 0.04); border-color: rgba(15, 23, 42, 0.08);
}
.zph3-link {
  display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 13px;
  border-radius: 10px; border: 0; background: transparent; color: var(--fg-2);
  font-family: inherit; font-size: 0.82rem; font-weight: 600; text-decoration: none;
  white-space: nowrap !important; flex-shrink: 0; cursor: pointer;
  transition: color .15s, background .15s;
}
.zph3-link:hover { color: var(--fg); background: rgba(255, 255, 255, 0.06); }
:root:not(.dark) .zph3-link:hover { background: rgba(15, 23, 42, 0.06); }
.zph3-link.is-active {
  color: #fb923c !important; background: rgba(249, 115, 22, 0.13) !important;
}
:root:not(.dark) .zph3-link.is-active {
  color: #ea580c !important; background: rgba(249, 115, 22, 0.12) !important;
}
.zph3-chev { opacity: .68; transition: transform .18s; flex-shrink: 0; }
.zph3-drop-wrap { position: relative; }
.zph3-drop-wrap.is-open .zph3-chev,
#zp-mega-item:hover .zph3-chev,
#zp-mega-item.is-open .zph3-chev { transform: rotate(180deg); }

/* Bento 2-Col Sticker MegaMenu */
.zph3-mega {
  width: min(790px, 92vw) !important; padding: 16px !important;
  border-radius: 18px !important; border: 1px solid rgba(255, 255, 255, 0.1) !important;
  background: rgba(13, 16, 25, 0.97) !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55) !important;
  backdrop-filter: blur(22px) !important;
}
:root:not(.dark) .zph3-mega {
  background: rgba(255, 255, 255, 0.98) !important;
  border-color: rgba(15, 23, 42, 0.1) !important;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.14) !important;
}
.zph3-mega-cols { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 16px; align-items: start; }
.zph3-col-lbl { font-size: 0.72rem; font-weight: 700; color: var(--fg-3); margin-bottom: 10px; padding: 0 4px; }
.zph3-eco-grid { display: flex; flex-direction: column; gap: 5px; }
.zph3-eco-card {
  display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 12px;
  border: 1px solid transparent; text-decoration: none; transition: .15s;
}
.zph3-eco-card:hover { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.08); }
:root:not(.dark) .zph3-eco-card:hover { background: rgba(15, 23, 42, 0.04); border-color: rgba(15, 23, 42, 0.07); }
.zph3-eco-card.is-hi { background: rgba(249, 115, 22, 0.1); border-color: rgba(249, 115, 22, 0.3); }
.zph3-eco-ic {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0; display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.05); color: var(--fg); border: 1px solid var(--border);
}
.zph3-eco-card.is-hi .zph3-eco-ic { color: #fb923c; border-color: rgba(249, 115, 22, 0.35); background: rgba(249, 115, 22, 0.12); }
.zph3-eco-txt { min-width: 0; display: flex; flex-direction: column; }
.zph3-eco-txt strong { font-size: 0.81rem; font-weight: 700; color: var(--fg); line-height: 1.35; }
.zph3-eco-txt small { font-size: 0.7rem; color: var(--fg-3); margin-top: 1px; }

.zph3-mega-l { padding-right: 16px; border-right: 1px solid var(--border); }
.zph3-stk-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.zph3-stk-tile {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px;
  border-radius: 11px; border: 1px solid transparent; background: rgba(255, 255, 255, 0.025);
  text-decoration: none; color: var(--fg-2); font-size: 0.68rem; font-weight: 600; transition: .15s;
}
:root:not(.dark) .zph3-stk-tile { background: rgba(15, 23, 42, 0.03); }
.zph3-stk-tile img { width: 30px; height: 30px; object-fit: contain; transition: transform .18s; }
.zph3-stk-tile:hover { border-color: rgba(249, 115, 22, 0.5); background: rgba(249, 115, 22, 0.1); color: var(--fg); transform: translateY(-2px); }
.zph3-stk-tile:hover img { transform: scale(1.12) rotate(-4deg); }

.zph3-mega-foot {
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 0.78rem;
}
.zph3-mf-acts { display: flex; align-items: center; gap: 14px; }
.zph3-mf-sub { color: var(--fg-2); text-decoration: none; font-weight: 600; }
.zph3-mf-sub:hover { color: var(--fg); }
.zph3-mf-cta { color: #fb923c; text-decoration: none; font-weight: 700; }

/* Compact Support Dropdown */
.zph3-subdrop {
  position: absolute; top: calc(100% + 10px); left: 0; width: 250px; padding: 7px;
  border-radius: 14px; background: rgba(13, 16, 25, 0.97); border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 46px rgba(0, 0, 0, 0.5); backdrop-filter: blur(18px);
  display: none; flex-direction: column; gap: 3px; z-index: 95;
}
:root:not(.dark) .zph3-subdrop {
  background: rgba(255, 255, 255, 0.98); border-color: rgba(15, 23, 42, 0.1);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
}
.zph3-drop-wrap.is-open .zph3-subdrop { display: flex; }
.zph3-subdrop a {
  display: flex; flex-direction: column; padding: 8px 10px; border-radius: 10px;
  text-decoration: none; transition: background .14s;
}
.zph3-subdrop a:hover { background: rgba(249, 115, 22, 0.1); }
.zph3-subdrop strong { font-size: 0.8rem; font-weight: 700; color: var(--fg); }
.zph3-subdrop small { font-size: 0.69rem; color: var(--fg-3); margin-top: 2px; }

/* Left Toolbox (Compact 38x38 Controls) */
.zph3-tools { display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0; flex-wrap: nowrap; }
.zph3-search-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 11px;
  border-radius: 11px; border: 1px solid var(--border); background: rgba(255, 255, 255, 0.035);
  color: var(--fg-2); font-family: inherit; font-size: 0.78rem; cursor: pointer;
  white-space: nowrap; transition: border-color .15s, color .15s;
}
:root:not(.dark) .zph3-search-btn { background: rgba(15, 23, 42, 0.035); }
.zph3-search-btn:hover { border-color: rgba(249, 115, 22, 0.45); color: var(--fg); }
.zph3-kbd {
  font-family: var(--font-mono, monospace); font-size: 0.67rem; padding: 2px 6px;
  border-radius: 6px; background: rgba(255, 255, 255, 0.07); color: var(--fg-3);
  border: 1px solid var(--border);
}
:root:not(.dark) .zph3-kbd { background: rgba(15, 23, 42, 0.06); }

.zph3-ic-btn {
  position: relative; width: 38px; height: 38px; border-radius: 11px;
  border: 1px solid var(--border); background: rgba(255, 255, 255, 0.035);
  color: var(--fg); display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0; transition: border-color .15s, background .15s, transform .15s;
}
:root:not(.dark) .zph3-ic-btn { background: rgba(15, 23, 42, 0.035); }
.zph3-ic-btn:hover { border-color: rgba(249, 115, 22, 0.5); background: rgba(249, 115, 22, 0.1); }
.zph3-cart-badge {
  position: absolute; top: -5px; left: -5px; min-width: 19px; height: 19px; padding: 0 5px;
  border-radius: 99px; background: linear-gradient(135deg, #f97316, #ea580c); color: #fff;
  font-size: 0.68rem; font-weight: 800; display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 10px rgba(249, 115, 22, 0.45); transition: transform .2s;
}
.zph3-cart-badge.is-bump { transform: scale(1.28); }

.zph3-auth-btn {
  display: inline-flex; align-items: center; justify-content: center; height: 38px; padding: 0 15px;
  border-radius: 11px; background: #ffffff; color: #090a0f; text-decoration: none;
  font-size: 0.8rem; font-weight: 800; white-space: nowrap; flex-shrink: 0;
  transition: transform .15s, box-shadow .15s, background .15s;
}
.zph3-auth-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(255, 255, 255, 0.16); }
:root:not(.dark) .zph3-auth-btn { background: #0f172a; color: #ffffff; }

.zph3-user-btn {
  display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 13px;
  border-radius: 11px; background: linear-gradient(135deg, #f97316, #ea580c); color: #fff;
  text-decoration: none; font-size: 0.79rem; font-weight: 700; white-space: nowrap; flex-shrink: 0;
}
.zph3-user-btn small { padding: 2px 7px; border-radius: 7px; background: rgba(0, 0, 0, 0.22); font-size: 0.7rem; }
.zph3-u-dot { width: 7px; height: 7px; border-radius: 50%; background: #6ee7b7; }

.zph3-burger { display: none; }

/* Slide-Over Mini-Cart Drawer */
.zph3-cart-bg {
  position: fixed; inset: 0; z-index: 120; background: rgba(2, 6, 23, 0.65);
  backdrop-filter: blur(4px); opacity: 0; pointer-events: none; transition: opacity .2s;
}
.zph3-cart-bg.is-open { opacity: 1; pointer-events: auto; }
.zph3-cart-drawer {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 125; width: min(390px, 92vw);
  background: var(--card, #0e111a); border-right: 1px solid var(--border);
  box-shadow: 20px 0 60px rgba(0, 0, 0, 0.5);
  display: flex; flex-direction: column; transform: translateX(-105%); transition: transform .24s cubic-bezier(.22,1,.36,1);
}
.zph3-cart-drawer.is-open { transform: translateX(0); }
.zph3-cd-hd {
  padding: 15px 16px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.zph3-cd-hd strong { font-size: 0.94rem; color: var(--fg); }
.zph3-cd-cnt {
  padding: 2px 8px; border-radius: 99px; font-size: 0.72rem; font-weight: 700;
  background: rgba(249, 115, 22, 0.16); color: #fb923c;
}
.zph3-cd-body { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.zph3-cd-item {
  display: flex; gap: 11px; align-items: center; padding: 10px; border-radius: 13px;
  background: var(--bg); border: 1px solid var(--border);
}
.zph3-cd-item img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.zph3-cd-info { flex: 1; min-width: 0; }
.zph3-cd-title {
  display: block; font-size: 0.78rem; font-weight: 700; color: var(--fg); text-decoration: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.zph3-cd-price { font-size: 0.77rem; color: var(--ok); margin-top: 3px; }
.zph3-cd-qty { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; }
.zph3-cd-qty button {
  width: 24px; height: 24px; border-radius: 7px; border: 1px solid var(--border);
  background: var(--card); color: var(--fg); cursor: pointer; font-weight: 700; line-height: 1;
}
.zph3-cd-rm {
  border: 0; background: transparent; color: var(--fg-3); cursor: pointer; padding: 4px; font-size: 0.75rem;
}
.zph3-cd-rm:hover { color: #ef4444; }
.zph3-cd-empty {
  margin: auto; text-align: center; padding: 28px 16px; color: var(--fg-3); font-size: 0.84rem;
}
.zph3-cd-empty strong { display: block; color: var(--fg); font-size: 0.95rem; margin-bottom: 6px; }
.zph3-cd-foot { padding: 14px 16px calc(16px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--border); background: var(--bg); }
.zph3-cd-sum { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; font-size: 0.82rem; color: var(--fg-2); }
.zph3-cd-sum strong { font-size: 1.08rem; color: var(--ok); }
.zph3-cd-acts { display: flex; flex-direction: column; gap: 8px; }
.zph3-cd-pay {
  display: flex; align-items: center; justify-content: center; height: 42px; border-radius: 11px;
  background: linear-gradient(135deg, #f97316, #ea580c); color: #fff; text-decoration: none;
  font-size: 0.84rem; font-weight: 800;
}
.zph3-cd-view {
  display: flex; align-items: center; justify-content: center; height: 36px; border-radius: 10px;
  border: 1px solid var(--border); color: var(--fg-2); text-decoration: none; font-size: 0.78rem; font-weight: 600;
}

/* Redesigned 1-Column Mobile Drawer (Zero Cutoff, Clean Scroll) */
.zph3-mdrawer {
  display: flex !important; flex-direction: column !important; padding: 0 !important;
  width: min(350px, 88vw) !important; max-height: 100dvh !important; overflow: hidden !important;
}
.zph3-md-top {
  flex-shrink: 0; padding: 13px 16px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.zph3-md-body {
  flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 14px 16px 22px; display: flex; flex-direction: column; gap: 18px;
}
.zph3-md-search {
  width: 100%; height: 42px; padding: 0 12px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--bg); color: var(--fg-3);
  display: flex; align-items: center; gap: 9px; font-family: inherit; font-size: 0.8rem; cursor: pointer;
}
.zph3-md-lbl { font-size: 0.72rem; font-weight: 700; color: var(--fg-3); margin-bottom: 8px; }
.zph3-md-stks {
  display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px;
  scrollbar-width: none; -ms-overflow-style: none;
}
.zph3-md-stks::-webkit-scrollbar { display: none; }
.zph3-md-stk {
  flex: 0 0 64px; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 7px 4px; border-radius: 12px; background: var(--bg); border: 1px solid var(--border);
  text-decoration: none; color: var(--fg-2); font-size: 0.66rem; font-weight: 600;
}
.zph3-md-stk img { width: 32px; height: 32px; object-fit: contain; }
.zph3-md-list { display: flex; flex-direction: column; gap: 7px; }
.zph3-md-row {
  display: flex; align-items: center; gap: 11px; padding: 10px 11px; border-radius: 13px;
  background: var(--bg); border: 1px solid var(--border); text-decoration: none;
}
.zph3-md-row.is-hi { background: rgba(249, 115, 22, 0.1); border-color: rgba(249, 115, 22, 0.35); }
.zph3-md-ric {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0; display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.04); color: var(--fg); border: 1px solid var(--border);
}
.zph3-md-row.is-hi .zph3-md-ric { color: #fb923c; border-color: rgba(249, 115, 22, 0.35); }
.zph3-md-rtxt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.zph3-md-rtxt strong { font-size: 0.82rem; font-weight: 700; color: var(--fg); line-height: 1.35; }
.zph3-md-rtxt small { font-size: 0.7rem; color: var(--fg-3); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zph3-md-arr { color: var(--fg-3); flex-shrink: 0; }
.zph3-md-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.zph3-md-chips a {
  padding: 7px 11px; border-radius: 9px; background: var(--bg); border: 1px solid var(--border);
  color: var(--fg-2); text-decoration: none; font-size: 0.76rem; font-weight: 600;
}
.zph3-md-foot {
  flex-shrink: 0; padding: 12px 16px calc(14px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border); background: var(--card);
}
.zph3-md-cta {
  display: flex; align-items: center; justify-content: center; height: 44px; border-radius: 12px;
  background: linear-gradient(135deg, #f97316, #ea580c); color: #fff; text-decoration: none;
  font-size: 0.86rem; font-weight: 800;
}

/* Mobile App Bottom Bar (5 Thumb-Zone Tabs) */
.zph3-mbar {
  display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 88;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
  background: rgba(9, 10, 15, 0.92); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  grid-template-columns: repeat(5, 1fr); gap: 2px;
}
:root:not(.dark) .zph3-mbar {
  background: rgba(255, 255, 255, 0.95); border-top-color: rgba(15, 23, 42, 0.09);
}
.zph3-mbar-it {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  padding: 5px 2px; border-radius: 11px; border: 0; background: transparent;
  color: var(--fg-3); text-decoration: none; font-family: inherit; font-size: 0.66rem; font-weight: 600; cursor: pointer;
}
.zph3-mbar-it.is-active { color: #fb923c; }
.zph3-mbar-shop { color: #fb923c; }
.zph3-mbar-icw { position: relative; display: inline-flex; }
.zph3-mbar-bdg {
  position: absolute; top: -5px; left: -9px; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 99px; background: #f97316; color: #fff; font-size: 0.62rem; font-weight: 800;
  font-style: normal; display: inline-flex; align-items: center; justify-content: center;
}

/* Responsive Breakpoints */
@media (max-width: 1140px) {
  .zph3-search-lbl, .zph3-kbd { display: none; }
  .zph3-search-btn { width: 38px; padding: 0; justify-content: center; }
  .zph3-link { padding: 0 10px; font-size: 0.8rem; }
}
@media (max-width: 960px) {
  .zph3-header { height: 56px !important; }
  .zph3-nav, .zph3-theme-btn, .zph3-auth-btn, .zph3-user-btn { display: none !important; }
  .zph3-burger { display: inline-flex !important; }
  .zph3-mbar { display: grid; }
  body { padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px)) !important; }
}