.pnh-mobile-nav { display: none; }

@media (max-width: 1023px) {
  /* The custom Parkland navigation replaces Kadence's hamburger/off-canvas trigger. */
  body.pnh-mobile-nav-enabled .mobile-toggle-open-container,
  body.pnh-mobile-nav-enabled .menu-toggle-open {
    display: none !important;
  }

  .pnh-mobile-nav {
    display: block;
    position: relative;
    width: 100%;
    background: #fff;
    z-index: 1000;
    font-family: inherit;
  }

  .pnh-mobile-nav[hidden] { display: none !important; }

  .pnh-mobile-nav__primary-wrap {
    position: relative;
    display: flex;
    align-items: stretch;
    min-width: 0;
    background: #fff;
    border-bottom: 1px solid rgba(98, 116, 142, 0.22);
  }

  .pnh-mobile-nav__primary,
  .pnh-mobile-nav__secondary {
    display: flex;
    align-items: stretch;
    gap: 0;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-inline: contain;
  }

  .pnh-mobile-nav__primary { width: 100%; min-height: 40px; }

  .pnh-mobile-nav__primary::-webkit-scrollbar,
  .pnh-mobile-nav__secondary::-webkit-scrollbar { display: none; }

  .pnh-mobile-nav__primary-item {
    flex: 0 0 auto;
    appearance: none;
    border: 0;
    border-top: 3px solid transparent;
    border-bottom: 3px solid transparent;
    background: transparent;
    color: #334155;
    padding: 8px 12px;
    margin: 0;
    font: inherit;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none !important;
    cursor: pointer;
  }

  .pnh-mobile-nav__primary-item.is-active {
    color: #28ab00;
    border-bottom-color: #28ab00;
  }

  .pnh-mobile-nav__close-section {
    flex: 0 0 auto;
    appearance: none;
    border: 0;
    border-left: 1px solid rgba(98, 116, 142, 0.16);
    background: #fff;
    color: #334155;
    min-width: 58px;
    padding: 2px 8px 3px;
    font: inherit;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-direction: column;
  }

  .pnh-mobile-nav__close-section:not([hidden]) { display: flex; }
  .pnh-mobile-nav__close-section > span:first-child { font-size: 23px; line-height: 19px; font-weight: 400; }
  .pnh-mobile-nav__close-text { margin-top: 1px; font-size: 9px; line-height: 1; text-transform: uppercase; font-weight: 700; }

  .pnh-mobile-nav__secondary-shell {
    background: #fff;
    border-bottom: 1px solid rgba(98, 116, 142, 0.22);
    overflow: hidden;
  }

  .pnh-mobile-nav__secondary-shell:not([hidden]) { display: block; }

  .pnh-mobile-nav__secondary {
    min-height: 56px;
    padding: 4px;
    align-items: center;
  }

  .pnh-mobile-nav__secondary-item {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    appearance: none;
    border: 1px solid #d9dee6;
    border-radius: 999px;
    background: #fff;
    color: #334155;
    padding: 6px 11px;
    margin: 0 2px;
    font: inherit;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none !important;
    cursor: pointer;
  }

  .pnh-mobile-nav__secondary-item:focus,
  .pnh-mobile-nav__primary-item:focus {
    outline: 2px solid rgba(40, 171, 0, 0.28);
    outline-offset: 1px;
  }

  .pnh-mobile-nav__chevron { width: 15px; height: 15px; flex: 0 0 auto; }

  .pnh-mobile-nav__modal[hidden] { display: none !important; }
  .pnh-mobile-nav__modal { position: fixed; inset: 0; z-index: 999999; display: block; }

  .pnh-mobile-nav__backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: rgba(0, 0, 0, .70);
    padding: 0;
    margin: 0;
    cursor: default;
  }

  .pnh-mobile-nav__panel {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 16px;
    max-height: calc(100dvh - 32px);
    overflow: hidden;
    background: #fff;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 16px 50px rgba(0, 0, 0, .24);
  }

  .pnh-mobile-nav__panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
  }

  .pnh-mobile-nav__panel-title { color: #62748e; font-size: 16px; line-height: 1.3; font-weight: 600; }

  .pnh-mobile-nav__panel-close {
    flex: 0 0 auto;
    appearance: none;
    border: 0;
    background: transparent;
    color: #334155;
    width: 32px;
    height: 32px;
    padding: 0;
    margin: -4px -4px -4px 0;
    font: inherit;
    font-size: 28px;
    line-height: 30px;
    cursor: pointer;
  }

  .pnh-mobile-nav__panel-list {
    overflow-y: auto;
    max-height: calc(100dvh - 96px);
    border: 1px solid #d9dee6;
    border-radius: 8px;
    background: #fff;
  }

  .pnh-mobile-nav__panel-link {
    display: block;
    width: 100%;
    padding: 12px;
    border-bottom: 1px solid #d9dee6;
    color: #253348;
    background: #fff;
    font-size: 16px;
    line-height: 1.3;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none !important;
  }

  .pnh-mobile-nav__panel-link:last-child { border-bottom: 0; }
  .pnh-mobile-nav__panel-link:focus,
  .pnh-mobile-nav__panel-link:hover { background: rgba(40, 171, 0, .08); color: #253348; }

  body.pnh-mobile-nav-modal-open { overflow: hidden !important; touch-action: none; }
}

@media (min-width: 600px) and (max-width: 1023px) {
  .pnh-mobile-nav__primary-item { padding-left: 14px; padding-right: 14px; }
  .pnh-mobile-nav__panel { left: 20px; right: 20px; bottom: 20px; }
}


/* v0.1.2: complete plugin-owned mobile header */
@media (max-width: 1023px) {
  /* The plugin now owns the mobile header, so hide Kadence's mobile header. */
  body.pnh-mobile-nav-enabled #masthead,
  body.pnh-mobile-nav-enabled .site-header,
  body.pnh-mobile-nav-enabled .kadence-header-wrap {
    display: none !important;
  }

  .pnh-mobile-nav__topbar {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 12px 7px;
    background: #fff;
  }

  .pnh-mobile-nav__brand {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: inherit;
    text-decoration: none !important;
  }

  .pnh-mobile-nav__logo {
    flex: 0 0 auto;
    width: auto;
    height: 42px;
    max-width: 46px;
    object-fit: contain;
  }

  .pnh-mobile-nav__brand-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1;
  }

  .pnh-mobile-nav__brand-title {
    color: #045dff;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(16px, 4.2vw, 21px);
    font-weight: 700;
    white-space: nowrap;
    line-height: 1.03;
  }

  .pnh-mobile-nav__brand-sub {
    align-self: flex-end;
    display: inline-flex;
    gap: 0;
    margin-top: 3px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(8px, 2.2vw, 11px);
    line-height: 1;
    white-space: nowrap;
  }

  .pnh-mobile-nav__brand-sub span:nth-child(1),
  .pnh-mobile-nav__brand-sub span:nth-child(3) {
    color: #62748e;
  }

  .pnh-mobile-nav__brand-sub span:nth-child(2) {
    color: #28ab00;
  }

  .pnh-mobile-nav__utilities {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 7px;
  }

  .pnh-mobile-nav__utility {
    position: relative;
    min-width: 34px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #334155;
    text-decoration: none !important;
  }

  .pnh-mobile-nav__utility-icon {
    position: relative;
    height: 21px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .pnh-mobile-nav__utility-label {
    margin-top: 1px;
    font-size: 9px;
    line-height: 1;
    font-weight: 700;
    text-transform: uppercase;
  }

  .pnh-mobile-nav__cart-count {
    position: absolute;
    top: -5px;
    right: -8px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #28ab00;
    color: #fff;
    font-size: 9px;
    line-height: 16px;
    font-weight: 700;
  }

  .pnh-mobile-nav__search-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
  }

  .pnh-mobile-nav__search-inline-icon {
    display: inline-flex;
    width: 17px;
    height: 17px;
    align-items: center;
    justify-content: center;
  }

  .pnh-mobile-nav__search-panel {
    padding: 8px 10px;
    background: #fff;
    border-bottom: 1px solid rgba(98, 116, 142, 0.22);
  }

  .pnh-mobile-nav__search-panel:not([hidden]) {
    display: block;
  }

  .pnh-mobile-nav__search-form {
    display: flex;
    gap: 7px;
    width: 100%;
  }

  .pnh-mobile-nav__search-input {
    min-width: 0;
    flex: 1 1 auto;
    height: 40px;
    border: 1px solid #d9dee6;
    border-radius: 20px;
    background: #fff;
    padding: 0 14px;
    font: inherit;
    font-size: 15px;
    color: #253348;
  }

  .pnh-mobile-nav__search-submit {
    flex: 0 0 auto;
    height: 40px;
    border: 0;
    border-radius: 20px;
    background: #28ab00;
    color: #fff;
    padding: 0 17px;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
  }

  /* Pill radius: radius = 50% of the button height. */
  .pnh-mobile-nav__secondary-item {
    border-radius: 999px;
  }
}

@media (max-width: 430px) {
  .pnh-mobile-nav__topbar {
    padding-left: 9px;
    padding-right: 9px;
    gap: 6px;
  }

  .pnh-mobile-nav__brand {
    gap: 6px;
  }

  .pnh-mobile-nav__logo {
    height: 38px;
    max-width: 40px;
  }

  .pnh-mobile-nav__utilities {
    gap: 4px;
  }
}


/* v0.1.3: tablet support + outlined active top-level item */
@media (max-width: 1199px) {
  .pnh-mobile-nav {
    display: block;
  }

  /* The plugin owns the mobile/tablet header through 1199px. */
  body.pnh-mobile-nav-enabled #masthead,
  body.pnh-mobile-nav-enabled .site-header,
  body.pnh-mobile-nav-enabled .kadence-header-wrap {
    display: none !important;
  }

  /*
   * First-level active state:
   * no green fill, no green text, no underline.
   * Use the same neutral pill outline language as level two.
   */
  .pnh-mobile-nav__primary-item,
  .pnh-mobile-nav__primary-item:hover,
  .pnh-mobile-nav__primary-item:focus,
  .pnh-mobile-nav__primary-item:active {
    background: transparent !important;
    color: #334155 !important;
    box-shadow: none !important;
  }

  .pnh-mobile-nav__primary-item.is-active,
  .pnh-mobile-nav__primary-item.is-active:hover,
  .pnh-mobile-nav__primary-item.is-active:focus,
  .pnh-mobile-nav__primary-item.is-active:active {
    border: 1px solid #d9dee6 !important;
    border-radius: 999px !important;
    background: #fff !important;
    color: #334155 !important;
    box-shadow: none !important;
    padding-top: 6px;
    padding-bottom: 6px;
    margin-top: 3px;
    margin-bottom: 3px;
  }

  .pnh-mobile-nav__brand-tagline {
    color: #62748e;
  }
}

/* Ensure old 1023px-only rules do not hide the plugin at common tablet widths. */
@media (min-width: 1024px) and (max-width: 1199px) {
  .pnh-mobile-nav {
    display: block !important;
    position: relative;
    width: 100%;
    background: #fff;
    z-index: 1000;
    font-family: inherit;
  }

  .pnh-mobile-nav[hidden] {
    display: none !important;
  }

  .pnh-mobile-nav__topbar {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 9px 18px 8px;
    background: #fff;
  }

  .pnh-mobile-nav__brand {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: inherit;
    text-decoration: none !important;
  }

  .pnh-mobile-nav__logo {
    width: auto;
    height: 44px;
    max-width: 48px;
    object-fit: contain;
  }

  .pnh-mobile-nav__brand-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1;
  }

  .pnh-mobile-nav__brand-title {
    color: #045dff;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 21px;
    font-weight: 700;
    white-space: nowrap;
    line-height: 1.03;
  }

  .pnh-mobile-nav__brand-sub {
    align-self: flex-end;
    display: inline-flex;
    margin-top: 3px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 10px;
    line-height: 1;
    white-space: nowrap;
  }

  .pnh-mobile-nav__brand-sub span:nth-child(1),
  .pnh-mobile-nav__brand-sub span:nth-child(3) {
    color: #62748e;
  }

  .pnh-mobile-nav__brand-sub span:nth-child(2) {
    color: #28ab00;
  }

  .pnh-mobile-nav__utilities {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .pnh-mobile-nav__utility {
    min-width: 38px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #334155;
    text-decoration: none !important;
  }

  .pnh-mobile-nav__utility-icon {
    position: relative;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .pnh-mobile-nav__utility-label {
    margin-top: 1px;
    font-size: 9px;
    line-height: 1;
    font-weight: 700;
    text-transform: uppercase;
  }

  .pnh-mobile-nav__cart-count {
    position: absolute;
    top: -5px;
    right: -8px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #28ab00;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
  }

  .pnh-mobile-nav__primary-wrap {
    position: relative;
    display: flex;
    align-items: stretch;
    min-width: 0;
    background: #fff;
    border-bottom: 1px solid rgba(98, 116, 142, 0.22);
  }

  .pnh-mobile-nav__primary,
  .pnh-mobile-nav__secondary {
    display: flex;
    align-items: center;
    gap: 0;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .pnh-mobile-nav__primary {
    width: 100%;
    min-height: 44px;
  }

  .pnh-mobile-nav__primary::-webkit-scrollbar,
  .pnh-mobile-nav__secondary::-webkit-scrollbar {
    display: none;
  }

  .pnh-mobile-nav__primary-item {
    flex: 0 0 auto;
    appearance: none;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    color: #334155;
    padding: 7px 14px;
    margin: 3px 2px;
    font: inherit;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none !important;
    cursor: pointer;
  }

  .pnh-mobile-nav__secondary-shell:not([hidden]) {
    display: block;
    background: #fff;
    border-bottom: 1px solid rgba(98, 116, 142, 0.22);
  }

  .pnh-mobile-nav__secondary {
    min-height: 56px;
    padding: 4px;
  }

  .pnh-mobile-nav__secondary-item {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    border: 1px solid #d9dee6;
    border-radius: 999px;
    background: #fff;
    color: #334155;
    padding: 6px 11px;
    margin: 0 2px;
    font: inherit;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none !important;
  }

  .pnh-mobile-nav__close-section:not([hidden]) {
    display: flex;
  }

  .pnh-mobile-nav__search-panel:not([hidden]) {
    display: block;
  }

  .pnh-mobile-nav__modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
  }

  .pnh-mobile-nav__modal[hidden] {
    display: none !important;
  }
}


/* v0.1.4: brand sizing, search pill, neutral close pill */
@media (max-width: 1199px) {
  .pnh-mobile-nav__topbar {
    min-height: 64px;
  }

  .pnh-mobile-nav__brand {
    max-width: calc(100% - 90px);
  }

  .pnh-mobile-nav__logo {
    width: 34px !important;
    height: 44px !important;
    max-width: 34px !important;
    min-width: 34px !important;
    object-fit: contain !important;
    flex: 0 0 34px !important;
  }

  .pnh-mobile-nav__brand-copy {
    min-width: 0;
  }

  .pnh-mobile-nav__brand-title {
    font-size: clamp(18px, 4.7vw, 23px) !important;
    line-height: 1.05;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .pnh-mobile-nav__brand-sub,
  .pnh-mobile-nav__brand-tagline {
    display: none !important;
  }

  .pnh-mobile-nav__search-input {
    height: 40px;
    border-radius: 999px !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .pnh-mobile-nav__search-submit {
    border-radius: 999px !important;
  }

  .pnh-mobile-nav__close-section {
    align-self: center;
    min-width: 0 !important;
    height: 34px;
    margin: 3px 6px 3px 4px;
    padding: 0 12px !important;
    border: 1px solid #d9dee6 !important;
    border-radius: 999px !important;
    background: #fff !important;
    color: #334155 !important;
    flex-direction: row !important;
    gap: 4px;
    box-shadow: none !important;
  }

  .pnh-mobile-nav__close-section > span:first-child {
    font-size: 18px;
    line-height: 1;
    transform: translateY(-1px);
  }

  .pnh-mobile-nav__close-text {
    margin: 0 !important;
    font-size: 12px;
    line-height: 1;
    font-weight: 600;
    text-transform: none;
  }
}

/* Keep exactly the same brand/logo proportions on common tablet widths. */
@media (min-width: 600px) and (max-width: 1199px) {
  .pnh-mobile-nav__topbar {
    min-height: 68px;
    padding-left: 16px;
    padding-right: 16px;
  }

  .pnh-mobile-nav__logo {
    width: 38px !important;
    height: 48px !important;
    max-width: 38px !important;
    min-width: 38px !important;
    flex-basis: 38px !important;
  }

  .pnh-mobile-nav__brand-title {
    font-size: 22px !important;
  }

  .pnh-mobile-nav__close-section {
    height: 34px;
    padding-left: 13px !important;
    padding-right: 13px !important;
  }
}


/* v0.1.5: tablet-only third-level modal fix.
 * Mobile rules below 1024px are intentionally unchanged.
 */
@media (min-width: 1024px) and (max-width: 1199px) {
  .pnh-mobile-nav__modal[hidden] {
    display: none !important;
  }

  .pnh-mobile-nav__modal {
    position: fixed !important;
    inset: 0 !important;
    z-index: 999999 !important;
    display: block;
    width: 100vw;
    height: 100dvh;
  }

  .pnh-mobile-nav__backdrop {
    position: absolute !important;
    inset: 0 !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: rgba(0, 0, 0, .70) !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    cursor: default;
  }

  .pnh-mobile-nav__panel {
    position: absolute !important;
    left: 20px !important;
    right: 20px !important;
    bottom: 20px !important;
    top: auto !important;
    width: auto !important;
    max-width: none !important;
    max-height: calc(100dvh - 40px) !important;
    overflow: hidden !important;
    display: block !important;
    background: #fff !important;
    border: 0 !important;
    border-radius: 10px !important;
    padding: 16px !important;
    margin: 0 !important;
    box-shadow: 0 16px 50px rgba(0, 0, 0, .24) !important;
    transform: none !important;
  }

  .pnh-mobile-nav__panel-head {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 16px !important;
    margin: 0 0 12px !important;
    padding: 0 !important;
  }

  .pnh-mobile-nav__panel-title {
    color: #62748e !important;
    background: transparent !important;
    font: inherit !important;
    font-size: 16px !important;
    line-height: 1.3 !important;
    font-weight: 600 !important;
    text-transform: none !important;
  }

  .pnh-mobile-nav__panel-close {
    flex: 0 0 auto !important;
    appearance: none !important;
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    border: 1px solid #d9dee6 !important;
    border-radius: 999px !important;
    background: #fff !important;
    color: #334155 !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    font: inherit !important;
    font-size: 24px !important;
    line-height: 30px !important;
    font-weight: 400 !important;
    text-align: center !important;
    cursor: pointer;
  }

  .pnh-mobile-nav__panel-list {
    display: block !important;
    overflow-y: auto !important;
    max-height: calc(100dvh - 108px) !important;
    border: 1px solid #d9dee6 !important;
    border-radius: 8px !important;
    background: #fff !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .pnh-mobile-nav__panel-link,
  .pnh-mobile-nav__panel-link:visited {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 12px 14px !important;
    margin: 0 !important;
    border: 0 !important;
    border-bottom: 1px solid #d9dee6 !important;
    border-radius: 0 !important;
    background: #fff !important;
    color: #253348 !important;
    box-shadow: none !important;
    font: inherit !important;
    font-size: 16px !important;
    line-height: 1.3 !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    text-align: left !important;
    text-decoration: none !important;
  }

  .pnh-mobile-nav__panel-link:last-child {
    border-bottom: 0 !important;
  }

  .pnh-mobile-nav__panel-link:hover,
  .pnh-mobile-nav__panel-link:focus {
    background: rgba(40, 171, 0, .08) !important;
    color: #253348 !important;
  }

  body.pnh-mobile-nav-modal-open {
    overflow: hidden !important;
    touch-action: none !important;
  }
}
