/* Global mobile fixes for all pages */

* {
  box-sizing: border-box;
}

img,
video,
iframe {
  max-width: 100%;
  height: auto;
}

html,
body {
  overflow-x: hidden;
}

@media (max-width: 1200px) {
  .footer-grid,
  .footer-nav-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 768px) {
  /* Hide hero background photos on mobile — gradient only */
  .hero::before {
    content: none !important;
    display: none !important;
    background: none !important;
    opacity: 0 !important;
  }

  .hero-bg {
    display: none !important;
    opacity: 0 !important;
  }

  .hero {
    min-height: auto !important;
  }

  .container {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  .footer-grid,
  .footer-nav-grid {
    grid-template-columns: 1fr !important;
    gap: 18px !important;
  }

  .footer-col,
  .footer-nav-col {
    min-width: 0;
  }

  .footer-col h4,
  .footer-nav-col h4 {
    margin-bottom: 10px !important;
  }

  .footer-col a,
  .footer-nav-col a {
    padding: 4px 0;
    line-height: 1.35;
  }

  .footer .footer-col > div[style*="display:flex"] {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 14px !important;
  }

  .footer .footer-col > div[style*="display:flex"] > div[style*="min-width"] {
    width: min(320px, 100%) !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin-top: 0 !important;
    text-align: center !important;
  }

  .footer .footer-col > div[style*="display:flex"] > p {
    margin: 0 !important;
    text-align: center !important;
    width: 100% !important;
  }

  .top-bar-left {
    display: none !important;
  }

  .header-nav {
    display: none !important;
  }

  .search-row,
  .filter-row,
  .sizes-grid,
  .size-grid,
  .products-grid,
  .info-cards,
  .seo-features,
  .cards-grid {
    grid-template-columns: 1fr !important;
  }

  table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .mobile-cats-accordion .panel-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 12px 10px;
  }

  .mobile-cats-accordion .panel-col {
    display: flex;
    flex-direction: column;
    min-width: 0;
  }

  .mobile-cats-accordion .panel-title {
    font-size: 11px;
    font-weight: 700;
    color: #003366;
    padding: 8px 12px 4px;
    text-transform: uppercase;
  }

  .mobile-cats-accordion .cat-item {
    align-items: center;
    min-width: 0;
  }

  .mobile-cats-accordion .cat-item span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (max-width: 390px) {
  .container {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  .footer .footer-col > div[style*="display:flex"] > div[style*="min-width"] {
    width: 100% !important;
  }

  .mobile-cats-accordion .panel-grid {
    grid-template-columns: 1fr;
  }
}
