/* =====================================================================
   premium-ui.css  —  hybrid (light base + rich accents) override layer
   Load LAST (just before </head>). Delete this one file/link to revert.
   Uses only transform/opacity for motion => stays smooth on 90/120Hz.
   Colors follow the admin --theme-color, nothing is hard-coded to a brand.
   ===================================================================== */

:root {
  --pu-ink: #0b1220;
  --pu-line: rgba(15, 23, 42, .08);
  --pu-ease: cubic-bezier(.22, 1, .36, 1);
  --pu-accent: var(--theme-color, #e02424);
  --pu-accent-deep: color-mix(in srgb, var(--pu-accent) 62%, #0b1220);
  --pu-accent-soft: color-mix(in srgb, var(--pu-accent) 12%, #fff);
  --pu-ring: color-mix(in srgb, var(--pu-accent) 32%, transparent);
  --pu-sh-1: 0 1px 2px rgba(15, 23, 42, .04), 0 10px 26px -14px rgba(15, 23, 42, .16);
  --pu-sh-2: 0 2px 4px rgba(15, 23, 42, .05), 0 26px 48px -20px rgba(15, 23, 42, .32);
}

/* ---------- global polish ---------- */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
}
::selection { background: var(--pu-accent); color: #fff; }
* { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--pu-accent) 45%, #cbd5e1) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--pu-accent) 45%, #cbd5e1); border-radius: 99px; }
::-webkit-scrollbar-track { background: transparent; }

/* soft colored aurora behind the page (fixed, GPU-cheap, never blocks taps) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60vmax 40vmax at 8% -6%, color-mix(in srgb, var(--pu-accent) 11%, transparent), transparent 62%),
    radial-gradient(50vmax 36vmax at 100% 8%, rgba(99, 102, 241, .08), transparent 60%),
    radial-gradient(46vmax 34vmax at 50% 110%, color-mix(in srgb, var(--pu-accent) 7%, transparent), transparent 64%);
}

/* keyboard / tap focus ring on every form control */
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--pu-accent) !important;
  box-shadow: 0 0 0 4px var(--pu-ring) !important;
  transition: box-shadow .2s ease, border-color .2s ease;
}
:focus-visible { outline: 2px solid var(--pu-accent); outline-offset: 2px; }

/* ---------- header ---------- */
#main-header {
  box-shadow: 0 1px 0 var(--pu-line), 0 14px 34px -22px rgba(15, 23, 42, .35);
}

/* wallet pill */
.h-bal {
  border-color: color-mix(in srgb, var(--pu-accent) 22%, #fff);
  box-shadow: 0 10px 24px -12px var(--pu-ring), inset 0 1px 0 rgba(255, 255, 255, .8);
}
.h-bal-add {
  background: linear-gradient(135deg, color-mix(in srgb, var(--pu-accent) 82%, #fff), var(--pu-accent) 45%, var(--pu-accent-deep));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35);
}
.h-bal:active { transform: scale(.97); }

/* ---------- bottom nav (mobile) ---------- */
.sticky-footer-container {
  box-shadow: 0 -1px 0 var(--pu-line), 0 -18px 40px -20px rgba(15, 23, 42, .35);
}

/* ---------- cards ---------- */
.nb-card,
.flash-sale-card,
.pc2,
.pc3,
.pc9 {
  border-color: var(--pu-line);
  box-shadow: var(--pu-sh-1);
  transition: transform .35s var(--pu-ease), box-shadow .35s var(--pu-ease), border-color .35s ease;
}

/* blur on every product card is the #1 cause of scroll jank — solid white looks identical */
.pc2,
.pc3 {
  background: #fff;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

/* theme 1 pulses a box-shadow forever (repaints every frame) — keep the look, drop the cost */
.pc1 { animation: none; }

@media (hover: hover) {
  .flash-sale-card:hover,
  .pc2:hover,
  .pc3:hover,
  .pc8:hover,
  .pc9:hover {
    transform: translate3d(0, -5px, 0);
    box-shadow: var(--pu-sh-2), 0 0 0 1px color-mix(in srgb, var(--pu-accent) 26%, transparent);
    border-color: color-mix(in srgb, var(--pu-accent) 30%, #fff);
  }
}

/* notice card: slim accent bar */
.nb-card::before { background: linear-gradient(180deg, var(--pu-accent), var(--pu-accent-deep)); }

/* ---------- buttons ---------- */
.fs-buy-btn,
.sb-btn {
  background: linear-gradient(135deg, color-mix(in srgb, var(--pu-accent) 85%, #fff), var(--pu-accent) 48%, var(--pu-accent-deep));
  box-shadow: 0 12px 24px -10px var(--pu-ring), inset 0 1px 0 rgba(255, 255, 255, .32);
  transition: transform .25s var(--pu-ease), box-shadow .25s var(--pu-ease), filter .25s ease;
}
@media (hover: hover) {
  .fs-buy-btn:hover,
  .sb-btn:hover { transform: translate3d(0, -2px, 0); filter: brightness(1.06); }
}
.fs-buy-btn:active,
.sb-btn:active { transform: scale(.97); }

.carousel__pagination-button--active { background: linear-gradient(90deg, var(--pu-accent), var(--pu-accent-deep)); }

/* ---------- checkout (default + non-custom themes) ---------- */
.checkout_page .variation_list {
  border: 1.5px solid #e6eaf1 !important;
  border-radius: 14px !important;
  background: linear-gradient(180deg, #fff, #fafbfd) !important;
  transition: transform .3s var(--pu-ease), box-shadow .3s var(--pu-ease), border-color .3s ease !important;
}
@media (hover: hover) {
  .checkout_page .variation_list:hover {
    transform: translate3d(0, -3px, 0);
    box-shadow: 0 16px 30px -16px rgba(15, 23, 42, .3);
    border-color: color-mix(in srgb, var(--pu-accent) 45%, #fff) !important;
  }
}
.checkout_page .variation_list.active {
  border-color: var(--pu-accent) !important;
  background: linear-gradient(180deg, color-mix(in srgb, var(--pu-accent) 7%, #fff), #fff) !important;
  box-shadow: 0 0 0 1.5px var(--pu-accent), 0 18px 32px -16px var(--pu-ring) !important;
}
.checkout_page .c-card,
.checkout_page .cp-card {
  border-color: var(--pu-line);
  border-radius: 18px;
  box-shadow: var(--pu-sh-1);
}
.checkout_page .btn-custom,
.checkout_page .cp-buy-btn {
  background: linear-gradient(135deg, color-mix(in srgb, var(--pu-accent) 85%, #fff), var(--pu-accent) 48%, var(--pu-accent-deep)) !important;
  border-radius: 14px;
  box-shadow: 0 16px 30px -12px var(--pu-ring), inset 0 1px 0 rgba(255, 255, 255, .32);
  transition: transform .25s var(--pu-ease), box-shadow .25s var(--pu-ease), filter .25s ease;
}
@media (hover: hover) {
  .checkout_page .btn-custom:hover:not(:disabled),
  .checkout_page .cp-buy-btn:hover:not(:disabled) { transform: translate3d(0, -2px, 0); filter: brightness(1.06); }
}
.checkout_page .btn-custom:active:not(:disabled),
.checkout_page .cp-buy-btn:active:not(:disabled) { transform: scale(.98); }

/* dark rich total bar = the "dark accent" in the hybrid look */
.checkout_page .cp-total-row {
  background: linear-gradient(135deg, #0b1220, #172036 55%, color-mix(in srgb, var(--pu-accent) 38%, #0b1220));
  color: #fff;
  border-radius: 0 0 18px 18px;
}
.checkout_page .cp-total-row * { color: inherit; }

/* ---------- scroll reveal (Chromium/Android; others just show normally) ---------- */
@supports (animation-timeline: view()) {
  @keyframes puReveal {
    from { opacity: 0; transform: translate3d(0, 26px, 0) scale(.98); }
    to   { opacity: 1; transform: none; }
  }
  .nb-card:not(.carousel .nb-card),
  .flash-sale-card:not(.carousel .flash-sale-card) {
    animation: puReveal linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 24%;
  }
}

/* ---------- respect user + weak-device settings ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .nb-card,
  .flash-sale-card { animation: none !important; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
