/* ============================================================
   EXUDE — cursor.css
   Animated custom cursor (dot + trailing ring) and the
   product-card "second image reveal" animation.
   Cursor only activates on devices with a real mouse
   (html.has-custom-cursor is added by js/cursor.js).
   ============================================================ */

html.has-custom-cursor,
html.has-custom-cursor body,
html.has-custom-cursor a,
html.has-custom-cursor button,
html.has-custom-cursor [role="button"],
html.has-custom-cursor label,
html.has-custom-cursor select,
html.has-custom-cursor summary,
html.has-custom-cursor .product-card,
html.has-custom-cursor .product-card__media {
  cursor: none !important;
}

/* keep the normal text caret inside fields */
html.has-custom-cursor input,
html.has-custom-cursor textarea {
  cursor: text !important;
}

.ex-cursor,
.ex-cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 99999;
  pointer-events: none;
  opacity: 0;
  will-change: transform;
}

.ex-cursor.is-ready,
.ex-cursor-dot.is-ready {
  opacity: 1;
}

/* small gold dot that follows the mouse exactly */
.ex-cursor-dot {
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background-color: #C9A24B;
  transition: opacity 0.3s ease, width 0.3s ease, height 0.3s ease,
    margin 0.3s ease;
}

/* ring that trails behind with easing */
.ex-cursor {
  width: 38px;
  height: 38px;
  margin: -19px 0 0 -19px;
}

.ex-cursor__ring {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border: 1px solid #C9A24B;
  border-radius: 50%;
  background-color: rgba(201, 162, 75, 0);
  transform: scale(1);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    background-color 0.35s ease, border-color 0.35s ease,
    backdrop-filter 0.35s ease;
}

.ex-cursor__label {
  font-family: "Montserrat", sans-serif;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #0A0A0A;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* hovering links / buttons */
.ex-cursor.is-link .ex-cursor__ring {
  transform: scale(1.5);
  background-color: rgba(201, 162, 75, 0.14);
}

.ex-cursor-dot.is-link {
  opacity: 0;
}

/* hovering a product card -> big "View" bubble */
.ex-cursor.is-product .ex-cursor__ring {
  transform: scale(2.1);
  background-color: #C9A24B;
  border-color: #C9A24B;
}

.ex-cursor.is-product .ex-cursor__label {
  opacity: 1;
  transform: scale(1);
}

.ex-cursor-dot.is-product {
  opacity: 0;
}

/* press feedback */
.ex-cursor.is-down .ex-cursor__ring {
  transform: scale(0.75);
}

.ex-cursor.is-product.is-down .ex-cursor__ring {
  transform: scale(1.8);
}

/* click ripple */
.ex-ripple {
  position: fixed;
  z-index: 99998;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 1px solid #C9A24B;
  border-radius: 50%;
  pointer-events: none;
  animation: exRipple 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes exRipple {
  from { transform: scale(0.4); opacity: 0.9; }
  to   { transform: scale(4.5); opacity: 0; }
}

/* ============================================================
   PRODUCT CARD — 2nd image opening animation
   The second image is revealed as a circle that expands from
   the exact point where the mouse entered the card, while the
   first image zooms out and the second settles in.
   --mx / --my are set by js/cursor.js
   ============================================================ */

.product-card__img-alt {
  opacity: 1 !important;
  clip-path: circle(0% at var(--mx, 50%) var(--my, 50%));
  transform: scale(1.18);
  transition: clip-path 0.9s cubic-bezier(0.77, 0, 0.175, 1),
    transform 1.3s cubic-bezier(0.22, 1, 0.36, 1) !important;
  will-change: clip-path, transform;
}

.product-card:hover .product-card__img-alt {
  clip-path: circle(150% at var(--mx, 50%) var(--my, 50%));
  transform: scale(1);
}

.product-card:hover .product-card__img {
  transform: scale(1.12);
  transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

/* gold sweep line that runs across as the image opens */
.product-card__media::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -40%;
  width: 30%;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    100deg,
    rgba(201, 162, 75, 0) 0%,
    rgba(255, 244, 214, 0.45) 50%,
    rgba(201, 162, 75, 0) 100%
  );
  transform: skewX(-18deg);
  opacity: 0;
}

.product-card:hover .product-card__media::after {
  animation: exSheen 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.1s 1 forwards;
}

@keyframes exSheen {
  0%   { left: -40%; opacity: 0; }
  20%  { opacity: 1; }
  100% { left: 120%; opacity: 0; }
}

/* touch devices / reduced motion: simple fade instead */
@media (hover: none), (prefers-reduced-motion: reduce) {
  .product-card__img-alt {
    clip-path: none;
    opacity: 0 !important;
    transform: none;
    transition: opacity 0.6s ease !important;
  }
  .product-card:hover .product-card__img-alt {
    opacity: 1 !important;
  }
  .product-card:hover .product-card__media::after {
    animation: none;
  }
}
