/* ═══════════════════════════════════════════════════════════════════════════
   SPR — MOBILE-ONLY STYLES
   ---------------------------------------------------------------------------
   Every page links this file with  media="(max-width: 767px)",  and every rule
   below is also wrapped in the same media query. Browsers wider than 767px
   (desktops, laptops and tablets) never apply anything in this file, so the
   desktop design is untouched.
   The phone menu itself is created by mobile.js.
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 767px) {

  /* ─────────────  1. HEADER  ───────────── */

  /* The contact bar moves into the menu (and stays in the footer). */
  .utility-bar { display: none !important; }

  .main-header { padding-top: 8px !important; padding-bottom: 8px !important; }
  .main-header-inner {
    padding: 0 max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px)) !important;
    gap: 10px !important;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
  }
  .main-header .brand-mark { width: 96px !important; flex: 0 0 auto; }

  .header-utils { display: flex !important; align-items: center; gap: 8px !important; }
  .header-utils .search-icon { display: none !important; }   /* had no function */
  .main-header .btn-quote,
  .sticky-nav .nav-cta {
    padding: 0 14px !important;
    min-height: 40px;
    display: inline-flex !important;
    align-items: center;
    font-size: 13px !important;
    font-weight: 600;
    border-radius: 8px !important;
    white-space: nowrap;
    letter-spacing: 0.01em;
  }

  /* Hamburger button (added by mobile.js, in the header and the sticky bar) */
  .m-burger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0;
    margin: 0;
    background: transparent;
    border: 1px solid rgba(244,239,230,0.16);
    border-radius: 8px;
    color: #f4efe6;
    cursor: pointer;
    flex: 0 0 auto;
    -webkit-tap-highlight-color: transparent;
  }
  .m-burger span {
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
  }
  .m-burger:focus-visible { outline: 2px solid #c7873a; outline-offset: 2px; }
  .m-burger:active { background: rgba(244,239,230,0.06); }

  /* Compact bar that slides in on scroll */
  .sticky-nav {
    padding: 8px max(16px, env(safe-area-inset-right, 0px)) 8px max(16px, env(safe-area-inset-left, 0px)) !important;
    gap: 10px !important;
  }
  .sticky-nav .sticky-brand .spr-logo-img { width: 72px !important; }
  .sticky-nav .nav-cta { margin-left: auto; }

  /* ─────────────  5. MOBILE MENU PANEL  ───────────── */
  html.m-menu-open, html.m-menu-open body { overflow: hidden !important; }

  .m-menu {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: #050505;
    color: #f4efe6;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: env(safe-area-inset-top, 0px) max(20px, env(safe-area-inset-right, 0px)) calc(28px + env(safe-area-inset-bottom, 0px)) max(20px, env(safe-area-inset-left, 0px));
    font-family: 'Inter', system-ui, sans-serif;
  }
  .m-menu[hidden] { display: none !important; }

  .m-menu-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(244,239,230,0.08);
  }
  .m-menu-top .m-menu-logo img { width: 96px; height: auto; display: block; }
  .m-close {
    width: 44px; height: 44px;
    display: inline-flex; align-items: center; justify-content: center;
    background: transparent;
    border: 1px solid rgba(244,239,230,0.16);
    border-radius: 8px;
    color: #f4efe6;
    cursor: pointer;
    padding: 0;
  }
  .m-close svg { width: 20px; height: 20px; }
  .m-close:focus-visible { outline: 2px solid #c7873a; outline-offset: 2px; }

  .m-menu-nav { list-style: none; margin: 8px 0 0; padding: 0; }
  .m-menu-nav > li { border-bottom: 1px solid rgba(244,239,230,0.08); }
  .m-menu-nav a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 52px;
    color: #f4efe6;
    text-decoration: none;
    font-size: 17px;
    font-weight: 500;
    letter-spacing: 0.01em;
  }
  .m-menu-nav a.is-current { color: #c7873a; }
  .m-menu-nav a:active { color: #e8a24c; }
  .m-menu-nav .m-sub { list-style: none; margin: -6px 0 10px; padding: 0 0 0 14px; border-left: 1px solid rgba(199,135,58,0.35); }
  .m-menu-nav .m-sub a { min-height: 42px; font-size: 15px; font-weight: 400; color: #c9c3b8; }
  .m-menu-nav .m-sub a.is-current { color: #c7873a; }

  .m-menu-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 22px 0 0;
    min-height: 50px;
    background: #c7873a;
    color: #0a0a0a;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
  }
  .m-menu-cta:active { background: #e8a24c; }

  .m-menu-contact { margin-top: 26px; }
  .m-menu-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: #c7873a;
    margin-bottom: 6px;
  }
  .m-menu-contact a {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 46px;
    color: #f4efe6;
    text-decoration: none;
    font-size: 15px;
    border-bottom: 1px solid rgba(244,239,230,0.06);
    word-break: break-word;
  }
  .m-menu-contact a .m-who { color: #c7873a; min-width: 44px; font-weight: 500; }
  .m-menu-contact a .m-ico { width: 18px; height: 18px; color: #c7873a; flex: 0 0 auto; }

  /* ─────────────  2. HOMEPAGE STATISTICS  ───────────── */
  /* mobile.js moves this strip from above the hero to just below it. */
  .badges-strip { border-top: 1px solid rgba(255,255,255,0.07); }
  .badges-strip-inner { grid-template-columns: repeat(2, 1fr) !important; }
  .badges-strip .badge-pill {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    padding: 12px 14px !important;
    text-align: left !important;
    border-right: 1px solid rgba(255,255,255,0.06) !important;
    border-bottom: 1px solid rgba(255,255,255,0.06) !important;
    min-height: 58px;
  }
  .badges-strip .badge-pill:nth-child(2n) { border-right: none !important; }
  .badges-strip .badge-pill:nth-child(3),
  .badges-strip .badge-pill:nth-child(4) { border-bottom: none !important; }
  .badges-strip .badge-pill .num {
    font-size: 24px !important;
    min-width: 44px;
  }
  .badges-strip .badge-pill .lbl {
    font-size: 9px !important;
    letter-spacing: 0.14em !important;
    line-height: 1.45 !important;
    text-align: left !important;
  }

  /* ─────────────  3. HOMEPAGE HERO  ───────────── */
  .hero { padding: 10px 10px 0 !important; }
  .hero-frame { min-height: 0 !important; border-radius: 12px !important; }
  .hero-content { padding: 22px 16px 70px !important; }
  .hero-logo {
    width: 112px !important;
    margin: 0 auto 12px !important;
  }
  .hero h1 {
    font-size: clamp(26px, 7.6vw, 32px) !important;
    line-height: 1.12 !important;
    letter-spacing: -0.015em !important;
    margin: 0 auto 10px !important;
    text-shadow: 0 2px 18px rgba(0,0,0,0.75);
    text-wrap: balance;
  }
  .hero p.lede {
    font-size: 14.5px !important;
    line-height: 1.55 !important;
    margin: 0 auto 18px !important;
    color: rgba(244,239,230,0.88) !important;
    text-shadow: 0 1px 12px rgba(0,0,0,0.8);
    max-width: 34em;
  }
  .hero-ctas {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    gap: 8px !important;
    width: 100%;
    max-width: 360px;
  }
  .hero-ctas > a { flex: 1 1 0; min-width: 0; }
  .hero-ctas .btn-quote,
  .hero-ctas .btn-ghost-dark {
    width: 100%;
    justify-content: center !important;
    text-align: center;
    padding: 12px 10px !important;
    min-height: 48px;
    font-size: 14px !important;
    white-space: nowrap;
    display: inline-flex !important;
    align-items: center;
    gap: 10px;
  }
  /* "Credits include" logo strip inside the hero */
  .hero-trust { margin-top: 22px !important; }
  .hero-trust-label { font-size: 9.5px !important; letter-spacing: 0.18em !important; margin-bottom: 12px !important; }
  .hero-trust-logos { gap: 12px 18px !important; max-width: 350px; margin: 0 auto !important; }
  .hero-trust-logo img { height: 16px !important; max-width: 64px !important; }
  .hero-trust-logo--mid img  { height: 20px !important; }
  .hero-trust-logo--tall img { height: 25px !important; }

  /* A touch more shade behind the text so it reads on every photo */
  .hero-slideshow::after {
    background:
      radial-gradient(ellipse at 30% 70%, rgba(199,135,58,0.18), transparent 55%),
      linear-gradient(180deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.55) 45%, rgba(0,0,0,0.88) 100%) !important;
  }

  /* ─────────────  4. SPACING & TYPOGRAPHY  ───────────── */
  .section-pad {
    padding-top: 56px !important;
    padding-bottom: 56px !important;
    padding-left: max(18px, env(safe-area-inset-left, 0px)) !important;
    padding-right: max(18px, env(safe-area-inset-right, 0px)) !important;
  }
  .trust { padding: 56px max(18px, env(safe-area-inset-left, 0px)) !important; }
  .trust h2 { margin: 16px 0 12px !important; }
  .trust .sub { margin-bottom: 28px !important; }
  .trust-logo { height: 86px !important; padding: 16px !important; }
  .credits-wall .section-pad { padding-bottom: 48px !important; }
  .section-head { margin-bottom: 28px !important; }
  .contact-info li { gap: 14px !important; padding: 16px 0 !important; }
  .contact-info .ci-label { min-width: 84px !important; }
  .contact-form { padding: 28px 20px !important; }

  /* Comfortable tap targets for form fields */
  .contact-form input,
  .contact-form select,
  .contact-form textarea { font-size: 16px !important; } /* stops iPhone zooming in */

}

/* ═══════════════════════════════════════════════════════════════════════════
   ROUND 2 FIXES (phones only)
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 767px) {

  /* ─────────────  Fix 1: homepage slideshow arrows  ─────────────
     The arrows and dots sat in a layer underneath the hero text, so on a
     phone every tap landed on the text. Lift them above it, make them
     visible without a mouse, and put them in the bottom row beside the
     dots so they never cover the headline or buttons. */
  .hero-slideshow { z-index: auto !important; }
  .hero .slide-arrow {
    opacity: 1 !important;
    top: auto !important;
    bottom: 12px;
    transform: none !important;
    width: 44px !important;
    height: 44px !important;
    border-radius: 50%;
    font-size: 15px !important;
    background: rgba(5,5,5,0.6) !important;
    color: #f4efe6 !important;
    border: 1px solid rgba(244,239,230,0.22) !important;
    z-index: 14 !important;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }
  .hero .slide-arrow.prev { left: 12px !important; }
  .hero .slide-arrow.next { right: 12px !important; }
  .hero .slide-arrow:active { background: #c7873a !important; color: #050505 !important; border-color: #c7873a !important; }
  .hero .slideshow-nav { bottom: 33px !important; gap: 8px !important; z-index: 14 !important; }
  .hero .slide-dot { width: 22px !important; }
  .hero .slide-dot.active { width: 34px !important; }

  /* ─────────────  Fix 2: Catalogue dropdown in the menu  ───────────── */
  .m-acc {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 52px;
    padding: 0;
    background: none;
    border: 0;
    color: #f4efe6;
    font: inherit;
    font-size: 17px;
    font-weight: 500;
    letter-spacing: 0.01em;
    text-align: left;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .m-acc.is-current { color: #c7873a; }
  .m-acc .m-caret {
    width: 28px; height: 28px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid rgba(244,239,230,0.16);
    border-radius: 6px;
    color: #c7873a;
    transition: transform .2s ease;
  }
  .m-acc .m-caret svg { width: 14px; height: 14px; }
  .m-acc[aria-expanded="true"] .m-caret { transform: rotate(180deg); }
  .m-acc:focus-visible { outline: 2px solid #c7873a; outline-offset: 2px; }
  .m-menu-nav .m-sub[hidden] { display: none !important; }

  /* ─────────────  Fix 3 & 4: land below the top bar  ─────────────
     Leaves room for the compact bar so headings/forms aren't hidden. */
  #enquiryForm { scroll-margin-top: 80px; }
  #contact, #about, #credits, #home { scroll-margin-top: 72px; }

  /* ─────────────  Fix 5: Call / WhatsApp per person  ───────────── */
  .m-person {
    padding: 12px 0;
    border-bottom: 1px solid rgba(244,239,230,0.06);
  }
  .m-person-line { display: flex; align-items: center; gap: 12px; color: #f4efe6; font-size: 15px; }
  .m-person-line .m-who { color: #c7873a; min-width: 44px; font-weight: 500; }
  .m-person-line .m-ico { width: 18px; height: 18px; color: #c7873a; flex: 0 0 auto; }
  .m-person-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
  .m-menu-contact .m-person-actions a {
    min-height: 44px;
    justify-content: center;
    gap: 8px;
    border: 1px solid rgba(199,135,58,0.45);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #f4efe6;
  }
  .m-menu-contact .m-person-actions a:active { background: rgba(199,135,58,0.15); }
  .m-menu-contact .m-person-actions a svg { width: 17px; height: 17px; color: #c7873a; flex: 0 0 auto; }

  /* ─────────────  Fix 6: Services video play button  ───────────── */
  .m-video-play {
    position: absolute;
    right: 12px;
    top: 12px;
    z-index: 20;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid rgba(244,239,230,0.3);
    background: rgba(5,5,5,0.7);
    color: #f4efe6;
    font: 600 14px 'Inter', system-ui, sans-serif;
    cursor: pointer;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
  }
  .m-video-play[hidden] { display: none !important; }
  .m-video-play svg { width: 14px; height: 14px; color: #c7873a; }
  .m-video-play:focus-visible { outline: 2px solid #c7873a; outline-offset: 2px; }
  /* When a visitor with reduced motion chooses to play it, show it. */
  .hero-video.m-video-on video { display: block !important; }

  /* ─────────────  Fix 8: catalogue as a two-column product gallery  ───────────── */
  .cat-grid-v2 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }
  .cat-card-v2 { border-radius: 10px !important; }
  .cat-card-v2:hover { transform: none !important; }
  .cat-card-v2 .card-img-v2 { aspect-ratio: 1 / 1 !important; }
  .cat-card-v2 .card-img-v2 .img-photo {
    object-fit: contain !important;   /* never crop the weapon */
    padding: 8px !important;
  }
  .cat-card-v2 .card-img-v2 .placeholder-svg svg { width: 70%; }
  .cat-card-v2 .card-badges { top: 8px !important; left: 8px !important; gap: 4px !important; max-width: calc(100% - 30px) !important; }
  .cat-card-v2 .card-badges .badge { font-size: 9px !important; padding: 3px 7px !important; gap: 4px !important; }
  .cat-card-v2 .card-badges .badge svg { width: 9px !important; height: 9px !important; }
  .cat-card-v2 .availability-dot { top: 9px !important; right: 9px !important; width: 8px !important; height: 8px !important; }
  .cat-card-v2 .card-body-v2 { padding: 10px 10px 12px !important; gap: 5px !important; }
  .cat-card-v2 .card-cat-line { font-size: 9px !important; letter-spacing: 0.12em !important; line-height: 1.35 !important; }
  .cat-card-v2 .card-title-v2 { font-size: 14px !important; line-height: 1.25 !important; margin: 0 !important; overflow-wrap: anywhere; }
  .cat-card-v2 .card-desc-v2 {
    font-size: 12px !important;
    line-height: 1.45 !important;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .cat-card-v2 .card-chips { gap: 4px !important; }
  .cat-card-v2 .meta-chip { font-size: 9.5px !important; padding: 3px 6px !important; letter-spacing: 0.02em !important; }

  /* ─────────────  Fix 9: filters stay at the top, never follow the page  ───────────── */
  .cat-sidebar {
    position: static !important;
    top: auto !important;
    max-height: none !important;
    overflow: visible !important;
    z-index: auto !important;
  }
  .cat-layout { gap: 20px !important; padding-left: 0 !important; padding-right: 0 !important; }
  /* Less side padding so two cards fit comfortably on small phones */
  .cat-section-body {
    padding-left: max(14px, env(safe-area-inset-left, 0px)) !important;
    padding-right: max(14px, env(safe-area-inset-right, 0px)) !important;
  }
  .cat-grid-v2 { gap: 10px !important; }
}

/* Three per row only on wider phones held sideways / small tablets
   (still below the 768px desktop cut-off). */
@media (min-width: 600px) and (max-width: 767px) {
  .cat-grid-v2 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}

/* Reduced motion: no automatic sliding of the homepage photos on phones */
@media (max-width: 767px) and (prefers-reduced-motion: reduce) {
  .hero-slide { transition: none !important; }
}
