/* ==========================================================================
   Titan Graphics fix pack CSS - 3 Dec 2026
   Theme 1.0.40: loaded from inc/fix-140.php after titan-search.css.
   Rules use the same "body.titan-graphics" prefix as the theme so they win
   over titan-search.css / titan-header.css without needing !important
   everywhere. Header rules tested locally at 1120, 1280, 1366 and 1440px.
   ========================================================================== */

/* --- 1. HEADER CLIPPED AT 1280-1439px ------------------------------------
   Cause: titan-search.css shows the full search field in the bar from 1280px
   up (width clamp(190px,17vw,260px)). Together with the nav and tools it
   does not fit until ~1440px, so the logo ("TITANGRAPHIC") and "Our Work"
   get clipped. Fix: keep the search ICON (dropdown) until 1440px.        */
@media (min-width: 1280px) and (max-width: 1439px) {
  body.titan-graphics .titan-header-v25 .header-search-toggle {
    display: inline-flex !important;
  }
  body.titan-graphics .titan-header-v25 .header-search {
    display: none !important;
    position: absolute !important;
    top: calc(100% + 8px) !important;
    right: 0 !important;
    width: 380px !important;
    max-width: calc(100vw - 24px) !important;
    padding: 8px !important;
    background: #1C1C1E !important;
    border: 1px solid rgba(255,255,255,0.12) !important;
    border-radius: 8px !important;
    box-shadow: 0 12px 28px rgba(0,0,0,0.35) !important;
  }
  body.titan-graphics .titan-header-v25 .header-search.is-open {
    display: flex !important;
    gap: 6px;
  }
  body.titan-graphics .titan-header-v25 .header-search .search-submit-text {
    position: static; width: auto; height: auto; clip: auto; overflow: visible;
  }
  body.titan-graphics .titan-header-v25 .header-search button.search-submit {
    width: auto !important; padding: 0 12px !important;
  }
}

/* Logo: the theme caps the <a> at 170px but the image at 190px, so the
   image is clipped (shows "TITANGRAPHIC"). With the search collapsed to an
   icon there is room for the full 190px logo.                            */
@media (min-width: 1280px) and (max-width: 1439px) {
  body.titan-graphics .titan-header-v25 .brand-link { max-width: 190px; }
}

/* 1120-1279px: nav + logo + tools are tight. Trim spacing/font a little.   */
@media (min-width: 1120px) and (max-width: 1279px) {
  body.titan-graphics .titan-header-v25 .brand-link { margin-right: 4px; }
  body.titan-graphics .titan-header-v25 .nav-list { gap: 0 2px; }
  body.titan-graphics .titan-header-v25 .nav-link,
  body.titan-graphics .titan-header-v25 button.nav-link { font-size: 14px !important; padding: 8px 3px; }
  body.titan-graphics .titan-header-v25 .nav-replace { font-size: 14px !important; padding: 5px 8px; }
  body.titan-graphics .titan-header-v25 .header-tools { gap: 6px; }
  body.titan-graphics .titan-header-v25 .basket-link { font-size: 14px !important; }
  body.titan-graphics .titan-header-v25 .nav-quote { padding-left: 12px; padding-right: 12px; font-size: 14px !important; }
}

/* --- 3. EMPTY BULK PRICE TABLE ------------------------------------------
   inc/fix-140.php adds the class .titan-bulk-empty (via a tiny script) when
   every price cell in the table is "-" or blank. Once the pricing rule has
   real prices the class is never added and the table shows normally.      */
body.single-product .bulk_table.titan-bulk-empty,
body.single-product .wdp_pricing_table_caption.titan-bulk-empty {
  display: none !important;
}

/* --- 4. COOKIE BANNER ON PHONES -----------------------------------------
   Banner covers the lower third of a 375px screen. Make it a compact bar.  */
@media (max-width: 767px) {
  .cc-window.cc-banner, .cc-window.cc-floating {
    max-height: 38vh;
    overflow-y: auto;
    padding: 10px 14px !important;
    font-size: 14px !important;
    line-height: 1.35 !important;
  }
}
