/**
 * Stable viewport: smooth scroll, no overscroll bounce, no accidental zoom, map locked.
 */

html {
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overscroll-behavior: none;
  scroll-behavior: smooth;
  height: 100%;
}

body {
  overflow-x: clip;
  max-width: 100%;
  min-height: 100%;
  overscroll-behavior: none;
  -webkit-overflow-scrolling: touch;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* Deliberate horizontal scrollers */
.shop-cats,
.catalog-mobile-nav,
.catalog-sidebar__list,
.admin-tabs,
[data-shop-scroll] {
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}

/* Reduce accidental double-tap zoom; normal vertical scroll unchanged */
a,
button,
.btn,
.btn-admin,
.shop-cat-tile,
.lcs-nav__btn,
.lcs-nav__mega-link,
.carousel__nav--ctrl {
  touch-action: manipulation;
}

/* Map: pan only via +/- controls */
.lcs-map,
.lcs-map .leaflet-container,
.lcs-map .maplibregl-canvas,
.lcs-map .maplibregl-map {
  touch-action: none;
}

.lcs-map-frame .leaflet-control-zoom,
.lcs-map-frame .leaflet-control-zoom a,
.lcs-map .maplibregl-ctrl-zoom {
  touch-action: manipulation;
}

/* Bottom nav — fixed to safe area (no visualViewport shift on scroll) */
.lcs-nav,
.lcs-nav--4,
.lcs-nav--5 {
  bottom: var(--nav-bar-offset, max(0.75rem, env(safe-area-inset-bottom, 0px))) !important;
}

/* Logo preload fade-in */
.logo,
.site-footer__logo {
  opacity: 0;
  transition: opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.logo.logo--ready,
.site-footer__logo.logo--ready {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .logo,
  .site-footer__logo {
    opacity: 1;
    transition: none;
  }
}

/* Contrast: faint utility text on light surfaces */
.section--linen .shop-cats__title,
.section--shop-preview .shop-cats__title {
  color: var(--muted, #4a4844);
  opacity: 1;
}

.lcs-lang-alt {
  color: rgba(26, 26, 26, 0.58);
}

.page-home #main,
.catalog-main,
.product-detail--shop,
.legal-page__main {
  overflow-x: clip;
  max-width: 100%;
}
