/**
 * Hexia 3D Product Carousel — Frontend v1.4
 */

.h3pc-section {
  --h3pc-height: var(--h3pc-height-desktop, 100vh);
  --h3pc-product-size: 1.5;
  --h3pc-scale-center: var(--h3pc-scale-center-d, 1.58);
  --h3pc-center-height: 54%;
  --h3pc-side-height: 24%;
  --h3pc-back-height: 18%;
  --h3pc-center-height-m: 51%;
  --h3pc-side-height-m: 19.5%;
  --h3pc-back-height-m: 15%;
  --h3pc-bottom-center: var(--h3pc-bottom-center-d, 14%);
  --h3pc-left-pos: var(--h3pc-left-pos-d, 36%);
  --h3pc-right-pos: var(--h3pc-right-pos-d, 64%);
  --h3pc-nav-size: var(--h3pc-nav-size-d, 48px);
  --h3pc-glow-strength: 0.22;

  position: relative;
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  min-height: var(--h3pc-height);
  height: var(--h3pc-height);
  background: var(--h3pc-bg, #020204);
  color: var(--h3pc-text, #fff);
  overflow: hidden;
  overflow-x: hidden;
  isolation: isolate;
  font-family: var(--h3pc-font-text, "Coda", system-ui, sans-serif);
  box-sizing: border-box;
  contain: layout style;
}

.h3pc-section *,
.h3pc-section *::before,
.h3pc-section *::after {
  box-sizing: border-box;
}

.h3pc-inner {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: inherit;
}

.h3pc-bg-glow {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 90% 70% at 50% 55%, rgba(255, 255, 255, 0.03), transparent 55%),
    radial-gradient(circle at 12% 88%, rgba(255, 255, 255, 0.02), transparent 40%);
}

.h3pc-bg-glow--accent {
  z-index: 1;
  background:
    radial-gradient(ellipse 55% 45% at 50% 48%, var(--h3pc-active-color-soft, rgba(241, 0, 171, 0.22)), transparent 62%),
    radial-gradient(circle at 72% 18%, var(--h3pc-active-color-soft, rgba(241, 0, 171, 0.12)), transparent 38%);
  opacity: calc(var(--h3pc-glow-strength, 0.22) * 3.5);
  transition: background 650ms cubic-bezier(0.4, 0, 0.2, 1), opacity 650ms ease;
}

.h3pc-glow--low { --h3pc-glow-strength: 0.12; }
.h3pc-glow--medium { --h3pc-glow-strength: 0.22; }
.h3pc-glow--high { --h3pc-glow-strength: 0.35; }

.h3pc-noise {
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0.055;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

.h3pc-vignette {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    radial-gradient(ellipse 120% 100% at 50% 50%, transparent 35%, rgba(0, 0, 0, 0.55) 100%),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.35) 0%, transparent 25%, transparent 70%, rgba(0, 0, 0, 0.5) 100%);
}

.h3pc-ghost-text {
  position: absolute;
  left: 50%;
  top: 44%;
  transform: translate(-50%, -50%);
  z-index: 4;
  font-family: var(--h3pc-font-title, "Nova Flat", sans-serif);
  font-size: var(--h3pc-color-name-bg-font-size-desktop, clamp(90px, 18vw, 260px));
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--h3pc-active-color-soft, rgba(255, 255, 255, 0.08));
  pointer-events: none;
  user-select: none;
  line-height: 0.9;
  transition: opacity 280ms ease, color 650ms cubic-bezier(0.4, 0, 0.2, 1);
}

.h3pc-copy {
  position: absolute;
  z-index: 30;
  left: clamp(1.25rem, 5vw, 4rem);
  top: clamp(3.5rem, 10vh, 6rem);
  max-width: min(460px, 38vw);
  padding-right: 1rem;
}

.h3pc-kicker {
  display: block;
  font-family: var(--h3pc-font-label, "Coda", sans-serif);
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--h3pc-accent, #f100ab);
  margin-bottom: 0.75rem;
}

.h3pc-title {
  font-family: var(--h3pc-font-title, "Nova Flat", sans-serif);
  font-size: var(--h3pc-title-font-size-desktop, clamp(38px, 5vw, 82px));
  font-weight: 400;
  line-height: 1.12;
  margin: 0 0 1rem;
  color: var(--h3pc-text, #fff);
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45);
}

.h3pc-description {
  font-size: clamp(0.875rem, 1.1vw, 1rem);
  line-height: 1.65;
  margin: 0;
  opacity: 0.76;
  max-width: 42ch;
}

.h3pc-carousel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  top: 0;
  z-index: 15;
  pointer-events: none;
  perspective: 1100px;
}

/* Transparent product slots — no white cards */
.h3pc-item {
  position: absolute;
  aspect-ratio: 0.6 / 1;
  width: auto;
  height: auto;
  left: 50%;
  bottom: 0;
  transform-origin: center center;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  transition:
    transform var(--h3pc-anim-duration, 650ms) var(--h3pc-anim-easing, cubic-bezier(0.4, 0, 0.2, 1)),
    filter var(--h3pc-anim-duration, 650ms) var(--h3pc-anim-easing, cubic-bezier(0.4, 0, 0.2, 1)),
    opacity var(--h3pc-anim-duration, 650ms) var(--h3pc-anim-easing, cubic-bezier(0.4, 0, 0.2, 1)),
    left var(--h3pc-anim-duration, 650ms) var(--h3pc-anim-easing, cubic-bezier(0.4, 0, 0.2, 1)),
    bottom var(--h3pc-anim-duration, 650ms) var(--h3pc-anim-easing, cubic-bezier(0.4, 0, 0.2, 1)),
    height var(--h3pc-anim-duration, 650ms) var(--h3pc-anim-easing, cubic-bezier(0.4, 0, 0.2, 1));
  will-change: transform, filter, opacity, left;
  backface-visibility: hidden;
}

.h3pc-item-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  background: transparent !important;
  mix-blend-mode: normal;
  border: none;
  box-shadow: none;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.45));
  pointer-events: none;
  user-select: none;
}

.h3pc-role-center {
  left: 50%;
  bottom: var(--h3pc-bottom-center, 14%);
  height: var(--h3pc-center-height, 54%);
  transform: translateX(-50%) scale(var(--h3pc-scale-center, 1.58));
  filter: blur(0);
  opacity: 1;
  z-index: 20;
}

.h3pc-role-center .h3pc-item-img {
  filter: drop-shadow(0 24px 48px rgba(0, 0, 0, 0.5));
}

.h3pc-role-left {
  left: var(--h3pc-left-pos, 36%);
  bottom: 20%;
  height: var(--h3pc-side-height, 24%);
  transform: translateX(-50%) scale(0.9) rotateY(14deg);
  filter: blur(var(--h3pc-blur-sides, 2px));
  opacity: var(--h3pc-opacity-sides, 0.75);
  z-index: 10;
}

.h3pc-role-right {
  left: var(--h3pc-right-pos, 64%);
  bottom: 20%;
  height: var(--h3pc-side-height, 24%);
  transform: translateX(-50%) scale(0.9) rotateY(-14deg);
  filter: blur(var(--h3pc-blur-sides, 2px));
  opacity: var(--h3pc-opacity-sides, 0.75);
  z-index: 10;
}

.h3pc-role-back {
  left: 50%;
  bottom: 24%;
  height: var(--h3pc-back-height, 18%);
  transform: translateX(-50%) scale(0.8);
  filter: blur(var(--h3pc-blur-back, 4px));
  opacity: var(--h3pc-opacity-back, 0.35);
  z-index: 5;
}

.h3pc-role-hidden {
  left: 50%;
  bottom: 18%;
  height: 10%;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) scale(0.55);
  filter: blur(8px);
  z-index: 1;
}

.h3pc-section[data-h3pc-count="1"] .h3pc-nav {
  display: none;
}

.h3pc-section.h3pc-is-animating .h3pc-nav-btn,
.h3pc-section.h3pc-is-animating .h3pc-secondary-link {
  pointer-events: none;
}

.h3pc-product-info {
  position: absolute;
  z-index: 35;
  right: clamp(1.25rem, 5vw, 4rem);
  bottom: clamp(2rem, 8vh, 3.5rem);
  max-width: min(380px, 34vw);
  text-align: right;
}

.h3pc-current-label {
  display: block;
  font-family: var(--h3pc-font-label, "Coda", sans-serif);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.5;
  margin-bottom: 0.35rem;
}

.h3pc-current-name {
  font-family: var(--h3pc-font-title, "Nova Flat", sans-serif);
  font-size: clamp(1.2rem, 2.4vw, 1.85rem);
  margin: 0 0 0.5rem;
  color: var(--h3pc-active-color, var(--h3pc-accent, #f100ab));
  transition: color 650ms ease;
}

.h3pc-current-description {
  font-size: 0.9rem;
  line-height: 1.55;
  margin: 0 0 1.25rem;
  opacity: 0.74;
}

.h3pc-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.85rem 1.85rem;
  font-family: var(--h3pc-font-cta, "Coda", sans-serif);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--h3pc-active-cta-text, #ffffff);
  background: linear-gradient(
    90deg,
    var(--h3pc-active-color-cta-soft, rgba(241, 0, 171, 0.65)) 0%,
    var(--h3pc-active-color-cta, var(--h3pc-active-color, #f100ab)) 100%
  );
  border-radius: var(--h3pc-cta-radius, 999px);
  transition: box-shadow 0.3s ease, transform 0.3s ease, background 0.45s ease, color 0.3s ease;
  box-shadow: 0 0 32px var(--h3pc-active-color-cta-soft, rgba(241, 0, 171, 0.45));
}

.h3pc-cta:hover,
.h3pc-cta:focus {
  box-shadow: 0 0 44px var(--h3pc-active-color-cta-soft, rgba(241, 0, 171, 0.65));
  transform: translateY(-2px);
  color: var(--h3pc-active-cta-text, #ffffff);
}

.h3pc-secondary-link {
  display: block;
  margin-top: 0.75rem;
  margin-left: auto;
  background: none;
  border: none;
  padding: 0.5rem 0;
  font-family: var(--h3pc-font-text, "Coda", sans-serif);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.48);
  cursor: pointer;
  text-decoration: underline;
}

.h3pc-nav {
  position: absolute;
  inset: 0;
  z-index: 70;
  pointer-events: none;
}

.h3pc-nav-btn {
  position: absolute;
  top: 50%;
  width: 56px;
  height: 56px;
  min-width: 44px;
  min-height: 44px;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--h3pc-nav-color, #ffffff);
  opacity: 0.88;
  pointer-events: auto;
  transform: translateY(-50%);
  transition: opacity 180ms ease, transform 180ms ease;
  touch-action: manipulation;
}

.h3pc-prev {
  left: clamp(24px, 5vw, 80px);
}

.h3pc-next {
  right: clamp(24px, 5vw, 80px);
}

.h3pc-arrow {
  width: 34px;
  height: 34px;
  display: block;
  border-right: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
}

.h3pc-arrow-left {
  transform: rotate(135deg);
}

.h3pc-arrow-right {
  transform: rotate(-45deg);
}

.h3pc-nav-btn:hover,
.h3pc-nav-btn:focus {
  opacity: 1;
  outline: none;
  transform: translateY(-50%) scale(1.08);
}

.h3pc-nav-btn:disabled,
.h3pc-section.h3pc-is-animating .h3pc-nav-btn {
  opacity: 0.35;
  cursor: not-allowed;
  transform: translateY(-50%);
}

/* Legacy nav_style classes: same minimal chevron (no circle/glass). */
.h3pc-nav--minimal .h3pc-nav-btn,
.h3pc-nav--circle .h3pc-nav-btn,
.h3pc-nav--glass .h3pc-nav-btn {
  border: 0;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-radius: 0;
}

.h3pc-empty {
  padding: 2rem;
  text-align: center;
  background: #0a0a0c;
  color: #a7aaad;
  border: 1px dashed #3c434a;
  border-radius: 8px;
}

/* --------------------------------------------------------------------------
   Mobile — vertical flow, safe area, no header overlap
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {
  html,
  body {
    overflow-x: hidden;
  }

  .h3pc-section {
    --h3pc-height: max(var(--h3pc-height-mobile, 100svh), 100svh);
    width: 100%;
    max-width: 100%;
    margin-left: 0 !important;
    margin-right: 0 !important;
    left: auto;
    right: auto;
    transform: none;
    min-height: 100svh;
    height: auto;
    overflow: hidden;
    overflow-x: clip;
    padding-top: clamp(120px, 18svh, 170px);
    padding-bottom: calc(clamp(70px, 10svh, 110px) + env(safe-area-inset-bottom, 0px));
  }

  .h3pc-section,
  .h3pc-section * {
    box-sizing: border-box;
  }

  .h3pc-inner {
    display: grid;
    grid-template-rows: auto auto auto auto;
    grid-template-areas:
      "copy"
      "stage"
      "info"
      "nav";
    min-height: 0;
    height: auto;
    width: 100%;
    max-width: 100%;
  }

  .h3pc-bg-glow,
  .h3pc-bg-glow--accent,
  .h3pc-noise,
  .h3pc-vignette,
  .h3pc-ghost-text {
    grid-row: 1 / -1;
    grid-column: 1;
  }

  .h3pc-ghost-text {
    position: absolute;
    left: 50%;
    right: auto;
    top: 38%;
    transform: translateX(-50%) translateY(-50%);
    z-index: 2;
    width: 100vw;
    max-width: 100vw;
    font-size: var(--h3pc-color-name-bg-font-size-mobile, 50px) !important;
    line-height: 0.9;
    color: var(--h3pc-active-color-soft, rgba(255, 255, 255, 0.08));
    opacity: 0.16;
    white-space: nowrap;
    text-align: center;
    overflow: hidden;
    pointer-events: none;
  }

  .h3pc-copy {
    position: relative;
    z-index: 50;
    grid-area: copy;
    left: auto;
    top: auto;
    transform: none;
    width: 100%;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding: 0 24px;
    margin-bottom: 18px;
    text-align: center;
  }

  .h3pc-kicker {
    font-size: 11px;
    letter-spacing: 0.18em;
    margin-bottom: 8px;
  }

  .h3pc-title {
    font-size: var(--h3pc-title-font-size-mobile, clamp(30px, 9vw, 42px));
    line-height: 0.95;
    margin-bottom: 10px;
  }

  .h3pc-description {
    font-size: 14px;
    line-height: 1.35;
    max-width: 320px;
    margin: 0 auto;
    opacity: 0.82;
  }

  .h3pc-carousel {
    position: relative;
    z-index: 20;
    grid-area: stage;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    transform: none;
    width: 100%;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    height: clamp(300px, 42svh, 430px);
    min-height: clamp(300px, 42svh, 430px);
    margin-top: 8px;
    margin-bottom: 12px;
    perspective: 900px;
    overflow: hidden;
  }

  .h3pc-item {
    max-width: 100%;
  }

  .h3pc-role-center {
    left: 50% !important;
    bottom: 8%;
    height: 58%;
    transform: translateX(-50%) scale(1.45);
    filter: blur(0);
    opacity: 1;
    z-index: 30;
  }

  .h3pc-role-left {
    left: 22%;
    bottom: 28%;
    height: 18%;
    transform: translateX(-50%) scale(1) rotateY(12deg);
    filter: blur(2px);
    opacity: 0.45;
    z-index: 10;
  }

  .h3pc-role-right {
    left: 78%;
    bottom: 28%;
    height: 18%;
    transform: translateX(-50%) scale(1) rotateY(-12deg);
    filter: blur(2px);
    opacity: 0.45;
    z-index: 10;
  }

  .h3pc-role-back {
    left: 50%;
    bottom: 32%;
    height: 15%;
    transform: translateX(-50%) scale(0.9);
    filter: blur(4px);
    opacity: 0.25;
    z-index: 5;
  }

  .h3pc-product-info {
    position: relative;
    z-index: 55;
    grid-area: info;
    left: auto !important;
    right: auto !important;
    bottom: auto;
    transform: none !important;
    width: 100%;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding: 0 24px;
    margin-top: 0;
    text-align: left;
    background: none;
  }

  .h3pc-current-label {
    font-size: 11px;
    letter-spacing: 0.2em;
    opacity: 0.65;
  }

  .h3pc-current-name {
    font-size: clamp(26px, 8vw, 36px);
    line-height: 1;
    margin: 8px 0 12px;
  }

  .h3pc-current-description {
    font-size: 14px;
    line-height: 1.35;
    opacity: 0.82;
    max-width: 330px;
    margin-bottom: 0;
  }

  .h3pc-cta {
    display: flex;
    width: 100%;
    min-height: 62px;
    margin-top: 22px;
    padding: 0 22px;
    border-radius: 999px;
    font-size: 15px;
    letter-spacing: 0.16em;
    position: relative;
    z-index: 70;
    text-align: center;
    transform: none;
  }

  .h3pc-cta:hover,
  .h3pc-cta:focus {
    transform: none;
  }

  .h3pc-secondary-link {
    display: none;
  }

  .h3pc-nav {
    position: relative;
    z-index: 80;
    grid-area: nav;
    inset: auto;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    width: 100%;
    max-width: 100%;
    height: 70px;
    margin-top: 24px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 24px calc(12px + env(safe-area-inset-bottom, 0px));
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 70px;
    pointer-events: auto;
  }

  .h3pc-nav-btn {
    position: static;
    top: auto;
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    transform: none;
  }

  .h3pc-prev,
  .h3pc-next {
    left: auto;
    right: auto;
  }

  .h3pc-arrow {
    width: 28px;
    height: 28px;
    border-right-width: 2px;
    border-bottom-width: 2px;
  }

  .h3pc-nav-btn:hover,
  .h3pc-nav-btn:focus {
    transform: scale(1.06);
  }

  .h3pc-nav-btn:disabled,
  .h3pc-section.h3pc-is-animating .h3pc-nav-btn {
    transform: none;
  }

  .et_pb_code .h3pc-section--divi,
  .et_pb_text .h3pc-section--divi {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}

/* --------------------------------------------------------------------------
   Tablet — compact desktop-like layout
   -------------------------------------------------------------------------- */
@media (min-width: 768px) and (max-width: 1024px) {
  .h3pc-section {
    min-height: 100svh;
    height: auto;
    padding-top: clamp(90px, 12svh, 130px);
    padding-bottom: 80px;
    overflow-x: hidden;
  }

  .h3pc-inner {
    min-height: calc(100svh - clamp(90px, 12svh, 130px) - 80px);
  }

  .h3pc-copy {
    left: 6vw;
    top: 15%;
    max-width: 360px;
  }

  .h3pc-title {
    font-size: clamp(40px, 6vw, 64px);
  }

  .h3pc-description {
    font-size: 15px;
    line-height: 1.45;
  }

  .h3pc-ghost-text {
    top: 42%;
    font-size: var(--h3pc-color-name-bg-font-size-tablet, clamp(70px, 15vw, 160px));
    opacity: 0.16;
  }

  .h3pc-carousel {
    top: 0;
    bottom: 0;
    height: 62vh;
    min-height: 62vh;
  }

  .h3pc-role-center {
    height: 70%;
    bottom: 12%;
    transform: translateX(-50%) scale(1.45);
  }

  .h3pc-role-left {
    left: 24%;
    height: 23%;
    bottom: 22%;
  }

  .h3pc-role-right {
    left: 76%;
    height: 23%;
    bottom: 22%;
  }

  .h3pc-product-info {
    left: 6vw;
    right: auto;
    bottom: 8vh;
    max-width: 420px;
    text-align: left;
  }

  .h3pc-current-name {
    font-size: clamp(32px, 5vw, 50px);
  }

  .h3pc-cta {
    min-height: 68px;
    max-width: 520px;
    width: 100%;
    display: flex;
  }

  .h3pc-secondary-link {
    display: none;
  }

  .h3pc-prev {
    left: clamp(16px, 3vw, 40px);
  }

  .h3pc-next {
    right: clamp(16px, 3vw, 40px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .h3pc-item,
  .h3pc-bg-glow--accent,
  .h3pc-current-name {
    transition-duration: 0.01ms !important;
  }
}

.et_pb_section .h3pc-section--divi,
.et_pb_row .h3pc-section--divi,
.et_pb_column .h3pc-section--divi {
  overflow: hidden;
}

.et_pb_section:has(.h3pc-section--divi),
.et_pb_row:has(.h3pc-section--divi) {
  overflow: visible !important;
}

.et_pb_code .h3pc-section--divi,
.et_pb_text .h3pc-section--divi {
  width: 100vw;
  max-width: 100vw;
}

@media (max-width: 767px) {
  .et_pb_code .h3pc-section--divi,
  .et_pb_text .h3pc-section--divi {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}
