/* Shared interaction polish. Product framing and source brightness stay unchanged. */
:root { --interaction-fast: 160ms; --interaction-normal: 220ms; }
body:not(.admin-body) :is(a, button, summary, input, select, textarea):focus-visible {
  outline: 2px solid #dc601b;
  outline-offset: 4px;
}
body:not(.admin-body) :is(.business-button, .detail-primary-button, .detail-secondary-button, .catalog-quote-button, .cooperation-button) {
  transition: background-color var(--interaction-fast) ease, box-shadow var(--interaction-fast) ease, color var(--interaction-fast) ease;
}
body:not(.admin-body) :is(.business-button, .detail-primary-button, .catalog-quote-button, .cooperation-button):active {
  box-shadow: inset 0 2px 5px #0003;
}
body:not(.admin-body) button:disabled { cursor: progress; }
.product-nav summary svg { transition: transform var(--interaction-fast) ease; }
.product-nav[open] summary svg { transform: rotate(180deg); }
.product-nav[open] .product-nav-menu { animation: menu-enter var(--interaction-fast) ease-out; }
.product-nav-menu a { transition: background-color var(--interaction-fast) ease, color var(--interaction-fast) ease; }
.interactive-media { position: relative; }
.interactive-media.media-loading::after {
  content: ''; position: absolute; inset-inline: 16px; bottom: 10px; height: 3px;
  background: linear-gradient(90deg, transparent, #d76a2b, transparent);
  background-size: 200% 100%; animation: media-progress 1.2s linear infinite; pointer-events: none;
}
.media-load-error {
  position: absolute; inset: 8px; display: flex; justify-content: center;
  align-items: center; flex-wrap: wrap; gap: 4px 10px; padding: 4px 8px;
  background: #fff; color: #53595f; border: 1px solid #dadcde; border-radius: 4px; font: 13px/1.4 Arial, sans-serif;
}
.catalog-product-media.media-loading, .detail-main-image.media-loading, .related-product-card figure.media-loading { background-color: #f2f0ec; }
.detail-main-image img, .related-product-card img { aspect-ratio: 1; object-fit: contain; }
.media-load-error button { min-height: 44px; padding: 6px 10px; border: 0; background: transparent; color: #a8400c; font: inherit; text-decoration: underline; cursor: pointer; }
body:not(.admin-body) .factory-gallery-lightbox.is-open .factory-gallery-lightbox-card { animation: gallery-enter 200ms ease-out; }
body:not(.admin-body) .factory-gallery-lightbox-close { width: 44px; height: 44px; }
body:not(.admin-body) #cooperationForm[data-submitting="true"] .cooperation-button::before {
  content: ''; display: inline-block; width: 14px; height: 14px; margin-inline-end: 10px;
  border: 2px solid #ffffff66; border-top-color: #fff; border-radius: 50%; vertical-align: middle;
  animation: submit-progress 800ms linear infinite;
}
@media (hover: hover) and (pointer: fine) {
  body:not(.admin-body) :is(.catalog-product-card, .related-product-card):hover { transform: translateY(-2px); }
  .business-text-link, .footer-quick-links a { text-underline-offset: 4px; }
  .business-text-link:hover, .footer-quick-links a:hover { text-decoration: underline; }
  .business-button svg, .catalog-product-card > a svg, .detail-primary-button svg { transition: transform var(--interaction-fast) ease; }
  .business-button:hover svg, .catalog-product-card > a:hover svg, .detail-primary-button:hover svg { transform: translateX(3px); }
  html[dir="rtl"] .business-button:hover svg, html[dir="rtl"] .catalog-product-card > a:hover svg, html[dir="rtl"] .detail-primary-button:hover svg { transform: translateX(-3px); }
}
@keyframes menu-enter { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes gallery-enter { from { opacity: .5; transform: scale(.985); } to { opacity: 1; transform: none; } }
@keyframes media-progress { to { background-position: -200% 0; } }
@keyframes submit-progress { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  body:not(.admin-body) *, body:not(.admin-body) *::before, body:not(.admin-body) *::after {
    animation: none !important; transition: none !important; scroll-behavior: auto !important;
  }
  body:not(.admin-body) :is(.catalog-product-card, .related-product-card):hover { transform: none; }
}
