/* ============================
   CRITICAL MOBILE FIXES
   High Priority Mobile Responsiveness
============================= */

/* Prevent horizontal scrolling on all devices */
html, body {
  overflow-x: hidden !important;
  width: 100% !important;
  max-width: 100vw !important;
  position: relative !important;
}

/* Universal box-sizing for mobile */
*, *::before, *::after {
  box-sizing: border-box !important;
}

/* Mobile-first responsive breakpoints */
@media (max-width: 768px) {
  
  /* HEADER CRITICAL FIXES */
  .header-wrapper {
    width: 100% !important;
    max-width: 100vw !important;
    overflow: hidden !important;
    position: relative !important;
  }
  
  .main-header {
    padding: 10px 15px !important;
    min-height: 60px !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }
  
  .header-container {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
  }
  
  .logo-text {
    font-size: 1.6rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  
  .mobile-icons {
    display: flex !important;
    gap: 10px !important;
    flex-shrink: 0 !important;
  }
  
  /* LOADER MOBILE FIXES */
  .loader-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 10000 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
  }
  
  .loader-content {
    text-align: center !important;
    padding: 20px !important;
  }
  
  .loader-gif {
    width: 100px !important;
    height: 100px !important;
    max-width: 100px !important;
    max-height: 100px !important;
  }
  
  .loader-text {
    font-size: 0.9rem !important;
    margin-top: 15px !important;
  }
  
  /* MODAL MOBILE FIXES */
  .unified-modal-overlay {
    padding: 10px !important;
  }
  
  .unified-modal {
    width: 95% !important;
    max-width: 95vw !important;
    max-height: 85vh !important;
    margin: 0 !important;
    border-radius: 15px !important;
  }
  
  .modal-header {
    padding: 1rem !important;
  }
  
  .modal-content {
    padding: 1rem !important;
    max-height: calc(85vh - 80px) !important;
  }
  
  .tab-btn {
    padding: 0.5rem 1rem !important;
    font-size: 0.85rem !important;
  }
  
  .tab-btn span {
    display: inline !important;
  }
  
  /* PRODUCT PAGE MOBILE FIXES */
  .product-hero {
    padding-top: 80px !important;
    min-height: 60vh !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  .product-hero-container {
    gap: 1rem !important;
    padding: 0 !important;
  }
  
  .product-title {
    font-size: 1.75rem !important;
    line-height: 1.2 !important;
    margin-bottom: 1rem !important;
  }
  
  /* BUTTON MOBILE ENHANCEMENTS */
  .submit-button,
  .cta-button,
  .action-btn {
    min-height: 44px !important;
    font-size: 0.9rem !important;
    padding: 12px 20px !important;
    border-radius: 22px !important;
  }
  
  /* FORM MOBILE FIXES */
  .form-group input,
  .form-group textarea,
  .search-input {
    min-height: 44px !important;
    font-size: 1rem !important;
    padding: 12px 15px !important;
  }
  
  /* TOUCH TARGET SIZES */
  .mobile-icons button,
  .modal-close,
  .tab-btn,
  .suggestion-tag {
    min-width: 44px !important;
    min-height: 44px !important;
  }
  
  /* SPACING ADJUSTMENTS */
  .section-padding {
    padding: 2rem 1rem !important;
  }
  
  /* PREVENT ZOOM ON INPUT FOCUS */
  input, textarea, select {
    font-size: 1rem !important;
  }
}

/* Extra small devices */
@media (max-width: 480px) {
  .logo-text {
    font-size: 1.4rem !important;
  }
  
  .loader-gif {
    width: 80px !important;
    height: 80px !important;
  }
  
  .loader-text {
    font-size: 0.8rem !important;
  }
  
  .unified-modal {
    width: 98% !important;
    max-height: 90vh !important;
  }
  
  .product-title {
    font-size: 1.5rem !important;
  }
}

/* Landscape orientation fixes for mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .product-hero {
    min-height: 80vh !important;
  }
  
  .loader-overlay {
    height: 100vh !important;
    height: -webkit-fill-available !important;
  }
}

/* iOS Safari specific fixes */
@supports (-webkit-touch-callout: none) {
  .loader-overlay {
    height: -webkit-fill-available !important;
  }
  
  .unified-modal {
    max-height: 80vh !important;
  }
}