/* Site polish styles — moved out of polish.js (Oct 2026) so they load with the
   page instead of forcing a second full restyle after it has drawn. */
/* ── Premium font rendering ── */
html { -webkit-text-size-adjust: 100%; }
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'kern' 1, 'liga' 1, 'calt' 1;
}

/* ── T3 SPORTS brand logo class ── */
.brand-logo,
a[href="/"][class*="font-display"][class*="font-black"][class*="tracking-[-0.04em]"],
a[href="/"][class*="font-display"][class*="font-black"][class*="tracking-[-0.02em]"] {
  font-family: 'Audiowide', 'Saira', 'Outfit', sans-serif !important;
  letter-spacing: 0.04em !important;
  font-weight: 400 !important;
}
.brand-logo .text-primary,
a[href="/"][class*="font-display"] .text-primary {
  margin-left: 0.15em;
}
/* Triangle mark inline next to logo */
.brand-mark {
  display: inline-block;
  width: 1em; height: 1em;
  vertical-align: -0.12em;
  margin-right: 0.3em;
}

/* ── Selection color ── */
::selection { background: #1565C0; color: white; }
::-moz-selection { background: #1565C0; color: white; }

/* ── Slim premium scrollbar ── */
html { scrollbar-width: thin; scrollbar-color: #1565C0 #f3f4f6; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #f9fafb; }
::-webkit-scrollbar-thumb {
  background: #d1d5db; border-radius: 10px; border: 2px solid #f9fafb;
  transition: background 0.2s ease;
}
::-webkit-scrollbar-thumb:hover { background: #1565C0; }

/* ── Smooth scroll w/ sticky-header offset ── */
html { scroll-padding-top: 76px; }

/* ── Numeric tabular for prices / counts ── */
.lc-price, .lc-price-old, .prod-price, .prod-price-old,
[class*="text-["][class*="font-black"], .price, .num-tabular,
.cart-count, #cartBadge, .order-total, .step-dot {
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1, 'kern' 1;
}

/* ── Premium button micro-press ── */
button, .btn, [role="button"], a.add-to-cart-btn, a[class*="bg-primary"],
a[class*="bg-black"], button[class*="bg-primary"] {
  transition: transform 0.12s cubic-bezier(0.4,0,0.2,1),
              box-shadow 0.18s ease,
              background-color 0.18s ease,
              border-color 0.18s ease,
              color 0.18s ease;
}
button:not(:disabled):active, .btn:active, [role="button"]:active {
  transform: scale(0.97);
}

/* ── Card hover shadow tier ── */
.lc-card, .prod-card, .shop-cat-card, .cat-grid-item {
  will-change: transform;
}

/* ── Top progress bar — DISABLED ── */
#apexProgressBar { display: none !important; }

/* ── Header scroll-shadow ── */
header.sticky.apex-header-scrolled {
  box-shadow: 0 2px 12px -4px rgba(0,0,0,0.12);
  backdrop-filter: saturate(1.5) blur(8px);
  -webkit-backdrop-filter: saturate(1.5) blur(8px);
  background: rgba(255,255,255,0.92) !important;
}

/* ── Image shimmer placeholder ── */
.apex-img-shimmer {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #f3f4f6 0%, #ffffff 50%, #e5e7eb 100%);
}
.apex-img-shimmer::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.5) 50%, transparent 100%);
  transform: translateX(-100%);
  animation: apexShimmer 1.6s ease-in-out infinite;
}
@keyframes apexShimmer { to { transform: translateX(100%); } }

/* ── Toast notifications ── */
#apexToastWrap {
  position: fixed; bottom: 24px; right: 24px;
  z-index: 99998; display: flex; flex-direction: column; gap: 10px;
  max-width: calc(100vw - 32px); pointer-events: none;
}
.apex-toast {
  pointer-events: auto;
  background: #111827; color: white;
  font-family: 'Outfit', sans-serif; font-size: 13px; font-weight: 600;
  letter-spacing: 0.02em;
  padding: 14px 18px 14px 16px;
  border-radius: 8px;
  display: flex; align-items: center; gap: 10px;
  box-shadow: 0 16px 40px -12px rgba(0,0,0,0.35), 0 4px 12px -4px rgba(0,0,0,0.18);
  min-width: 260px; max-width: 380px;
  transform: translateY(20px) scale(0.96); opacity: 0;
  animation: apexToastIn 0.3s cubic-bezier(0.16,1,0.3,1) forwards;
}
.apex-toast.success { border-left: 3px solid #10b981; }
.apex-toast.error { border-left: 3px solid #ef4444; }
.apex-toast.info { border-left: 3px solid #1565C0; }
.apex-toast .mat { font-size: 20px; flex-shrink: 0; }
.apex-toast.success .mat { color: #34d399; }
.apex-toast.error .mat { color: #f87171; }
.apex-toast.info .mat { color: #60a5fa; }
.apex-toast.leaving { animation: apexToastOut 0.25s ease forwards; }
@keyframes apexToastIn { to { transform: translateY(0) scale(1); opacity: 1; } }
@keyframes apexToastOut { to { transform: translateY(-8px) scale(0.96); opacity: 0; } }
@media (max-width: 640px) {
  #apexToastWrap { left: 12px; right: 12px; bottom: 12px; }
  .apex-toast { min-width: 0; width: 100%; }
}

/* ── Mobile sticky cart bar ── */
#apexStickyCart {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: white; border-top: 1px solid #e5e7eb;
  padding: 10px 16px; display: none;
  align-items: center; justify-content: space-between; gap: 10px;
  z-index: 90; box-shadow: 0 -4px 16px -4px rgba(0,0,0,0.08);
  font-family: 'Outfit', sans-serif;
}
#apexStickyCart .label { font-size: 11px; color: #6b7280; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; }
#apexStickyCart .count { font-size: 18px; font-weight: 800; color: #111827; }
#apexStickyCart a {
  background: #1565C0; color: white; font-size: 11px; font-weight: 800;
  padding: 12px 20px; letter-spacing: 0.12em; text-transform: uppercase;
  text-decoration: none; border-radius: 4px; display: inline-flex;
  align-items: center; gap: 8px;
}
#apexStickyCart a:hover { background: #0D47A1; }
@media (max-width: 1023px) {
  body.apex-listing-page #apexStickyCart.show { display: flex; }
  body.apex-listing-page { padding-bottom: 72px; }
}

/* ── Form input polish ── */
input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):focus,
textarea:focus, select:focus {
  outline: none;
}
.field-input:focus, input.field-input:focus {
  border-color: #1565C0 !important;
  box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.15);
}

/* ── Remove jarring outline on click but keep focus-visible ── */
*:focus:not(:focus-visible) { outline: none; }

/* ── Subtle link underline on text links ── */
.apex-link { color: #1565C0; text-decoration: underline; text-decoration-thickness: 1px;
  text-underline-offset: 3px; transition: text-decoration-color 0.2s ease; }
.apex-link:hover { text-decoration-color: transparent; }
