/*
 * SIGMAN luxury layer — full port of snippets/sgm-luxe.liquid.
 * Animated nav underline, button hover lift, card depth + hover zoom, price
 * refinement, sticky-header glass, scroll-reveal hooks (luxe.js), rich-text
 * link underline. Selectors mapped from Horizon classes to ported classes.
 * Typography now lives in the global system: fonts.css + tokens.css + base.css
 * + sgm-display-type.css (Bebas Neue display / DM Sans body).
 */

/* -- Buttons: one recipe for every CTA (BUY NOW included, pdp.css) --
   Hover lightens the fill and lifts 1px; press scales down. No opacity (it
   washed navy to grey-blue) and no `transition: all`. */
.sgm-btn, .button, .single_add_to_cart_button {
  transition: transform 0.15s var(--sgm-ease), filter 0.2s var(--sgm-ease),
              background-color 0.2s var(--sgm-ease), color 0.2s var(--sgm-ease);
  min-height: 48px;
  letter-spacing: 0.04em;
  transform: translateZ(0);
}
@media (any-pointer: fine) and (prefers-reduced-motion: no-preference) {
  .sgm-btn:hover:not(:disabled),
  .button:hover:not(:disabled),
  .single_add_to_cart_button:hover:not(:disabled):not(.disabled) { transform: translateY(-1px); }
}
.sgm-btn:active:not(:disabled),
.button:active:not(:disabled),
.single_add_to_cart_button:active:not(:disabled) { transform: scale(0.97); }
.sgm-btn[disabled], .button[disabled], .single_add_to_cart_button[disabled] {
  opacity: 0.5; cursor: not-allowed; transform: none;
}

/* -- Product cards: flat, square, like the 4:5 media they frame. The soft
   resting shadow put a rounded edge 2px from the title and snapped on hover;
   the image zoom carries the hover on its own (mouse only, so a tap can't
   leave it stuck on touch screens). -- */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .sgm-card__media img {
    transition: transform 0.5s var(--sgm-ease);
    transform-origin: center;
  }
  .sgm-card:hover .sgm-card__media img { transform: scale(1.04); }
}

/* -- Prices refinement -- */
.sgm-card__price, .sgm-price { font-weight: 500; letter-spacing: 0.01em; }

/* -- Sticky header glass on the white nav row -- */
@supports (backdrop-filter: blur(8px)) {
  #header-component[data-sticky-state='active'] .header__row--bottom {
    background-color: rgb(var(--color-background-rgb) / 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 12px rgb(var(--color-foreground-rgb) / 0.06);
  }
}

/* -- Scroll-reveal (only under html.sgm-anim, added by luxe.js) --
   Applies to grids, carousels and the main storefront blocks so the page
   breathes as you scroll instead of appearing all at once. */
@media (prefers-reduced-motion: no-preference) {
  html.sgm-anim :is(.sgm-grid, .sgm-carousel) > *,
  html.sgm-anim :is(.sgm-vrev__card, .sgm-bento__card, .sgm-testimonial, .sgm-note,
    .sgm-bundle-card, .sgm-ed-hero__content, .sgm-home-list__head, .sgm-shopby,
    .sgm-bundle-editorial__h, .sgm-desc__i) {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  }
  html.sgm-anim .sgm-in { opacity: 1 !important; transform: translateY(0) !important; }
  html.sgm-anim .sgm-now { opacity: 1 !important; transform: none !important; transition: none !important; }
}
@media screen and (max-width: 749px) and (prefers-reduced-motion: no-preference) {
  html.sgm-anim :is(.sgm-grid, .sgm-carousel) > * { transform: translateY(12px); }
}

/* -- Refined rich-text link underline -- */
@media (prefers-reduced-motion: no-preference) {
  .rte a:not(.sgm-btn):not(.button) { position: relative; text-decoration: none; }
  .rte a:not(.sgm-btn):not(.button)::after {
    content: '';
    position: absolute; left: 0; bottom: -2px;
    width: 0; height: 1px;
    background: currentColor;
    transition: width 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  }
  .rte a:not(.sgm-btn):not(.button):hover::after { width: 100%; }
}

/* -- Reduced-motion: hard reset -- */
@media (prefers-reduced-motion: reduce) {
  html.sgm-anim .sgm-grid > *, html.sgm-anim .sgm-carousel > *,
  .sgm-card__media img, .sgm-btn, .button { transition: none; transform: none; opacity: 1; }
}
