/* ==========================================================================
   Shared hero-slider component (dxh-* classes; design handoff home2.css).
   Extracted from home.css so the Home 2026 hero and the brand-page featured
   slider (inc/brand.php droix_brand_featured()) reuse one implementation —
   registered as handle 'droix-hero-slider', a dependency-only style/script
   like droix-pcard. Behaviour in assets/js/hero-slider.js.
   ========================================================================== */

.dxh-hero {
  position: relative; margin-top: 20px; overflow: hidden;
  border-radius: var(--radius-3xl);
  background:
    radial-gradient(120% 120% at 88% 18%, rgba(176,203,31,0.16), transparent 55%),
    linear-gradient(180deg, #ffffff 0%, var(--bg-2) 100%);
  border: 1px solid var(--stroke-1);
}
.dxh-hero[data-accent="purple"] {
  background:
    radial-gradient(120% 120% at 88% 18%, rgba(187,61,161,0.14), transparent 55%),
    linear-gradient(180deg, #ffffff 0%, var(--bg-2) 100%);
}
.dxh-hero-stage {
  display: grid; grid-template-columns: 1.02fr 0.98fr; gap: 24px; align-items: center;
  padding: 18px 60px 56px; min-height: 480px;
}
/* server-rendered slides: stacked, JS toggles .on */
.dxh-slide { display: none; }
.dxh-slide.on { display: grid; }
.dxh-hero-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.dxh-pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-ui); font-size: 11.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--droix-green-dark); background: var(--droix-green-tint);
  padding: 7px 13px; border-radius: var(--radius-pill);
}
.dxh-pill .d { width: 7px; height: 7px; border-radius: 50%; background: var(--droix-green); box-shadow: 0 0 0 4px rgba(176,203,31,0.25); }
.dxh-hero-h {
  font-family: var(--font-ui); font-weight: 700; font-size: clamp(36px, 4.4vw, 60px);
  line-height: 1.02; letter-spacing: -0.02em; color: var(--fg-1); margin: 0; text-wrap: balance;
}
.dxh-hero-p { font-family: var(--font-body); font-size: 16.5px; line-height: 1.55; color: var(--fg-3); margin: 0; max-width: 46ch; }
.dxh-hero-specs { display: flex; flex-wrap: wrap; gap: 10px; }
.dxh-chip {
  display: flex; flex-direction: column; gap: 2px;
  background: #fff; border: 1px solid var(--stroke-2); border-radius: var(--radius-md);
  padding: 8px 14px; box-shadow: var(--shadow-xs);
}
.dxh-chip .k { font-family: var(--font-body); font-size: 10.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg-5); }
.dxh-chip .v { font-family: var(--font-ui); font-size: 14px; font-weight: 500; color: var(--fg-1); }
.dxh-hero-buy { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 2px; }
.dxh-price { display: flex; flex-direction: column; line-height: 1; }
.dxh-price .from { font-family: var(--font-body); font-size: 11px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--fg-5); margin-bottom: 4px; }
.dxh-price .now, .dxh-price .now .woocommerce-Price-amount { font-family: var(--font-ui); font-weight: 700; font-size: 26px; color: var(--droix-purple); line-height: 1; }
.dxh-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 52px; padding: 0 24px;
  border-radius: var(--radius-lg); border: 0; cursor: pointer; text-decoration: none; white-space: nowrap;
  font-family: var(--font-ui); font-size: 15px; font-weight: 700;
  background: var(--droix-green); color: #1c2400; box-shadow: var(--shadow-cta);
  transition: background .16s ease, color .16s ease, transform .16s ease;
}
.dxh-btn:hover { background: var(--droix-green-dark); color: #fff; }
.dxh-btn:active { transform: translateY(1px); box-shadow: none; }
.dxh-btn.ghost { background: #fff; color: var(--fg-2); border: 1px solid var(--stroke-3); box-shadow: none; }
.dxh-btn.ghost:hover { background: var(--droix-green-tint); border-color: var(--droix-green); color: var(--droix-green-dark); }
.dxh-hero-ctas { display: flex; gap: 10px; flex-wrap: wrap; }

/* hero figure */
.dxh-hero-fig { position: relative; display: flex; align-items: center; justify-content: center; min-height: 380px; }
.dxh-bloom {
  position: absolute; width: 70%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(176,203,31,0.32), transparent 64%); filter: blur(8px);
}
.dxh-slide[data-accent="purple"] .dxh-bloom { background: radial-gradient(circle, rgba(187,61,161,0.26), transparent 64%); }
.dxh-hero-fig img {
  position: relative; max-width: 100%; width: auto; max-height: 400px; height: auto; object-fit: contain;
  filter: drop-shadow(0 26px 44px rgba(17,24,39,0.22));
}
.dxh-figpill {
  position: absolute; bottom: 4px; left: 0;
  display: inline-flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,0.82); backdrop-filter: blur(8px);
  border: 1px solid var(--stroke-2); border-radius: var(--radius-pill);
  padding: 8px 16px; box-shadow: var(--shadow-sm); font-family: var(--font-body);
}
.dxh-figpill .badge { font-family: var(--font-ui); font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; color: var(--droix-green-dark); text-transform: uppercase; }
.dxh-figpill .nm { font-size: 13.5px; font-weight: 700; color: var(--fg-1); }

@media (prefers-reduced-motion: no-preference) {
  .dxh-slide.on .dxh-hero-copy > * { animation: dxhRise .5s cubic-bezier(.2,.7,.3,1) both; }
  .dxh-slide.on .dxh-hero-copy > *:nth-child(2) { animation-delay: .05s; }
  .dxh-slide.on .dxh-hero-copy > *:nth-child(3) { animation-delay: .1s; }
  .dxh-slide.on .dxh-hero-copy > *:nth-child(4) { animation-delay: .15s; }
  .dxh-slide.on .dxh-hero-copy > *:nth-child(5) { animation-delay: .2s; }
  .dxh-slide.on .dxh-hero-fig { animation: dxhFadeIn .55s ease both; }
}
@keyframes dxhRise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes dxhFadeIn { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }

/* slider controls */
.dxh-dots { position: absolute; bottom: 20px; left: 60px; display: flex; gap: 8px; z-index: 4; }
.dxh-dot { width: 9px; height: 9px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; background: var(--stroke-3); transition: width .2s ease, background .2s ease; }
.dxh-dot.on { width: 26px; border-radius: 5px; background: var(--droix-green); }
.dxh-arrows { position: absolute; bottom: 16px; right: 56px; display: flex; gap: 8px; z-index: 4; }
.dxh-arrow {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--stroke-2); background: rgba(255,255,255,0.9);
  display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--fg-2); padding: 0;
  transition: background .16s ease, border-color .16s ease;
}
.dxh-arrow:hover { background: var(--droix-green-tint); border-color: var(--droix-green); color: var(--droix-green-dark); }
/* single-slide fallback (e.g. a brand's 2nd featured product missing on this site) */
.dxh-hero.single .dxh-dots, .dxh-hero.single .dxh-arrows { display: none; }

@media (max-width: 900px) {
  .dxh-slide.on { grid-template-columns: 1fr; }
  .dxh-hero-stage { padding: 24px 24px 64px; min-height: 0; gap: 18px; }
  .dxh-hero-fig { order: -1; min-height: 0; }
  .dxh-hero-fig img { max-height: 240px; }
  .dxh-figpill { display: none; }
  .dxh-dots { left: 24px; bottom: 22px; }
  .dxh-arrows { right: 20px; bottom: 18px; }
}
@media (max-width: 480px) {
  .dxh-hero-h { font-size: 34px; }
  .dxh-hero-p { font-size: 15px; }
  .dxh-dots { left: 18px; bottom: 18px; }
  .dxh-arrows { right: 16px; bottom: 14px; }
}
