/**
 * Header & Footer - 1688 Style
 * CSS variables (injected from settings via assets.php):
 *   --pph-header-bg    (#1A2B3C)  dark background
 *   --pph-header-text  (#ffffff)  text/icons
 *   --pph-header-accent (#F67D00)  active/accent
 *   --pph-header-h    (64px)      top bar height
 * Prefix: pph-header, pph-siderail, pph-mobilenav, pph-header-panel, pph-footer--standalone
 */
.pph-header-wrapper,
.pph-header-wrapper *,
.pph-header-wrapper *::before,
.pph-header-wrapper *::after,
.pph-footer--standalone,
.pph-footer--standalone * { box-sizing: border-box; }

/* Force all header SVG icons to inherit color from their parent
   container (NOT from the theme's default <a> link color #c36 */
.pph-header-wrapper svg,
.pph-header-wrapper .pph-topbar__search-btn svg,
.pph-header-wrapper .pph-topbar__action svg,
.pph-header-wrapper .pph-mobilenav__item svg,
.pph-header-wrapper .pph-siderail__item svg,
.pph-header-wrapper .pph-topbar__util svg,
.pph-header-wrapper .pph-header-panel__search button svg,
.pph-header-wrapper .pph-header-panel__close svg,
.pph-header-wrapper .pph-topbar__menu-toggle svg { color: inherit; }
.pph-header-wrapper svg path,
.pph-header-wrapper svg circle,
.pph-header-wrapper svg line,
.pph-header-wrapper svg rect,
.pph-header-wrapper svg polygon,
.pph-header-wrapper svg polyline { stroke: currentColor; }

.pph-header-wrapper {
  position: relative;
  z-index: 1000;
  font-family: var(--pp-font);
  color: var(--pph-header-text, #fff);
  --hh: var(--pph-header-h, 64px);
}
.pph-header-wrapper[data-sticky="1"] .pph-topbar,
.pph-header-wrapper[data-sticky="1"] .pph-topbar--cittymall {
  position: sticky;
  top: 0;
  z-index: 1001;
}

/* Admin Bar offset: when logged in, account for the 32px WordPress admin bar.
   Non-logged-in users get top:0 (no gap). */
body.admin-bar .pph-header-wrapper[data-sticky="1"] .pph-topbar,
body.admin-bar .pph-header-wrapper[data-sticky="1"] .pph-topbar--cittymall,
body.admin-bar.pph-header--fullwidth .pph-topbar,
body.admin-bar .pph-header--fullwidth .pph-topbar--cittymall { top: 32px; }
@media (max-width: 782px) {
  body.admin-bar .pph-header-wrapper[data-sticky="1"] .pph-topbar,
  body.admin-bar .pph-header-wrapper[data-sticky="1"] .pph-topbar--cittymall,
  body.admin-bar.pph-header--fullwidth .pph-topbar,
  body.admin-bar .pph-header--fullwidth .pph-topbar--cittymall { top: 46px; }
}

/* Full-width header: stretch the bar content to the full viewport width. */
.pph-header--fullwidth .pph-topbar__inner,
.pph-header--fullwidth .pph-topbar__cittymall-inner {
  max-width: 100%;
}

/* Full-height side rail: always span the whole viewport height (100vh). */
.pph-siderail {
    position: fixed;
    inset-block: 0;
    inset-inline-start: 0;
    width: 70px;
    height: 100vh;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    background: var(--pp-bg-white, #fff);
    border: 1px solid var(--pp-border-light, rgba(0, 0, 0, 0.04));
    border-radius: 0 12px 12px 0;
    padding: 10px 6px;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.06);
}

/* Body padding: 130px on the siderail side, 40px on the opposite side.
   Only on desktop where the siderail is visible.
   RTL: siderail on left → padding-left = 130px, padding-right = 40px */
@media (min-width: 1025px) {
  body.pph-header-active { padding-inline-start: 130px; padding-inline-end: 40px; }
  body.pph-header-active[dir="rtl"] { padding-inline-start: 40px; padding-inline-end: 130px; }
  body.pph-header-active.pph-header-active--cittymall { padding-inline-start: 130px; padding-inline-end: 40px; }
  body.pph-header-active.pph-header-active--cittymall[dir="rtl"] { padding-inline-start: 40px; padding-inline-end: 130px; }
}

/* ======================
   TOP BAR
   ====================== */
.pph-topbar {
  background: var(--pph-header-bg, #1A2B3C);
  color: var(--pph-header-text, #fff);
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.pph-topbar__inner {
  max-width: var(--pp-container, 1370px);
  margin: 0 auto;
  padding: 0 20px;
  height: var(--hh);
  display: flex !important;
  align-items: center;
  gap: 16px;
}

/* Suppress wpautop line breaks inside the regular top bar too */
.pph-topbar__inner br { display: none !important; }

/* Logo */
.pph-topbar__logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
  color: var(--pph-header-text, #fff);
  margin-inline-end: 24px;
}
.pph-topbar__logo img { max-height: 40px; width: auto; display: block; }
.pph-topbar__logo-text {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--pph-header-accent, #F67D00);
}

/* Search */
.pph-topbar__search {
  flex: 1;
  max-width: 560px;
  display: flex;
  align-items: center;
  border: 2px solid var(--pph-header-accent, #F67D00);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.pph-topbar__search-input {
  flex: 1;
  border: none;
  outline: none;
  height: 40px;
  padding: 0 14px;
  font-size: 14px;
  color: #333;
  background: transparent;
  font-family: var(--pp-font);
  min-width: 0;
}
.pph-topbar__search-btn {
  width: 54px;
  height: 40px;
  min-width: 44px;
  border: none;
  background: var(--pph-header-accent, #F67D00);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s;
}
.pph-topbar__search-btn:hover { background: #e6680d; }

/* Search slot wrapper (holds builtin form or custom shortcode output) */
.pph-topbar__search-slot {
  flex: 1;
  max-width: 560px;
  min-width: 0;
}
.pph-topbar__search-slot .pph-topbar__search { margin: 0; }
.pph-topbar__search--custom {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  height: 40px;
}
.pph-topbar__search--custom > * { width: 100%; margin: 0; }

/* ============================================================
   Third-party search plugin compatibility
   Normalises DGWT WCAS / Ivory Search / Ajax Search for WordPress (AWS)
   so their injected forms match the built-in search layout (40px bar,
   rounded, full width, button + input inline).
   ============================================================ */
/* 1) Make the injected form take full slot dimensions */
.pph-topbar__search--custom form,
.pph-topbar__search--custom .dgwt-wcas-search-form,
.pph-topbar__search--custom .aws-search-form,
.pph-topbar__search--custom .ivory-search,
.pph-header-panel__search--custom form,
.pph-header-panel__search--custom .dgwt-wcas-search-form,
.pph-header-panel__search--custom .aws-search-form,
.pph-header-panel__search--custom .ivory-search {
  display: flex !important;
  align-items: center;
  width: 100%;
  margin: 0;
  position: relative;
  height: 40px;
}

/* 2) Wrapper elements from the plugins should fill the form */
.pph-topbar__search--custom .dgwt-wcas-search-wrapp,
.pph-topbar__search--custom .dgwt-wcas-search-bar,
.pph-topbar__search--custom .aws-wrapper,
.pph-topbar__search--custom .ivory-search-wrapper,
.pph-header-panel__search--custom .dgwt-wcas-search-wrapp,
.pph-header-panel__search--custom .dgwt-wcas-search-bar,
.pph-header-panel__search--custom .aws-wrapper,
.pph-header-panel__search--custom .ivory-search-wrapper {
  width: 100%;
  display: flex;
  position: relative;
  flex: 1;
  height: 40px;
}

/* 3) The text input — uniform height, border, radius (RTL aware) */
.pph-topbar__search--custom .dgwt-wcas-search-input,
.pph-topbar__search--custom .aws-search-field,
.pph-topbar__search--custom .ivory-search-input,
.pph-header-panel__search--custom .dgwt-wcas-search-input,
.pph-header-panel__search--custom .aws-search-field,
.pph-header-panel__search--custom .ivory-search-input {
  width: 100%;
  height: 40px;
  border: 1px solid var(--pph-header-accent, #F67D00);
  border-radius: 8px;
  background: #fff;
  padding: 0 14px;
  font-size: 14px;
  outline: none;
  min-width: 0;
  box-sizing: border-box;
}
.pph-topbar__search--custom .dgwt-wcas-search-input:focus,
.pph-topbar__search--custom .aws-search-field:focus,
.pph-topbar__search--custom .ivory-search-input:focus,
.pph-header-panel__search--custom .dgwt-wcas-search-input:focus,
.pph-header-panel__search--custom .aws-search-field:focus,
.pph-header-panel__search--custom .ivory-search-input:focus {
  border-color: var(--pph-header-accent, #F67D00);
  box-shadow: 0 0 0 3px rgba(246,125,0,0.15);
}

/* 4) The submit button — overlay absolutely on the inline-end edge */
.pph-topbar__search--custom .dgwt-wcas-search-submit,
.pph-topbar__search--custom .aws-search-submit,
.pph-topbar__search--custom .ivory-search-submit,
.pph-header-panel__search--custom .dgwt-wcas-search-submit,
.pph-header-panel__search--custom .aws-search-submit,
.pph-header-panel__search--custom .ivory-search-submit {
  position: absolute;
  inset-block: 0;
  inset-inline-end: 0;
  width: 50px;
  height: 40px;
  border: none;
  background: var(--pph-header-accent, #F67D00);
  color: #fff;
  cursor: pointer;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: background 0.2s;
}
.pph-topbar__search--custom .dgwt-wcas-search-submit:hover,
.pph-topbar__search--custom .aws-search-submit:hover,
.pph-topbar__search--custom .ivory-search-submit:hover,
.pph-header-panel__search--custom .dgwt-wcas-search-submit:hover,
.pph-header-panel__search--custom .aws-search-submit:hover,
.pph-header-panel__search--custom .ivory-search-submit:hover {
  background: #e6680d;
}

/* 5) Give the input room for the button on the inline-end side */
.pph-topbar__search--custom .dgwt-wcas-search-input,
.pph-topbar__search--custom .aws-search-field,
.pph-topbar__search--custom .ivory-search-input,
.pph-header-panel__search--custom .dgwt-wcas-search-input,
.pph-header-panel__search--custom .aws-search-field,
.pph-header-panel__search--custom .ivory-search-input {
  padding-inline-end: 56px;
}

/* 6) Hide the magnifier icon some plugins inject INSIDE the input
   (we keep the collapsible results layer, only hide the decorative icon) */
.pph-topbar__search--custom .dgwt-wcas-sf-wrapp:after,
.pph-topbar__search--custom .dgwt-wcas-ico-magnifier,
.pph-topbar__search--custom .aws-search-clear,
.pph-topbar__search--custom .ivory-search-clear {
  display: none !important;
}

/* 7) Autocomplete / results dropdown stays visible (positioned by the plugin) */
.pph-topbar__search--custom .dgwt-wcas-suggestions-wrapp,
.pph-topbar__search--custom .aws-result-list,
.pph-topbar__search--custom .ivory-search-results { z-index: 9999; }

/* 8) RTL: keep input direction + cursor on the correct side */
[dir="rtl"] .pph-topbar__search--custom .dgwt-wcas-search-input,
[dir="rtl"] .pph-topbar__search--custom .aws-search-field,
[dir="rtl"] .pph-topbar__search--custom .ivory-search-input,
[dir="rtl"] .pph-header-panel__search--custom .dgwt-wcas-search-input,
[dir="rtl"] .pph-header-panel__search--custom .aws-search-field,
[dir="rtl"] .pph-header-panel__search--custom .ivory-search-input { direction: rtl; text-align: right; }

.pph-header-panel__search--custom { position: relative; display: block; width: 100%; }

/* Actions */
.pph-topbar__actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-inline-start: auto;
}
.pph-topbar__action {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: var(--pph-header-text, #fff);
  padding: 10px 8px;
  position: relative;
  min-width: 44px;
  min-height: 44px;
  transition: color 0.2s;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
}
.pph-topbar__action:hover { color: var(--pph-header-accent, #F67D00); }
.pph-topbar__action-label { font-size: 13px; white-space: nowrap; }

.pph-topbar__cart-badge {
  position: absolute;
  top: 2px;
  inset-inline-end: -6px;
  background: var(--pph-header-accent, #F67D00);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
}

/* Menu toggle (mobile) */
.pph-topbar__menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--pph-header-text, #fff);
  cursor: pointer;
  padding: 10px;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ======================
   NAV BAR (categories)
   ====================== */
.pph-topbar__nav {
  background: var(--pph-header-bg, #1A2B3C);
  border-top: 1px solid rgba(255,255,255,0.08);
}
.pph-topbar__nav-inner {
  max-width: var(--pp-container, 1370px);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.pph-topbar__nav-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--pph-header-accent, #F67D00);
  white-space: nowrap;
  flex-shrink: 0;
}
.pph-topbar__nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 24px;
  overflow-x: auto;
  flex: 1;
}
.pph-topbar__nav-list::-webkit-scrollbar { height: 0; }
.pph-topbar__nav-item a {
  display: block;
  padding: 16px 8px;
  font-size: 15px;
  font-weight: 500;
  color: var(--pph-header-text, #fff);
  text-decoration: none;
  white-space: nowrap;
  min-height: 44px;
  opacity: 0.85;
  transition: color 0.2s, opacity 0.2s;
}
.pph-topbar__nav-item a:hover { color: var(--pph-header-accent, #F67D00); opacity: 1; }

.pph-siderail::-webkit-scrollbar { width: 4px; }
.pph-siderail::-webkit-scrollbar-thumb { background: #ddd; border-radius: 2px; }
.pph-siderail__item {
  width: 58px;
  height: 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  color: var(--pph-header-bg, #1A2B3C);
  text-decoration: none;
  padding: 8px 4px;
  border-radius: 8px;
  min-height: 56px;
  transition: color 0.2s, background 0.2s;
}
.pph-siderail__item:hover,
.pph-siderail__item:focus { color: var(--pph-header-accent, #F67D00); background: rgba(246,125,0,0.08); }
.pph-siderail__item svg { width: 30px; height: 30px; display: block; flex-shrink: 0; color: inherit; }
.pph-siderail__item svg path[fill="currentColor"] { fill: currentColor; }
.pph-siderail__item svg path,
.pph-siderail__item svg line,
.pph-siderail__item svg circle,
.pph-siderail__item svg rect,
.pph-siderail__item svg polygon,
.pph-siderail__item svg polyline { stroke: currentColor; vector-effect: non-scaling-stroke; }
.pph-siderail__label { font-size: 12px; font-weight: 600; white-space: nowrap; }
.pph-siderail__badge {
  position: absolute;
  top: 4px;
  inset-inline-end: 4px;
  background: var(--pph-header-accent, #F67D00);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  line-height: 1;
}
.pph-siderail__item { position: relative; }

/* ======================
   MOBILE BOTTOM NAV
   ====================== */
.pph-mobilenav {
  position: fixed;
  inset-block-end: 0;
  inset-inline: 0;
  height: 56px;
  background: var(--pp-bg-white, #fff);
  border-top: 1px solid var(--pp-border-light, rgba(0,0,0,0.08));
  box-shadow: 0 -2px 12px rgba(0,0,0,0.08);
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  z-index: 999;
  display: none;
}
.pph-mobilenav__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  text-decoration: none;
  color: var(--pph-header-bg, #1A2B3C);
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  position: relative;
  padding: 6px 2px;
  min-height: 48px;
  transition: color 0.2s;
}
.pph-mobilenav__item:hover { color: var(--pph-header-accent, #F67D00); }
.pph-mobilenav__item svg { width: 30px; height: 30px; display: block; flex-shrink: 0; color: inherit; }
.pph-mobilenav__item svg path,
.pph-mobilenav__item svg line,
.pph-mobilenav__item svg circle,
.pph-mobilenav__item svg rect,
.pph-mobilenav__item svg polygon,
.pph-mobilenav__item svg polyline { stroke: currentColor; fill: currentColor; }
.pph-mobilenav__label { font-size: 12px; font-weight: 600; }
.pph-mobilenav__badge {
  position: absolute;
  top: 6px;
  inset-inline-start: 50%;
  margin-inline-start: 8px;
  background: var(--pph-header-accent, #F67D00);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
}
.pph-mobilenav__item--cart svg { color: var(--pph-header-accent, #F67D00); }

/* ======================
   SLIDE-OUT PANEL
   ====================== */
.pph-header-panel {
  position: fixed;
  inset: 0;
  z-index: 1002;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s, visibility 0.3s;
}
.pph-header-panel[data-pph-open] {
  pointer-events: auto;
  visibility: visible;
  opacity: 1;
}
.pph-header-panel[data-pph-open] .pph-header-panel__overlay { opacity: 1; }
.pph-header-panel[data-pph-open] .pph-header-panel__drawer { transform: translateX(0); }

.pph-header-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: var(--pph-header-bg, #1A2B3C);
  color: #fff;
  flex-shrink: 0;
}
.pph-header-panel__logo-text { font-size: 20px; font-weight: 800; color: var(--pph-header-accent, #F67D00); }
.pph-header-panel__close {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 10px;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pph-header-panel__search {
  display: flex;
  padding: 14px 16px;
  border-bottom: 1px solid var(--pp-border-light, rgba(0,0,0,0.06));
  flex-shrink: 0;
}
.pph-header-panel__search input {
  flex: 1;
  border: 1px solid var(--pp-border, rgba(0,0,0,0.08));
  border-radius: 6px 0 0 6px;
  height: 40px;
  padding: 0 12px;
  font-size: 14px;
  outline: none;
  min-width: 0;
}
.pph-header-panel__search button {
  width: 48px;
  border: none;
  background: var(--pph-header-accent, #F67D00);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pph-header-panel__list {
  list-style: none;
  margin: 0;
  padding: 8px 0;
}
.pph-header-panel__list a {
  display: block;
  padding: 16px 20px;
  font-size: 16px;
  font-weight: 500;
  color: var(--pp-main-text, #333);
  text-decoration: none;
  min-height: 48px;
  border-bottom: 1px solid var(--pp-border-light, rgba(0,0,0,0.04));
  transition: color 0.2s, background 0.2s;
}
.pph-header-panel__list a:hover { color: var(--pph-header-accent, #F67D00); background: rgba(246,125,0,0.06); }
.pph-header-panel__cats { padding: 16px 20px; }
.pph-header-panel__cats-title { font-size: 13px; color: var(--pp-tip-text, rgba(0,0,0,0.4)); margin: 0 0 8px; text-transform: uppercase; }
.pph-header-panel__cats ul { list-style: none; margin: 0; padding: 0; }
.pph-header-panel__cats li a { display: block; padding: 12px 12px; font-size: 15px; color: var(--pp-main-text, #333); text-decoration: none; min-height: 44px; border-radius: 6px; transition: background 0.2s; }
.pph-header-panel__cats li a:hover { background: var(--pp-bg-gray, #F8F8F9); }

/* ======================
   STANDALONE FOOTER (for [1688_footer] shortcode outside home page)
   ====================== */
.pph-footer--standalone {
  max-width: var(--pp-container, 1370px);
  margin: 24px auto 0;
  border-radius: var(--pp-radius-lg, 8px) var(--pp-radius-lg, 8px) 0 0;
}
.pph-footer__logo { margin-bottom: 12px; }
.pph-footer__newsletter { margin-bottom: 16px; }
.pph-footer__newsletter-text { font-size: 13px; margin: 0 0 8px; opacity: 0.8; }
.pph-footer__newsletter-form { display: flex; gap: 6px; }
.pph-footer__newsletter-form input {
  flex: 1; padding: 8px 12px; border: 1px solid rgba(255,255,255,0.2); border-radius: 6px;
  background: rgba(255,255,255,0.1); color: #fff; font-size: 13px; outline: none;
}
.pph-footer__newsletter-form input::placeholder { color: rgba(255,255,255,0.4); }
.pph-footer__newsletter-form input:focus { border-color: rgba(255,255,255,0.4); }
.pph-footer__newsletter-form button {
  padding: 8px 16px; border: none; border-radius: 6px; background: var(--pp-brand, #F67D00);
  color: #fff; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background .2s;
}
.pph-footer__newsletter-form button:hover { background: var(--pp-brand-hover, #E65200); }
.pph-footer__newsletter-form button:disabled { opacity: 0.6; cursor: default; }
.pph-footer__newsletter-msg { font-size: 13px; margin: 6px 0 0; }
.pph-footer__bottom-inner {
  max-width: var(--pp-container, 1370px); margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.pph-footer__payments { display: flex; gap: 8px; align-items: center; }
.pph-footer__payments img, .pph-footer__payments svg { border-radius: 4px; }
.pph-footer__copyright { font-size: 13px; margin: 0; opacity: 0.6; }
.pph-footer__top {
  display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px;
  background: rgba(255,255,255,0.1); border: none; border-radius: 6px; color: #fff;
  font-size: 13px; cursor: pointer; font-family: inherit; transition: background .2s;
}
.pph-footer__top:hover { background: rgba(255,255,255,0.2); }

/* ======================
   RESPONSIVE
   Breakpoints: 1400 (wide desktop), 1200 (laptop), 1024 (ipad), 768 (tablet), 480 (phone)
   ====================== */

/* Wide desktop (<=1400px) */
@media (max-width: 1400px) {
  .pph-topbar__cittymall-inner { gap: 16px; padding: 0 24px; }
  .pph-siderail { width: 66px; }
  .pph-siderail__item { width: 56px; height: 60px; }
  .pph-siderail__item svg { width: 28px; height: 28px; }
}

/* Laptop (<=1200px) */
@media (max-width: 1200px) {
  .pph-cards__grid { gap: 14px; }
  .pph-topbar__cittymall-inner { gap: 12px; padding: 0 16px; }
  .pph-siderail { width: 56px; }
  .pph-siderail__item { width: 48px; height: 56px; min-height: 48px; }
  .pph-siderail__item svg { width: 28px; height: 28px; }
  .pph-siderail__label { font-size: 11px; }
}

/* Laptop / iPad landscape (<=1024px) */
@media (max-width: 1024px) {
  .pph-siderail { display: none; }
  .pph-mobilenav { display: flex; }
  .pph-topbar__action-label { display: none; }
  .pph-topbar__nav-list { gap: 18px; }
  .pph-topbar__logo-text { font-size: 20px; }
}

/* Tablet portrait (<=768px) */
@media (max-width: 768px) {
  .pph-topbar__inner { gap: 10px; padding: 0 14px; }
  .pph-topbar__logo { margin-inline-end: 8px; }
  .pph-topbar__logo-text { font-size: 18px; }
  .pph-topbar__logo img { max-height: 32px; }
  .pph-topbar__action-label { display: none; }
  .pph-topbar__actions { gap: 8px; }
  .pph-topbar__search { max-width: none; }
  .pph-topbar__nav { display: none; }
  .pph-topbar__menu-toggle { display: flex; align-items: center; }
  .pph-footer--standalone { padding: 24px 14px 70px; }
  .pph-footer__inner { grid-template-columns: 1fr 1fr; gap: 20px; }
  .pph-footer__col--about { grid-column: 1 / -1; }
}

/* Phone (<=480px) */
@media (max-width: 480px) {
  .pph-topbar__inner { padding: 0 10px; height: 54px; }
  .pph-topbar__search:not(.pph-topbar__search--custom) { display: none; }
  .pph-topbar__search-btn { display: none; }
  .pph-header-panel__search { display: flex; }
  .pph-header-panel__search--custom { display: block; }
  .pph-topbar__action-label { display: none; }
  .pph-mobilenav { height: 56px; }
  .pph-mobilenav__item { min-height: 48px; padding: 6px 2px; }
  .pph-mobilenav__item svg { width: 26px; height: 26px; }
  .pph-mobilenav__label { font-size: 12px; }
  .pph-mobilenav__badge { font-size: 11px; min-width: 18px; height: 18px; }
  .pph-footer__inner { grid-template-columns: 1fr; gap: 16px; }
  .pph-footer__col--about { grid-column: auto; }
  .pph-footer { padding: 24px 14px 0; }
  body { padding-block-end: 56px; }
}

/* RTL adjustments */
[dir="rtl"] .pph-topbar__search-btn { border-radius: 8px 0 0 8px; }
[dir="rtl"] .pph-topbar__search-input { direction: rtl; }
[dir="rtl"] .pph-siderail { border-radius: 12px 0 0 12px; inset-inline-start: auto; inset-inline-end: 0; box-shadow: -2px 0 12px rgba(0,0,0,0.06); }

/* ============================================================
   Layout safety: neutralise wpautop <br>/<p> injection that
   collapses flex-column layouts, and prevent horizontal overflow
   from side panels / drawers.
   ============================================================ */
.pph-header-wrapper br,
.pph-header-wrapper p:empty,
.pph-footer--standalone br,
.pph-footer--standalone p:empty { display: none !important; }

/* Drawer uses transform only (never left/right offsets) to avoid overflow */
.pph-header-panel__drawer { will-change: transform; }

/* Ensure the header wrapper never introduces horizontal scrollbars */
.pph-header-wrapper { max-width: 100vw; overflow-x: clip; }

/* ============================================================
   CITYMALL HEADER DESIGN
   Upper top bar (60px) with login + language + cart + contact
   Side rail: right side (RTL), 100vh, dark bg, centered menu
   ============================================================ */

/* --- Top bar --- */
.pph-topbar--cittymall {
  position: fixed;
  top: 0;
  inset-inline: 0;
  background: #1A2B3C;
  color: #fff;
  height: 60px;
  display: block;
  z-index: 90;
  box-shadow: 0 0 10px rgba(0,0,0,1);
  border: none;
  border-radius: 0;
  padding: 0;
}
/* Admin bar offset */
body.admin-bar .pph-topbar--cittymall { top: 32px; }
@media (max-width: 782px) {
  body.admin-bar .pph-topbar--cittymall { top: 46px; }
}
.pph-topbar__cittymall-inner {
  max-width: var(--pp-container, 1370px);
  margin: 0 auto;
  padding: 0 16px;
  height: 60px;
  display: flex !important;
  flex-direction: row !important;
  justify-content: flex-start;
  align-items: center;
  gap: 4px;
}

/* 1. ضبط الروابط في الـ Topbar لتأخذ نفس النمط */
.pph-topbar__cittymall-inner a.pph-topbar__cta,
.pph-topbar__cittymall-inner a.pph-topbar__util {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    width: 48px !important;
    height: 56px !important;
    padding: 8px 4px !important;
    text-decoration: none !important;
}

/* 2. توحيد حجم الأيقونات داخل الـ Topbar */
.pph-topbar__cittymall-inner svg {
    width: 22px !important;
    height: 22px !important;
    stroke-width: 2 !important;
    justify-content: start !important;
}

/* 3. ضبط الخط للنصوص (Labels) داخل الـ Topbar */
.pph-topbar__cittymall-inner a span,
.pph-topbar__cittymall-inner a {
    font-size: 11px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
}

/* 3. ضبط الخط للنصوص (Labels) داخل الـ Topbar */
.pph-topbar__cittymall-inner a span,
.pph-topbar__cittymall-inner a {
    font-size: 11px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
}

/* Suppress wpautop <br>/<p> wrappers */
.pph-topbar__cittymall-inner br,
.pph-topbar--cittymall br { display: none !important; }
.pph-topbar__cittymall-inner p,
.pph-topbar--cittymall p,
.pph-topbar__cittymall-inner > p,
.pph-topbar--cittymall > p {
  display: contents !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Cart count bubble — positioned as popup above the icon */
.pph-topbar__util--cart { position: relative; }
.pph-topbar__util-count {
  position: absolute;
  top: 2px;
  inset-inline-end: 2px;
  background: var(--pph-header-accent, #F67D00);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
  z-index: 10;
  border: 2px solid var(--pph-header-bg, #1A2B3C);
}

/* --- Side rail (cittymall variant) --- */
.pph-siderail--cittymall {
  position: fixed;
  inset-block: 0;
  inset-inline-start: auto;
  inset-inline-end: 0;
  width: 72px;
  height: 100vh;
  z-index: 95;
  margin: 0;
  background: #1A2B3C;
  color: #fff;
  box-shadow: 0 0 10px rgba(0,0,0,1);
  border: none;
  border-radius: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0;
}
.pph-siderail--cittymall .pph-siderail__logo {
  display: block;
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  flex-shrink: 0;
}
.pph-siderail--cittymall .pph-siderail__logo img {
  max-width: 50px;
  max-height: 50px;
  width: auto;
  height: auto;
  border-radius: 8px;
}
.pph-siderail--cittymall .pph-siderail__item {
  width: 72px;
  padding: 12px 4px;
  color: #fff;
  min-height: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: opacity 0.2s, color 0.2s;
}
.pph-siderail--cittymall .pph-siderail__item:hover,
.pph-siderail--cittymall .pph-siderail__item:focus {
  color: var(--pph-header-accent, #F67D00);
  background: transparent;
}
.pph-siderail--cittymall .pph-siderail__item svg { width: 30px; height: 30px; }
.pph-siderail--cittymall .pph-siderail__label { font-size: 14px; font-weight: 400; color: #fff; }
.pph-siderail--cittymall .pph-siderail__item:hover .pph-siderail__label,
.pph-siderail--cittymall .pph-siderail__item:focus .pph-siderail__label { color: var(--pph-header-accent, #F67D00); }
.pph-siderail--cittymall .pph-siderail__badge {
  background: var(--pph-header-accent, #F67D00);
  top: 6px;
  inset-inline-end: 6px;
}

/* --- CityMall responsive --- */
@media (max-width: 1024px) {
  .pph-siderail--cittymall { display: none; }
}
@media (max-width: 768px) {
  .pph-topbar__cittymall-inner { gap: 12px; padding: 0 12px; }
  .pph-topbar__util-label { display: none; }
  .pph-topbar__cta { padding: 0 10px; font-size: 10px; }
  .pph-topbar__util svg { width: 22px; height: 22px; }
}
@media (max-width: 480px) {
  .pph-topbar--cittymall { height: 54px; }
  .pph-topbar__cittymall-inner { height: 54px; padding: 0 10px; gap: 8px; }
  .pph-topbar__cta, .pph-topbar__util { height: 54px; min-height: 54px; }
  .pph-topbar__util svg { width: 26px; height: 26px; }
}

/* RTL: cittymall side rail stays on right (default inset-inline-end) */
[dir="rtl"] .pph-siderail--cittymall {
  box-shadow: -2px 0 10px rgba(0,0,0,1);
}