/* ========================================
   HEATX it — iOS-first layer (Astro rebuild)
   Native scroll-snap hero carousel + small mobile fixes.
   No background-image slides, no JS-dependent layout.
   ======================================== */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ----- Hero carousel ----- */
.hero-carousel {
  margin-top: 72px;
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--bg-dark, #0a0a0f);
  /* iOS Safari: horizontal gestures belong to the scroll-snap track */
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
}

.hero-track {
  display: flex;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  -webkit-overflow-scrolling: -webkit-auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.hero-track::-webkit-scrollbar { display: none; }

.hero-slide {
  position: relative;
  flex: 0 0 100%;
  min-width: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  height: clamp(420px, 44vw, 620px);
  background: #0a0a0f;
  overflow: hidden;
}

.hero-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: none;
}

/* ----- Arrows ----- */
.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(10, 10, 15, 0.55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, opacity 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.hero-arrow:hover { background: rgba(0, 212, 255, 0.35); }
.hero-prev { left: 16px; }
.hero-next { right: 16px; }

/* ----- Dots ----- */
.hero-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18px;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 8px;
}
.hero-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
  -webkit-tap-highlight-color: transparent;
}
.hero-dot.active {
  background: linear-gradient(135deg, #00d4ff, #6c5ce7);
  transform: scale(1.25);
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.6);
}

/* ----- Mobile: taller cover slides, hidden arrows (swipe + dots are the iOS way) ----- */
@media (max-width: 768px) {
  .hero-slide { height: clamp(240px, 62vw, 340px); }
  .hero-arrow { display: none; }
  .hero-dots { bottom: 12px; }
}
@media (max-width: 480px) {
  .hero-slide { height: 240px; }
  .hero-dot { width: 8px; height: 8px; }
}
@media (max-width: 360px) {
  .hero-slide { height: 210px; }
}

/* ----- iOS rendering hardening ----- */
img {
  -webkit-touch-callout: none;
}
.product-image img,
.product-detail-image img,
.npk-mat img {
  object-fit: contain;
}
@supports (-webkit-touch-callout: none) {
  /* Safari-only: keep momentum scrolling sane inside horizontal galleries */
  .gallery-thumbs,
  .spb-stack,
  .npk-grid {
    -webkit-overflow-scrolling: touch;
  }
}

/* Respect reduced motion: no autoplay animation-driven movement */
@media (prefers-reduced-motion: reduce) {
  .hero-track { scroll-behavior: auto !important; }
}
