/* brand-41-lockedloaded-mobile.css
 * Locked & Loaded: phone and tablet fixes from the mobile layout audit of 2026-10-11 (MOB-xxx ids are the audit rows).
 *
 * Store-only: header.php loads every assets/css/brand-*.css on every page after theme.css, and releases never ship or
 * overwrite brand-*.css. The defects themselves live in shared files (professional-fixes.min.css, theme.css,
 * cookie-consent.php, search.php), so the same fixes belong in those files fleet-wide; until then this file overrides
 * them here. Selectors carry an extra `html body` where the shared rule is !important, so they win on specificity.
 */

/* MOB-001 (critical): professional-fixes sets body{touch-action:pan-y !important} at <=992px, which blocks pinch-zoom on
   every page while the viewport tag looks clean (WCAG 1.4.4). manipulation keeps panning and pinch-zoom and only drops
   double-tap zoom. Sideways drift is already prevented by the overflow-x guard. */
@media (max-width: 992px) {
  html body { touch-action: manipulation !important; }
}

/* MOB-003 / MOB-004: iOS zooms the page in when a field under 16px is tapped, and it stays zoomed. Every text field,
   select and textarea is 16px on touch screens (phones in both orientations and tablets). */
@media (pointer: coarse) {
  html body input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="submit"]):not([type="button"]):not([type="hidden"]),
  html body select,
  html body textarea { font-size: 16px !important; }
}

/* MOB-016: on phones the clear (x) sat in the middle of the search field (positioned for the desktop button width).
   Make it a plain item between the field and the Search button. */
@media (max-width: 900px) {
  html body .search-bar .search-clear {
    position: static !important; transform: none !important; left: auto !important; right: auto !important;
    width: 38px !important; height: auto !important; align-self: stretch !important; justify-content: center !important;
    align-items: center !important; background: #fff !important; color: #555 !important;
    border: 1px solid #939393 !important; border-left: 0 !important; border-right: 0 !important; border-radius: 0 !important;
    padding: 0 !important; font-size: 20px !important;
  }
}

/* MOB-006 / MOB-007: browse-only listing cards. The button label "In-store - call for availability" was nowrap and
   spilled out of its button on tablets and desktops, and on 2-column phones the same sentence in the price slot broke
   mid-word ("availabilit / y"). Let the button wrap on whole words, and drop the duplicate sentence from the price slot
   (the button says it). */
html body .product-card a.btn.btn-block {
  white-space: normal !important; overflow-wrap: normal !important; word-break: normal !important; hyphens: none !important;
  height: auto !important; min-height: 40px; line-height: 1.25 !important; text-align: center;
}
html body .product-card .product-price .price-tbd { display: none !important; }

/* MOB-013: the closed filter drawer kept a 26px shadow inside the left edge of every listing page, and its controls
   stayed in the tab order. Shadow and visibility only while it is open. */
@media (max-width: 1024px) {
  html body:not(.sr-filters-open) .filter-sidebar {
    box-shadow: none !important; visibility: hidden !important;
    transition: transform .26s ease, visibility 0s linear .26s !important;
  }
  html body.sr-filters-open .filter-sidebar {
    visibility: visible !important; box-shadow: 2px 0 26px rgba(0,0,0,.28) !important; transition: transform .26s ease !important;
  }
}

/* MOB-015: the cookie banner floated 80px up "to avoid a chatbot" this store does not have, covering 44% of a 320x640
   screen and the login email field. Pin it to the bottom edge and keep it compact; on landscape phones cap its height. */
@media (max-width: 480px) {
  html body #cookieConsent.cookie-consent {
    bottom: 0 !important; left: 0 !important; right: 0 !important; max-width: none !important;
    border-radius: 12px 12px 0 0 !important; border-bottom: 0 !important; padding: 12px 14px !important;
  }
  html body #cookieConsent .cookie-consent-content { gap: 10px !important; }
  html body #cookieConsent .cookie-description { font-size: 13px !important; margin-bottom: 0 !important; }
  html body #cookieConsent .cookie-actions { flex-direction: row !important; gap: 8px !important; }
  html body #cookieConsent .cookie-actions .btn { width: auto !important; flex: 1 1 0 !important; min-height: 44px; }
}
@media (max-height: 500px) and (orientation: landscape) {
  html body #cookieConsent.cookie-consent {
    bottom: 0 !important; left: 0 !important; right: 0 !important; max-width: none !important;
    border-radius: 12px 12px 0 0 !important; padding: 10px 14px !important; max-height: 42vh; overflow-y: auto;
  }
  html body #cookieConsent .cookie-icon { display: none !important; }
  html body #cookieConsent .cookie-consent-content { flex-wrap: nowrap !important; align-items: center !important; gap: 12px !important; }
  html body #cookieConsent .cookie-heading { font-size: 14px !important; margin-bottom: 2px !important; }
  html body #cookieConsent .cookie-description { font-size: 12px !important; }
  html body #cookieConsent .cookie-actions { flex-direction: column !important; width: auto !important; flex: 0 0 auto !important; gap: 6px !important; }
  html body #cookieConsent .cookie-actions .btn { width: auto !important; white-space: nowrap; }
}

/* MOB-017: overflow-x:hidden on html, body and the listing wrappers turns them into scroll containers, so the sticky
   FILTERS bar never stuck. clip hides sideways overflow the same way without creating a scroll container. Browsers
   without clip (Safari 15 and older) drop this declaration and keep the old hidden behaviour. */
html:root, html body { overflow-x: clip !important; }
@media (max-width: 768px) {
  html body .container, html body .content-page, html body .search-layout, html body .search-results-main, html body section {
    overflow-x: clip !important;
  }
}

/* MOB-012: About page contact cards ran off the right edge at 320/375 (long email and notes in a grid cell). */
@media (max-width: 480px) {
  html body .about-container .contact-bar { padding: 0 !important; }
  html body .about-container .contact-bar > * { min-width: 0; }
  html body .about-container .contact-item .value,
  html body .about-container .contact-item .sub,
  html body .about-container .contact-item a { overflow-wrap: anywhere; }
}
