/* TankAndBarrel.com desktop header A3d  v20261127b
   Matches the approved A3d mock. Applies only at 992px and wider
   (Bootstrap 3 md). Mobile/tablet header is unchanged.
   Scoped to #tb-a3 except the legacy-chrome hide rules at the bottom. */

#tb-a3 {
  display: none;
  position: relative;
  z-index: 200;
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.3;
  color: #1f2d3d;
  background: #fff;
  width: 100%;
  box-sizing: border-box;
}
#tb-a3 *,
#tb-a3 *::before,
#tb-a3 *::after {
  box-sizing: border-box;
}
#tb-a3 a {
  text-decoration: none;
  color: inherit;
}
#tb-a3 a:hover,
#tb-a3 a:focus {
  text-decoration: none;
}
#tb-a3 button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
#tb-a3 svg {
  display: block;
  flex-shrink: 0;
}
#tb-a3 .tb-a3-wrap {
  width: auto;
  max-width: none;
  margin: 0 auto;
  padding: 0 15px;
  display: flex;
  align-items: center;
  width: 100%;
  height: 100%;
  position: relative;
}

/* ---- logo / search / phone / account / cart : 84px ---- */
#tb-a3 .tb-a3-row-logo {
  height: 84px;
  background: #fff;
  border-bottom: 1px solid #e3e8ee;
}
#tb-a3 .tb-a3-row-logo .tb-a3-wrap {
  height: 84px;
  gap: 36px;
  max-width: 1340px;
  justify-content: center;
}
#tb-a3 .tb-a3-logo {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}
#tb-a3 .tb-a3-logo img {
  display: block;
  height: 70px;
  width: auto;
  max-width: 240px;
}
#tb-a3 .tb-a3-search {
  flex: 0 1 600px;
  display: flex;
  align-items: stretch;
  height: 40px;
  min-width: 0;
  border: 2px solid #1e6fc4;
  border-radius: 6px;
  overflow: visible;
  position: relative;
  background: #fff;
}
/* site search autocomplete (twitter typeahead) wraps the input in a span */
#tb-a3 .tb-a3-search .twitter-typeahead {
  flex: 1 1 auto;
  min-width: 0;
  display: block !important;
  position: relative;
}
#tb-a3 .tb-a3-search .twitter-typeahead input[name="keywords"] {
  width: 100%;
  border-radius: 4px 0 0 4px;
}
#tb-a3 .tb-a3-search .tt-menu {
  z-index: 600 !important;
  min-width: 100%;
  text-align: left;
}
#tb-a3 .tb-a3-search input[type="search"],
#tb-a3 .tb-a3-search input[type="text"],
#tb-a3 .tb-a3-search input[name="keywords"] {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  outline: 0;
  box-shadow: none;
  height: 36px;
  padding: 0 14px;
  font: 14px "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #1f2d3d;
  background: #fff;
  width: auto;
  margin: 0;
  border-radius: 0;
  -webkit-appearance: none;
}
#tb-a3 .tb-a3-search input::placeholder {
  color: #8a96a3;
  opacity: 1;
}
#tb-a3 .tb-a3-search button {
  flex: 0 0 52px;
  width: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1e6fc4;
  color: #fff;
  border: 0;
  height: 36px;
  border-radius: 0 4px 4px 0;
}
#tb-a3 .tb-a3-search button:hover,
#tb-a3 .tb-a3-search button:focus {
  background: #15589e;
  outline: none;
}
#tb-a3 .tb-a3-search button:focus-visible {
  outline: 2px solid #13253a;
  outline-offset: -2px;
}
#tb-a3 .tb-a3-phone {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 9px;
  color: #1e6fc4;
  white-space: nowrap;
}
#tb-a3 .tb-a3-phone:hover,
#tb-a3 .tb-a3-phone:focus {
  color: #15589e;
}
#tb-a3 .tb-a3-phone span {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
#tb-a3 .tb-a3-phone b {
  display: block;
  font-size: 23px;
  font-weight: 700;
  color: #13253a;
  letter-spacing: 0.2px;
}
#tb-a3 .tb-a3-phone small {
  font-size: 13px;
  color: #6b7785;
  font-weight: 500;
}
#tb-a3 .tb-a3-icons {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: 0;
  color: #33475b;
  font-size: 13.5px;
  font-weight: 600;
}
#tb-a3 .tb-a3-icons a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: #33475b;
  white-space: nowrap;
}
#tb-a3 .tb-a3-icons a:hover,
#tb-a3 .tb-a3-icons a:focus {
  color: #1e6fc4;
}
#tb-a3 .tb-a3-phone svg {
  width: 32px;
  height: 32px;
}
#tb-a3 .tb-a3-icons svg {
  width: 30px;
  height: 30px;
}
#tb-a3 .tb-a3-cart-count {
  font-weight: 700;
  color: #1e6fc4;
}

/* ---- trust strip : 38px ---- */
#tb-a3 .tb-a3-row-trust {
  height: 38px;
  background: #f6f9fc;
  border-bottom: 1px solid #e3e8ee;
  color: #1f2d3d;
  font-size: 15.5px;
  font-weight: 700;
}
#tb-a3 .tb-a3-row-trust .tb-a3-wrap {
  height: 38px;
  justify-content: space-between;
  gap: 8px;
}
#tb-a3 .tb-a3-i {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  color: #1f2d3d;
  font-weight: 700;
}
#tb-a3 .tb-a3-i svg {
  color: #1e6fc4;
  width: 18px;
  height: 18px;
}
#tb-a3 .tb-a3-i b {
  font-weight: 700;
  color: inherit;
}
#tb-a3 a.tb-a3-i:hover,
#tb-a3 a.tb-a3-i:focus {
  color: #1e6fc4;
}
#tb-a3 .tb-a3-stars {
  display: inline-flex;
  gap: 1px;
  color: #f5b301;
}
#tb-a3 .tb-a3-stars svg {
  color: #f5b301 !important;
  width: 15px;
  height: 15px;
}
#tb-a3 .tb-a3-pay {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
#tb-a3 .tb-a3-pay .tb-a3-pm {
  display: block;
  width: 38px;
  height: 24px;
  flex: 0 0 auto;
}

/* ---- blue category bar : 44px ---- */
#tb-a3 .tb-a3-row-bar {
  height: 44px;
  background: #1e6fc4;
  color: #fff;
  position: relative;
  z-index: 201;
}
#tb-a3 .tb-a3-row-bar .tb-a3-wrap {
  height: 44px;
  overflow: visible;
}
#tb-a3 .tb-a3-slot {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  align-items: stretch;
  height: 44px;
}
#tb-a3 .tb-a3-all-btn,
#tb-a3 .tb-a3-more-btn,
#tb-a3 .tb-a3-ci-link,
#tb-a3 .tb-a3-ci-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 44px;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  background: transparent;
  padding: 0;
}
#tb-a3 .tb-a3-ci {
  padding: 0 6px;
  gap: 1px;
}
#tb-a3 .tb-a3-all-btn {
  background: #15589e;
  font-weight: 700;
  padding: 0 12px;
  margin-right: 2px;
  gap: 6px;
}
#tb-a3 .tb-a3-more-btn {
  padding: 0 9px;
}
#tb-a3 .tb-a3-ci-toggle svg {
  opacity: 0.75;
}
#tb-a3 .tb-a3-more-btn {
  font-weight: 700;
  gap: 3px;
}

/* Approved A3d hover: white tab, blue text */
#tb-a3 .tb-a3-ci:hover,
#tb-a3 .tb-a3-ci.is-open,
#tb-a3 .tb-a3-ci:focus-within,
#tb-a3 .tb-a3-more:hover,
#tb-a3 .tb-a3-more.is-open,
#tb-a3 .tb-a3-more:focus-within {
  background: #fff;
  color: #1e6fc4;
}
#tb-a3 .tb-a3-ci:hover .tb-a3-ci-link,
#tb-a3 .tb-a3-ci:hover .tb-a3-ci-toggle,
#tb-a3 .tb-a3-ci.is-open .tb-a3-ci-link,
#tb-a3 .tb-a3-ci.is-open .tb-a3-ci-toggle,
#tb-a3 .tb-a3-ci:focus-within .tb-a3-ci-link,
#tb-a3 .tb-a3-ci:focus-within .tb-a3-ci-toggle,
#tb-a3 .tb-a3-more:hover .tb-a3-more-btn,
#tb-a3 .tb-a3-more.is-open .tb-a3-more-btn,
#tb-a3 .tb-a3-more:focus-within .tb-a3-more-btn {
  color: #1e6fc4;
  background: transparent;
}
#tb-a3 .tb-a3-all-btn:hover,
#tb-a3 .tb-a3-all-btn:focus,
#tb-a3 .tb-a3-all.is-open .tb-a3-all-btn,
#tb-a3 .tb-a3-all:focus-within .tb-a3-all-btn {
  background: #0f4f8f;
  color: #fff;
}
#tb-a3 .tb-a3-ci.is-current:not(:hover):not(.is-open):not(:focus-within) {
  box-shadow: inset 0 -3px 0 #fff;
}
#tb-a3 .tb-a3-all-btn:focus-visible,
#tb-a3 .tb-a3-more-btn:focus-visible,
#tb-a3 .tb-a3-ci-link:focus-visible,
#tb-a3 .tb-a3-ci-toggle:focus-visible {
  outline: 2px solid #fff;
  outline-offset: -2px;
}
#tb-a3 .tb-a3-ci:hover .tb-a3-ci-link:focus-visible,
#tb-a3 .tb-a3-ci.is-open .tb-a3-ci-link:focus-visible,
#tb-a3 .tb-a3-more:hover .tb-a3-more-btn:focus-visible,
#tb-a3 .tb-a3-more.is-open .tb-a3-more-btn:focus-visible {
  outline-color: #1e6fc4;
}
#tb-a3 .tb-a3-more {
  margin-left: auto;
}
#tb-a3 .tb-a3-more.is-empty {
  display: none;
}

/* hidden bar items (fit script) stay in the DOM for measurement */
#tb-a3 .tb-a3-ci.is-overflow {
  position: absolute;
  visibility: hidden;
  pointer-events: none;
  left: -9999px;
}

/* dropdowns — 3-column grid for subcategory lists, single column for All/More */
#tb-a3 .tb-a3-dd {
  display: none;
  position: absolute;
  top: 44px;
  left: 0;
  z-index: 400;
  background: #fff;
  color: #1f2d3d;
  border: 1px solid #d5dde7;
  border-top: 3px solid #1e6fc4;
  box-shadow: 0 10px 24px rgba(15, 34, 56, 0.18);
  padding: 12px 16px;
  grid-template-columns: 1fr;
  gap: 2px 16px;
  max-height: min(70vh, 560px);
  overflow: auto;
  text-align: left;
  min-width: 240px;
}
#tb-a3 .tb-a3-ci .tb-a3-dd {
  grid-template-columns: 1fr;
  min-width: 240px;
}
#tb-a3 .tb-a3-ci .tb-a3-dd.tb-a3-dd-cols-2 {
  grid-template-columns: repeat(2, minmax(200px, 250px));
  min-width: 0;
}
#tb-a3 .tb-a3-ci .tb-a3-dd.tb-a3-dd-cols-3 {
  grid-template-columns: repeat(3, minmax(200px, 250px));
  min-width: 0;
}
#tb-a3 .tb-a3-all .tb-a3-dd {
  left: 0;
  right: auto;
  min-width: 260px;
}
#tb-a3 .tb-a3-more .tb-a3-dd {
  right: 0;
  left: auto;
  min-width: 260px;
}
#tb-a3 .tb-a3-dd[hidden] {
  display: none !important;
}
#tb-a3 .tb-a3-slot.is-open > .tb-a3-dd {
  display: grid;
}
#tb-a3 .tb-a3-dd-h {
  grid-column: 1 / -1;
  font-size: 13px;
  font-weight: 700;
  color: #1e6fc4;
  padding: 0 0 6px;
  margin-bottom: 4px;
  border-bottom: 1px solid #dfe6ee;
  text-transform: none;
  letter-spacing: 0;
}
#tb-a3 .tb-a3-dd a {
  display: block;
  padding: 5px 0;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.3;
  color: #1f2d3d;
  white-space: normal;
  overflow-wrap: break-word;
  min-width: 0;
  border-bottom: 1px solid #f0f3f6;
}
#tb-a3 .tb-a3-dd a:hover,
#tb-a3 .tb-a3-dd a:focus {
  background: transparent;
  color: #1e6fc4;
}
#tb-a3 .tb-a3-dd a:focus-visible {
  outline: 2px solid #1e6fc4;
  outline-offset: 2px;
}
#tb-a3 .tb-a3-dd a.is-overflow-hidden {
  display: none;
}

@media (min-width: 992px) {
  #tb-a3 {
    display: block;
  }

  /* Hide the previous desktop header chrome only. Keep breadcrumbs, alerts,
     the mobile logo, and the left Superfish sidebar. Do not hide #navbar-extra
     or the navigation bar (those sit outside includes/header.php). */
  #storeLogo,
  #BestPrice,
  #catMenu,
  #headerShortcuts,
  #SA_trust_widget_top_500,
  .modular-header > .row > .search,
  .modular-header .tnb-hdr-call,
  .modular-header a[href="https://www.shopperapproved.com/reviews/Tankandbarrel.com"] img,
  .modular-header #bbblink,
  img[src*="contact-us-phone.png"],
  img[src*="lowest-prices"],
  img[src*="bestprice"],
  img[src*="best-price"] {
    display: none !important;
  }

  /* Collapse leftover empty rows from the old logo/search/seal modules.
     :has() is ignored by very old browsers; the rules above still hide the chrome. */
  .modular-header > .row:has(#storeLogo),
  .modular-header > .row:has(#BestPrice),
  .modular-header > .row:has(#catMenu),
  .modular-header > .row:has(#headerShortcuts),
  .modular-header > .row:has(#SA_trust_widget_top_500) {
    display: none !important;
  }
}

@media (max-width: 991px) {
  #tb-a3 {
    display: none !important;
  }
}

/* Mid-width desktop: drop payment marks first, then shrink gaps */
@media (min-width: 992px) and (max-width: 1199px) {
  #tb-a3 .tb-a3-pay {
    display: none;
  }
  #tb-a3 .tb-a3-phone small {
    display: none;
  }
  #tb-a3 .tb-a3-row-logo .tb-a3-wrap {
    gap: 14px;
  }
  #tb-a3 .tb-a3-logo img {
    height: 60px;
  }
  #tb-a3 .tb-a3-row-trust {
    font-size: 13px;
  }
  #tb-a3 .tb-a3-all-btn,
  #tb-a3 .tb-a3-more-btn,
  #tb-a3 .tb-a3-ci-link,
  #tb-a3 .tb-a3-ci-toggle {
    font-size: 14px;
  }
}
@media (min-width: 1100px) and (max-width: 1199px) {
  #tb-a3 .tb-a3-row-trust {
    font-size: 14px;
  }
}

/* Mid-large desktop: keep the bold trust strip on one line.
   1200-1279 is tight once payment marks return, so use 13px there. */
@media (min-width: 1200px) and (max-width: 1279px) {
  #tb-a3 .tb-a3-row-trust {
    font-size: 13px;
  }
  #tb-a3 .tb-a3-pay {
    gap: 4px;
  }
}
@media (min-width: 1280px) and (max-width: 1439px) {
  #tb-a3 .tb-a3-row-trust {
    font-size: 14px;
  }
  #tb-a3 .tb-a3-pay {
    gap: 4px;
  }
}

/* Checkout pages (v20261127b): the header PHP skips the category
   bar on checkout_shipping, checkout_payment and checkout_confirmation.
   This hides the leftover #catMenu from the old header modules on
   those pages too (it can still appear on tablets under 992px).
   Side columns and the footer are left to the store's existing
   Slim Checkout module. */
#tb-a3.tb-a3-checkout ~ #catMenu,
#tb-a3.tb-a3-checkout ~ .row #catMenu {
  display: none !important;
}
