/*
 * navigation-v2.css — PRODUCTION RULES
 *
 * Contains all .wtd-nav scoped rules and CSS custom properties.
 * Safe to include in the WordPress build.
 *
 * Demo/prototype-only rules (body reset, box-sizing global, .wtd-nav-demo-*)
 * are in navigation-v2-demo.css and must not be included in production.
 */

:root {
  /* Brand palette */
  --wtd-navy:  #263540;
  --wtd-white: #ffffff;
  --wtd-mid:   #647889; /* darkened from #657a8d — AA 4.58:1 on white */
  --wtd-light: #96b0c0;
  --wtd-green: #567434;
  --wtd-warm:  #c1a790;

  /* Derived from palette */
  --wtd-green-dk:  color-mix(in srgb, var(--wtd-green) 75%, #000000);
  --wtd-bar-hover: color-mix(in srgb, var(--wtd-green) 60%, var(--wtd-navy));
  --wtd-hover-bg:  color-mix(in srgb, var(--wtd-light) 10%, var(--wtd-white));
  --wtd-panel-bg:  color-mix(in srgb, var(--wtd-light)  5%, var(--wtd-white));

  /* Non-colour utilities */
  --wtd-nav-shadow: 0 24px 60px rgba(38, 53, 64, 0.18);
  --wtd-nav-max: 1560px;
}

.wtd-nav {
  position: sticky;
  top: 0;
  /* z-index must exceed Divi's fixed #main-header (z-index: 9999) */
  z-index: 10000;
  background: var(--wtd-navy);
  box-shadow: 0 10px 25px rgba(38, 53, 64, 0.18);
}

.wtd-nav__loading,
.wtd-nav__error {
  max-width: var(--wtd-nav-max);
  margin: 0 auto;
  padding: 18px 28px;
  color: var(--wtd-white);
  font-size: 15px;
}

.wtd-nav__bar {
  max-width: var(--wtd-nav-max);
  margin: 0 auto;
  display: flex;
  align-items: stretch;
  padding: 30px 20px;
}

.wtd-nav__brand {
  display: flex;
  align-items: center;
  padding-right: 20px;
  color: var(--wtd-white);
  text-decoration: none;
  font-size: 19px;
  font-weight: 800;
  line-height: 1;
  flex-shrink: 0;
}

.wtd-nav__brand-logo {
  display: block;
  max-height: 48px;
  height: auto;
  width: auto;
}

.wtd-nav__brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-right: 10px;
  border: 2px solid rgba(255, 255, 255, 0.78);
  color: var(--wtd-white);
  font-size: 15px;
  font-weight: 800;
}

.wtd-nav__list {
  display: flex;
  align-items: stretch;
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.wtd-nav__item {
  display: flex;
  min-width: 0;
}

.wtd-nav__link,
.wtd-nav__trigger,
.wtd-nav__cart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 66px;
  padding: 0 13px;
  border: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  color: var(--wtd-white);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.wtd-nav__link:hover,
.wtd-nav__link:focus-visible,
.wtd-nav__trigger:hover,
.wtd-nav__trigger:focus-visible,
.wtd-nav__trigger[aria-expanded="true"],
.wtd-nav__cart:hover,
.wtd-nav__cart:focus-visible {
  outline: none;
  background: var(--wtd-bar-hover);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.65);
}

/* Dedicated keyboard focus style — stronger ring than hover */
.wtd-nav__link:focus-visible,
.wtd-nav__trigger:focus-visible,
.wtd-nav__cart:focus-visible {
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.85);
}

.wtd-nav__trigger[aria-expanded="true"] {
  color: var(--wtd-white);
}

.wtd-nav__chevron {
  width: 0;
  height: 0;
  margin-left: 8px;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  transition: transform 0.18s ease;
}

.wtd-nav__trigger[aria-expanded="true"] .wtd-nav__chevron {
  transform: rotate(180deg);
}

.wtd-nav__cart {
  margin-left: auto;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.wtd-nav__panel-layer {
  position: absolute;
  left: 0;
  top: 100%;
  width: 100%;
  pointer-events: none;
}

.wtd-nav__panel {
  /* All panels stack at the same origin inside the layer so closed panels
     (visibility:hidden, still in layout) don't push open panels downward. */
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  background: var(--wtd-white);
  border-top: 4px solid var(--wtd-green);
  box-shadow: var(--wtd-nav-shadow);
  /* closed state — visibility hides from AT and keyboard after transition */
  visibility: hidden;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s linear 0.18s;
}

.wtd-nav__panel.is-open {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  z-index: 1;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.wtd-nav__panel-inner {
  max-width: var(--wtd-nav-max);
  min-height: 330px;
  margin: 0 auto;
  padding: 38px 30px 42px;
}

.wtd-nav__layout-links-plus-cards {
  display: grid;
  grid-template-columns: 265px minmax(0, 1fr);
  gap: 42px;
}

.wtd-nav__layout-column-links {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
}

.wtd-nav__layout-editorial-tiles {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 44px;
  align-items: start;
}

.wtd-nav__layout-cards,
.wtd-nav__layout-single-card {
  display: grid;
  grid-template-columns: 275px minmax(0, 1fr);
  gap: 46px;
  align-items: start;
}

.wtd-nav__layout-single-card {
  grid-template-columns: 310px 420px;
}

.wtd-nav__layout-links-plus-tiles {
  display: grid;
  grid-template-columns: 265px minmax(0, 1fr);
  gap: 42px;
  align-items: start;
}

.wtd-nav__section {
  min-width: 0;
}

.wtd-nav__layout-column-links .wtd-nav__section {
  padding: 0 24px;
  border-right: 1px solid var(--wtd-light);
}

.wtd-nav__layout-column-links .wtd-nav__section:first-child {
  padding-left: 0;
}

.wtd-nav__layout-column-links .wtd-nav__section:last-child {
  padding-right: 0;
  border-right: 0;
}

.wtd-nav__heading,
.wtd-nav__editorial-heading {
  margin: 0 0 17px;
  color: var(--wtd-navy);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.2;
}

.wtd-nav__layout-links-plus-cards .wtd-nav__heading,
.wtd-nav__layout-cards .wtd-nav__heading,
.wtd-nav__layout-single-card .wtd-nav__heading,
.wtd-nav__layout-links-plus-tiles .wtd-nav__heading,
.wtd-nav__editorial-heading {
  text-transform: uppercase;
}

.wtd-nav__link-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.wtd-nav__link-list-item {
  margin: 0;
}

.wtd-nav__panel-link {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 37px;
  padding: 9px 0 9px 18px;
  border-bottom: 1px solid var(--wtd-light);
  color: var(--wtd-navy);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
}

.wtd-nav__layout-links-plus-cards .wtd-nav__panel-link,
.wtd-nav__layout-cards .wtd-nav__panel-link,
.wtd-nav__layout-single-card .wtd-nav__panel-link,
.wtd-nav__layout-links-plus-tiles .wtd-nav__panel-link {
  border-bottom: 0;
  padding-top: 8px;
  padding-bottom: 8px;
}

.wtd-nav__panel-link::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 6px solid var(--wtd-mid);
}

.wtd-nav__panel-link:hover,
.wtd-nav__panel-link:focus-visible,
.wtd-nav__editorial-link:hover,
.wtd-nav__editorial-link:focus-visible {
  color: var(--wtd-green-dk);
  outline: none;
}

.wtd-nav__panel-link:focus-visible {
  outline: 2px solid var(--wtd-green);
  outline-offset: 2px;
}

.wtd-nav__badge {
  margin-left: 8px;
  padding: 2px 7px;
  border-radius: 2px;
  background: var(--wtd-green);
  color: var(--wtd-white);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.wtd-nav__card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
}

.wtd-nav__layout-single-card .wtd-nav__card-grid {
  grid-template-columns: 1fr;
}

.wtd-nav__card {
  display: flex;
  min-width: 0;
  min-height: 284px;
  flex-direction: column;
  color: var(--wtd-navy);
  text-decoration: none;
}

.wtd-nav__card-media,
.wtd-nav__tile-media {
  position: relative;
  overflow: hidden;
  background-color: var(--wtd-warm);
}

.wtd-nav__card-media {
  height: 174px;
  margin-bottom: 14px;
}

/* In image-only card layouts the media fills available space, CTA pins to bottom */
.wtd-nav__layout-cards .wtd-nav__card-media,
.wtd-nav__layout-single-card .wtd-nav__card-media {
  flex: 1;
  height: auto;
  margin-bottom: 0;
}

.wtd-nav__card-title {
  margin: 0 0 7px;
  color: var(--wtd-navy);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

.wtd-nav__card-description {
  margin: 0 0 13px;
  color: var(--wtd-mid);
  font-size: 14px;
  line-height: 1.45;
}

.wtd-nav__card-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: auto;
  min-height: 43px;
  padding: 12px 16px;
  background: var(--wtd-green);
  color: var(--wtd-white);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
}

.wtd-nav__card-cta::after {
  content: " ›";
}

.wtd-nav__card:hover .wtd-nav__card-cta,
.wtd-nav__card:focus-visible .wtd-nav__card-cta {
  background: var(--wtd-green-dk);
}

.wtd-nav__card:focus-visible,
.wtd-nav__tile:focus-visible {
  outline: 3px solid var(--wtd-green);
  outline-offset: 4px;
}

.wtd-nav__editorial-copy {
  margin: 0;
  color: var(--wtd-mid);
  font-size: 16px;
  line-height: 1.6;
}

.wtd-nav__editorial-links {
  margin: 18px 0 0;
  font-size: 16px;
  line-height: 1.6;
}

.wtd-nav__editorial-link {
  color: var(--wtd-green);
  font-weight: 700;
}

.wtd-nav__tile-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.wtd-nav__tile {
  display: block;
  color: var(--wtd-navy);
  text-decoration: none;
}

.wtd-nav__tile-media {
  display: block;
  height: 218px;
  margin-bottom: 13px;
}

.wtd-nav__layout-links-plus-tiles .wtd-nav__tile-media {
  height: 174px;
}

.wtd-nav__tile-label {
  display: block;
  color: var(--wtd-navy);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
}

.wtd-nav__layout-links-plus-tiles .wtd-nav__tile-label {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.wtd-nav__tile-count {
  display: block;
  margin-top: 4px;
  color: var(--wtd-green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-align: center;
  text-transform: uppercase;
}

.wtd-nav__card-img,
.wtd-nav__tile-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.wtd-nav__card-media::before,
.wtd-nav__tile-media::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.16), rgba(255,255,255,0) 42%),
    repeating-linear-gradient(12deg, rgba(255,255,255,0.12) 0 10px, rgba(0,0,0,0.05) 10px 22px);
}

.wtd-nav__card-media::after,
.wtd-nav__tile-media::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 34%;
  background: linear-gradient(to top, rgba(0,0,0,0.15), rgba(0,0,0,0));
}

.wtd-nav__media--laminate { background: linear-gradient(135deg, #e6e1d7, #9e9a8e); }
.wtd-nav__media--compact { background: linear-gradient(135deg, #d9d9d4, #59615b); }
.wtd-nav__media--wood { background: linear-gradient(135deg, #d4a363, #7f4d24); }
.wtd-nav__media--aria { background: linear-gradient(135deg, #f2f0e8, #7a776e); }
.wtd-nav__media--fenix { background: linear-gradient(135deg, #4b4c48, #171a1c); }
.wtd-nav__media--zenith { background: linear-gradient(135deg, #d7d4ca, #7a7b74); }
.wtd-nav__media--coreluxe { background: linear-gradient(135deg, #f4f4f1, #b7bbb6); }
.wtd-nav__media--oak { background: linear-gradient(135deg, #e4ba78, #9b632c); }
.wtd-nav__media--walnut { background: linear-gradient(135deg, #8a5532, #3e2417); }
.wtd-nav__media--full-stave { background: linear-gradient(135deg, #d7a461, #8d5824); }
.wtd-nav__media--black-oak { background: linear-gradient(135deg, #353632, #101312); }
.wtd-nav__media--stainless { background: linear-gradient(135deg, #e8eaeb, #b0b5b8); }
.wtd-nav__media--ceramic { background: linear-gradient(135deg, #f5f5f3, #cdd0cc); }
.wtd-nav__media--granite { background: linear-gradient(135deg, #7a7e7b, #3a3d3b); }
.wtd-nav__media--taps { background: linear-gradient(135deg, #d4d8da, #8a9296); }

.wtd-nav__sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================
   SCROLL LOCK
   ============================================================ */

body.wtd-nav-lock {
  overflow: hidden;
}

/* ============================================================
   MOBILE TRIGGER (inside the top bar)
   ============================================================ */

.wtd-nav__mobile-trigger {
  display: none; /* shown via media query below */
  align-items: center;
  justify-content: center;
  margin-left: auto;
  width: 48px;
  min-height: 66px;
  border: 0;
  background: transparent;
  color: var(--wtd-white);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.wtd-nav__mobile-trigger:hover,
.wtd-nav__mobile-trigger:focus-visible {
  background: var(--wtd-bar-hover);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.4);
  outline: none;
}

.wtd-nav__mobile-burger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 22px;
}

.wtd-nav__mobile-burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

/* Animate burger → × when drawer is open */
.wtd-nav.is-mobile-open .wtd-nav__mobile-burger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.wtd-nav.is-mobile-open .wtd-nav__mobile-burger span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.wtd-nav.is-mobile-open .wtd-nav__mobile-burger span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ============================================================
   MOBILE OVERLAY
   ============================================================ */

.wtd-nav__mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10001; /* above sticky nav bar (10000) */
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0s linear 0.25s;
}

.wtd-nav__mobile-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.25s ease;
}

/* ============================================================
   MOBILE DRAWER
   ============================================================ */

.wtd-nav__mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 320px;
  max-width: 100vw;
  background: var(--wtd-white);
  z-index: 10002; /* above overlay (10001) and sticky nav bar (10000) */
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: -4px 0 32px rgba(0, 0, 0, 0.2);
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1), visibility 0s linear 0.28s;
}

.wtd-nav__mobile-drawer.is-open {
  transform: translateX(0);
  visibility: visible;
  transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
}

.wtd-nav__mobile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px 0 20px;
  height: 60px;
  background: var(--wtd-navy);
  flex-shrink: 0;
}

.wtd-nav__mobile-title {
  color: var(--wtd-white);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.wtd-nav__mobile-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 0;
  background: transparent;
  color: var(--wtd-white);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  border-radius: 4px;
  flex-shrink: 0;
  touch-action: manipulation;
}

.wtd-nav__mobile-close:hover {
  background: rgba(255, 255, 255, 0.15);
}

.wtd-nav__mobile-close:focus-visible {
  background: rgba(255, 255, 255, 0.15);
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: -2px;
}

/* ============================================================
   MOBILE NAV LIST — top-level items
   ============================================================ */

.wtd-nav__mobile-list {
  flex: 1;
  overflow-y: auto;
  margin: 0;
  padding: 0;
  list-style: none;
  -webkit-overflow-scrolling: touch;
}

.wtd-nav__mobile-section {
  border-bottom: 1px solid var(--wtd-light);
}

/* Shared styles for section accordion trigger and plain section link */
.wtd-nav__mobile-section-trigger,
.wtd-nav__mobile-section-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 52px;
  padding: 0 16px 0 20px;
  border: 0;
  background: transparent;
  color: var(--wtd-navy);
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
}

.wtd-nav__mobile-section-trigger:hover,
.wtd-nav__mobile-section-link:hover {
  background: var(--wtd-hover-bg);
}

.wtd-nav__mobile-section-trigger:focus-visible,
.wtd-nav__mobile-section-link:focus-visible {
  background: var(--wtd-hover-bg);
  outline: 2px solid var(--wtd-green);
  outline-offset: -2px;
}

.wtd-nav__mobile-chevron {
  display: block;
  width: 0;
  height: 0;
  margin-left: 10px;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--wtd-mid);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.wtd-nav__mobile-section-trigger[aria-expanded="true"] .wtd-nav__mobile-chevron,
.wtd-nav__mobile-group-trigger[aria-expanded="true"] .wtd-nav__mobile-chevron {
  transform: rotate(180deg);
}

/* ============================================================
   MOBILE SECTION PANEL — collapsible content
   ============================================================ */

.wtd-nav__mobile-section-panel {
  border-top: 1px solid var(--wtd-light);
  background: var(--wtd-panel-bg);
  padding-bottom: 8px;
}

.wtd-nav__mobile-view-all {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  color: var(--wtd-green-dk);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid var(--wtd-light);
}

.wtd-nav__mobile-view-all:hover {
  color: var(--wtd-green);
}

.wtd-nav__mobile-view-all:focus-visible {
  color: var(--wtd-green);
  outline: 2px solid var(--wtd-green);
  outline-offset: -2px;
}

/* ============================================================
   MOBILE LINK LIST
   ============================================================ */

.wtd-nav__mobile-link-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.wtd-nav__mobile-link {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px 0 28px;
  color: var(--wtd-navy);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--wtd-hover-bg);
}

.wtd-nav__mobile-link:hover {
  color: var(--wtd-green-dk);
  background: var(--wtd-hover-bg);
}

.wtd-nav__mobile-link:focus-visible {
  color: var(--wtd-green-dk);
  background: var(--wtd-hover-bg);
  outline: 2px solid var(--wtd-green);
  outline-offset: -2px;
}

/* ============================================================
   MOBILE NESTED GROUP ACCORDION (Laminate columns etc.)
   ============================================================ */

.wtd-nav__mobile-group {
  border-bottom: 1px solid var(--wtd-light);
}

.wtd-nav__mobile-group:last-child {
  border-bottom: 0;
}

.wtd-nav__mobile-group-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 44px;
  padding: 0 16px 0 20px;
  border: 0;
  background: transparent;
  color: var(--wtd-mid);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: left;
  cursor: pointer;
}

.wtd-nav__mobile-group-trigger:hover {
  background: var(--wtd-hover-bg);
}

.wtd-nav__mobile-group-trigger:focus-visible {
  background: var(--wtd-hover-bg);
  outline: 2px solid var(--wtd-green);
  outline-offset: -2px;
}

.wtd-nav__mobile-group-panel {
  padding-bottom: 4px;
}

/* ============================================================
   MOBILE EDITORIAL TEXT
   ============================================================ */

.wtd-nav__mobile-editorial {
  margin: 10px 20px 12px;
  font-size: 13px;
  color: var(--wtd-mid);
  line-height: 1.55;
}

/* ============================================================
   MOBILE CARD COMPACT LINKS
   ============================================================ */

.wtd-nav__mobile-card-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 16px 4px;
}

.wtd-nav__mobile-card-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  color: var(--wtd-navy);
  text-decoration: none;
  background: var(--wtd-white);
  border: 1px solid var(--wtd-light);
  border-radius: 4px;
}

.wtd-nav__mobile-card-link:hover,
.wtd-nav__mobile-card-link:focus-visible {
  border-color: var(--wtd-green);
  color: var(--wtd-green-dk);
  outline: 2px solid var(--wtd-green);
  outline-offset: 0;
}

.wtd-nav__mobile-card-thumb {
  width: 56px;
  height: 42px;
  object-fit: cover;
  border-radius: 3px;
  flex-shrink: 0;
  display: block;
}

.wtd-nav__mobile-card-label {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
}

/* ============================================================
   MOBILE TILE GRID (2 columns)
   ============================================================ */

.wtd-nav__mobile-tile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 8px 16px 8px;
}

.wtd-nav__mobile-tile-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--wtd-navy);
  border: 1px solid var(--wtd-light);
  border-radius: 4px;
  overflow: hidden;
}

.wtd-nav__mobile-tile-link:hover,
.wtd-nav__mobile-tile-link:focus-visible {
  border-color: var(--wtd-green);
  outline: 2px solid var(--wtd-green);
  outline-offset: 0;
}

.wtd-nav__mobile-tile-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.wtd-nav__mobile-tile-label {
  display: block;
  padding: 6px 6px 2px;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  line-height: 1.3;
}

.wtd-nav__mobile-tile-count {
  display: block;
  padding: 0 6px 6px;
  font-size: 10px;
  font-weight: 700;
  color: var(--wtd-green);
  text-align: center;
  text-transform: uppercase;
}

/* ============================================================
   MOBILE CART LINK — pinned to drawer bottom
   ============================================================ */

.wtd-nav__mobile-cart-link {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 20px;
  background: var(--wtd-green);
  color: var(--wtd-white);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  flex-shrink: 0;
}

.wtd-nav__mobile-cart-link:hover {
  background: var(--wtd-green-dk);
}

.wtd-nav__mobile-cart-link:focus-visible {
  background: var(--wtd-green-dk);
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: -3px;
}

/* ============================================================
   RESPONSIVE BREAKPOINT — 1149px (owner confirmed 2026-05-21)
   At ≤ 1149px: collapse to mobile layout.
   At ≥ 1150px: show full desktop layout.
   Legacy system used 1440px; 1149px is the confirmed replacement.
   ============================================================ */

@media (max-width: 1149px) {
  .wtd-nav__list,
  .wtd-nav__cart {
    display: none;
  }

  .wtd-nav__mobile-trigger {
    display: flex;
  }

  /* Desktop dropdown panels are inaccessible on mobile */
  .wtd-nav__panel-layer {
    display: none;
  }

  /* Reduce bar padding on mobile so the bar is ~88px not ~126px */
  .wtd-nav__bar {
    padding-top: 11px;
    padding-bottom: 11px;
  }
}

/* ============================================================
   WORDPRESS ADMIN BAR OFFSET
   When logged-in users have the admin bar visible, offset the
   sticky nav so it sits below the admin bar, not behind it.
   ============================================================ */

body.admin-bar .wtd-nav {
  top: 32px;
}

/* Mobile admin bar is 46px tall */
@media screen and (max-width: 782px) {
  body.admin-bar .wtd-nav {
    top: 46px;
  }
}

@media (min-width: 1150px) {
  .wtd-nav__mobile-trigger {
    display: none;
  }

  /* Force overlay and drawer off on desktop regardless of JS state */
  .wtd-nav__mobile-overlay,
  .wtd-nav__mobile-drawer {
    display: none !important;
  }
}

/* ============================================================
   SEARCH TOGGLE (desktop top bar)
   ============================================================ */

.wtd-nav__search-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 66px;
  padding: 0 14px;
  border: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  color: var(--wtd-white);
  cursor: pointer;
  opacity: 0.85;
  transition: opacity 0.2s, background 0.18s;
  flex-shrink: 0;
}

.wtd-nav__search-toggle:hover,
.wtd-nav__search-toggle:focus-visible {
  opacity: 1;
  background: var(--wtd-bar-hover);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.65);
  outline: none;
}

.wtd-nav__search-toggle.active,
.wtd-nav__search-toggle[aria-expanded="true"] {
  opacity: 1;
  background: var(--wtd-bar-hover);
}

/* ============================================================
   SEARCH DROPDOWN
   ============================================================ */

.wtd-nav__search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--wtd-navy);
  border-top: 2px solid var(--wtd-green);
  padding: 16px 30px;
  z-index: 10;
  display: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.wtd-nav__search-dropdown.is-open {
  display: block;
}

.wtd-nav__search-inner {
  max-width: 640px;
  margin: 0 auto;
  position: relative;
}

.wtd-search-form {
  display: flex;
  align-items: center;
  background: var(--wtd-white);
  border-radius: 4px;
  overflow: hidden;
}

.wtd-search-input {
  flex: 1;
  border: none;
  padding: 12px 16px;
  font-size: 15px;
  font-family: 'Montserrat', sans-serif;
  color: var(--wtd-navy);
  outline: none;
  background: transparent;
  min-width: 0;
}

.wtd-search-input::placeholder {
  color: var(--wtd-light);
}

.wtd-search-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 12px 16px;
  border: none;
  background: var(--wtd-green);
  color: var(--wtd-white);
  cursor: pointer;
  transition: background 0.18s;
}

.wtd-search-submit:hover {
  background: var(--wtd-green-dk);
}

.wtd-search-submit:focus-visible {
  background: var(--wtd-green-dk);
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: -2px;
}

/* Hide search toggle on mobile — search is not available in this breakpoint */
@media (max-width: 1149px) {
  .wtd-nav__search-toggle,
  .wtd-nav__search-dropdown {
    display: none !important;
  }
}

/* ============================================================
   FALLBACK NAV — shown when navigation-data.json fails to load
   ============================================================ */

.wtd-nav__bar--fallback {
  height: auto;
  min-height: 66px;
  flex-wrap: wrap;
}

/* ============================================================
   LIVE SEARCH RESULTS DROPDOWN
   Positioned relative to .wtd-nav__search-inner so it sits
   outside .wtd-search-form (which has overflow:hidden).
   ============================================================ */

.wtd-search-results {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #ffffff;
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  z-index: 10000;
  max-height: 480px;
  overflow-y: auto;
}

.wtd-search-results.open {
  display: block;
}

.wtd-search-results__list {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.wtd-search-results__item {
  border-bottom: 1px solid #f0f0f0 !important;
  padding: 0 !important;
  margin: 0 !important;
}

.wtd-search-results__item:last-child {
  border-bottom: none !important;
}

.wtd-search-results__link {
  display: flex !important;
  align-items: center !important;
  padding: 10px 16px !important;
  text-decoration: none !important;
  transition: background 0.15s !important;
  gap: 12px !important;
  color: inherit !important;
}

.wtd-search-results__link:hover {
  background: #f7f8f9 !important;
}

.wtd-search-results__img {
  width: 48px !important;
  height: 48px !important;
  object-fit: cover !important;
  border-radius: 2px !important;
  flex-shrink: 0 !important;
  display: block !important;
}

.wtd-search-results__img--placeholder {
  background: #e5e5e5 !important;
}

.wtd-search-results__info {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
  min-width: 0 !important;
}

.wtd-search-results__title {
  font-family: 'Montserrat', sans-serif !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #263540 !important;
  line-height: 1.3 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.wtd-search-results__price {
  font-family: 'Montserrat', sans-serif !important;
  font-size: 12px !important;
  color: #567434 !important;
  font-weight: 600 !important;
}

.wtd-search-results__none {
  padding: 16px !important;
  text-align: center !important;
  color: #657a8d !important;
  font-family: 'Montserrat', sans-serif !important;
  font-size: 13px !important;
}

.wtd-search-results__all {
  display: block !important;
  text-align: center !important;
  padding: 11px 16px !important;
  background: #f7f8f9 !important;
  color: #263540 !important;
  font-family: 'Montserrat', sans-serif !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  text-decoration: none !important;
  border-top: 1px solid #e5e5e5 !important;
  transition: background 0.15s, color 0.15s !important;
}

.wtd-search-results__all:hover {
  background: #263540 !important;
  color: #ffffff !important;
}
