/* Shared touch behaviour. Editing and copying enquiry text remain available. */
:where(a, button, summary, label, [role="button"], .product-card:has(a), .quantity-control) {
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}
:where(input:not([type="checkbox"]):not([type="radio"]), textarea, [contenteditable]:not([contenteditable="false"])) {
  -webkit-user-select: text;
  user-select: text;
}

/* Independent scale preserves existing rotate/translate hover transforms. */
@media (prefers-reduced-motion: no-preference) {
  :is(button, .button, summary, [role="button"], .category-tile, .mobile-nav-item, .brand-toggle, .catalogue-mobile-toolbar a, .collection-related a, .product-card:has(a)) {
    transition-property: background-color, color, border-color, box-shadow, transform, scale;
    transition-duration: 160ms;
    transition-timing-function: ease;
  }
  :is(button, .button, summary, [role="button"], .category-tile, .mobile-nav-item, .brand-toggle, .catalogue-mobile-toolbar a, .collection-related a):active:not(:disabled):not([aria-disabled="true"]),
  .product-card-linked:active:not(:has(button:active, input:active, select:active)),
  .product-card:has(a:active):not(:has(button:active, input:active, select:active)) {
    scale: .96;
  }
  :is(.button, .add-product, .icon-button, .quantity-button):active:not(:disabled) {
    transform: none;
  }
}

@media (max-width: 767px) {
  :is(button, .button, summary, [role="button"]) { min-height: 44px; }
  :is(.icon-button, .quantity-button) { min-width: 44px; }
  .mobile-bottom-nav {
    bottom: .5rem;
    padding-top: .5rem;
    padding-bottom: calc(.5rem + env(safe-area-inset-bottom, 0px));
  }
  .enquiry-dock { display: none; }
}
@media (max-width: 360px) {
  .mobile-bottom-nav .mobile-nav-item { padding-inline: 1px; }
}
@media (prefers-reduced-motion: reduce) {
  :is(button, .button, summary, [role="button"], .category-tile, .mobile-nav-item, .brand-toggle, .catalogue-mobile-toolbar a, .collection-related a, .product-card:has(a)):active,
  .product-card:has(a:active) { scale: none; }
}
