/* Royal Metals launch hardening — non-invasive responsive refinements. */
*, *::before, *::after { box-sizing: border-box; }
img, video, svg { max-width: 100%; }
img { height: auto; }
main, main > section, .rm-container { min-width: 0; }
:where(h1,h2,h3,h4,p,li,a) { overflow-wrap: break-word; }
:where(a,button,input,select,textarea):focus-visible { outline: 3px solid #76b74b; outline-offset: 3px; }
@media (max-width: 767px) {
  .rm-container { width: min(100% - 32px, 100%); }
  :where(input:not([type="checkbox"]):not([type="radio"]),select,textarea) { max-width: 100%; }
  :where(.rm-btn,button,[role="button"]) { touch-action: manipulation; }
  .rm-product-card, .rm-product-card-body { min-width: 0; }
}
@media (max-width: 420px) {
  .rm-home-products .rm-product-grid,.rm-products-catalogue .rm-product-grid { gap: 12px; }
  .rm-home-products .rm-product-card-body,.rm-products-catalogue .rm-product-card-body { padding: 12px; }
  .rm-home-products .rm-product-card h3,.rm-products-catalogue .rm-product-card h2 { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
}

/* Stage 14.2: mobile hero information strip shows a single complete card per swipe. */
@media (max-width: 600px) {
  .rm-hero .rm-hero-information {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    width: min(100% - 32px, 100%);
    gap: 12px;
    padding: 2px 0 15px;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #8bea4b99 transparent;
  }
  .rm-hero .rm-hero-information-card,
  .rm-hero .rm-hero-information-card:last-child {
    flex: 0 0 100%;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    padding: 18px;
  }
  .rm-hero .rm-hero-information-copy { flex: 1; min-width: 0; }
  .rm-hero .rm-hero-information-title { font-size: 15px; }
  .rm-hero .rm-hero-information-label { font-size: 12px; }
  .rm-hero .rm-hero-actions { flex-wrap: wrap; }
  .rm-hero .rm-hero-actions .rm-btn { max-width: 100%; }
  /* On the hero, the fixed controls are intentionally hidden to avoid covering information cards. */
  body.home .rm-floating-controls.rm-hero-in-view { opacity: 0; visibility: hidden; pointer-events: none; }
  body.home .rm-floating-controls { transition: opacity .2s ease, visibility .2s ease; }
}

/* Stage 14.3: unobtrusive utility controls for narrow phones. */
@media (max-width: 600px) {
  .rm-floating-controls { right: max(10px, env(safe-area-inset-right)); left: auto; gap: 8px; bottom: calc(12px + env(safe-area-inset-bottom) + var(--rm-floating-offset, 0px) + var(--rm-floating-obstruction, 0px)); }
  .rm-floating-controls .rm-whatsapp { width: 44px; height: 44px; --rm-wave-scale: 1.15; }
  .rm-floating-controls .rm-whatsapp svg { width: 24px; height: 24px; }
  .rm-floating-controls .rm-back-to-top { width: 38px; height: 38px; border-radius: 12px; }
  .rm-floating-controls .rm-back-to-top svg { width: 20px; height: 20px; }
  .rm-floating-controls.rm-form-in-view { opacity: 0; visibility: hidden; pointer-events: none; }
  .rm-floating-controls.rm-form-in-view > * { pointer-events: none; }
  .rm-floating-controls { transition: opacity .18s ease, visibility .18s ease; }
}
@media (prefers-reduced-motion: reduce) {
  .rm-floating-controls { transition: none; }
}
