/* ==========================================================================
   HEATX CZ — iOS RENDERING LAYER  (astro build 20261018astro1)
   Primitive, version-proof CSS for iPhone Safari.
   No aspect-ratio, no object-fit for layout, no gap for the carousel,
   no CSS custom properties for anything critical.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CAROUSEL — fixed pixel heights, absolutely positioned slides.
   -------------------------------------------------------------------------- */
.ios-carousel,
.carousel-section {
  position: relative;
  display: block;
  width: 100%;
  height: 620px;
  min-height: 0;
  max-height: none;
  margin: 0;
  margin-top: 72px;
  padding: 0;
  overflow: hidden;
  background: #0a0a0f;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  user-select: none;
  touch-action: pan-y;
  z-index: 1;
}
.ios-carousel > .carousel {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* every slide is a fixed-size box, stacked */
.ios-carousel .carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background-color: #0b0d12;
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  visibility: hidden;
  opacity: 0;
  z-index: 1;
  pointer-events: none;
  transition: opacity .45s ease, visibility .45s ease;
  -webkit-transform: translate3d(0, 0, 0);
  -webkit-backface-visibility: hidden;
}
.ios-carousel .carousel-slide.active {
  visibility: visible;
  opacity: 1;
  z-index: 2;
  pointer-events: auto;
}

/* the image is a real, sized element — layout never depends on it loading */
.ios-carousel .carousel-slide .slide-img,
.ios-carousel .carousel-slide > img {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  object-fit: cover;
  object-position: center center;
  -webkit-object-fit: cover;
  -webkit-user-drag: none;
  -webkit-user-select: none;
  pointer-events: none;
}

/* ---------------- controls ---------------- */
.ios-carousel .carousel-arrow {
  position: absolute;
  top: 50%;
  display: block;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 0;
  transform: none;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  background: rgba(8, 10, 16, 0.55);
  color: #fff;
  font-size: 17px;
  line-height: 40px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  z-index: 40;
  -webkit-appearance: none;
  -webkit-border-radius: 50%;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}
.ios-carousel .carousel-arrow:active,
.ios-carousel .carousel-arrow.is-pressed {
  background: #00c4ee;
  border-color: transparent;
}
.ios-carousel .carousel-arrow:hover {
  transform: scale(1.1);
}
.ios-carousel .carousel-prev { left: 8px; }
.ios-carousel .carousel-next { right: 8px; }

/* dots: big invisible hit boxes over a small visual dot */
.ios-carousel .carousel-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  display: block;
  height: 44px;
  margin: 0;
  padding: 0;
  text-align: center;
  font-size: 0;
  line-height: 0;
  z-index: 40;
  pointer-events: none;
  white-space: nowrap;
  transform: none;
}
.ios-carousel .carousel-dot {
  position: relative;
  display: inline-block;
  width: 30px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  pointer-events: auto;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
  vertical-align: top;
}
.ios-carousel .carousel-dot .dot-visual {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  -webkit-border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}
.ios-carousel .carousel-dot.active .dot-visual {
  width: 20px;
  margin-left: -10px;
  border-radius: 4px;
  -webkit-border-radius: 4px;
  background: #00d4ff;
}
.ios-carousel .carousel-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  display: block;
  width: 0;
  height: 3px;
  background: #00d4ff;
  z-index: 41;
  pointer-events: none;
}

/* iPhone sizes: explicit px, tuned so a slide is never taller than 44vh */
@media (max-width: 768px) {
  .ios-carousel, .carousel-section {
    height: 380px;
    margin-top: 64px;
  }
  .ios-carousel .carousel-prev { left: 4px; }
  .ios-carousel .carousel-next { right: 4px; }
  .ios-carousel .carousel-arrow {
    width: 40px;
    height: 40px;
    margin-top: -20px;
    line-height: 36px;
    font-size: 15px;
  }
}
@media (max-width: 480px) {
  .ios-carousel, .carousel-section { height: 340px; }
}
@media (max-width: 360px) {
  .ios-carousel, .carousel-section { height: 340px; }
}
/* landscape phone */
@media (max-width: 900px) and (orientation: landscape) {
  .ios-carousel, .carousel-section { height: 240px; margin-top: 64px; }
}

/* --------------------------------------------------------------------------
   2. PRODUCT GRID — ratio box made with padding, never aspect-ratio
   -------------------------------------------------------------------------- */
.products-grid {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  font-size: 0;              /* kills inline-block whitespace */
  letter-spacing: 0;
  overflow: visible;
}

.product-card {
  display: inline-block;
  vertical-align: top;
  width: 47.8%;
  margin: 0 2.2% 14px 0;
  padding: 0;
  font-size: 14px;
  letter-spacing: normal;
  background: #14161d;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  opacity: 1;
  -webkit-transform: none;
  transform: none;
  -webkit-tap-highlight-color: rgba(0, 212, 255, 0.15);
  box-sizing: border-box;
}
.product-card:nth-child(2n) { margin-right: 0; }

/* whole-card anchor wrapper (static prerendered cards) */
.product-card-link {
  display: block;
  width: 100%;
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: rgba(0, 212, 255, 0.15);
}

/* square ratio box: padding-top percentage is supported since iOS 1 */
.product-card .product-image {
  position: relative;
  display: block;
  width: 100%;
  height: 0;
  padding: 0 0 100% 0;
  overflow: hidden;
  background-color: #12141b;
}
.product-card .product-image > img {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
  -webkit-object-fit: contain;
}
.product-card .product-image > .pi-fallback {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 100%;
  height: 100%;
  background-repeat: no-repeat;
  background-position: center center;
  background-size: contain;
}
.product-card .product-image .product-tag {
  position: absolute;
  top: 9px;
  left: 9px;
  z-index: 3;
  padding: 3px 8px;
  border-radius: 4px;
  background: #00a8d6;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.5px;
  line-height: 1.5;
  text-transform: uppercase;
}
.product-card .product-image .product-tag.new { background: #10b981; }

.product-card .product-info {
  display: block;
  padding: 10px 10px 12px;
  overflow: visible;
}
.product-card .product-category {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.6px;
  color: #00d4ff;
  text-transform: uppercase;
  margin: 0 0 4px;
  line-height: 1.4;
}
.product-card .product-name {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  margin: 0 0 6px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.product-card .product-desc {
  font-size: 11.5px;
  line-height: 1.45;
  color: #9aa3b2;
  margin: 0 0 8px;
  max-height: 33px;
  overflow: hidden;
  word-wrap: break-word;
}
.product-card .product-specs {
  display: block;
  margin: 0 0 8px;
  padding: 0;
  font-size: 0;
}
.product-card .product-spec {
  display: inline-block;
  margin: 0 4px 4px 0;
  padding: 2px 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  font-size: 9.5px;
  line-height: 1.4;
  color: #c8d0dc;
  white-space: nowrap;
}
.product-card .product-footer { display: block; }
.product-card .product-price {
  font-size: 15px;
  font-weight: 800;
  color: #00d4ff;
  line-height: 1.3;
  margin: 0 0 6px;
}
.product-card .product-price > span {
  font-size: 11px;
  font-weight: 400;
  color: #6b7385;
  text-decoration: line-through;
}
.product-card .product-link {
  display: block;
  width: 100%;
  min-height: 34px;
  padding: 7px 4px;
  border: 0;
  border-radius: 8px;
  background: #00a8d6;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
  cursor: pointer;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
}

@media (max-width: 400px) {
  .product-card { width: 48.4%; margin: 0 3.2% 10px 0; }
  .product-card:nth-child(2n) { margin-right: 0; }
  .product-card .product-info { padding: 8px 8px 10px; }
  .product-card .product-name { font-size: 12.5px; }
  .product-card .product-desc { display: none; }
  .product-card .product-price { font-size: 13.5px; }
}

/* tablet / desktop keep three columns */
@media (min-width: 769px) {
  .product-card { width: 31.4%; margin: 0 2.9% 24px 0; }
  .product-card:nth-child(2n) { margin-right: 2.9%; }
  .product-card:nth-child(3n) { margin-right: 0; }
  .product-card .product-info { padding: 18px; }
  .product-card .product-name { font-size: 18px; }
  .product-card .product-desc { font-size: 13px; max-height: none; }
  .product-card .product-price { font-size: 20px; }
  .product-card .product-link { min-height: 42px; font-size: 14px; }
}

/* --------------------------------------------------------------------------
   3. PRODUCT DETAIL — gallery square via padding, thumbs as scroll strip
   -------------------------------------------------------------------------- */
.pd-gallery-main {
  position: relative;
  display: block;
  width: 100%;
  height: 0;
  padding: 0 0 100% 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background-color: #12141b;
  cursor: zoom-in;
  -webkit-tap-highlight-color: transparent;
}
.pd-gallery-main > img {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
  -webkit-object-fit: contain;
  -webkit-transform: none;
  transform: none;
}
.pd-gallery-main > .pd-fallback {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 100%;
  height: 100%;
  background-repeat: no-repeat;
  background-position: center center;
  background-size: contain;
}
.pd-gallery-main > .product-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  padding: 4px 10px;
  border-radius: 5px;
  background: #00a8d6;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.pd-thumbs {
  display: -webkit-box;
  display: block;
  width: 100%;
  margin: 10px 0 0 0;
  padding: 0 0 6px 0;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  font-size: 0;
  -webkit-overflow-scrolling: touch;
}
.pd-thumbs::-webkit-scrollbar { display: none; height: 0; }
.pd-thumbs > img {
  display: inline-block;
  width: 62px;
  height: 62px;
  margin: 0 8px 0 0;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.14);
  border-radius: 9px;
  background: #12141b;
  object-fit: contain;
  -webkit-object-fit: contain;
  vertical-align: top;
  cursor: pointer;
}
.pd-thumbs > img.active { border-color: #00d4ff; }

/* marketing image blocks: give every figure a real height on iOS */
.g2h-banner, .g2h-shot, .g2sp-card, .g2sc-item, .h3pk-stage,
.nasp-frame, .npk-mat, .g2pk-cell {
  position: relative;
  display: block;
  overflow: hidden;
  background-color: #12141b;
}
.g2h-banner img, .g2h-shot img, .g2sp-card img, .g2sc-item img,
.h3pk-stage img, .nasp-screen img, .npk-mat img, .g2pk-cell img {
  display: block;
  width: 100%;
  height: auto;
  min-height: 40px;
  max-width: 100%;
  -webkit-backface-visibility: hidden;
}

@media (max-width: 768px) {
  .pd-hero { display: block; }
  .pd-name { font-size: 24px; line-height: 1.2; }
  .pd-info { padding-top: 18px; }
  .pd-gallery-main { border-radius: 14px; }
  .g2h, .g2sp, .g2sc, .g2pk, .h3pk, .nasp, .npk { margin-top: 36px; }
  .g2h-band { padding: 24px 14px 20px; }
  .g2h-title, .g2sp-title, .h3pk-title { font-size: 21px; line-height: 1.25; }
  .g2h-sub, .g2sp-sub, .h3pk-sub { font-size: 13.5px; line-height: 1.6; }
  .g2h-cap { padding: 36px 16px 14px; }
  .g2h-cap b { font-size: 14px; }
  .g2h-cap span { font-size: 11.5px; }
  .g2sp-cap { padding: 34px 16px 14px; }
  .g2sp-cap b { font-size: 13.5px; }
  .g2sp-cap span { font-size: 11px; }
}

/* --------------------------------------------------------------------------
   4. Never hide prerendered content behind an IntersectionObserver.
      The legacy build revealed .sp-card/.scene-item/.nasp-frame/.npk-card
      with opacity:0 + .in-view — on iPhone the observer sometimes never
      fired and the sections stayed invisible. They are prerendered now;
      force them visible.
   -------------------------------------------------------------------------- */
.sp-card,
.scene-item,
.nasp-frame,
.npk-card {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}
.sp-card.in-view, .scene-item.in-view, .nasp-frame.in-view, .npk-card.in-view {
  opacity: 1 !important;
  transform: none !important;
}

/* --------------------------------------------------------------------------
   5. Recommended products (prerendered .pd-rec-* markup)
   -------------------------------------------------------------------------- */
.pd-rec-grid {
  display: block;
  width: 100%;
  font-size: 0;
  letter-spacing: 0;
}
.pd-rec-card {
  display: inline-block;
  vertical-align: top;
  width: 47.8%;
  margin: 0 2.2% 14px 0;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  overflow: hidden;
  background: #14161d;
  color: inherit;
  text-decoration: none;
  font-size: 14px;
  letter-spacing: normal;
  -webkit-tap-highlight-color: rgba(0, 212, 255, 0.15);
}
.pd-rec-card:nth-child(2n) { margin-right: 0; }
.pd-rec-img {
  position: relative;
  display: block;
  width: 100%;
  height: 0;
  padding: 0 0 68% 0;
  overflow: hidden;
  background: #12141b;
}
.pd-rec-img > img {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  -webkit-object-fit: cover;
}
.pd-rec-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  padding: 2px 8px;
  border-radius: 4px;
  background: #00a8d6;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.pd-rec-info {
  display: block;
  padding: 12px 12px 14px;
}
.pd-rec-info h3 {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 8px;
  line-height: 1.3;
}
.pd-rec-prices {
  display: block;
  font-size: 0;
}
.pd-rec-now {
  display: inline-block;
  font-size: 16px;
  font-weight: 700;
  color: #00d4ff;
  margin: 0 8px 0 0;
  vertical-align: baseline;
}
.pd-rec-was {
  display: inline-block;
  font-size: 12px;
  color: #6b7385;
  text-decoration: line-through;
  vertical-align: baseline;
}
.pd-rec-meta {
  display: block;
  margin-top: 8px;
  font-size: 12px;
}
.pd-rec-meta span { margin-right: 10px; }
@media (min-width: 769px) {
  .pd-rec-card { width: 23.05%; margin: 0 2.6% 24px 0; }
  .pd-rec-card:nth-child(2n) { margin-right: 2.6%; }
  .pd-rec-card:nth-child(4n) { margin-right: 0; }
  .pd-rec-info { padding: 16px; }
  .pd-rec-info h3 { font-size: 16px; }
  .pd-rec-now { font-size: 18px; }
}
@media (max-width: 400px) {
  .pd-rec-card { width: 48.4%; margin: 0 3.2% 10px 0; }
  .pd-rec-card:nth-child(2n) { margin-right: 0; }
}

/* --------------------------------------------------------------------------
   6. Global iOS hardening
   -------------------------------------------------------------------------- */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { overflow-x: hidden; -webkit-overflow-scrolling: touch; }
img { max-width: 100%; }
a, button, .btn, .product-card, .carousel-arrow, .carousel-dot {
  touch-action: manipulation;
}
@media (max-width: 768px) {
  input, select, textarea { font-size: 16px !important; }  /* no focus zoom */
  .container { padding-left: 14px; padding-right: 14px; }
}

/* Lightbox: make sure it always paints above everything on iOS */
.lb-overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 9999;
}
.lb-overlay img {
  max-width: 92vw;
  max-height: 82vh;
  width: auto;
  height: auto;
  -webkit-user-drag: none;
}

/* --------------------------------------------------------------------------
   6. Nasal Inhaler range — four-aroma grid (product.html?id=nasal-inhaler)
   -------------------------------------------------------------------------- */
.nasp-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-top: 22px;
}
.nasp-grid .nasp-frame { cursor: zoom-in; }
.nasp-grid .nasp-cap { padding: 12px 16px; }
.nasp-grid .nasp-cap b { font-size: 14px; }
@media (max-width: 1100px) {
  .nasp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
}
@media (max-width: 520px) {
  .nasp-grid { grid-template-columns: 1fr; gap: 14px; }
}
