/* ═══════════════════════════════════════════════════════
   RACK N RACKS — MOBILE RESPONSIVE CSS v29
   ═══════════════════════════════════════════════════════ */

html { overflow-x: hidden; }
body { overflow-x: hidden; max-width: 100vw; }
* { box-sizing: border-box; }

/* ── Hamburger (hidden on desktop) ── */
.mob-ham {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px; height: 44px;
  background: linear-gradient(135deg, #0a1e3d, #1a3a6b);
  border: none; border-radius: 10px;
  cursor: pointer; padding: 10px;
  z-index: 1200; flex-shrink: 0;
}
.mob-ham span {
  display: block; width: 20px; height: 2px;
  background: #fff; border-radius: 2px; pointer-events: none;
}
.mob-brand {
  display: none;
  font-family: Garet,Montserrat,Arial,sans-serif;
  font-size: 1.1rem; font-weight: 700;
  color: #fff; letter-spacing: 1px; text-decoration: none;
}

/* ── Mobile drawer ── */
.mob-drawer {
  display: none;
  position: fixed; top: 0; left: 0;
  width: min(300px, 80vw); height: 100%;
  background: #060d1a; z-index: 9000;
  padding: 68px 24px 40px;
  transform: translateX(-100%);
  transition: transform 0.32s cubic-bezier(0.4,0,0.2,1);
  overflow-y: auto;
  box-shadow: none; visibility: hidden;
  transition: transform 0.32s cubic-bezier(0.4,0,0.2,1), visibility 0s 0.32s;
}
.mob-drawer.open { transform: translateX(0); visibility: visible; box-shadow: 6px 0 40px rgba(0,0,0,0.6); transition: transform 0.32s cubic-bezier(0.4,0,0.2,1), visibility 0s; }
.mob-drawer a {
  display: block;
  font-family: Garet,Montserrat,Arial,sans-serif; font-size: 1rem; font-weight: 500;
  color: rgba(255,255,255,0.8); padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  text-decoration: none; transition: color 0.2s;
}
.mob-drawer a:hover { color: #2979ff; }
.mob-drawer-close {
  position: absolute; top: 16px; right: 16px;
  background: none; border: none;
  color: rgba(255,255,255,0.55); font-size: 1.5rem;
  cursor: pointer; line-height: 1; padding: 4px 8px;
}
.mob-quote-btn {
  display: block !important; margin-top: 20px;
  text-align: center;
  background: linear-gradient(135deg,#1a3a6b,#2979ff) !important;
  color: #fff !important; font-weight: 700 !important;
  padding: 13px !important; border-radius: 10px;
  border-bottom: none !important; font-size: 0.95rem;
}
.mob-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.55); z-index: 8999;
  opacity: 0; transition: opacity 0.3s; pointer-events: none;
}
.mob-overlay.show { opacity: 1; pointer-events: all; }

/* ── Sidebar toggle (product pages) ── */
.mob-sidebar-btn { display: none; }

/* ═══════════ TABLET: 769px – 900px ═══════════ */
@media (max-width: 900px) {
  .nav-links li a { font-size: 0.74rem; padding: 5px 7px; }
  .btn-quote      { font-size: 0.74rem; padding: 8px 14px; }
  .products-grid  { grid-template-columns: repeat(2,1fr) !important; }
  .page-layout    { grid-template-columns: 1fr !important; }
  .sidebar        { border-left: none !important; border-top: 1px solid #eee; padding: 30px 5vw !important; }
  .main-content   { border-right: none !important; padding: 30px 5vw !important; }
  .gallery-grid   { grid-template-columns: repeat(2,1fr) !important; }
  .iso-section    { grid-template-columns: 1fr !important; text-align: center; gap: 30px !important; }
  .iso-list li    { justify-content: center; }
  .offices-grid   { grid-template-columns: 1fr 1fr !important; }
}

/* ═══════════ MOBILE: max 768px ═══════════ */
@media (max-width: 768px) {

  /* Header */
  #site-header {
    padding: 0 16px !important; height: 58px !important;
    display: flex !important; align-items: center !important;
    justify-content: space-between !important;
  }
  .mob-ham     { display: flex !important; }
  .mob-brand   { display: block !important; }
  .mob-drawer  { display: block !important; }
  .mob-overlay { display: block !important; }
  .nav-pill    { display: none !important; }
  .mega-menu, .has-mega:hover .mega-menu { display: none !important; }

  /* Hero */
  .hero-section {
    height: 100svh !important; min-height: 580px !important;
    align-items: stretch !important; padding-top: 112px !important;
  }
  .hero-content  {
    padding: 0 5vw 64px !important; max-width: 100% !important;
    display: flex !important; flex-direction: column !important;
    align-items: flex-start !important; text-align: left !important;
    width: 100%;
  }
  .hero-headline-wrap { max-width: 100% !important; margin-bottom: 14px !important; }
  .sl-head { font-size: clamp(1.75rem, 8vw, 2.5rem) !important; line-height: 1.12 !important; }
  .sl-name { font-size: 0.95rem !important; margin-top: 8px !important; }
  .hero-tagline  { font-size: 0.62rem !important; letter-spacing: 2px !important; margin-bottom: 10px !important; }
  .hero-subtitle-wrap { height: 26px !important; margin-bottom: 12px !important; width: 100%; }
  .slide-label   { font-size: 0.9rem !important; }
  .hero-desc     { font-size: 0.8625rem !important; max-width: 100% !important; margin-bottom: 22px !important; }
  /* buttons pinned to bottom-left of the hero */
  .hero-cta      { flex-direction: column !important; gap: 10px !important; align-items: flex-start !important; margin-top: auto !important; }
  .hero-cta a    { font-size: 0.8rem !important; padding: 11px 22px !important; width: auto !important; text-align: center !important; }
  .hero-right-panel { display: none !important; }

  /* Stats bar */
  .stats-bar { grid-template-columns: 1fr 1fr !important; padding: 24px 5vw !important; }
  .stat-item { padding: 12px 8px !important; border-right: 1px solid rgba(41,121,255,0.2); border-bottom: 1px solid rgba(41,121,255,0.12); }
  .stat-item:nth-child(2) { border-right: none !important; }
  .stat-item:nth-child(3) { border-bottom: none !important; }
  .stat-item:nth-child(4) { border-right: none !important; border-bottom: none !important; }
  .stat-num  { font-size: 2rem !important; }
  .stat-plus { font-size: 1.5rem !important; }
  .stat-item p { font-size: 0.68rem !important; }

  /* Products: vertical list (one card after another) */
  .products-section { padding: 44px 5vw !important; }
  .products-grid {
    display: grid !important; grid-template-columns: 1fr !important;
    gap: 18px !important; overflow: visible !important;
    padding: 0 !important; scroll-snap-type: none !important;
  }
  .products-grid .product-card {
    min-width: 0 !important; max-width: 100% !important;
    width: 100% !important; flex-shrink: 1 !important;
  }

  /* About Us — stack image above text */
  .about-section {
    flex-direction: column !important; align-items: stretch !important;
    gap: 36px !important; padding: 56px 5vw !important;
  }
  .about-image-col { width: 100% !important; max-width: 100% !important; flex-shrink: 1 !important; }
  .about-img { height: 260px !important; }
  .about-badge { right: 12px !important; bottom: -16px !important; font-size: 1.1rem !important; padding: 12px 18px !important; }
  .about-content { width: 100% !important; min-width: 0 !important; }
  .about-content h2 { font-size: clamp(1.7rem, 7vw, 2.2rem) !important; }
  .about-highlights { padding: 18px !important; }
  .about-content .btn-primary { display: inline-block; }

  /* ISO / Certification — stack badge above text */
  .iso-section {
    display: flex !important; flex-direction: column !important; align-items: center !important;
    padding: 44px 5vw !important;
    gap: 24px !important; text-align: center; overflow: hidden !important;
  }
  .iso-visual { width: 220px !important; height: 220px !important; margin: 0 auto !important; }
  .iso-ring.orbit-outermost { width: 210px !important; height: 210px !important; }
  .iso-ring.orbit-outer     { width: 160px !important; height: 160px !important; }
  .iso-ring.orbit-inner     { width: 110px !important; height: 110px !important; }
  .iso-list li { justify-content: center !important; }
  .iso-content { width: 100% !important; min-width: 0 !important; }
  .iso-content h2 { font-size: 1.8rem !important; }
  .iso-content > p { margin-left: auto !important; margin-right: auto !important; max-width: 100% !important; }
  .iso-list li { text-align: center !important; }
  .iso-ring.orbit-3 { width: 214px !important; height: 214px !important; }
  .iso-ring.outer   { width: 166px !important; height: 166px !important; }
  .iso-ring.inner   { width: 122px !important; height: 122px !important; }
  .iso-badge { width: 100px !important; height: 100px !important; }
  .iso-icon { font-size: 1.4rem !important; margin-bottom: 2px !important; }
  .iso-text { font-size: 1.15rem !important; }
  .iso-sub  { font-size: 0.5rem !important; letter-spacing: 2px !important; }
  .btn-cert { max-width: 100%; justify-content: center; }

  /* Clients */
  .clients-section { padding: 44px 0 54px !important; }
  .mq-fade-left, .mq-fade-right { width: 30px !important; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr 1fr !important; gap: 30px 20px !important; }
  .footer-brand, .footer-contact { grid-column: 1 / -1 !important; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .footer-legal { justify-content: center; }
  .footer-main { padding: 44px 5vw 30px !important; }

  /* Filter bar */
  .filter-bar { flex-wrap: wrap !important; gap: 8px !important; justify-content: center !important; padding: 0 4vw !important; }
  .filter-btn { font-size: 0.72rem !important; padding: 6px 12px !important; }

  /* Product pages */
  .page-layout    { grid-template-columns: 1fr !important; display: block !important; }
  .main-content   { border-right: none !important; padding: 24px 5vw 16px !important; }
  .sidebar        { display: none; border-left: none !important; border-top: 1px solid #eee; padding: 24px 5vw 40px !important; }
  .sidebar.mob-open { display: block !important; }
  .mob-sidebar-btn {
    display: block !important; width: 100%; padding: 11px 16px;
    margin: 0 0 20px; background: #f0f4ff;
    border: 1px solid #d0dcf0; border-radius: 8px;
    font-family: Garet,Montserrat,Arial,sans-serif; font-size: 0.83rem; font-weight: 600;
    color: #1a3a6b; cursor: pointer; text-align: left;
  }

  /* Gallery */
  .gallery-grid { grid-template-columns: repeat(2,1fr) !important; gap: 10px !important; }

  /* Product hero */
  .product-hero { padding: 40px 5vw 28px !important; }
  .product-hero h1 { font-size: clamp(1.8rem,7vw,2.6rem) !important; }
  .hero-badges { gap: 8px !important; }
  .hero-badge  { font-size: 0.64rem !important; padding: 5px 11px !important; }

  /* Contact / Quote */
  .offices-grid { grid-template-columns: 1fr !important; gap: 14px !important; }
  .contact-grid { grid-template-columns: 1fr !important; }
  .quote-grid   { grid-template-columns: 1fr !important; gap: 14px !important; }

  /* Section headings */
  .section-title { font-size: clamp(1.5rem,5.5vw,2rem) !important; }
  .section-tag   { font-size: 0.66rem !important; }
}

/* ═══════════ SMALL PHONE: max 480px ═══════════ */
@media (max-width: 480px) {
  .sl-head { font-size: clamp(1.6rem,8.2vw,2.2rem) !important; }
  .stat-num   { font-size: 1.7rem !important; }
  .stat-plus  { font-size: 1.3rem !important; }
  .iso-visual { width: 190px !important; height: 190px !important; }
  .iso-ring.orbit-outermost { width: 182px !important; height: 182px !important; }
  .iso-ring.orbit-outer     { width: 138px !important; height: 138px !important; }
  .iso-ring.orbit-inner     { width:  96px !important; height:  96px !important; }
  .iso-ring.orbit-3 { width: 184px !important; height: 184px !important; }
  .iso-ring.outer   { width: 144px !important; height: 144px !important; }
  .iso-ring.inner   { width: 106px !important; height: 106px !important; }
  .gallery-grid { grid-template-columns: 1fr !important; }
  .social-icons-row { flex-wrap: wrap; }
  .product-hero h1 { font-size: clamp(1.6rem,8vw,2.2rem) !important; }
}
