/* V21 — corrections verified with Chromium screenshots and responsive render checks. */
@media (min-width: 1101px) and (max-width: 1536px) {
  .navlinks {
    gap: 12px;
    flex-wrap: nowrap;
    white-space: nowrap;
    font-size: 13px;
  }
  .navlinks > a,
  .navlinks .nav-dropdown-trigger { white-space: nowrap; }
  .navtools .phonebtn,
  .navtools .wabtn { white-space: nowrap; }
}

/* Collapse navigation before it becomes cramped, including at 1024–1310 px. */
@media (min-width: 761px) and (max-width: 1310px) {
  .nav { position: relative; }
  .navlinks {
    display: none !important;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 60;
    max-height: calc(100vh - 82px);
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #fff;
    padding: 12px 24px 20px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border: 1px solid #dbe5ee;
    border-top: 0;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 18px 38px rgba(7,30,52,.16);
  }
  .navlinks.open { display: flex !important; }
  .navlinks > a,
  .navlinks .nav-dropdown-trigger {
    display: flex;
    width: 100%;
    min-height: 46px;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #edf1f5;
    text-align: left;
    white-space: normal;
  }
  .navlinks > a::after { display: none; }
  .navlinks .nav-dropdown { display: block; width: 100%; }
  .navlinks.open .nav-dropdown-menu {
    position: static;
    display: none;
    width: 100%;
    min-width: 0;
    max-width: none;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    margin: 3px 0 9px;
    padding: 7px;
    border: 0;
    border-radius: 7px;
    background: #f1f6fa;
    box-shadow: none;
  }
  .navlinks.open .nav-dropdown.open .nav-dropdown-menu { display: grid; }
  .navlinks .nav-dropdown-menu a { min-height: 44px; }
  .hamb { display: block !important; }
  .navtools .phonebtn,
  .navtools .navcta { display: none !important; }
  .navtools .wabtn {
    width: 42px;
    min-width: 42px;
    height: 42px;
    padding: 0;
    justify-content: center;
    font-size: 0 !important;
  }
  .navtools .wabtn svg { display: none; }
  .navtools .wabtn::before {
    content: "";
    display: block;
    width: 19px;
    height: 19px;
    background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.8'%3E%3Cpath d='M20.2 11.8a8.2 8.2 0 0 1-12.1 7.2L3 20l1.1-4.9a8.2 8.2 0 1 1 16.1-3.3Z'/%3E%3C/svg%3E");
  }
}

@media (max-width: 760px) {
  .navtools .wabtn {
    width: 42px;
    min-width: 42px;
    height: 42px;
    padding: 0;
    justify-content: center;
    font-size: 0 !important;
  }
  .navtools .wabtn svg { display: none; }
  .navtools .wabtn::before {
    content: "";
    display: block;
    width: 19px;
    height: 19px;
    background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.8'%3E%3Cpath d='M20.2 11.8a8.2 8.2 0 0 1-12.1 7.2L3 20l1.1-4.9a8.2 8.2 0 1 1 16.1-3.3Z'/%3E%3C/svg%3E");
  }
}

/* Keep product search and its result count within very narrow viewports. */
.catalog-tools input { min-width: 0; }
.catalog-tools #catalogCount { flex: 0 0 auto; white-space: nowrap; }

/* Keep direct contact actions available in the responsive header. */
@media (min-width: 761px) and (max-width: 1310px) {
  .navtools a[data-contact="phone"] {
    display: inline-flex !important;
    width: 42px;
    min-width: 42px;
    height: 42px;
    padding: 0;
    align-items: center;
    justify-content: center;
    font-size: 0 !important;
  }
  .navtools a[data-contact="phone"]::before { content: "☎"; font-size: 18px; }
}
@media (max-width: 760px) {
  .navtools { gap: 6px; }
  .navtools a[data-contact="phone"] {
    display: inline-flex !important;
    width: 42px;
    min-width: 42px;
    height: 42px;
    padding: 0;
    align-items: center;
    justify-content: center;
    font-size: 0 !important;
  }
  .navtools a[data-contact="phone"]::before { content: "☎"; font-size: 18px; }
  /* Header now carries both direct actions, so fixed bubbles must not cover page content. */
  .float-actions,
  .floatwa { display: none !important; }
}
@media (max-width: 360px) {
  .navtools { gap: 5px; }
  .navtools a[data-contact="phone"],
  .navtools .wabtn,
  .searchbtn,
  .search-toggle,
  .searchbtn { width: 38px; min-width: 38px; height: 40px; }
}
