/* ============================================
   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 (.hover-dirty-5f90) is a descendant of
   .black-1bc2 (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.breadcrumb-inner-0945 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".chip_cold_123a" 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.liquid-33ee so it can't cause
   horizontal overflow anyway. */
.fixed_06ee,
.pro-1e93,
.detail_1a19,
.modal_9028,
.shadow_large_22e0,
.first_0e43,
.notification_fast_7dca,
.link-faf7,
.white-2a8d,
.dropdown-bea3,
.lite_0740 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .pink-8713 {
    padding: 8px 0;
  }
  
  .action-9e29 img {
    height: 28px;
    width: auto;
  }
  
  .row-476a {
    display: none !important;
  }
  
  .heading_hard_6762 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .heading_hard_6762 svg {
    width: 14px;
    height: 14px;
  }
  
  .black-3b1c {
    padding: 6px;
  }
  
  .box-1584 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .detail_1a19,
  .pro-1e93,
  .modal_9028,
  .shadow_large_22e0,
  .warm_e8af,
  .gold_4738,
  .header_f9b7,
  .item-upper-d36e,
  .texture_first_d63d,
  .heading-5513,
  .bottom-d889,
  .carousel-a05a {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .main-f594,
  .sort_new_a35d {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .upper-4605,
  .aside-steel-78fa,
  .pink-949e,
  .tiny-eba7,
  .shadow_7fe1,
  .outline_old_8de6,
  .texture_545c {
    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 */
  .fixed-da56,
  .active-1eef,
  .summary-smooth-776a,
  .table-63a6,
  .bronze_18e8 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .media_53ba,
  .banner-center-71be,
  .panel_f599,
  .card_next_b18f {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .east_360f,
  .iron-6d03 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .south-9fec,
  .row-2784,
  .motion-bcee,
  .static_1571 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .status_9d30,
  .shade-171e,
  .nav_8bc4,
  .preview-next-0fc7,
  .detail-591a,
  .carousel-under-48fb {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .fixed-da56,
  .active-1eef,
  .table-63a6 {
    max-width: none !important;
  }
  
  .chip_cold_123a {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .media_53ba {
    font-size: 1.5rem !important;
  }
  
  .banner-center-71be {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .primary-medium-fe47,
  .hot-150e {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .panel_f599 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .fluid-902f {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .content-old-173e {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .fixed-da56,
  .table-63a6 {
    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: c683 */
.ghost-box-s9 {
  padding: 0.2rem;
  font-size: 12px;
  line-height: 1.3;
}
