/* Estore motion layer. No layout, header order or artwork transforms are changed.
   JS opts elements into reveal by adding both .estore-reveal and .is-pending.
   Ripple: --estore-ripple-size, and either inline left/top or --estore-ripple-x/y.
   Reveal stagger: --estore-reveal-delay, in ms. Every animation runs once. */

.estore-reveal {
  transition:
    opacity 360ms cubic-bezier(.2,.65,.25,1),
    translate 440ms cubic-bezier(.2,.75,.25,1),
    transform 240ms cubic-bezier(.2,.75,.25,1),
    box-shadow 250ms ease;
  transition-delay: var(--estore-reveal-delay, 0ms), var(--estore-reveal-delay, 0ms), 0ms, 0ms;
}

.estore-reveal.is-pending:not(.is-visible) {
  opacity: 0;
  translate: 0 14px;
}

.estore-reveal.is-visible {
  opacity: 1;
  translate: none;
}

#app.estore-page-enter > :not(.estore-reveal.is-pending):not(script):not(style) {
  animation: estore-page-enter 300ms cubic-bezier(.2,.7,.3,1) both;
}

@keyframes estore-page-enter {
  from { opacity: .45; }
  to { opacity: 1; }
}

/* Surface feedback stays on controls. Product/photo containers retain their
   existing transforms, and navigation keeps its existing flex arrangement. */
:where(#app, body > header) :is(
  .btn, .heart, .qty button, .sp-choice-buttons button,
  .sp-favorite-chips button, .sp-wholesale-add,
  .of-brand-filters button, .of-categories button,
  .brand-pills button, .mini-chips button, .filter-button,
  .cp-reset, .cp-add-product, .cp-remove,
  .cart-item-qty button, .quantity button
) {
  transition:
    box-shadow 200ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    color 150ms ease,
    filter 150ms ease,
    scale 150ms cubic-bezier(.2,.7,.3,1);
}

body > header .actions a,
body > header .mobile-menu,
.bottom a,
#app :is(.section-head a, .sp-section-heading a, .of-help a, .cp-help a) {
  transition: color 160ms ease, background-color 180ms ease, box-shadow 200ms ease;
}

:where(#app, body > header, .bottom) :is(a, button):focus-visible {
  outline: 2px solid #ff5563;
  outline-offset: 4px;
}

:where(#app, body > header) :is(
  .btn, .heart, .qty button, .sp-choice-buttons button,
  .sp-favorite-chips button, .sp-wholesale-add,
  .of-brand-filters button, .of-categories button,
  .brand-pills button, .mini-chips button, .filter-button,
  .cp-reset, .cp-add-product, .cp-remove,
  .cart-item-qty button, .quantity button
):active {
  scale: .975;
  transition-duration: 90ms;
}

@media (hover: hover) and (pointer: fine) {
  #app .btn:not(:disabled):hover {
    filter: brightness(1.035);
    box-shadow: 0 5px 18px #ff1c292d, 0 0 0 1px #ff495521;
  }

  #app .btn.light:hover,
  #app :is(.sp-wholesale-add, .cp-reset, .cp-add-product):hover {
    box-shadow: 0 5px 17px #30211d0a, 0 0 0 1px #ff526220;
    filter: brightness(1.015);
  }

  #app :is(.heart, .cp-remove):hover {
    color: #ff1930;
    background-color: #fff4f5;
    box-shadow: 0 3px 13px #ff26321a;
  }

  #app :is(
    .sp-choice-buttons button, .sp-favorite-chips button,
    .of-brand-filters button, .of-categories button,
    .brand-pills button, .mini-chips button
  ):hover {
    border-color: #ffbec5;
    box-shadow: 0 4px 14px #d231410b;
  }

  body > header .actions a:hover {
    color: #ff1930;
    background-color: #fff9f9;
    box-shadow: 0 4px 17px #ff253519;
  }

  .bottom a:hover,
  #app :is(.section-head a, .sp-section-heading a, .of-help a):hover {
    color: #c7001b;
  }
}

/* The underline is absolutely positioned; navigation widths do not change. */
body > header nav a {
  position: relative;
  transition: color 160ms ease;
}

body > header nav a::after {
  content: '';
  position: absolute;
  inset-inline: 12%;
  bottom: -7px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, #ff626c, #ff172b);
  opacity: 0;
  transform: scaleX(.3);
  transform-origin: center;
  transition: opacity 180ms ease, transform 200ms cubic-bezier(.2,.7,.3,1);
}

body > header nav a.active::after {
  opacity: .88;
  transform: scaleX(1);
}

#app :is(input, select, textarea), body > header input {
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

#app :is(input, select, textarea):focus-visible {
  border-color: #ff9da5;
  box-shadow: 0 0 0 3px #ff334612;
}

@media (hover: hover) and (pointer: fine) {
  #app :is(.use-card, .feature-banner, .sp-brand-promo, .of-deal):not(.estore-reveal) {
    transition: translate 250ms cubic-bezier(.2,.75,.25,1), box-shadow 250ms ease;
  }
  #app :is(.use-card, .feature-banner, .sp-brand-promo, .of-deal):not(.is-pending):hover {
    translate: 0 -3px;
    box-shadow: 0 9px 26px #16111c12;
  }
  #app .estore-reveal.is-visible:hover { transition-delay: 0ms; }
}

.estore-motion-reduced *, .estore-motion-reduced *::before, .estore-motion-reduced *::after {
  animation-duration: .01ms !important;
  transition-duration: .01ms !important;
  scroll-behavior: auto !important;
}
.estore-motion-reduced #app :is(.use-card, .feature-banner, .sp-brand-promo, .of-deal):hover {
  translate: none;
}

@media (hover: hover) and (pointer: fine) {
  body > header nav a:hover::after {
    opacity: .7;
    transform: scaleX(1);
  }
}

/* Only transient, inert overlays ignore pointer events. */
.estore-ripple {
  position: fixed;
  left: var(--estore-ripple-x, 0px);
  top: var(--estore-ripple-y, 0px);
  width: var(--estore-ripple-size, 120px);
  height: var(--estore-ripple-size, 120px);
  z-index: 190;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, #ffffff9c 0%, #ff536a36 44%, #ff536a00 72%);
  animation: estore-ripple 480ms cubic-bezier(.2,.6,.3,1) forwards;
}

@keyframes estore-ripple {
  from { transform: translate(-50%, -50%) scale(.08); opacity: .8; }
  to { transform: translate(-50%, -50%) scale(1); opacity: 0; }
}

/* WAAPI owns the flight transform. These styles only frame its thumbnail. */
.estore-flight {
  position: fixed;
  left: 0;
  top: 0;
  width: 60px;
  height: 60px;
  z-index: 10020;
  overflow: hidden;
  display: grid;
  place-items: center;
  border-radius: 16px;
  border: 1px solid #ffffffc9;
  background: linear-gradient(145deg, #ffffffed, #fff0f2e8);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 25px #ff243426, 0 3px 10px #34212816;
  pointer-events: none;
}

.estore-flight > .art-clip,
.estore-flight .product-art {
  width: 100%;
  height: 100%;
}

.estore-click-halo {
  position: fixed;
  left: var(--estore-ripple-x, 0px);
  top: var(--estore-ripple-y, 0px);
  width: var(--estore-halo-size, 70px);
  height: var(--estore-halo-size, 70px);
  z-index: 190;
  border-radius: 50%;
  border: 1px solid #ff33464d;
  box-shadow: inset 0 0 13px #ff3d490a;
  pointer-events: none;
  animation: estore-halo 420ms cubic-bezier(.2,.6,.3,1) forwards;
}

@keyframes estore-halo {
  from { transform: translate(-50%, -50%) scale(.62); opacity: .55; }
  to { transform: translate(-50%, -50%) scale(1.15); opacity: 0; }
}

.estore-feedback-cart {
  animation: estore-cart-feedback 360ms cubic-bezier(.2,.7,.3,1);
}

@keyframes estore-cart-feedback {
  0%, 100% { translate: none; }
  38% { translate: 0 -4px; }
  72% { translate: 0 1px; }
}

.estore-feedback-heart {
  animation: estore-heart-feedback 420ms cubic-bezier(.2,.65,.3,1);
}

@keyframes estore-heart-feedback {
  0%, 100% { scale: none; }
  36% { scale: 1.17; }
  65% { scale: .96; }
}

@media (max-width: 800px) {
  body > header nav.is-open {
    animation: estore-menu-enter 220ms cubic-bezier(.2,.7,.3,1);
  }

  #app .filter.is-open {
    animation: estore-filter-enter 250ms cubic-bezier(.2,.7,.3,1);
  }
}

@keyframes estore-menu-enter {
  from { opacity: 0; translate: 0 -6px; }
  to { opacity: 1; translate: none; }
}

@keyframes estore-filter-enter {
  from { opacity: .3; translate: 0 10px; }
  to { opacity: 1; translate: none; }
}

#toast.estore-toast-show {
  animation: estore-toast-enter 240ms cubic-bezier(.2,.7,.3,1);
}

@keyframes estore-toast-enter {
  from { opacity: 0; translate: 0 9px; }
  to { opacity: 1; translate: none; }
}

#app details[open] > :not(summary):not(img):not(.art-clip):not(.product-art) {
  animation: estore-details-enter 180ms cubic-bezier(.2,.7,.3,1);
}

@keyframes estore-details-enter {
  from { opacity: .4; translate: 0 3px; }
  to { opacity: 1; translate: none; }
}

@media (prefers-reduced-motion: reduce) {
  .estore-reveal,
  .estore-reveal.is-pending:not(.is-visible),
  .estore-reveal.is-visible {
    opacity: 1;
    translate: none;
    transition: none !important;
  }

  #app.estore-page-enter > *,
  .estore-feedback-cart,
  .estore-feedback-heart,
  body > header nav.is-open,
  #app .filter.is-open,
  #toast.estore-toast-show,
  #app details[open] > :not(summary):not(img):not(.art-clip):not(.product-art) {
    animation: none !important;
  }

  :where(#app, body > header, .bottom) :is(button, .btn, .heart, .actions a),
  body > header nav a,
  body > header nav a::after,
  .bottom a,
  #app :is(.section-head a, .sp-section-heading a, .of-help a, .cp-help a) {
    transition: none !important;
  }

  :where(#app, body > header) :is(
    .btn, .heart, .qty button, .sp-choice-buttons button,
    .sp-favorite-chips button, .sp-wholesale-add,
    .of-brand-filters button, .of-categories button,
    .brand-pills button, .mini-chips button, .filter-button,
    .cp-reset, .cp-add-product, .cp-remove,
    .cart-item-qty button, .quantity button
  ):active {
    scale: none;
  }

  .estore-ripple,
  .estore-click-halo,
  .estore-flight {
    display: none;
    animation: none;
  }
}
