/* Load after styles.css and shop.css. These rules never change layout. */

/* Keep the existing border treatment without interpolating a painted shadow. */
.shop-product-card {
  transition: border-color 180ms ease;
}

/* Cancel unqualified legacy hover transforms on touch/reduced-motion devices. */
.shop-product-card:hover .product-image-button img,
.shop-dialog-close:hover,
.text-link:hover svg,
.oppo-world-copy .button-blue:hover {
  transform: none;
}

/* Explicit entry animation is enabled only when motion is welcome. */
.shop-dialog[open] {
  animation: none;
}

@keyframes novatel-dialog-enter {
  from {
    opacity: 0;
    transform: translateY(10px) scale(.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes novatel-menu-enter {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes novatel-favourite-confirm {
  0%, 100% { transform: scale(1); }
  38% { transform: scale(1.2); }
  72% { transform: scale(.96); }
}

@media (prefers-reduced-motion: no-preference) {
  .shop-dialog[open] {
    animation: novatel-dialog-enter 340ms var(--motion-ease) backwards;
  }

  /* Focus limits the confirmation to the control the visitor is using. */
  :is(.product-save, .shop-save-detail).is-saved:focus > .shop-icon {
    transform-origin: center;
    animation: novatel-favourite-confirm 320ms ease-out;
  }

  :is(.shop-primary, .product-quick-view, .product-save, .shop-save-detail) {
    transition: transform 150ms ease, background-color 180ms ease, color 180ms ease;
  }

  :is(.shop-primary, .product-quick-view, .product-save, .shop-save-detail):active {
    transform: scale(.97);
  }
}

@media (max-width: 800px) and (prefers-reduced-motion: no-preference) {
  #mobile-menu:not([hidden]) {
    animation: novatel-menu-enter 280ms var(--motion-ease) backwards;
  }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .product-image-button img {
    transition: transform 550ms var(--motion-ease);
  }

  .shop-product-card:hover .product-image-button img {
    transform: translateY(-4px) scale(1.025);
  }

  .text-link > svg,
  .category-cta > svg,
  .product-quick-view > .shop-icon,
  .shop-primary > .shop-icon:last-child,
  .shop-contact-option > .shop-icon:last-child,
  .header-search button > svg,
  .nav-feature > svg,
  .mobility-feature .button > svg,
  .oppo-world-copy .button > svg {
    transition: transform 200ms cubic-bezier(.2,.65,.3,1);
  }

  .text-link:hover > svg,
  .product-quick-view:hover > .shop-icon,
  .shop-contact-option:hover > .shop-icon:last-child,
  .nav-feature:hover > svg,
  .oppo-world-copy .button:hover > svg {
    transform: translate(2px, -2px);
  }

  .category-card:hover .category-cta > svg,
  .shop-primary:hover > .shop-icon:last-child,
  .header-search button:hover > svg,
  .mobility-feature .button:hover > svg {
    transform: translateX(3px);
  }

  .shop-primary:hover,
  .oppo-world-copy .button-blue:hover {
    transform: translateY(-1px);
  }

  .shop-primary:active {
    transform: scale(.97);
  }

  .shop-dialog-close {
    transition: transform 180ms ease;
  }

  .shop-dialog-close:hover {
    transform: rotate(8deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .shop-product-card,
  .product-image-button img,
  .shop-dialog-close,
  .text-link > svg,
  .shop-primary,
  .product-quick-view,
  .product-save,
  .shop-save-detail {
    transition: none;
  }

  .shop-dialog[open],
  #mobile-menu:not([hidden]),
  :is(.product-save, .shop-save-detail).is-saved:focus > .shop-icon {
    animation: none;
  }
}
