/* ═══════════════════════════════════════════════════════════════
   IMAGE QUALITY — Sharp, consistent product & marketing imagery
   ═══════════════════════════════════════════════════════════════ */

img {
  display: block;
  max-width: 100%;
  height: auto;
  image-rendering: auto;
  -webkit-font-smoothing: antialiased;
}

/* Product cards */
.pc-img-inner img,
.pm-media img,
.pm-rc-img img,
.ci-img img {
  image-rendering: high-quality;
  backface-visibility: hidden;
  transform: translateZ(0);
}

.pc-img-inner img {
  object-fit: contain;
  object-position: center;
  min-height: 72%;
  max-height: 92%;
  width: auto;
  max-width: 92%;
  margin: 0 auto;
  filter: drop-shadow(0 10px 28px rgba(0, 0, 0, 0.4));
}

.pc:hover .pc-img-inner img {
  filter: drop-shadow(0 14px 36px rgba(0, 0, 0, 0.48));
}

/* Modal product image */
.pm-media {
  background: linear-gradient(160deg, var(--s2) 0%, var(--bg) 100%);
}

.pm-media img {
  max-width: 100%;
  max-height: min(52vh, 420px);
  width: auto;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 12px 40px rgba(0, 0, 0, 0.35));
}

.pm-rc-img {
  min-height: 80px;
  background: var(--s2);
}

.pm-rc-img img {
  object-fit: contain;
  padding: 0.5rem;
  max-height: 100%;
}

/* Cart thumbnails */
.ci-img {
  width: 72px;
  height: 72px;
  background: var(--s2);
}

.ci-img img {
  object-fit: contain;
  padding: 0.35rem;
}

/* Homepage hero */
#home .hero-visual-frame img {
  filter: brightness(0.88) saturate(1.05) contrast(1.02);
  object-fit: contain;
  object-position: center bottom;
}

#home .hero-visual:hover .hero-visual-frame img {
  filter: brightness(0.94) saturate(1.08) contrast(1.03);
}

/* Category mosaic — clearer photos */
.cm img,
#home .cm img {
  object-fit: cover;
  object-position: center;
  filter: brightness(0.72) saturate(1.08) contrast(1.03);
  transition: transform 0.85s cubic-bezier(0.22, 1, 0.36, 1), filter 0.5s ease;
}

.cm:hover img,
#home .cm:hover img {
  filter: brightness(0.82) saturate(1.12) contrast(1.04);
}

/* Sparklers + More — bright, full-bleed (not dimmed like other tiles) */
#home .cm-sparklers img {
  filter: brightness(1.08) saturate(1.2) contrast(1.08);
}

#home .cm-sparklers:hover img {
  filter: brightness(1.14) saturate(1.25) contrast(1.1);
}

.cm::after,
#home .cm::after {
  background: linear-gradient(
    180deg,
    transparent 35%,
    rgba(6, 4, 12, 0.55) 70%,
    rgba(6, 4, 12, 0.92) 100%
  );
}

/* Legacy inline category grid */
.cmos .cm img {
  filter: brightness(0.72) saturate(1.08);
}

/* Prevent upscaled blur on tiny sources */
@supports (image-resolution: 1dppx) {
  .pc-img-inner img[src*='-300x300'],
  .ci-img img[src*='-300x300'] {
    outline: none;
  }
}

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .pc-img-inner img,
  .pm-media img {
    image-rendering: -webkit-optimize-contrast;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pc-img-inner img,
  .cm img,
  #home .hero-visual-frame img {
    transition: none;
  }
}
