/*
 Theme Name:   FPD Dealer Theme
 Description:  FPD Dealer Theme (Bootscore child)
 Author:       Advantech Consulting Group
 Template:     bootscore
 Version:      1.0.0
 Requires at least: 5.0
 Tested up to: 6.6
 Requires PHP: 7.4
 Text Domain:  fpd-dealer
*/

/* Shop nav (horizontal + mega hover) */
.fpd-shop-nav {
  position: relative;
  background: #F4F3EE;
  border-top: 1px solid #E5E3DA;
  border-bottom: 1px solid #E5E3DA;
}
.fpd-shop-nav-list {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
  container-type: inline-size;
}
.fpd-shop-nav-item {
  position: static;
  flex: 0 1 auto;
  min-width: 0;
}
.fpd-shop-nav-link {
  display: inline-block;
  padding: clamp(10px, 1.4cqi, 18px) clamp(8px, 2cqi, 24px);
  color: #111;
  font-weight: 700;
  text-decoration: none;
  font-size: clamp(12px, 1.5cqi, 18px);
  white-space: nowrap;
}
/* Fallback for browsers without container queries (Safari < 16) */
@supports not (container-type: inline-size) {
  .fpd-shop-nav-link {
    font-size: clamp(12px, 1.2vw, 18px);
    padding: clamp(10px, 1vw, 18px) clamp(8px, 1.6vw, 24px);
  }
}
@media (max-width: 767.98px) {
  .fpd-shop-nav-list { flex-wrap: wrap; }
}
.fpd-shop-nav-item:hover > .fpd-shop-nav-link,
.fpd-shop-nav-item.is-open > .fpd-shop-nav-link {
  background: #004B97;
  color: #fff;
}

.fpd-shop-mega {
  display: none;
  position: fixed;
  left: var(--fpd-mega-left, 0);
  top: var(--fpd-mega-top, 100%);
  width: var(--fpd-mega-width, 100%);
  background: #004B97;
  color: #fff;
  z-index: 1000;
  max-height: calc(100vh - var(--fpd-mega-top, 200px) - 16px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.fpd-shop-nav-item.has-mega:hover > .fpd-shop-mega,
.fpd-shop-nav-item.is-open > .fpd-shop-mega {
  display: block;
}
.fpd-shop-mega-inner {
  column-count: 4;
  column-gap: 40px;
  padding: 30px 40px;
}

.fpd-shop-nav-item--199 .fpd-shop-mega-inner {
  margin: 0 0;
}

@media (max-width: 991.98px) {
  .fpd-shop-mega-inner { column-count: 3; }
}

.fpd-shop-nav-item--199 .fpd-shop-mega-group {

}

.fpd-shop-mega-col {
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
  display: block;
  min-width: 0;
  margin-bottom: 30px;
}
.fpd-shop-mega-col:last-child {
  margin-bottom: 0;
}

/* Special case: Kerckhaert Steel Shoes column spans the full mega width and
   lays its own sublist out in the same 4/3-column grid as the parent. */
.fpd-shop-mega-col--20 {
  column-span: all;
  -webkit-column-span: all;
  background-color: #004B97;
  margin-top: -30px;
  margin-left: -40px;
  margin-right: -40px;
  padding: 30px 40px;
}
.fpd-shop-mega-col--20 .fpd-shop-mega-sublist {
  column-count: 4;
  column-gap: 40px;
}
.fpd-shop-mega-col--20 .fpd-shop-mega-sublist li {
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
  
}

.fpd-shop-nav-item--199 .fpd-shop-mega {
  background-color: #2867A7;

}

@media (max-width: 991.98px) {
  .fpd-shop-mega-col--20 .fpd-shop-mega-sublist { column-count: 3; }
}
.fpd-shop-mega-heading {
  display: block;
  font-family: "proxima-nova", system-ui, sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  color: #fff;
  text-decoration: none;
  margin-bottom: 0px;
  font-size: 17px;
  line-height: 18px;
}
.fpd-shop-mega-heading:hover {
  text-decoration: underline;
}
.fpd-shop-mega-sublist {
  list-style: none;
  margin: 0;
  padding: 0;
}
.fpd-shop-mega-sublist li + li {
  margin-top: 0px;
  line-height: 20px;
  margin-bottom: 5px;
}
.fpd-shop-mega-sublist a {
  color: #fff;
  text-decoration: none;
  font-size: 16px;
  line-height: 14px;
  font-family: proxima-nova-condensed;
}
.fpd-shop-mega-sublist a:hover {
  text-decoration: underline;
}

/* Match Gutenberg button appearance on the frontend (bootscore adds border + reduced radius) */
.wp-block-button .wp-block-button__link {
  border: 0;
  border-radius: 9999px;
}

/* Footer */
body { margin-bottom: 0; }
#page { margin-bottom: 0; padding-bottom: 0; }
#footer.bootscore-footer {
  background: #004B95;
  color: #F4F3EE;
  padding: 40px 70px 70px 70px;
  margin: 0;
  position: relative;
}
#footer.bootscore-footer a {
  color: #F4F3EE;
}

/* Quick-links circles — hidden on desktop, shown on mobile */
.fpd-footer-quicklinks { display: none; }
.fpd-footer-columns {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  min-width: 0;
}
.fpd-footer-col { min-width: 0; }
.fpd-footer-col-1 { flex: 3 1 0; }
.fpd-footer-col-2,
.fpd-footer-col-3 { flex: 1 1 0; }
@media (max-width: 767.98px) {
  .fpd-footer-col-1 { flex: 0 0 100%; max-width: 100%; }
  .fpd-footer-col-2,
  .fpd-footer-col-3 { flex: 0 0 calc(50% - 15px); max-width: calc(50% - 15px); }
}

/* Default typography */
body {
  font-family: "proxima-nova", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 18px;
}

/* H1 pill */
h1 {
  display: block;
  text-align: center;
  margin: 1.5rem auto;
}
h1::after { content: none; }
h1 {
  font-family: "proxima-nova", system-ui, sans-serif;
  font-weight: 900;
  text-transform: uppercase;
  font-size: 35px;
  color: #004B97;
}
#main h1 {
  background: #F4F3EE;
  border: 1px solid #CFCDC4;
  border-radius: 999px;
  padding: 2px 60px 2px 60px;
  width: max-content;
  max-width: 100%;
}

/* Hamburger + mobile-only rows — hidden on desktop */
.fpd-hamburger { display: none; }
.fpd-mobile-welcomecart { display: none; }
.fpd-mobile-topbar2 { display: none; }

/* Welcome / sign-in — lives inside .fpd-top-bar-2-welcome, populated by JS
   after fetching /acgshop/v1/me so the shell HTML stays cacheable. */
.fpd-welcome-bar__inner { display: flex; flex-direction: column; align-items: flex-start;
  text-align: left; gap: 0; }
.fpd-welcome-bar__row { display: inline-flex; align-items: baseline; gap: 10px;
  line-height: 1.2; }
.fpd-welcome-bar__hi { color: #39B34A; font-weight: 800; font-size: 18px;
  letter-spacing: .03em; }
.fpd-welcome-bar__sep { color: #004B97; font-weight: 500; }
.fpd-welcome-bar__link { color: #004B97; font-weight: 500; font-size: 16px;
  text-decoration: none; background: none; border: 0; padding: 0; cursor: pointer;
  font-family: inherit; }
.fpd-welcome-bar__link:hover, .fpd-welcome-bar__link:focus { color: #39B34A; }
.fpd-welcome-bar__form { display: inline; margin: 0; padding: 0; }
.fpd-welcome-bar__who { color: #39B34A; font-weight: 500; font-size: 15px;
  margin-top: 2px; }

/* Shop-nav lives inside #shop-header .container now. Allow it to break to a
   full-width row on desktop, and neutralize its inner .container padding so
   we don't get nested-container double-indent. */
#shop-header .container { flex-wrap: wrap; }
/* Break the nav wrapper out to the full viewport width, but keep the inner
   .container centered/padded like a normal Bootstrap container so the menu
   itself stays aligned with the rest of the header. */
#shop-header .fpd-shop-nav {
  flex: 0 0 auto;
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  align-self: stretch;
}
@media (max-width: 767.98px) {
  #shop-header .fpd-shop-nav > .container {
    max-width: 100%;
    width: 100%;
    padding-left: 0;
    padding-right: 0;
  }
}

/* Shop header row */
.fpd-shop-header-logo {
  margin: 20px 30px 35px 0;
}
.fpd-shop-header-logo img,
.fpd-shop-header-logo .custom-logo img {
  height: 104px;
  width: auto;
  transition: height 0.25s ease;
}
#shop-header.is-stuck .fpd-shop-header-logo img,
#shop-header.is-stuck .fpd-shop-header-logo .custom-logo img {
  height: 60px;
}

.fpd-shop-header-search {
  align-self: center;
}

/* Cart summary */
.fpd-shop-header-cart {
  text-align: right;
  line-height: 1.2;
}
.fpd-cart-top {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  margin-bottom: 8px;
}
.fpd-cart-iconwrap {
  position: relative;
  display: inline-block;
  line-height: 0;
}
.fpd-cart-icon {
  display: block;
  width: 44px;
  height: auto;
}
.fpd-cart-count {
  position: absolute;
  top: -2px;
  left: -10px;
  width: 22px;
  height: 22px;
  padding: 0;
  border-radius: 999px;
  background: #2FAA47;
  color: #fff;
  font-family: "proxima-nova", system-ui, sans-serif;
  font-weight: 900;
  font-size: 12px;
  line-height: 22px;
  text-align: center;
  box-sizing: border-box;
}
.fpd-cart-label {
  font-family: "proxima-nova", system-ui, sans-serif;
  font-weight: 900;
  font-size: 22px;
  color: #004B97;
  text-transform: uppercase;
}
.fpd-cart-top:hover .fpd-cart-label { text-decoration: none; }

.fpd-cart-totals {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 16px;
}
.fpd-cart-totals li { margin: 0; }
.fpd-cart-totals-label {
  font-weight: 700;
  color: #111;
}
.fpd-cart-totals-val {
  color: #8A8A8A;
  font-weight: 700;
  margin-left: 4px;
}

/* Pill-style search form */
.fpd-search-form {
  position: relative;
  display: block;
}
/* Desktop preservation — barcode icon hidden and placeholder invisible */
.fpd-search-form .fpd-search-barcode { display: none; }
@media (min-width: 768px) {
  .fpd-search-form .fpd-search-input::placeholder { color: transparent; }
}
.fpd-search-form .fpd-search-icon {
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  display: inline-flex;
  color: #6c6c6c;
  pointer-events: none;
}
.fpd-search-form .fpd-search-input {
  width: 100%;
  border: 1px solid #CFCDC4;
  background: #F4F3EE;
  border-radius: 999px;
  padding: .5rem 1rem .5rem 2.25rem;
  font-size: .95rem;
  line-height: 1.4;
  outline: none;
  box-shadow: none;
  appearance: none;
}
.fpd-search-form .fpd-search-input:focus {
  border-color: #b7b4a9;
  background: #fff;
}

/* #shop-nav placeholder (loaded via API) */
.fpd-shop-nav {
  background: #F4F3EE;
  border-top: 1px solid #CFCDC4;
  border-bottom: 1px solid #CFCDC4;
  min-height: 3rem;
}

/* Top Bar 1 */
.fpd-top-bar-1 {
  background: #004B97;
  color: #fff;
}
.fpd-top-bar-1 a {
  color: #fff;
  text-decoration: none;
}
.fpd-top-bar-1-label {
  font-family: "proxima-nova", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 900;
  font-size: 40px;
  color: #CFCDC4;
}
.fpd-top-bar-1-phone {
  font-family: "proxima-nova", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 900;
  font-size: 25px;
  color: #CFCDC4;
}
.fpd-top-bar-1 a.fpd-top-bar-1-phone {
  color: #CFCDC4;
}
.fpd-top-bar-1 a:hover {
  text-decoration: underline;
}
.fpd-top-bar-1-nav {
  gap: .25rem;
  text-transform: uppercase;
}
.fpd-top-bar-1-nav .menu-item {
  display: inline-flex;
  align-items: center;
}
.fpd-top-bar-1-nav .menu-item > a {
  display: inline-block;
  padding: .25rem .75rem;
}
.fpd-top-bar-1-nav .menu-item:not(:last-child)::after {
  content: "";
  display: inline-block;
  width: 1px;
  height: 1em;
  background: #fff;
}

/* Top Bar 2 */
.fpd-top-bar-2 {
  background: #f8f9fa;
}
.fpd-top-bar-2-nav {
  gap: .25rem;
  text-transform: uppercase;
}
.fpd-top-bar-2-nav .menu-item > a {
  display: inline-block;
  padding: 30px 20px 30px 20px;
  color: #004B97;
  font-weight: 600;
  text-decoration: none;
}
.fpd-top-bar-2-nav .menu-item > a:hover,
.fpd-top-bar-2-nav .current-menu-item > a {
  background: #F7F5F2;
  text-decoration: none;
}
.fpd-top-bar-2-nav .menu-item.scan > a {
  background: #F7F5F2;
  color: #39B34A;
  cursor: pointer;
}

/* UPC Scanner desktop info modal */
.fpd-scan-modal[hidden] { display: none; }
.fpd-scan-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fpd-scan-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}
.fpd-scan-modal__dialog {
  position: relative;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
  padding: 30px 32px 28px;
  max-width: 480px;
  width: calc(100% - 32px);
}
.fpd-scan-modal__close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: transparent;
  border: 0;
  font-size: 28px;
  line-height: 1;
  color: #666;
  cursor: pointer;
}
.fpd-scan-modal__close:hover { color: #000; }
.fpd-scan-modal__title {
  margin: 0 0 12px;
  color: #004B97;
  font-size: 22px;
  font-weight: 700;
}
.fpd-scan-modal__body {
  margin: 0;
  color: #333;
  line-height: 1.5;
}

/* Cap containers at XL width — effectively disables the XXL breakpoint for layout. */
@media (min-width: 1400px) {
  .container,
  .container-sm,
  .container-md,
  .container-lg,
  .container-xl,
  .container-xxl {
    max-width: 1140px;
  }
}

/* ==========================================================================
   Mobile (≤767.98px) — matches Design/FPD Mobile Site - Home.pdf
   Scale anchor: Top Bar 1 (FPD DEALERS ONLY) is 50px tall.
   ========================================================================== */
@media (max-width: 767.98px) {

  /* Top Bar 1 — 50px blue bar, label centered, right-side hidden */
  .fpd-top-bar-1 > .container {
    min-height: 50px;
    padding-top: 0;
    padding-bottom: 0;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 0;
  }
  .fpd-top-bar-1-label {
    font-size: 22px;
    line-height: 50px;
    color: #CFCDC4;
    text-align: center;
    width: 100%;
  }
  .fpd-top-bar-1-right { display: none !important; }

  /* Top Bar 2 — hidden on mobile (welcome + menu are moved into the shop header row) */
  .fpd-top-bar-2 { display: none !important; }

  /* Shop header — row 1: logo + hamburger; row 2: welcome + cart; row 3: search */
  #shop-header .container {
    flex-wrap: wrap;
    gap: 12px !important;
    padding-top: 10px;
    padding-bottom: 10px;
  }
  .fpd-shop-header-logo {
    margin: 0;
    flex: 1 1 auto;
    min-width: 0;
  }
  .fpd-shop-header-logo img,
  .fpd-shop-header-logo .custom-logo img {
    height: 60px;
  }
  #shop-header.is-stuck .fpd-shop-header-logo img,
  #shop-header.is-stuck .fpd-shop-header-logo .custom-logo img {
    height: 48px;
  }
  /* Desktop cart is hidden on mobile — replaced by the mobile welcome/cart row */
  .fpd-shop-header-cart { display: none; }
  /* Search moves to its own full-width row below the pill buttons */
  .fpd-shop-header-search {
    order: 5;
    flex: 0 0 100%;
    max-width: 100%;
  }
  /* Taller pill, magnifier + hint text on the left, barcode icon on the right */
  .fpd-search-form .fpd-search-input {
    height: 48px;
    padding: 0 52px 0 44px;
    font-size: 15px;
    background: #F4F3EE;
  }
  .fpd-search-form .fpd-search-input::placeholder {
    color: #8A8A8A;
    font-weight: 600;
    letter-spacing: 0.02em;
  }
  .fpd-search-form .fpd-search-icon {
    left: 16px;
  }
  .fpd-search-form .fpd-search-icon svg {
    width: 20px;
    height: 20px;
  }
  .fpd-search-form .fpd-search-barcode {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    padding: 6px;
    background: transparent;
    border: 0;
    color: #4a4a4a;
    cursor: pointer;
  }
  .fpd-search-form .fpd-search-barcode:hover,
  .fpd-search-form .fpd-search-barcode:focus { color: #111; }

  /* Hamburger button */
  .fpd-hamburger {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px 8px;
    background: transparent;
    border: 0;
    cursor: pointer;
    color: #6c6c6c;
    order: 1;
    flex: 0 0 auto;
  }
  .fpd-hamburger span {
    display: block;
    height: 3px;
    background: currentColor;
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }
  .fpd-hamburger.is-open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .fpd-hamburger.is-open span:nth-child(2) { opacity: 0; }
  .fpd-hamburger.is-open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

  /* Shop nav — order 2 so it drops in right under the logo/hamburger row */
  #shop-header .fpd-shop-nav { order: 2; }

  /* Mobile welcome + cart row (order 3 → below the shop menu) */
  .fpd-mobile-welcomecart {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    order: 3;
    flex: 0 0 100%;
    max-width: 100%;
    padding-left: 12px;
    padding-right: 12px;
  }

  /* Mobile Top Bar 2 pill-button row (order 4) */
  .fpd-mobile-topbar2 {
    display: block;
    order: 4;
    flex: 0 0 100%;
    max-width: 100%;
    padding: 4px 12px 0;
  }
  .fpd-mobile-topbar2-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
  }
  .fpd-mobile-topbar2-nav .menu-item { display: inline-flex; }
  .fpd-mobile-topbar2-nav .menu-item.scan { display: none; }
  .fpd-mobile-topbar2-nav .menu-item > a {
    display: inline-block;
    padding: 10px 18px;
    background: #8A8A8A;
    color: #fff;
    border-radius: 999px;
    font-family: "proxima-nova", system-ui, sans-serif;
    font-weight: 700;
    font-size: 13px;
    line-height: 1.15;
    text-transform: uppercase;
    text-align: center;
    text-decoration: none;
  }
  .fpd-mobile-topbar2-nav .menu-item > a:hover,
  .fpd-mobile-topbar2-nav .current-menu-item > a {
    background: #6f6f6f;
    color: #fff;
  }
  .fpd-mobile-welcome {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
  }
  .fpd-mobile-welcome-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #2FAA47;
    color: #fff;
    flex: 0 0 auto;
  }
  .fpd-mobile-welcome-icon svg { width: 22px; height: 22px; }
  .fpd-mobile-welcome-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    min-width: 0;
  }
  .fpd-mobile-welcome-label {
    font-family: "proxima-nova", system-ui, sans-serif;
    font-weight: 900;
    font-size: 16px;
    color: #2FAA47;
    text-transform: uppercase;
  }
  .fpd-mobile-welcome-name {
    font-size: 14px;
    color: #2FAA47;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .fpd-mobile-cart {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    flex: 0 0 auto;
  }
  .fpd-mobile-cart .fpd-cart-iconwrap { line-height: 0; }
  .fpd-mobile-cart .fpd-cart-icon { width: 32px; height: auto; display: block; }
  .fpd-mobile-cart .fpd-cart-count {
    position: absolute;
    top: -4px;
    left: -10px;
    width: 20px;
    height: 20px;
    padding: 0;
    border-radius: 999px;
    background: #2FAA47;
    color: #fff;
    font-weight: 900;
    font-size: 11px;
    line-height: 20px;
    text-align: center;
  }
  .fpd-mobile-cart .fpd-cart-label {
    font-family: "proxima-nova", system-ui, sans-serif;
    font-weight: 900;
    font-size: 13px;
    color: #004B97;
    text-transform: uppercase;
  }

  /* Shop nav — hidden until hamburger is toggled; accordion-style on mobile */
  .fpd-shop-nav { display: none; }
  .fpd-shop-nav.is-open {
    display: block;
    background: #F4F3EE;
    border: 0;
  }
  .fpd-shop-nav.is-open > .container {
    padding: 0;
    max-width: 100%;
  }
  .fpd-shop-nav.is-open .fpd-shop-nav-list {
    flex-direction: column;
    flex-wrap: nowrap;
    background: #F4F3EE;
  }
  .fpd-shop-nav.is-open .fpd-shop-nav-item {
    width: 100%;
    border-bottom: 1px solid #E5E3DA;
    background: transparent;
  }
  .fpd-shop-nav.is-open .fpd-shop-nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 16px;
    font-family: "proxima-nova", system-ui, sans-serif;
    font-weight: 900;
    text-transform: uppercase;
    font-size: 16px;
    color: #111;
    text-align: center;
    background: transparent;
  }
  /* Chevron on items that have children — matches text color */
  .fpd-shop-nav.is-open .fpd-shop-nav-item.has-mega > .fpd-shop-nav-link::after {
    content: "";
    display: inline-block;
    width: 10px;
    height: 10px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    margin-left: 4px;
    margin-bottom: 3px;
    transition: transform 0.2s ease;
  }
  .fpd-shop-nav.is-open .fpd-shop-nav-item.has-mega.is-expanded > .fpd-shop-nav-link::after {
    transform: rotate(-135deg);
    margin-bottom: -3px;
  }
  /* Expanded top-level: blue background + white text on the item and its mega panel */
  .fpd-shop-nav.is-open .fpd-shop-nav-item.is-expanded {
    background: #004B95;
  }
  .fpd-shop-nav.is-open .fpd-shop-nav-item.is-expanded > .fpd-shop-nav-link {
    color: #fff;
  }
  /* Suppress the desktop hover-invert on mobile (no blue pill on tap) */
  .fpd-shop-nav.is-open .fpd-shop-nav-item:hover > .fpd-shop-nav-link {
    background: transparent;
    color: inherit;
  }
  .fpd-shop-nav.is-open .fpd-shop-nav-item.is-expanded:hover > .fpd-shop-nav-link {
    color: #fff;
  }

  /* Mega panel — hidden by default on mobile; shown when parent is expanded */
  .fpd-shop-nav.is-open .fpd-shop-mega {
    position: static;
    display: none;
    background: #004B95;
    width: 100%;
  }
  .fpd-shop-nav.is-open .fpd-shop-nav-item.is-expanded > .fpd-shop-mega { display: block; }
  /* Suppress the desktop hover-open rule while in mobile drawer */
  .fpd-shop-nav.is-open .fpd-shop-nav-item.has-mega:hover > .fpd-shop-mega { display: none; }
  .fpd-shop-nav.is-open .fpd-shop-nav-item.has-mega.is-expanded:hover > .fpd-shop-mega { display: block; }

  .fpd-shop-nav.is-open .fpd-shop-mega-inner {
    display: block;
    grid-template-columns: none;
    gap: 0;
    padding: 8px 0 16px;
  }
  .fpd-shop-nav.is-open .fpd-shop-mega-col {
    padding: 0 16px;
  }
  .fpd-shop-nav.is-open .fpd-shop-mega-col + .fpd-shop-mega-col {
    margin-top: 4px;
  }
  .fpd-shop-nav.is-open .fpd-shop-mega-heading {
    display: block;
    text-align: center;
    padding: 10px 16px;
    margin: 0;
    font-size: 15px;
    line-height: 1.2;
    color: #fff;
    font-weight: 900;
    text-transform: uppercase;
    cursor: pointer;
  }
  /* Chevron on 2nd-level headings that have a sublist */
  .fpd-shop-nav.is-open .fpd-shop-mega-col:has(.fpd-shop-mega-sublist) > .fpd-shop-mega-heading::after {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(45deg);
    margin-left: 6px;
    margin-bottom: 2px;
    transition: transform 0.2s ease;
  }
  .fpd-shop-nav.is-open .fpd-shop-mega-col.is-expanded > .fpd-shop-mega-heading::after {
    transform: rotate(-135deg);
    margin-bottom: -2px;
  }
  /* 3rd-level sublist — hidden until parent col is expanded */
  .fpd-shop-nav.is-open .fpd-shop-mega-sublist {
    display: none;
    padding: 4px 0 12px;
  }
  .fpd-shop-nav.is-open .fpd-shop-mega-col.is-expanded > .fpd-shop-mega-sublist {
    display: block;
  }
  .fpd-shop-nav.is-open .fpd-shop-mega-sublist li {
    text-align: center;
  }
  .fpd-shop-nav.is-open .fpd-shop-mega-sublist a {
    display: block;
    padding: 6px 16px;
    font-size: 14px;
    line-height: 1.3;
    color: #fff;
    font-weight: 400;
  
  }

  /* Section headings — full-width blue pill */
  h1 {
    font-size: 22px;
    margin: 1rem 0;
  }
  #main h1 {
    display: block;
    width: 100%;
    max-width: 100%;
    background: #004B97;
    color: #fff;
    border-color: #004B97;
    padding: 10px 16px;
    text-align: center;
  }

  /* Main container — tighter side padding on phones */
  main.fpd-home > .container,
  main#main > .container {
    padding-left: 12px;
    padding-right: 12px;
  }

  /* Body copy scale */
  body { font-size: 16px; }

  /* Footer — reduce padding, center content, col-1 full width, cols 2/3 = 50/50 */
  #footer.bootscore-footer {
    padding: 52px 16px 32px; /* extra top padding for overlapping circles */
    text-align: center;
  }

  /* Green circle quick-links overlapping the top edge of the footer */
  .fpd-footer-quicklinks {
    display: flex;
    justify-content: center;
    gap: 18px;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    z-index: 2;
    pointer-events: none;
  }
  .fpd-footer-quicklink {
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #2FAA47;
    color: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    text-decoration: none;
    transition: background 0.15s ease;
  }
  .fpd-footer-quicklink:hover,
  .fpd-footer-quicklink:focus { background: #26903a; color: #fff; }
  .fpd-footer-quicklink svg {
    width: 24px;
    height: 24px;
    display: block;
  }
  #footer.bootscore-footer .widget { text-align: center; }
  #footer.bootscore-footer ul,
  #footer.bootscore-footer ol,
  #footer.bootscore-footer .menu {
    list-style: none;
    padding-left: 0;
    margin-left: 0;
  }
  #footer.bootscore-footer img { margin-left: auto; margin-right: auto; }
  .fpd-footer-columns {
    gap: 20px;
    justify-content: center;
  }
  .fpd-footer-col { text-align: center; }
}

/* Slightly tighter tuning for very small phones */
@media (max-width: 400px) {
  .fpd-top-bar-1-label { font-size: 18px; }
  .fpd-shop-header-logo img,
  .fpd-shop-header-logo .custom-logo img { height: 56px; }
  .fpd-cart-label { font-size: 12px; }
  #main h1 { font-size: 20px; padding: 8px 12px; }
}
