/* ═══════════════════════════════════════════════════════════════════════════
   MotoMagic — General Polish  (css/premium-polish.css)
   Additive only. Fills gaps NOT already covered by app.css.
   app.css already handles: webkit scrollbar, ::selection, :focus-visible,
   smooth scroll, toast base. This file ONLY adds what's missing. No JS.
   Load LAST.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Firefox scrollbar (app.css only styles webkit) ────────────────────────*/
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.18) transparent;
}

/* ── Webkit scrollbar: add thumb colour + hover (app.css only sets width) ──*/
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.14);
  border-radius: 99px;
  border: 2px solid transparent;
  background-clip: padding-box;
  transition: background .2s;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,.28);
  background-clip: padding-box;
}

/* ── Toast: smoother entrance easing (enhances existing #toast) ────────────*/
#toast {
  transition: transform .4s var(--ease, cubic-bezier(.22,1,.36,1)), opacity .3s;
}
#toast svg { color: var(--red, #E30613); }

/* ── Consistent border-radius tokens on common containers ──────────────────*/
/* Only applies where a container has no explicit radius already. Safe. */
.card, .panel, .box { border-radius: var(--r-md, 14px); }

/* ── Refined shadow utility for elevated surfaces ──────────────────────────*/
.elevated,
.shadow-premium {
  box-shadow: 0 24px 60px -24px rgba(0,0,0,.85),
              0 0 0 1px rgba(255,255,255,.04) inset;
}

/* ── Glass utility (opt-in class, doesn't affect existing elements) ────────*/
.glass-premium {
  background: var(--glass, rgba(9,9,9,.68));
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid var(--line, rgba(255,255,255,.08));
}

/* ── Smoother image loading fade site-wide (non-product images) ────────────*/
img.img-loaded { animation: imgFade .4s ease both; }
@keyframes imgFade { from { opacity: 0; } to { opacity: 1; } }

/* ── Buttons: universal subtle press feedback (only if not already set) ────*/
.btn { transition: transform .15s var(--ease, cubic-bezier(.22,1,.36,1)),
                    box-shadow .2s, background .18s, border-color .18s; }
.btn:active { transform: scale(.98); }

/* ── Tap highlight cleanup on mobile ───────────────────────────────────────*/
a, button, .btn, .pcard, .cat-card {
  -webkit-tap-highlight-color: transparent;
}

/* ── Reduced motion ────────────────────────────────────────────────────────*/
@media (prefers-reduced-motion: reduce) {
  img.img-loaded { animation: none !important; }
  .btn:active { transform: none; }
}
