/* ── GLOBAL MOBILE RESPONSIVENESS OVERRIDES ── */

/* Safety viewport constraints */
html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

/* 1. TOP UTILITY BAR RESPONSIVENESS */
@media (max-width: 768px) {
  .top-utility-bar {
    height: auto !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    padding: 0.75rem 1rem !important;
    text-align: center !important;
  }
  
  .utility-contacts {
    flex-direction: column !important;
    gap: 0.35rem !important;
    align-items: center !important;
  }
  
  .utility-contacts a {
    font-size: 0.75rem !important;
  }
  
  .utility-actions {
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
  }

  .utility-spec-link {
    font-size: 0.75rem !important;
  }
}

/* 2. SITE HEADER & LOGO ADJUSTMENTS */
@media (max-width: 768px) {
  .site-header {
    height: 70px !important;
    top: 90px !important; /* Push header below stacked utility bar */
    padding: 0 1.5rem !important;
    position: absolute !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
  }

  /* Scrolled header state reset top and shrink logo */
  .site-header.scrolled {
    top: 0 !important;
    height: 65px !important;
    position: fixed !important;
  }

  .header-logo-img {
    height: 48px !important;
  }

  .site-header.scrolled .header-logo-img {
    height: 42px !important;
  }

  .mobile-menu-toggle {
    display: flex !important;
  }
}

@media (max-width: 480px) {
  .site-header {
    top: 110px !important; /* Stacked utility bar is taller on small viewports */
  }
}

/* 3. HERO BUTTONS & TEXT FOR HOME & SERVICES */
@media (max-width: 576px) {
  .hero-title {
    font-size: 2.5rem !important;
    line-height: 1.15 !important;
  }
  
  .hero-subtitle {
    font-size: 0.95rem !important;
  }

  .hero-actions {
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100% !important;
    gap: 0.75rem !important;
  }

  .hero-actions .btn {
    width: 100% !important;
    text-align: center !important;
  }
}

/* 4. CONFIGURATION SELECTOR TAB GRID OVERRIDES */
@media (max-width: 1200px) {
  .config-horizontal-grid {
    grid-template-columns: repeat(4, 1fr) !important;
  }
}

@media (max-width: 992px) {
  .config-horizontal-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
  .config-bottom-split {
    flex-direction: column !important;
    gap: 2rem !important;
  }
}

@media (max-width: 576px) {
  .config-horizontal-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.75rem !important;
  }
  .config-horizontal-grid .config-table-row {
    padding: 1rem 0.5rem !important;
  }
  .config-row-title {
    font-size: 0.8rem !important;
  }
}

/* 5. SPLIT LAYOUT ADJUSTMENTS FOR FOOTER AND FORMS */
@media (max-width: 768px) {
  /* Contact Form side-by-side field stack override */
  .form-container form div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  /* Main footer column stacking */
  .footer-top {
    grid-template-columns: 1fr !important;
    gap: 2.5rem !important;
    text-align: center !important;
  }

  .footer-brand-col, .footer-links-col, .footer-contact-col {
    padding: 0 !important;
  }

  .footer-bottom {
    flex-direction: column !important;
    gap: 1rem !important;
    text-align: center !important;
    padding: 2rem 1rem !important;
  }

  .footer-bottom-links {
    justify-content: center !important;
    flex-wrap: wrap !important;
    gap: 1rem !important;
  }
}

/* 6. GENERAL SUBPAGES ADAPTABILITY */
@media (max-width: 1024px) {
  /* Catalog grids stacking */
  .catalog-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.5rem !important;
  }
  
  /* Hero split sections responsive vertical stacking */
  .sm-hero-container {
    flex-direction: column !important;
    gap: 2.5rem !important;
  }
  
  .sm-hero-left, .sm-hero-right {
    flex: none !important;
    width: 100% !important;
  }
}

@media (max-width: 768px) {
  .catalog-grid {
    grid-template-columns: 1fr !important;
  }

  .sm-hero-meta-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  .drawings-grid-centered .drawing-card {
    flex: 0 1 100% !important;
    width: 100% !important;
  }

  .specs-container {
    grid-template-columns: 1fr !important;
    gap: 2.5rem !important;
  }

  .specs-table td {
    padding: 0.65rem 0.5rem !important;
    font-size: 0.8rem !important;
  }
}
