/* ======================================================
   HOMEPAGE MODULES
====================================================== */
.homepage-module {
  margin-bottom: 28px;
}

.module-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0 16px 10px;
}

.module-header .view-all-link,
.module-header a {
  font-size: 12px;
  font-weight: 500;
  color: var(--tc-mobile-sec-link-color, #64748b);
  text-decoration: none;
}

.module-header h3 {
  font-size: var(--tc-mobile-sec-title-size, 17px);
  font-weight: 700;
  color: var(--tc-mobile-sec-title-color, var(--text));
}

.module-loading {
  display: flex;
  justify-content: center;
  padding: 60px 0;
}

.module-loading .spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: dv-spin 0.7s linear infinite;
}

@keyframes dv-spin {
  to { transform: rotate(360deg); }
}

.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 60px 20px;
  font-size: 14px;
}

/* ======================================================
   BANNER MODULE
====================================================== */
.banner-module {
  padding: 0 16px;
  overflow: hidden;
}

.banner-carousel {
  position: relative;
  overflow: hidden;
  background: transparent;
  min-height: 160px;
  touch-action: pan-y;
  cursor: grab;
  margin-left: -16px;
  margin-right: -16px;
  padding: 10px 16px;
  --slide-width: 86%;
}

@media (min-width: 641px) {
  .banner-carousel {
    --slide-width: 88%;
  }
}

.banner-carousel.paused {
  cursor: grabbing;
}

.banner-track {
  display: flex;
  gap: 12px;
  width: auto;
  height: 100%;
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.banner-carousel.paused .banner-track {
  transition: none;
}

.banner-slide {
  flex: 0 0 var(--slide-width);
  position: relative;
  display: block;
  min-height: 160px;
  text-decoration: none;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.dark .banner-slide {
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.banner-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  position: absolute;
  inset: 0;
  user-select: none;
  pointer-events: none;
}

.banner-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.35), transparent 70%);
}

.banner-heading {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  max-width: 70%;
}

.banner-button {
  display: inline-block;
  padding: 9px 20px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  border: 1.5px solid rgba(212, 160, 23, 0.9);
  box-shadow: 0 0 10px rgba(212, 160, 23, 0.5);
}

/* -------- ARROWS -------- */
.banner-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
}

.banner-arrow-prev {
  left: 10px;
}

.banner-arrow-next {
  right: 10px;
}

.banner-arrow:hover {
  background: rgba(0, 0, 0, 0.6);
}

/* -------- DOTS -------- */
.banner-dots {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 5px;
  z-index: 2;
}

.banner-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transition: background 0.15s ease, transform 0.15s ease;
}

.banner-dot.active {
  background: #fff;
  transform: scale(1.3);
}

@media (prefers-reduced-motion: reduce) {
  .banner-track { transition: none; }
}

/* ======================================================
   ADVANCED BANNER (Banner Editor, referenced by bannerId)
   Separate class namespace from the legacy .banner-* module above
   so both can coexist — legacy inline banners still render fine,
   this is the richer version with per-banner sizing, animation
   style, video slides, subtext and a fully styleable button.
====================================================== */
.abanner-module {
  padding: 0 16px;
  overflow: hidden;
}

.abanner-carousel {
  position: relative;
  overflow: hidden;
  background: transparent;
  height: var(--abanner-h-desktop, 420px);
  touch-action: pan-y;
  cursor: grab;
  margin-left: -16px;
  margin-right: -16px;
  padding: 10px 16px;
  --slide-width: 86%;
}

@media (min-width: 641px) {
  .abanner-carousel {
    --slide-width: 88%;
  }
}

.abanner-carousel.paused {
  cursor: grabbing;
}

@media (max-width: 640px) {
  .abanner-carousel {
    height: var(--abanner-h-mobile, 220px);
  }
}

.abanner-track {
  width: 100%;
  height: 100%;
  position: relative;
}

/* -------- SLIDE animation: horizontal filmstrip -------- */
.abanner-anim-slide .abanner-track {
  display: flex;
  gap: 12px;
  width: auto;
  transition: transform var(--abanner-speed, 600ms) cubic-bezier(0.16, 1, 0.3, 1);
}
.abanner-anim-slide.paused .abanner-track {
  transition: none;
}
.abanner-anim-slide .abanner-slide {
  flex: 0 0 var(--slide-width);
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.dark .abanner-anim-slide .abanner-slide {
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

/* -------- STACKED ANIMATIONS (Fade, Zoom, Slide Up, Flip, Cube, None) -------- */
.abanner-anim-fade .abanner-slide,
.abanner-anim-zoom .abanner-slide,
.abanner-anim-slide-up .abanner-slide,
.abanner-anim-flip .abanner-slide,
.abanner-anim-cube .abanner-slide,
.abanner-anim-none .abanner-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  z-index: 0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.dark .abanner-anim-fade .abanner-slide,
.dark .abanner-anim-zoom .abanner-slide,
.dark .abanner-anim-slide-up .abanner-slide,
.dark .abanner-anim-flip .abanner-slide,
.dark .abanner-anim-cube .abanner-slide,
.dark .abanner-anim-none .abanner-slide {
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.45);
}

/* -------- FADE MODE -------- */
.abanner-anim-fade .abanner-slide {
  transition: opacity var(--abanner-speed, 600ms) cubic-bezier(0.16, 1, 0.3, 1);
}
.abanner-anim-fade .abanner-slide.active {
  opacity: 1;
  z-index: 1;
}

/* -------- ZOOM MODE (Ken Burns) -------- */
.abanner-anim-zoom .abanner-slide {
  transition: opacity var(--abanner-speed, 600ms) cubic-bezier(0.16, 1, 0.3, 1);
}
.abanner-anim-zoom .abanner-slide.active {
  opacity: 1;
  z-index: 1;
}
.abanner-anim-zoom .abanner-media {
  transition: transform 6s cubic-bezier(0.16, 1, 0.3, 1);
  transform: scale(1.02);
}
.abanner-anim-zoom .abanner-slide.active .abanner-media {
  transform: scale(1.12);
}

/* -------- VERTICAL SLIDE UP MODE -------- */
.abanner-anim-slide-up .abanner-slide {
  transform: translateY(30px) scale(0.97);
  transition: transform var(--abanner-speed, 600ms) cubic-bezier(0.16, 1, 0.3, 1), opacity var(--abanner-speed, 600ms) ease;
}
.abanner-anim-slide-up .abanner-slide.active {
  opacity: 1;
  z-index: 1;
  transform: translateY(0) scale(1);
}

/* -------- 3D FLIP CARD MODE -------- */
.abanner-anim-flip {
  perspective: 1200px;
}
.abanner-anim-flip .abanner-slide {
  transform: rotateY(-75deg) scale(0.9) translateZ(-100px);
  transition: transform var(--abanner-speed, 600ms) cubic-bezier(0.16, 1, 0.3, 1), opacity var(--abanner-speed, 600ms) ease;
  backface-visibility: hidden;
}
.abanner-anim-flip .abanner-slide.active {
  opacity: 1;
  z-index: 1;
  transform: rotateY(0deg) scale(1) translateZ(0);
}

/* -------- 3D PERSPECTIVE CUBE MODE -------- */
.abanner-anim-cube {
  perspective: 1500px;
}
.abanner-anim-cube .abanner-slide {
  transform: rotateX(45deg) translateZ(-200px) scale(0.85);
  transition: transform var(--abanner-speed, 600ms) cubic-bezier(0.16, 1, 0.3, 1), opacity var(--abanner-speed, 600ms) ease;
  backface-visibility: hidden;
}
.abanner-anim-cube .abanner-slide.active {
  opacity: 1;
  z-index: 1;
  transform: rotateX(0deg) translateZ(0px) scale(1);
}

/* -------- PARALLAX HORIZONTAL SLIDING MODE -------- */
.abanner-anim-parallax-slide .abanner-track {
  display: flex;
  gap: 12px;
  width: auto;
  transition: transform var(--abanner-speed, 600ms) cubic-bezier(0.16, 1, 0.3, 1);
}
.abanner-anim-parallax-slide .abanner-slide {
  flex: 0 0 var(--slide-width);
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.05);
}
.abanner-anim-parallax-slide .abanner-media {
  width: 140%;
  left: -20%;
  transition: transform var(--abanner-speed, 800ms) cubic-bezier(0.16, 1, 0.3, 1);
  transform: translateX(-8%);
}
.abanner-anim-parallax-slide .abanner-slide.active .abanner-media {
  transform: translateX(8%);
}

/* -------- INSTANT MODE -------- */
.abanner-anim-none .abanner-slide {
  transition: none !important;
}
.abanner-anim-none .abanner-slide.active {
  opacity: 1;
  z-index: 1;
}

.abanner-slide {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
}

.abanner-media {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  position: absolute;
  inset: 0;
  user-select: none;
  pointer-events: none;
}

.abanner-overlay {
  position: absolute;
  inset: 0;
  display: flex;
}

.abanner-overlay-valign-top { align-items: flex-start; }
.abanner-overlay-valign-center { align-items: center; }
.abanner-overlay-valign-bottom { align-items: flex-end; }

.abanner-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  width: 100%;
}

/* Horizontal / Inner alignments supporting the 9-position grid */
.abanner-pos-left,
.abanner-pos-top-left,
.abanner-pos-center-left,
.abanner-pos-bottom-left {
  align-items: flex-start;
  text-align: left;
}

.abanner-pos-center,
.abanner-pos-top-center,
.abanner-pos-center-center,
.abanner-pos-bottom-center {
  align-items: center;
  text-align: center;
}

.abanner-pos-right,
.abanner-pos-top-right,
.abanner-pos-center-right,
.abanner-pos-bottom-right {
  align-items: flex-end;
  text-align: right;
}

.abanner-heading {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
  max-width: 80%;
  margin: 0;
  opacity: 0;
  transform: translateY(14px);
  transition: transform var(--abanner-speed, 600ms) cubic-bezier(0.16, 1, 0.3, 1), opacity var(--abanner-speed, 600ms) ease;
  transition-delay: 120ms;
}

.abanner-subtext {
  font-size: 14px;
  line-height: 1.5;
  max-width: 75%;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  margin: 0;
  opacity: 0;
  transform: translateY(14px);
  transition: transform var(--abanner-speed, 600ms) cubic-bezier(0.16, 1, 0.3, 1), opacity var(--abanner-speed, 600ms) ease;
  transition-delay: 220ms;
}

.abanner-button {
  display: inline-block;
  padding: 10px 24px;
  font-size: 13.5px;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  opacity: 0;
  transform: translateY(14px);
  transition: transform var(--abanner-speed, 600ms) cubic-bezier(0.16, 1, 0.3, 1), opacity var(--abanner-speed, 600ms) ease, background-color 0.2s ease, transform 0.2s ease;
  transition-delay: 320ms;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.abanner-button:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.abanner-slide.active .abanner-heading,
.abanner-anim-slide .abanner-slide .abanner-heading {
  opacity: 1;
  transform: translateY(0);
}

.abanner-slide.active .abanner-subtext,
.abanner-anim-slide .abanner-slide .abanner-subtext {
  opacity: 1;
  transform: translateY(0);
}

.abanner-slide.active .abanner-button,
.abanner-anim-slide .abanner-slide .abanner-button {
  opacity: 1;
  transform: translateY(0);
}

/* -------- ARROWS (Preset Styles: classic, glassmorphism, minimal, pill, glow) -------- */
.abanner-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%) scale(1);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.abanner-arrow-prev { left: 24px; }
.abanner-arrow-next { right: 24px; }
.abanner-arrow:hover {
  background: rgba(15, 23, 42, 0.8);
  transform: translateY(-50%) scale(1.12);
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}
.abanner-arrow:active {
  transform: translateY(-50%) scale(0.95);
}

/* Arrow Presets */
.abanner-arrow-style-classic {
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.5);
}

.abanner-arrow-style-glassmorphism {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}
.abanner-arrow-style-glassmorphism:hover {
  background: rgba(255, 255, 255, 0.35);
  border-color: rgba(255, 255, 255, 0.65);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.25);
}

.abanner-arrow-style-minimal {
  width: 38px;
  height: 38px;
  background: transparent;
  border: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.85));
}
.abanner-arrow-style-minimal:hover {
  background: transparent;
  transform: translateY(-50%) scale(1.22);
  filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.95));
}

.abanner-arrow-style-pill {
  width: 26px;
  height: 48px;
  background: rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}
.abanner-arrow-style-pill.abanner-arrow-prev {
  left: 0 !important;
  border-left: none;
  border-radius: 0 14px 14px 0;
}
.abanner-arrow-style-pill.abanner-arrow-next {
  right: 0 !important;
  border-right: none;
  border-radius: 14px 0 0 14px;
}
.abanner-arrow-style-pill:hover {
  background: rgba(0, 0, 0, 0.78);
  width: 32px;
}

.abanner-arrow-style-glow {
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: var(--primary-color, #1E3A8A);
  box-shadow: 0 0 16px var(--primary-color, #1E3A8A), 0 4px 12px rgba(0, 0, 0, 0.3);
}
.abanner-arrow-style-glow:hover {
  background: var(--primary-color, #1E3A8A);
  transform: translateY(-50%) scale(1.15);
  box-shadow: 0 0 24px var(--primary-color, #1E3A8A), 0 6px 18px rgba(0, 0, 0, 0.45);
}

@media (max-width: 640px) {
  .abanner-arrow {
    width: 34px;
    height: 34px;
  }
  .abanner-arrow-prev { left: 12px; }
  .abanner-arrow-next { right: 12px; }
  .abanner-arrow-style-pill {
    width: 22px;
    height: 40px;
  }
  .abanner-arrow-style-pill:hover {
    width: 26px;
  }
}

/* -------- DOTS (Preset Styles: pill, classic, dashes, fraction, glow, minimal) -------- */
.abanner-dots {
  position: absolute;
  bottom: 16px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  z-index: 10;
}
.abanner-dot {
  cursor: pointer;
}

/* Dot Preset: Pill */
.abanner-dots-style-pill .abanner-dot {
  width: 7px;
  height: 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.45);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.abanner-dots-style-pill .abanner-dot.active {
  width: 24px;
  background: #ffffff;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.abanner-dots-style-pill .abanner-dot:hover:not(.active) {
  background: rgba(255, 255, 255, 0.75);
}

/* Dot Preset: Classic */
.abanner-dots-style-classic .abanner-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transition: all 0.25s ease;
}
.abanner-dots-style-classic .abanner-dot.active {
  background: #ffffff;
  transform: scale(1.25);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

/* Dot Preset: Dashes */
.abanner-dots-style-dashes .abanner-dot {
  width: 14px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.4);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.abanner-dots-style-dashes .abanner-dot.active {
  width: 28px;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Dot Preset: Glow */
.abanner-dots-style-glow .abanner-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transition: all 0.25s ease;
}
.abanner-dots-style-glow .abanner-dot.active {
  background: var(--primary-color, #2563EB);
  box-shadow: 0 0 10px var(--primary-color, #2563EB), 0 0 3px #ffffff;
  transform: scale(1.15);
}

/* Dot Preset: Minimal */
.abanner-dots-style-minimal {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  gap: 0;
  height: 3px;
  z-index: 10;
}
.abanner-dots-style-minimal .abanner-dot {
  flex: 1;
  height: 100%;
  border-radius: 0;
  background: rgba(0, 0, 0, 0.25);
  margin: 0;
  transition: background 0.3s ease;
}
.abanner-dots-style-minimal .abanner-dot.active {
  background: var(--primary-color, #2563EB);
  box-shadow: 0 0 8px rgba(37, 99, 235, 0.6);
}

/* Dot Preset: Fraction */
.abanner-dots-style-fraction {
  position: absolute;
  bottom: 14px;
  left: auto;
  right: 18px;
  z-index: 10;
}
.abanner-fraction-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

@media (prefers-reduced-motion: reduce) {
  .abanner-track,
  .abanner-slide,
  .abanner-media {
    transition: none !important;
  }
}

/* ======================================================
   PRODUCT ROW (horizontal scroll feed)
====================================================== */
.product-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 0 16px 4px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}

.product-row::-webkit-scrollbar {
  display: none;
}

/* ======================================================
   PRODUCT CARD
====================================================== */
.product-card {
  flex: 0 0 168px;
  scroll-snap-align: start;
  background: var(--tc-mobile-prod-bg, var(--tc-card-bg, var(--card)));
  opacity: var(--tc-card-opacity, 1);
  border: var(--tc-card-bw, 1px) solid var(--tc-card-bc, var(--border));
  border-radius: var(--tc-mobile-prod-radius, var(--tc-card-radius, 14px));
  overflow: hidden;
  display: flex;
  flex-direction: column;
}


/* -------- PRODUCT GRID OVERRIDE -------- */
/* When cards are inside a .product-grid container (not a .product-row),
   reset the flex sizing so they fill grid cells properly.
   The .product-row keeps flex: 0 0 168px for horizontal scroll. */
.product-grid .product-card {
  flex: none;
  width: 100%;
  min-width: 0;
  scroll-snap-align: none;
}
/* -------- IMAGE CAROUSEL -------- */
.card-carousel {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--border);
  touch-action: pan-y;
  cursor: grab;
}

.carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.25s ease;
}

.carousel-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  flex-shrink: 0;
  user-select: none;
  pointer-events: none;
}

.carousel-dots {
  position: absolute;
  bottom: 8px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 4px;
}

.dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  transition: background 0.15s ease, transform 0.15s ease;
}

.dot.active {
  background: #fff;
  transform: scale(1.3);
}

.sale-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--danger, #ef4444);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 6px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  z-index: 4;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.35);
  display: inline-block;
  line-height: 1.3;
}

.image-tag-badge {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 15;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  pointer-events: none;
  line-height: 1.3;
}

.pm-discount-badge, .discount-badge-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  margin-left: 4px;
  vertical-align: middle;
  line-height: 1.3;
  letter-spacing: 0.2px;
}

.wishlist-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #475569;
  cursor: pointer;
  padding: 0;
}

.wishlist-btn.active {
  color: #ef4444;
}

.wishlist-btn:active {
  transform: scale(0.92);
}

/* -------- CARD INFO -------- */
.card-info {
  padding: 10px 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.card-name {
  font-size: 13px;
  color: var(--text);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
}

.card-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.price-now {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
}

.price-was {
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: line-through;
}

.add-to-cart-btn {
  width: 100%;
  padding: 7px 0;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 8px;
  border: 1.5px solid rgba(212, 160, 23, 0.9);
  background: linear-gradient(135deg, #F4C430 0%, #D4A017 55%, #A67C00 100%);
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  box-shadow: 0 0 8px rgba(212, 160, 23, 0.45);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.add-to-cart-btn:active {
  transform: scale(0.97);
}

.add-to-cart-btn.added {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: #fff;
  border-color: rgba(34, 197, 94, 0.9);
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
}

.add-to-cart-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

@media (prefers-reduced-motion: reduce) {
  .carousel-track,
  .spinner {
    transition: none;
    animation: none;
  }
}

/* ======================================================
   CUSTOM MODULE — IMAGE + TEXT LAYOUT
====================================================== */
.custom-image-text {
  padding: 0 16px;
  border-radius: 14px;
  overflow: hidden;
}

.custom-banner-link {
  display: block;
  position: relative;
  min-height: 160px;
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
}

.custom-full-image {
  width: 100%;
  display: block;
  object-fit: cover;
  min-height: 160px;
  user-select: none;
  pointer-events: none;
}

.custom-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 10px;
  padding: 24px;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.35), transparent 70%);
}

.custom-subtext {
  font-size: 14px;
  line-height: 1.5;
  max-width: 70%;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* ======================================================
   CUSTOM MODULE — HTML LAYOUT
====================================================== */
.custom-html-module {
  padding: 0 16px;
}

.custom-html-content {
  background: var(--tc-card-bg, var(--card));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  overflow-wrap: break-word;
}

.custom-html-content h1,
.custom-html-content h2,
.custom-html-content h3 {
  margin-top: 0;
}

.custom-html-content img {
  max-width: 100%;
  border-radius: 8px;
}

.custom-html-content a {
  color: var(--accent);
  text-decoration: underline;
}

/* ── BRAND SHOWCASE MODULE ────────────────────────────────────── */
.brand-showcase-module .bs-brand-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 12px 16px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.brand-showcase-module .bs-brand-row::-webkit-scrollbar { display: none; }
.bs-brand-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  flex-shrink: 0;
  min-width: 72px;
}
.bs-logo-wrap {
  width: 64px; height: 64px;
  border-radius: 12px;
  border: 1.5px solid #e5e7eb;
  background: white;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  transition: box-shadow .15s, border-color .15s;
}
.bs-brand-tile:hover .bs-logo-wrap {
  box-shadow: 0 4px 12px rgba(0,0,0,.1);
  border-color: #a5b4fc;
}
.bs-brand-logo {
  width: 100%; height: 100%; object-fit: contain; padding: 6px; box-sizing: border-box;
}
.bs-brand-initial {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: #eef2ff;
  font-size: 22px; font-weight: 800; color: #4f46e5;
}
.bs-brand-name {
  font-size: 11px; font-weight: 600; color: #374151;
  text-align: center; line-height: 1.3;
  max-width: 72px; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}

/* ── CATEGORY SHOWCASE MODULE ────────────────────────────────── */
.category-showcase-module .category-showcase-grid {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 16px 16px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.category-showcase-module .category-showcase-grid::-webkit-scrollbar { display: none; }
.category-showcase-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
  width: 76px;
}
.category-showcase-img-wrap {
  width: 68px;
  height: 68px;
  border-radius: 16px;
  border: 1.5px solid var(--border, #e2e8f0);
  background: var(--card, #ffffff);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.dark .category-showcase-img-wrap {
  background: #1e293b;
  border-color: #334155;
}
.category-showcase-card:hover .category-showcase-img-wrap,
.category-showcase-card:active .category-showcase-img-wrap {
  transform: translateY(-2px);
  border-color: var(--accent, #e85d04);
  box-shadow: 0 4px 14px rgba(232, 93, 4, 0.18);
}
.category-showcase-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.category-showcase-icon {
  font-size: 28px;
}
.category-showcase-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--text, #1e293b);
  text-align: center;
  line-height: 1.3;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.category-showcase-card {
  overflow: hidden;
}
.dark .category-showcase-name {
  color: #f8fafc;
}

/* ── CATEGORY SHOWCASE — "CARD GRID" STYLE (marketplace-style 2x2 widget) ──────
   Bordered card, title header, exactly 4 image+label tiles in a 2-col
   grid, and a single "Explore more" link at the bottom of the card. */
.category-showcase-module.style-card-grid {
  margin: 0 16px 28px;
  padding: 16px 16px 14px;
  border: 1.5px solid var(--border, #e2e8f0);
  border-radius: 12px;
  background: var(--card, #ffffff);
  box-sizing: border-box;
  max-width: 100%;
  overflow: hidden;
}
.category-showcase-module.style-card-grid .module-header {
  padding: 0 0 12px;
}
.category-showcase-module.style-card-grid .module-header h3 {
  font-size: 18px;
  font-weight: 700;
}
.category-showcase-module.style-card-grid .category-showcase-grid {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  grid-auto-flow: row !important;
  grid-auto-columns: unset !important;
  grid-template-rows: unset !important;
  gap: 14px 16px !important;
  overflow-x: visible !important;
  overflow-y: visible !important;
  scroll-snap-type: none !important;
  -webkit-overflow-scrolling: auto !important;
  padding: 0 !important;
  min-width: 0 !important;
  scrollbar-width: none !important;
}
.category-showcase-module.style-card-grid .category-showcase-card {
  width: 100% !important;
  min-width: 0 !important;
  flex: unset !important;
  flex-shrink: 1 !important;
  scroll-snap-align: unset !important;
  align-items: flex-start !important;
  gap: 6px !important;
}
.category-showcase-module.style-card-grid .category-showcase-img-wrap {
  width: 100%;
  height: 0;
  padding-bottom: 100%;
  border-radius: 8px;
  border: 1px solid var(--border, #e2e8f0);
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}
.category-showcase-module.style-card-grid .category-showcase-img,
.category-showcase-module.style-card-grid .category-showcase-icon {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  max-width: 100%;
  max-height: 100%;
}
.category-showcase-module.style-card-grid .category-showcase-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
}
.category-showcase-module.style-card-grid .category-showcase-name {
  font-size: 13px;
  font-weight: 400;
  color: var(--text, #1e293b);
  text-align: left;
  white-space: normal;
}
.category-showcase-module.style-card-grid .explore-more-link {
  display: inline-block;
  margin-top: 14px;
  font-size: 13px;
  font-weight: 500;
  color: #0d6efd;
  text-decoration: none;
}
.category-showcase-module.style-card-grid .explore-more-link:hover {
  text-decoration: underline;
}

/* ── SHOWCASE ROW — multiple 2x2 card widgets side-by-side ────────────
   Desktop: N widgets in a row (columns set via --src-cols).
   Mobile (<=640px): stacks to one widget per row, full width. */
.showcase-row-module {
  margin: 0 16px 28px;
  overflow-x: hidden;
}
.showcase-row-grid {
  display: grid;
  grid-template-columns: repeat(var(--src-cols, 3), 1fr);
  gap: 16px;
  min-width: 0;
}
.showcase-row-card {
  min-width: 0;
}
@media (max-width: 768px) {
  .showcase-row-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}
.showcase-row-card {
  border: 1.5px solid var(--border, #e2e8f0);
  border-radius: 12px;
  background: var(--card, #ffffff);
  padding: 14px 14px 12px;
  box-sizing: border-box;
  max-width: 100%;
  overflow: hidden;
}
.showcase-row-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text, #1e293b);
  margin: 0 0 10px;
}
.showcase-row-card .category-showcase-grid {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  grid-auto-flow: row !important;
  grid-auto-columns: unset !important;
  grid-template-rows: unset !important;
  gap: 12px 14px !important;
  overflow-x: visible !important;
  overflow-y: visible !important;
  scroll-snap-type: none !important;
  -webkit-overflow-scrolling: auto !important;
  padding: 0 !important;
  min-width: 0 !important;
  scrollbar-width: none !important;
}
.showcase-row-card .category-showcase-card {
  width: 100% !important;
  min-width: 0 !important;
  flex: unset !important;
  flex-shrink: 1 !important;
  scroll-snap-align: unset !important;
  align-items: flex-start !important;
  gap: 6px !important;
}
.showcase-row-card .category-showcase-img-wrap {
  width: 100%;
  height: 0;
  padding-bottom: 100%;
  border-radius: 8px;
  border: 1px solid var(--border, #e2e8f0);
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}
.showcase-row-card .category-showcase-img,
.showcase-row-card .category-showcase-icon {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  max-width: 100%;
  max-height: 100%;
}
.showcase-row-card .category-showcase-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
}
.showcase-row-card .category-showcase-name {
  font-size: 12.5px;
  font-weight: 400;
  color: var(--text, #1e293b);
  text-align: left;
  white-space: normal;
}
.showcase-row-card .explore-more-link {
  display: inline-block;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 500;
  color: #0d6efd;
  text-decoration: none;
}
.showcase-row-card .explore-more-link:hover {
  text-decoration: underline;
}
.dark .showcase-row-card .category-showcase-name {
  color: #f8fafc;
}




/* ── SHOWCASE ROW: "Featured" layout style ─────────────────────────
   marketplace-style "Top categories in X" widget: 1 large tile on top,
   up to 3 smaller tiles in a row underneath. */
.showcase-row-card.layout-featured .showcase-featured-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}
.showcase-featured-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  text-decoration: none;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.showcase-featured-main-img-wrap {
  width: 100%;
  height: 0;
  padding-bottom: 78%;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--border, #e2e8f0);
  background: var(--background, #f8fafc);
  box-sizing: border-box;
}
.showcase-featured-main-img-wrap img,
.showcase-featured-main-img-wrap .category-showcase-icon {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
  box-sizing: border-box;
}
.showcase-featured-main-img-wrap .category-showcase-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  padding: 0;
}
.showcase-featured-main-name {
  font-size: 13.5px;
  font-weight: 400;
  color: var(--text, #1e293b);
  white-space: normal;
  line-height: 1.3;
}
.showcase-featured-row {
  display: flex;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
}
.showcase-featured-mini {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  text-decoration: none;
  flex: 1 1 0;
  min-width: 0;
  box-sizing: border-box;
}
.showcase-featured-mini-img-wrap {
  width: 100%;
  height: 0;
  padding-bottom: 100%;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--border, #e2e8f0);
  background: var(--background, #f8fafc);
  box-sizing: border-box;
}
.showcase-featured-mini-img-wrap img,
.showcase-featured-mini-img-wrap .category-showcase-icon {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6px;
  box-sizing: border-box;
}
.showcase-featured-mini-img-wrap .category-showcase-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  padding: 0;
}
.showcase-featured-mini-name {
  font-size: 12px;
  font-weight: 400;
  color: var(--text, #1e293b);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  line-height: 1.3;
}
.dark .showcase-featured-main-name,
.dark .showcase-featured-mini-name {
  color: var(--text, #e2e8f0);
}
/* If only the featured (first) item exists and no others, drop the row gap */
.showcase-row-card.layout-featured .showcase-featured-wrap:has(.showcase-featured-row:empty) {
  gap: 0;
}


/* ── SHOWCASE ROW: "Mosaic Banner" layout style ─────────────────────
   Grid of image tiles with dark gradient overlay at bottom of each
   tile containing the item name and a "Shop Now" button. */
.showcase-row-card.layout-mosaic .mosaic-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  overflow: hidden;
}
.mosaic-tile {
  display: block;
  position: relative;
  text-decoration: none;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--background, #f8fafc);
}
.mosaic-tile-img-wrap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.mosaic-tile-img-wrap img,
.mosaic-tile-img-wrap .category-showcase-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.mosaic-tile-img-wrap .category-showcase-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
}
.mosaic-tile-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 16px 10px 10px;
  background: linear-gradient(to top, rgba(0,0,0,0.78) 0%, rgba(0,0,0,0.45) 60%, transparent 100%);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mosaic-tile-name {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  line-height: 1.25;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}
.mosaic-tile-btn {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  color: #fff;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 20px;
  padding: 3px 12px;
  align-self: flex-start;
  backdrop-filter: blur(4px);
  transition: background 0.2s;
}
.mosaic-tile:hover .mosaic-tile-btn {
  background: rgba(255,255,255,0.3);
}
@media (max-width: 640px) {
  .showcase-row-card.layout-mosaic .mosaic-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .mosaic-tile { aspect-ratio: 1 / 1; }
}

/* ── SHOWCASE ROW: "Split Hero" layout style ───────────────────────
   Top section: large image on left (≈55%), headline + bullet list +
   CTA button on right (≈45%). Bottom: row of 3 small tiles with
   "Shop X" text links. */
.showcase-row-card.layout-split-hero {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.showcase-row-card.layout-split-hero .split-hero-top {
  display: flex;
  gap: 12px;
  align-items: stretch;
}
.split-hero-img-link {
  flex: 0 0 55%;
  text-decoration: none;
  display: block;
}
.split-hero-img-wrap {
  width: 100%;
  height: 100%;
  min-height: 160px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--background, #f8fafc);
}
.split-hero-img-wrap img,
.split-hero-img-wrap .category-showcase-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.split-hero-img-wrap .category-showcase-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
}
.split-hero-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  min-width: 0;
}
.showcase-row-card.layout-split-hero .showcase-row-card-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text, #1e293b);
  line-height: 1.3;
}
.split-hero-bullets {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.split-hero-bullets li {
  font-size: 12.5px;
  font-weight: 400;
  color: var(--text, #475569);
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.3;
}
.split-hero-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #e67e22;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}
.split-hero-cta {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: #e67e22;
  border-radius: 20px;
  padding: 7px 18px;
  text-decoration: none;
  align-self: flex-start;
  transition: background 0.2s;
}
.split-hero-cta:hover {
  background: #d35400;
}
.split-hero-mini-row {
  display: flex;
  gap: 8px;
  width: 100%;
}
.split-hero-mini {
  flex: 1 1 0;
  min-width: 0;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.split-hero-mini-img-wrap {
  width: 100%;
  height: 0;
  padding-bottom: 75%;
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  background: var(--background, #f8fafc);
}
.split-hero-mini-img-wrap img,
.split-hero-mini-img-wrap .category-showcase-icon {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.split-hero-mini-img-wrap .category-showcase-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}
.split-hero-mini-name {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text, #1e293b);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}
@media (max-width: 640px) {
  .showcase-row-card.layout-split-hero .split-hero-top {
    flex-direction: column;
  }
  .split-hero-img-link {
    flex: none;
    width: 100%;
  }
  .split-hero-img-wrap {
    min-height: 180px;
    aspect-ratio: 16 / 9;
  }
  .split-hero-mini-row {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }
  .split-hero-mini {
    min-width: 100px;
    scroll-snap-align: start;
  }
}
.dark .split-hero-bullets li { color: var(--text, #e2e8f0); }
.dark .split-hero-mini-name { color: var(--text, #e2e8f0); }

/* ── SHOWCASE ROW: single product gets full width ────────────────── */
/* When the grid has only 1 child, span it across both columns */
.showcase-row-card .category-showcase-grid:has(> :only-child) {
  grid-template-columns: 1fr !important;
}
.showcase-row-card .category-showcase-grid > :only-child {
  grid-column: 1 / -1 !important;
  width: 100% !important;
}
/* Fallback for browsers without :has() — :only-child still spans */
.showcase-row-card .category-showcase-grid > .category-showcase-card:only-child,
.showcase-row-card .category-showcase-grid > .product-tile:only-child {
  grid-column: 1 / -1 !important;
  width: 100% !important;
}

/* Same for style-card-grid */
.category-showcase-module.style-card-grid .category-showcase-grid:has(> :only-child) {
  grid-template-columns: 1fr !important;
}
.category-showcase-module.style-card-grid .category-showcase-grid > :only-child {
  grid-column: 1 / -1 !important;
  width: 100% !important;
}
/* ── SHOWCASE ROW: !important overrides to protect from
   category-styling-runtime.js global injected CSS ─────────────── */
/* Use 3-class selectors (0,3,0 specificity) to beat injected 2-class selectors (0,2,0) */
.showcase-row-card .category-showcase-grid .category-showcase-card {
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  min-height: unset !important;
  transition: none !important;
  font-family: inherit !important;
  font-size: inherit !important;
  font-weight: inherit !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  line-height: 1.3 !important;
  width: 100% !important;
  min-width: 0 !important;
  flex: unset !important;
  flex-shrink: 1 !important;
  scroll-snap-align: unset !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 6px !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
  text-decoration: none !important;
}
.showcase-row-card .category-showcase-grid .category-showcase-card:hover {
  background: transparent !important;
  color: inherit !important;
  transform: none !important;
  box-shadow: none !important;
  opacity: 1 !important;
}
.showcase-row-card .category-showcase-grid .category-showcase-card:hover * {
  color: inherit !important;
}
.showcase-row-card .category-showcase-grid .category-showcase-img-wrap {
  width: 100% !important;
  height: 0 !important;
  padding-bottom: 100% !important;
  min-height: unset !important;
  border-radius: 8px !important;
  border: 1px solid var(--border, #e2e8f0) !important;
  position: relative !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
  background: var(--background, #f8fafc) !important;
  box-shadow: none !important;
  flex: none !important;
}
.showcase-row-card .category-showcase-grid .category-showcase-img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  max-width: 100% !important;
  max-height: 100% !important;
}
.showcase-row-card .category-showcase-grid .category-showcase-icon {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 32px !important;
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
}
.showcase-row-card .category-showcase-grid .category-showcase-name {
  font-size: 12.5px !important;
  font-weight: 400 !important;
  color: var(--text, #1e293b) !important;
  text-align: left !important;
  white-space: normal !important;
  padding: 0 !important;
  background: transparent !important;
  border-radius: 0 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  line-height: 1.3 !important;
  font-family: inherit !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  display: block !important;
}
.showcase-row-card .category-showcase-grid .product-tile {
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  min-height: unset !important;
  transition: none !important;
  font-family: inherit !important;
  font-size: inherit !important;
  font-weight: inherit !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  line-height: 1.3 !important;
  width: 100% !important;
  min-width: 0 !important;
  flex: unset !important;
  flex-shrink: 1 !important;
  scroll-snap-align: unset !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 4px !important;
  text-decoration: none !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}
.showcase-row-card .category-showcase-grid .product-tile:hover {
  background: transparent !important;
  color: inherit !important;
  transform: none !important;
  box-shadow: none !important;
  opacity: 1 !important;
}
.showcase-row-card .category-showcase-grid .product-tile:hover * {
  color: inherit !important;
}
.showcase-row-card .category-showcase-grid .product-tile-img-wrap {
  width: 100% !important;
  height: 0 !important;
  padding-bottom: 100% !important;
  min-height: unset !important;
  border-radius: 8px !important;
  border: 1px solid var(--border, #e2e8f0) !important;
  position: relative !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
  background: var(--background, #f8fafc) !important;
  flex: none !important;
}
.showcase-row-card .category-showcase-grid .product-tile-img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  max-width: 100% !important;
  max-height: 100% !important;
}
.showcase-row-card .category-showcase-grid .product-tile-name {
  font-size: 12.5px !important;
  font-weight: 400 !important;
  color: var(--text, #1e293b) !important;
  text-align: left !important;
  white-space: normal !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  line-height: 1.3 !important;
  max-height: 2.6em !important;
  padding: 0 !important;
  background: transparent !important;
  font-family: inherit !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
}
.showcase-row-card .category-showcase-grid .product-tile-price {
  font-size: 12px !important;
  font-weight: 600 !important;
  color: var(--text, #1e293b) !important;
  padding: 0 !important;
  background: transparent !important;
}

/* Also protect style-card-grid with 4-class specificity (0,4,0) */
.category-showcase-module.style-card-grid .category-showcase-grid .category-showcase-card {
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  min-height: unset !important;
  transition: none !important;
  font-family: inherit !important;
  font-size: inherit !important;
  font-weight: inherit !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  line-height: 1.3 !important;
  width: 100% !important;
  min-width: 0 !important;
  flex: unset !important;
  flex-shrink: 1 !important;
  scroll-snap-align: unset !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 6px !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
  text-decoration: none !important;
}
.category-showcase-module.style-card-grid .category-showcase-grid .category-showcase-card:hover {
  background: transparent !important;
  color: inherit !important;
  transform: none !important;
  box-shadow: none !important;
  opacity: 1 !important;
}
.category-showcase-module.style-card-grid .category-showcase-grid .category-showcase-card:hover * {
  color: inherit !important;
}
.category-showcase-module.style-card-grid .category-showcase-grid .category-showcase-img-wrap {
  width: 100% !important;
  height: 0 !important;
  padding-bottom: 100% !important;
  min-height: unset !important;
  border-radius: 8px !important;
  border: 1px solid var(--border, #e2e8f0) !important;
  position: relative !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
  background: var(--card, #ffffff) !important;
  box-shadow: none !important;
  flex: none !important;
}
.category-showcase-module.style-card-grid .category-showcase-grid .category-showcase-img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  max-width: 100% !important;
  max-height: 100% !important;
}
.category-showcase-module.style-card-grid .category-showcase-grid .category-showcase-icon {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 36px !important;
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
}
.category-showcase-module.style-card-grid .category-showcase-grid .category-showcase-name {
  font-size: 13px !important;
  font-weight: 400 !important;
  color: var(--text, #1e293b) !important;
  text-align: left !important;
  white-space: normal !important;
  padding: 0 !important;
  background: transparent !important;
  border-radius: 0 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  line-height: 1.3 !important;
  font-family: inherit !important;
}

/* ── SHOWCASE ROW — product tile variant ───────────────────────── */
.showcase-row-card .product-tile {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 4px !important;
  text-decoration: none !important;
  min-width: 0 !important;
  width: 100% !important;
  flex: unset !important;
  flex-shrink: 1 !important;
  scroll-snap-align: unset !important;
}
.showcase-row-card .product-tile-img-wrap {
  width: 100%;
  height: 0;
  padding-bottom: 100%;
  border-radius: 8px;
  border: 1px solid var(--border, #e2e8f0);
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  background: var(--background, #f8fafc);
}
.showcase-row-card .product-tile-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  max-width: 100%;
  max-height: 100%;
}
.showcase-row-card .product-tile-name {
  font-size: 12.5px;
  font-weight: 400;
  color: var(--text, #1e293b);
  text-align: left;
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.3;
  max-height: 2.6em;
}
.showcase-row-card .product-tile-price {
  font-size: 12px;
  font-weight: 600;
  color: var(--text, #1e293b);
}
.dark .showcase-row-card .product-tile-name,
.dark .showcase-row-card .product-tile-price {
  color: #f8fafc;
}

/* ============================================================
   DALIVARI QUICK ADD & QUANTITY SELECTOR SYSTEM
============================================================ */

/* Quick View (eye) button — top-left of the product image */
.quick-view-btn {
  width: 30px;
  height: 30px;
  min-width: 30px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.9);
  color: #1e293b;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: transform 0.15s ease, background-color 0.15s ease;
  touch-action: manipulation;
}

.quick-view-btn:hover {
  background-color: #ffffff;
  transform: scale(1.08);
}

.quick-view-btn:active {
  transform: scale(0.92);
}

@media (max-width: 768px) {
  .quick-view-btn {
    width: 26px;
    height: 26px;
    min-width: 26px;
  }
}

.dalivari-quick-add-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  /* Sits on top of .card-carousel, which has touch-action:pan-y for its
     swipe gesture. Without this, the browser reserves this region for
     the parent's gesture handling and taps here can be delayed or
     swallowed on mobile instead of firing click. */
  touch-action: manipulation;
}

/* Quick Add Single Button [+] */
.dalivari-quick-add-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: var(--qa-radius, 12px);
  background: var(--qa-primary, var(--tc-topbar-bg, var(--primary, #FF7A00)));
  color: var(--tc-topbar-text, #ffffff);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(255, 122, 0, 0.35);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.2s ease, box-shadow 0.2s ease;
  user-select: none;
  outline: none;
  touch-action: manipulation;
  position: relative;
  z-index: 5;
}

.dalivari-quick-add-btn:hover {
  filter: brightness(1.1);
  transform: scale(1.08);
  box-shadow: 0 6px 16px rgba(255, 122, 0, 0.45);
}

.dalivari-quick-add-btn:active {
  transform: scale(0.94);
}

.dalivari-quick-add-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Quantity Selector Container [ - qty + ] */
.dalivari-qty-selector {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  background-color: var(--qa-primary, var(--tc-topbar-bg, var(--primary, #FF7A00)));
  color: #FFFFFF;
  border: none;
  padding: 3px 6px;
  border-radius: var(--qa-radius, 10px);
  box-shadow: 0 4px 12px rgba(255, 122, 0, 0.35);
  animation: dalivariFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
  width: auto;
  min-width: 88px;
  height: 38px;
}

@keyframes dalivariFadeIn {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* "-" and "+" buttons inside selector */
.dalivari-qty-btn {
  width: 24px;
  height: 24px;
  min-width: 24px;
  border-radius: 6px;
  background-color: rgba(255, 255, 255, 0.22);
  color: #FFFFFF;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, background-color 0.15s ease;
  user-select: none;
  font-weight: 800;
  touch-action: manipulation;
}

.dalivari-qty-btn:hover {
  background-color: rgba(255, 255, 255, 0.38);
  transform: scale(1.08);
}

.dalivari-qty-btn:active {
  transform: scale(0.92);
}

.dalivari-qty-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Center number box */
.dalivari-qty-num {
  font-weight: 800;
  font-size: 13.5px;
  color: #FFFFFF;
  min-width: 18px;
  text-align: center;
  user-select: none;
}

/* Responsive Scaling */
@media (max-width: 768px) {
  .dalivari-quick-add-btn {
    width: 42px;
    height: 42px;
    min-width: 42px;
  }
  .dalivari-qty-selector {
    padding: 3px 6px;
    gap: 5px;
    min-width: 84px;
  }
  .dalivari-qty-btn {
    width: 22px;
    height: 22px;
    min-width: 22px;
  }
  .dalivari-qty-num {
    font-size: 13px;
  }
}

/* ============================================================
   DALIVARI QUICK VIEW OVERLAY (modal)
============================================================ */
.qv-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: qvFadeIn 0.18s ease;
}

@keyframes qvFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.qv-modal {
  position: relative;
  width: 100%;
  max-width: 380px;
  max-height: 90vh;
  overflow-y: auto;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  animation: qvSlideUp 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.dark .qv-modal {
  background: #1e1e24;
  color: #f8fafc;
}

@keyframes qvSlideUp {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.qv-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  color: #1e293b;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  touch-action: manipulation;
}

.qv-close:hover {
  background: #ffffff;
}

.qv-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  background: #f8fafc;
  overflow: hidden;
  border-radius: 16px 16px 0 0;
}

.qv-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.qv-wishlist-btn {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  touch-action: manipulation;
}

.qv-oos-badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  z-index: 2;
  background: #64748b;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
}

.qv-body {
  padding: 16px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.qv-brand {
  font-size: 11px;
  font-weight: 700;
  color: #15803d;
  background: #f0fdf4;
  padding: 2px 8px;
  border-radius: 6px;
  align-self: flex-start;
}

.qv-name {
  font-size: 16px;
  font-weight: 800;
  color: #1e293b;
  margin: 2px 0 0;
  line-height: 1.35;
}

.dark .qv-name {
  color: #f8fafc;
}

.qv-rating {
  font-size: 12px;
  color: #eab308;
  display: flex;
  align-items: center;
  gap: 3px;
}

.qv-rating span {
  color: #475569;
  font-weight: 600;
}

.dark .qv-rating span {
  color: #cbd5e1;
}

.qv-review-count {
  font-weight: 400 !important;
  color: #94a3b8 !important;
}

.qv-price {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  margin-top: 2px;
}

.dark .qv-price {
  color: #f8fafc;
}

.qv-highlights {
  margin: 4px 0 0;
  padding-left: 18px;
  font-size: 12.5px;
  color: #475569;
  line-height: 1.6;
}

.dark .qv-highlights {
  color: #cbd5e1;
}

.qv-actions {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.qv-quick-add {
  flex-shrink: 0;
}

.qv-oos-text {
  font-size: 13px;
  font-weight: 700;
  color: #ef4444;
}

.qv-view-link {
  font-size: 12.5px;
  font-weight: 700;
  color: #10b981;
  text-decoration: none;
  white-space: nowrap;
}

.qv-view-link:hover {
  text-decoration: underline;
}

@media (max-width: 480px) {
  .qv-backdrop {
    align-items: flex-end;
    padding: 0;
  }
  .qv-modal {
    max-width: 100%;
    max-height: 92vh;
    border-radius: 16px 16px 0 0;
    animation: qvSlideUpMobile 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  }
  @keyframes qvSlideUpMobile {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }
}

/* ======================================================
   LAYOUT TYPE EXTENSIONS
====================================================== */

/* Zigzag: alternate large/small cards every 2 items */
.product-grid.layout-zigzag .product-card:nth-child(4n+1),
.product-grid.layout-zigzag .product-card:nth-child(4n+2) {
  grid-row: span 1;
}
.product-grid.layout-zigzag .product-card:nth-child(4n+3),
.product-grid.layout-zigzag .product-card:nth-child(4n+4) {
  grid-row: span 1;
}
.product-grid.layout-zigzag .product-card:nth-child(odd) .card-carousel {
  aspect-ratio: 4/5 !important;
}
.product-grid.layout-zigzag .product-card:nth-child(even) .card-carousel {
  aspect-ratio: 1/1 !important;
}

/* Mixed Size: first card is featured (spans 2 cols, wider image) */
.product-grid.layout-mixed-size .product-card:first-child {
  grid-column: span 2;
}
.product-grid.layout-mixed-size .product-card:first-child .card-carousel {
  aspect-ratio: 16/9 !important;
}

/* Smart Auto-Fit: uses auto-fill, no extra styles needed */
.product-grid.layout-smart-auto {
  /* handled via JS-injected style */
}

/* Multi-Row Carousel: 2-row horizontal scroll */
.layout-multi-row-carousel {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.layout-multi-row-carousel::-webkit-scrollbar {
  display: none;
}
.layout-multi-row-carousel .product-card {
  flex-shrink: 0;
}

/* ============================================================
   FLASH SALE BANNER — countdown strip (icon + title + discount
   badge, message, live HRS/MIN/SEC boxes, dashed promo code box)
============================================================ */
.flash-sale-module {
  padding: 0 16px;
}

.flash-sale-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  padding: 12px 18px;
  border-radius: 12px;
  border: 1.5px solid;
  text-decoration: none;
  max-width: 100%;
}

a.flash-sale-strip {
  cursor: pointer;
}

.flash-sale-title {
  font-weight: 800;
  font-size: 14px;
  white-space: nowrap;
}

.flash-sale-icon {
  margin-right: 4px;
}

.flash-sale-message {
  font-size: 12.5px;
  flex: 1;
  min-width: 140px;
}

.flash-sale-timer {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.flash-sale-timer-box {
  border-radius: 8px;
  padding: 6px 9px;
  text-align: center;
  min-width: 42px;
}

.flash-sale-timer-num {
  font-weight: 800;
  font-size: 15px;
  line-height: 1;
}

.flash-sale-timer-label {
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  opacity: 0.75;
  margin-top: 2px;
}

.flash-sale-code {
  border: 1.5px dashed;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  flex-shrink: 0;
}

.flash-sale-code-label {
  display: block;
  font-size: 8.5px;
  font-weight: 700;
  opacity: 0.7;
  letter-spacing: 0.03em;
}

.flash-sale-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  transition: transform 0.15s ease, opacity 0.15s ease;
  margin-left: auto;
}

.flash-sale-action-btn:hover {
  transform: translateY(-1px);
  opacity: 0.93;
}

@media (max-width: 640px) {
  .flash-sale-strip {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .flash-sale-main-link {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .flash-sale-timer {
    order: 3;
    justify-content: center;
  }
  .flash-sale-action-btn {
    width: 100%;
    margin-left: 0;
    order: 4;
    padding: 10px 14px;
  }
}
