/* ==========================================================================
   Mobile fit fixes (2026-11-26)
   Loaded by head.php, head1.php and head3.php straight after style.css, so it
   reaches every storefront page. The ?v= on the <link> busts phone caches —
   bump it whenever this file changes.
   Every rule is inside a max-width media query: the desktop layout (992px and
   up) is not touched. See CHANGE_LOG.md 2026-11-26.
   ========================================================================== */

/* 1. The phone menu (the ☰ menu: navbar-expand-lg collapses below 992px).
      The <li>s carry inline desktop widths (width:100px/120px/130px) and the
      "My Account" button an inline margin-top:-20px that lines it up with the
      desktop link row. Once the menu stacks vertically:
        - the -20px pulls "My Account" up over the "Contact" link, leaving
          only the top half of "Contact" visible (and untappable);
        - the dropdowns are only as wide as their 100-130px <li> (or the 160px
          Bootstrap minimum), so "Remanufactured Turbos" and
          "Refund/Cancellations" run out of the white box onto the black menu. */
@media (max-width: 991.98px) {
    #worldNav .navbar-nav > .nav-item {
        width: auto !important;
    }
    #worldNav .dropdown-item {
        white-space: normal;
    }
    #worldNav .navbar-nav .button {
        margin-top: 6px !important;
    }
}

/* 2. The "FIND YOUR TURBO" search box (.portform: index.php + sidebar.php).
      On phones each "Go!" sits in a Bootstrap .row (-15px side margins) inside
      a .form-group that is itself pushed 25px right, so the empty right-hand
      column box reaches past the screen edge. Nothing visible is out there,
      but it made every storefront page 4px wider than the phone screen (the
      page wobbles sideways and the fixed header stretched with it). Clip the
      card's horizontal overflow: the input and button stay well inside it.
      `clip` keeps overflow-y visible; older browsers fall back to `hidden`. */
@media (max-width: 575.98px) {
    .portform {
        overflow-x: hidden;
        overflow-x: clip;
    }
}

/* 3. Pictures in the content column (franchise.php, franchise1.php).
      style.css stretches .post-style-4 thumbnails to min-width:100% on phones,
      and franchise.php shifts each one with an inline margin-left:160px meant
      for desktop, so every turbo picture hung 160px off the right edge (cut in
      half) and dragged the header's ☰ button off-screen with it. */
@media (max-width: 575.98px) {
    .single-blog-post.post-style-4 .post-thumbnail {
        margin-left: 0 !important;
    }
}

/* 4. Header row on the smallest phones (under 360px: iPhone SE 1st gen /
      iPhone 5 / compact Androids at 320px). Logo + the phone cart link
      (inline width:150px !important, margin-left:10px) + the ☰ button need
      ~334px, so the ☰ button wrapped onto a second line: under the logo on
      the head3.php pages, and out of sight entirely on index.php/shop.php
      (head.php) — no way to open the menu. The inline !important width can't
      be overridden, but max-width still caps it, and the icon + count fit. */
@media (max-width: 359.98px) {
    .navbar > .cart101 {
        margin-left: 0 !important;
        max-width: calc(100% - 158px);
        padding-left: 8px !important;
        padding-right: 8px !important;
    }
}

/* 5. The white content card (.post-content) is a flex item, so it refuses to
      shrink below its widest content. On shop.php that left the card 6px
      wider than the phone screen. min-width:0 lets it fit the screen; the
      stacked parts table and car box inside already fit the narrower width. */
@media (max-width: 767.98px) {
    .single-blog-post.post-style-4 > .post-content {
        min-width: 0;
    }
}
