/* =====================================================
   AcFixMart — Mobile Fixes Patch
   Add this file as:  <link rel="stylesheet" href="mobile_fixes.css">
   just before </head> in index.php
   ===================================================== */

/* ── 1. Root overflow prevention ───────────────────── */
html, body {
  overflow-x: hidden !important;
  max-width: 100%;
}
*, *::before, *::after {
  box-sizing: border-box;
}

/* ── 2. Navbar — fix cramping & clipping ────────────── */
#mainNav {
  padding: 0 12px !important;
}
.nav-inner {
  gap: 6px !important;
  min-width: 0;
  width: 100%;
}
.nav-brand {
  flex-shrink: 0;
  gap: 6px !important;
}
.nav-brand img {
  width: 30px !important;
  height: 30px !important;
}
.brand-word {
  font-size: 17px !important;
  white-space: nowrap;
}
.nav-actions {
  flex-shrink: 0 !important;
  gap: 6px !important;
  min-width: 0;
}
.nav-ham {
  flex-shrink: 0 !important;
  min-width: 36px !important;
  width: 36px !important;
  height: 36px !important;
}

/* Hide Login ghost button on mobile (hamburger handles auth) */
@media (max-width: 767px) {
  .btn-nav-ghost {
    display: none !important;
  }
}

/* Shrink "Book Now" on very small screens */
@media (max-width: 380px) {
  .btn-nav-cta {
    padding: 7px 10px !important;
    font-size: 12px !important;
  }
  .btn-nav-cta .cta-label {
    display: none;
  }
  .brand-word {
    font-size: 14px !important;
  }
  .nav-brand img {
    width: 26px !important;
    height: 26px !important;
  }
}

/* ── 3. Section wrappers — contain content ──────────── */
.section-wrap {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 1200px !important;
  overflow-x: hidden;
}
@media (max-width: 767px) {
  .section-wrap {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }
}

/* ── 4. Hero — prevent overflow ─────────────────────── */
.hero {
  overflow-x: hidden !important;
}
.hero-inner {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 1400px !important;
}
@media (max-width: 767px) {
  .hero-inner {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }
}

/* ── 5. Map section — KEY FIX ───────────────────────── */
#techSection .section-wrap {
  overflow-x: hidden !important;
}
.loc-grid {
  width: 100% !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}
.search-wrap {
  width: 100% !important;
  box-sizing: border-box !important;
}
.search-wrap input {
  width: 100% !important;
  box-sizing: border-box !important;
  max-width: 100% !important;
}
#map {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}
.map-btns {
  width: 100% !important;
  box-sizing: border-box !important;
}
.btn-map-set,
.btn-map-book {
  box-sizing: border-box !important;
  min-width: 0 !important;
}

/* Fix Leaflet geosearch bar overflow on mobile */
.leaflet-control-geosearch.bar {
  width: min(calc(100vw - 90px), 400px) !important;
  max-width: calc(100vw - 90px) !important;
  box-sizing: border-box !important;
}
.leaflet-control-geosearch form input {
  width: 100% !important;
  box-sizing: border-box !important;
}

/* ── 6. Services slider — contain it ───────────────── */
.svc-slider-wrap {
  max-width: 100% !important;
  overflow: hidden !important;
  position: relative;
}
#servicesSlider {
  max-width: 100% !important;
}
@media (max-width: 640px) {
  .svc-card {
    min-width: calc(100vw - 56px) !important;
  }
}

/* ── 7. Flip cards / collapse sections ─────────────── */
.flip-card-outer,
.flip-body,
.flip-body-inner,
.reg-wrap {
  box-sizing: border-box !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
}
.flip-trigger {
  box-sizing: border-box !important;
  width: 100% !important;
}
@media (max-width: 480px) {
  .ft-label {
    font-size: 13px !important;
  }
}

/* ── 8. Offers & products grids ─────────────────────── */
.offers-grid,
.products-grid {
  box-sizing: border-box !important;
  width: 100% !important;
}
.offer-card,
.product-card {
  box-sizing: border-box !important;
  max-width: 100% !important;
}

/* ── 9. Reviews ─────────────────────────────────────── */
#customerReviews {
  width: 100% !important;
  overflow-x: hidden !important;
}
.review-card {
  box-sizing: border-box !important;
  max-width: 100% !important;
  word-break: break-word !important;
  overflow-wrap: anywhere !important;
}

/* ── 10. Promo / products section wrappers ──────────── */
#promoOffersSection,
#recommendedProductsSection {
  box-sizing: border-box !important;
  width: 100% !important;
  overflow-x: hidden !important;
  padding-left: 14px !important;
  padding-right: 14px !important;
}
@media (min-width: 768px) {
  #promoOffersSection,
  #recommendedProductsSection {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
}

/* ── 11. Footer ─────────────────────────────────────── */
footer {
  box-sizing: border-box !important;
  width: 100% !important;
  overflow-x: hidden !important;
}
.footer-grid {
  box-sizing: border-box !important;
  width: 100% !important;
}

/* ── 12. Fixed floating buttons ─────────────────────── */
/* WhatsApp button — keep away from edge on small screens */
#whatsappButton {
  right: 12px !important;
  bottom: 16px !important;
}
/* Contact side tab — ensure it doesn't clip */
#contactInfoButton {
  right: 0 !important;
  z-index: 999 !important;
}

/* ── 13. Mobile menu — full width, no overflow ──────── */
#mobileMenuNew {
  box-sizing: border-box !important;
  width: 100% !important;
  left: 0 !important;
  right: 0 !important;
  overflow-x: hidden !important;
}
.mob-links a,
.mob-btn {
  box-sizing: border-box !important;
  max-width: 100% !important;
}

/* ── 14. Announcement ticker ────────────────────────── */
#announcementBar {
  box-sizing: border-box !important;
  width: 100% !important;
  overflow: hidden !important;
}

/* ── 15. Auth modal ─────────────────────────────────── */
#authModal {
  box-sizing: border-box !important;
  padding: 14px !important;
}
.auth-box {
  box-sizing: border-box !important;
  max-width: min(420px, calc(100vw - 28px)) !important;
  width: 100% !important;
}