/* ============================================
   CRITICAL MOBILE FIXES
   Additional layer to ensure perfect mobile display
   ============================================ */

/* Prevent horizontal scroll at all costs */
html {
  width: 100%;
  scroll-behavior: smooth;
  /* NO position:relative - it breaks sticky! */
  /* NO overflow-x here either - mixed with body's overflow-x: hidden
     it makes <html> its own scroll container and breaks sticky too! */
}

body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  /* NO position:relative - it breaks sticky! */
}

/* Ensure all major containers respect viewport */
/* NOTE: "nav" is intentionally excluded here. Giving a <nav> element
   overflow-x: hidden makes its overflow-y auto-compute to "auto" (per the
   CSS overflow spec), turning it into a clipping/scroll container. Since
   the header's dropdown submenu (.new-9483) is a descendant of
   .slow_aec1 (a <nav>), it was getting clipped and forced into a tiny
   internal scrollbar instead of opening naturally below the nav link. */
main,
section,
article,
footer {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header must NOT have max-width restriction for sticky to work */
header.wrapper_over_955b {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".hard-86ce" is intentionally excluded here for the same reason as
   "nav" above — the header's <div class="container"> wraps the nav and
   must not clip the dropdown submenu with an auto-computed overflow-y.
   It's already width-capped via max-width in style.cold_31f0 so it can't cause
   horizontal overflow anyway. */
.tag_5294,
.over-0227,
.info_easy_0a35,
.menu-e5a3,
.soft_d51c,
.first-765a,
.light-7540,
.element_abca,
.hard-dc78,
.description-motion-563b,
.picture-black-a18c {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .active_10a0 {
    padding: 8px 0;
  }
  
  .pattern-89d6 img {
    height: 28px;
    width: auto;
  }
  
  .notice_653e {
    display: none !important;
  }
  
  .accordion-huge-4d35 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .accordion-huge-4d35 svg {
    width: 14px;
    height: 14px;
  }
  
  .picture-205f {
    padding: 6px;
  }
  
  .alert-fc90 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .info_easy_0a35,
  .over-0227,
  .menu-e5a3,
  .soft_d51c,
  .main-new-e642,
  .column_gas_eb41,
  .silver_d2ef,
  .slider_b135,
  .heading-black-095c,
  .in_ddab,
  .old_3db8 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .east-7684,
  .rough-3c44 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .status-complex-c041,
  .caption_8319,
  .input_cold_076c,
  .title-d23d,
  .tabs-d19e,
  .media_8a63,
  .texture_fresh_b19d {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }
  
  /* Ensure images are responsive */
  img,
  svg,
  picture {
    max-width: 100% !important;
    height: auto !important;
  }
  
  /* Better padding for mobile */
  .notice-red-8650,
  .hover_motion_060a,
  .heading-013f,
  .hard-5664,
  .icon-over-ca69 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .label-6038,
  .stone_2e9c,
  .full_4776,
  .warm_2e8b {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .rough-584a,
  .lower_eb54 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .down_224c,
  .module_b2bc,
  .photo_west_db16,
  .active-brown-9e2a {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .content-54e0,
  .mini-2ee4,
  .detail-a4b8,
  .header-hot-461d,
  .filter_up_83c3,
  .narrow-573b {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .notice-red-8650,
  .hover_motion_060a,
  .hard-5664 {
    max-width: none !important;
  }
  
  .hard-86ce {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .label-6038 {
    font-size: 1.5rem !important;
  }
  
  .stone_2e9c {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .up_de90,
  .block_8e7c {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .full_4776 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .gallery-iron-f983 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .wrapper_iron_6738 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .notice-red-8650,
  .hard-5664 {
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
  }
}

/* iPhone X and notch devices */
@supports (padding: max(0px)) {
  body {
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }
}

/* css-noise: 0d02 */
.widget-item-w1 {
  padding: 0.5rem;
  font-size: 12px;
  line-height: 1.0;
}
