/*
 * Professional Theme Upgrade
 * Keeps accent #6571ff / background #101012 / card #18181c
 * Adds: refined depth, glow effects, glass header, better typography,
 *       polished cards, smooth transitions, subtle gradients
*/

/* ─── Google Font Override ──────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

body {
  font-family: 'Outfit', sans-serif !important;
  letter-spacing: -0.01em;
}

/* ─── Background Enhancement ────────────────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(101, 113, 255, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 90% 110%, rgba(101, 113, 255, 0.05) 0%, transparent 55%);
  pointer-events: none;
}

/* ─── Header ────────────────────────────────────────────────────────────── */
header.component {
  position: sticky;
  top: 0;
  z-index: 50;
}

header.component > .bg-card {
  background: rgba(24, 24, 28, 0.75) !important;
  backdrop-filter: blur(20px) saturate(1.4) !important;
  -webkit-backdrop-filter: blur(20px) saturate(1.4) !important;
  border-color: rgba(255, 255, 255, 0.07) !important;
  border-radius: 12px !important;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.04) inset,
    0 8px 32px rgba(0, 0, 0, 0.4) !important;
}

/* Shop name */
header.component h1 {
  font-weight: 800 !important;
  font-size: 1.35rem !important;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #fff 40%, rgba(101,113,255,0.7) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Stats block */
header.component .grid.grid-cols-3 {
  border-color: rgba(255,255,255,0.06) !important;
}

header.component .grid.grid-cols-3 > div p:first-child {
  font-weight: 800 !important;
  letter-spacing: -0.04em;
  color: #fff !important;
}

header.component .grid.grid-cols-3 > div p:last-child {
  font-size: 0.6rem !important;
  letter-spacing: 0.14em !important;
  color: rgba(255,255,255,0.35) !important;
  text-transform: uppercase;
}

/* ─── Nav Links ─────────────────────────────────────────────────────────── */
header nav a,
header nav button {
  font-weight: 500 !important;
  font-size: 0.8rem !important;
  letter-spacing: 0.01em;
  transition: all 0.18s ease !important;
  border-color: rgba(255,255,255,0.07) !important;
}

header nav a.bg-accent-500\/10,
header nav button.bg-accent-500\/10 {
  background: rgba(101,113,255,0.12) !important;
  border-color: rgba(101,113,255,0.25) !important;
  color: rgb(140, 148, 255) !important;
}

/* ─── Cards — Global ────────────────────────────────────────────────────── */
.bg-card {
  background: rgb(24, 24, 28) !important;
}

/* ─── Product Cards ─────────────────────────────────────────────────────── */
a.block.h-full.bg-card {
  border-color: rgba(255,255,255,0.06) !important;
  border-radius: 14px !important;
  overflow: hidden;
  transition: transform 0.22s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              box-shadow 0.22s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              border-color 0.22s ease !important;
}

a.block.h-full.bg-card:hover {
  transform: translateY(-3px) !important;
  border-color: rgba(101, 113, 255, 0.3) !important;
  box-shadow:
    0 0 0 1px rgba(101, 113, 255, 0.12),
    0 12px 40px rgba(0, 0, 0, 0.45),
    0 0 24px rgba(101, 113, 255, 0.08) !important;
}

/* Card image container */
a.block.h-full.bg-card > div > .relative.overflow-hidden {
  border-bottom-color: rgba(255,255,255,0.04) !important;
  padding: 0 !important;
  margin-bottom: 0 !important;
}

a.block.h-full.bg-card > div > .relative.overflow-hidden img {
  border-radius: 0 !important;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}

a.block.h-full.bg-card:hover img {
  transform: scale(1.03) !important;
}

/* Card text content */
a.block.h-full.bg-card .text-left.px-5 {
  padding: 14px 16px 16px !important;
}

a.block.h-full.bg-card h3 {
  font-weight: 700 !important;
  font-size: 0.95rem !important;
  letter-spacing: -0.02em !important;
  color: rgba(255,255,255,0.92) !important;
}

a.block.h-full.bg-card .text-sm.text-t-primary\/50 {
  font-size: 0.72rem !important;
  color: rgba(255,255,255,0.3) !important;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-weight: 500;
}

/* Price */
a.block.h-full.bg-card .text-base.font-semibold {
  font-size: 1.05rem !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em;
}

a.block.h-full.bg-card .text-accent-500 {
  color: rgb(140, 148, 255) !important;
}

/* ─── Buttons ───────────────────────────────────────────────────────────── */
.bg-accent-500:not(.text-\[0\.625rem\]):not(.pulsating):not(.badges *) {
  background: linear-gradient(135deg, #6571ff 0%, #8b94ff 100%) !important;
  box-shadow: 0 4px 16px rgba(101,113,255,0.35), 0 1px 0 rgba(255,255,255,0.12) inset !important;
  font-weight: 600 !important;
  letter-spacing: -0.01em;
  transition: all 0.18s ease !important;
}

.bg-accent-500:not(.text-\[0\.625rem\]):not(.pulsating):not(.badges *):hover {
  background: linear-gradient(135deg, #7480ff 0%, #9ba3ff 100%) !important;
  box-shadow: 0 6px 24px rgba(101,113,255,0.5), 0 1px 0 rgba(255,255,255,0.14) inset !important;
  transform: translateY(-1px) !important;
}

/* ─── Input Fields ──────────────────────────────────────────────────────── */
input[type="text"],
input[type="email"],
input[type="number"],
input[type="password"],
textarea {
  background: rgba(255,255,255,0.04) !important;
  border-color: rgba(255,255,255,0.09) !important;
  border-radius: 10px !important;
  transition: border-color 0.18s ease, box-shadow 0.18s ease !important;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
input[type="password"]:focus,
textarea:focus {
  border-color: rgba(101,113,255,0.45) !important;
  box-shadow: 0 0 0 3px rgba(101,113,255,0.12) !important;
  outline: none !important;
}

/* ─── Footer ────────────────────────────────────────────────────────────── */
footer {
  border-color: rgba(255,255,255,0.06) !important;
  border-radius: 14px !important;
  overflow: hidden;
}

footer .border-b {
  border-color: rgba(255,255,255,0.05) !important;
}

footer a.text-t-primary\/60 {
  color: rgba(255,255,255,0.35) !important;
  font-size: 0.72rem !important;
  letter-spacing: 0.02em;
  transition: color 0.15s ease !important;
}

footer a.text-t-primary\/60:hover {
  color: rgba(255,255,255,0.75) !important;
}

footer p.text-t-primary\/60 {
  color: rgba(255,255,255,0.25) !important;
  font-size: 0.72rem !important;
}

footer p.font-semibold {
  font-weight: 700 !important;
  letter-spacing: -0.025em !important;
}

footer a.size-8 {
  transition: transform 0.18s ease, color 0.18s ease !important;
}

footer a.size-8:hover {
  transform: scale(1.2) !important;
}

/* ─── Section headings ──────────────────────────────────────────────────── */
h2 {
  font-weight: 800 !important;
  letter-spacing: -0.03em !important;
}

/* ─── Badges ────────────────────────────────────────────────────────────── */
.badges div {
  font-size: 0.65rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 8px !important;
  border-radius: 6px !important;
}

/* ─── Table (invoices / orders) ─────────────────────────────────────────── */
thead th {
  font-size: 0.7rem !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35) !important;
  font-weight: 600 !important;
}

/* ─── Scrollbar ─────────────────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(101,113,255,0.4);
}

/* ─── Smooth page load ──────────────────────────────────────────────────── */
#app {
  animation: fadeUp 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Product Card — Bigger + Animated Glow Border ─────────────────────── */

.grid.grid-cols-1,
.grid.grid-cols-2,
.grid.grid-cols-3,
.grid.grid-cols-4 {
  gap: 1.25rem !important;
}

a.block.h-full.bg-card {
  min-height: 320px !important;
  position: relative !important;
  border: none !important;
  border-radius: 14px !important;
  overflow: hidden !important;
}

/* Large rotating square — bright spot sweeps around the border */
a.block.h-full.bg-card::before {
  content: '';
  position: absolute;
  width: 300%;
  height: 300%;
  top: -100%;
  left: -100%;
  background: conic-gradient(
    from 0deg,
    transparent 0%,
    transparent 35%,
    rgba(255, 255, 255, 0.95) 45%,
    rgba(200, 210, 255, 0.5) 50%,
    transparent 60%,
    transparent 100%
  );
  animation: border-spin 3s linear infinite;
  z-index: 1;
  opacity: 1;
}

/* Dark inset that reveals only the border strip */
a.block.h-full.bg-card::after {
  content: '';
  position: absolute;
  inset: 2px;
  background: rgb(24, 24, 28);
  border-radius: 12px;
  z-index: 2;
}

/* Card content sits above the dark inset */
a.block.h-full.bg-card > div {
  position: relative;
  z-index: 3;
  height: 100%;
}

a.block.h-full.bg-card:hover {
  box-shadow:
    0 0 30px rgba(255, 255, 255, 0.05),
    0 0 50px rgba(101, 113, 255, 0.1),
    0 16px 48px rgba(0, 0, 0, 0.5) !important;
  transform: translateY(-4px) scale(1.015) !important;
}

@keyframes border-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ─── Footer — Remove bottom bar (links + copyright) ───────────────────── */
footer .bg-card\/25,
footer .flex.flex-col.flex-wrap.gap-4.px-4.py-4 {
  display: none !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FEATURE: IN STOCK Green Pulse Badge
   ═══════════════════════════════════════════════════════════════════════════ */

.stock-live {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  color: rgba(74, 222, 128, 0.9) !important;
  font-weight: 600 !important;
  font-size: 0.68rem !important;
  letter-spacing: 0.07em !important;
  text-transform: uppercase !important;
}

.stock-live::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #4ade80;
  border-radius: 50%;
  flex-shrink: 0;
  animation: stock-pulse 1.8s ease-in-out infinite;
}

@keyframes stock-pulse {
  0%, 100% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6);
  }
  50% {
    opacity: 0.7;
    box-shadow: 0 0 0 4px rgba(74, 222, 128, 0);
  }
}

/* OUT OF STOCK — muted red */
.stock-empty {
  color: rgba(248, 113, 113, 0.6) !important;
  font-size: 0.68rem !important;
  letter-spacing: 0.07em !important;
  text-transform: uppercase !important;
  font-weight: 500 !important;
}




/* ─── Affiliate Nav Button ──────────────────────────────────────────────── */
.affiliate-nav-btn {
  background: linear-gradient(135deg, rgba(250, 197, 50, 0.12) 0%, rgba(250, 160, 50, 0.08) 100%) !important;
  border: 1px solid rgba(250, 197, 50, 0.3) !important;
  color: #f5c842 !important;
  position: relative;
  transition: all 0.2s ease !important;
  letter-spacing: 0.01em;
}

.affiliate-nav-btn:hover {
  background: linear-gradient(135deg, rgba(250, 197, 50, 0.2) 0%, rgba(250, 160, 50, 0.14) 100%) !important;
  border-color: rgba(250, 197, 50, 0.55) !important;
  box-shadow: 0 0 16px rgba(245, 200, 66, 0.2), 0 4px 12px rgba(0,0,0,0.3) !important;
  color: #ffd84d !important;
  transform: translateY(-1px) !important;
}

.affiliate-star {
  font-size: 0.6rem;
  opacity: 0.8;
  margin-right: 1px;
  animation: star-spin 4s linear infinite;
  display: inline-block;
}

@keyframes star-spin {
  0%, 80%   { transform: rotate(0deg); opacity: 0.8; }
  90%       { transform: rotate(180deg); opacity: 1; }
  100%      { transform: rotate(360deg); opacity: 0.8; }
}

/* Tooltip handled by JS #affiliate-tooltip */

/* ─── Colorful Accent Buttons — Buy Now, Add to Cart, Submit etc ─────────── */

/* Cycle through hues using nth-child on any accent button group */
/* Primary buy/submit buttons get a vivid gradient treatment */
[class*="bg-accent-500"]:not(.text-\[0\.625rem\]):not(.pulsating):not(span):not(.badges *),
button[type="submit"],
a[href*="checkout"],
.btn-primary {
  position: relative;
  overflow: hidden;
}

/* Shimmer sweep on all accent buttons */
[class*="bg-accent-500"]:not(.text-\[0\.625rem\]):not(.pulsating):not(span):not(.badges *)::before,
button[type="submit"]::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transform: skewX(-20deg);
  transition: none;
  pointer-events: none;
}

[class*="bg-accent-500"]:not(.text-\[0\.625rem\]):not(.pulsating):not(span):not(.badges *):hover::before,
button[type="submit"]:hover::before {
  left: 150%;
  transition: left 0.5s ease;
}

/* ─── Nav link buttons — colored via JS classes ──────────────────────────── */
.nav-color-1 { border-color: rgba(101,113,255,0.35) !important; color: rgba(130,140,255,0.9) !important; background: rgba(101,113,255,0.08) !important; }
.nav-color-1:hover { background: rgba(101,113,255,0.15) !important; border-color: rgba(101,113,255,0.6) !important; color: rgb(160,168,255) !important; box-shadow: 0 0 12px rgba(101,113,255,0.2) !important; }

.nav-color-2 { border-color: rgba(52,211,153,0.35) !important; color: rgba(52,211,153,0.9) !important; background: rgba(52,211,153,0.07) !important; }
.nav-color-2:hover { background: rgba(52,211,153,0.15) !important; border-color: rgba(52,211,153,0.6) !important; color: rgb(110,231,183) !important; box-shadow: 0 0 12px rgba(52,211,153,0.2) !important; }

.nav-color-3 { border-color: rgba(232,121,249,0.35) !important; color: rgba(232,121,249,0.9) !important; background: rgba(232,121,249,0.07) !important; }
.nav-color-3:hover { background: rgba(232,121,249,0.15) !important; border-color: rgba(232,121,249,0.6) !important; color: rgb(240,171,252) !important; box-shadow: 0 0 12px rgba(232,121,249,0.2) !important; }

.nav-color-4 { border-color: rgba(251,146,60,0.35) !important; color: rgba(251,146,60,0.9) !important; background: rgba(251,146,60,0.07) !important; }
.nav-color-4:hover { background: rgba(251,146,60,0.15) !important; border-color: rgba(251,146,60,0.6) !important; color: rgb(253,186,116) !important; box-shadow: 0 0 12px rgba(251,146,60,0.2) !important; }

/* Active state — keep the same color but brighter */
.nav-color-1.bg-accent-500\/10 { background: rgba(101,113,255,0.15) !important; border-color: rgba(101,113,255,0.5) !important; color: rgb(160,168,255) !important; }
.nav-color-2.bg-accent-500\/10 { background: rgba(52,211,153,0.15) !important; border-color: rgba(52,211,153,0.5) !important; color: rgb(110,231,183) !important; }
.nav-color-3.bg-accent-500\/10 { background: rgba(232,121,249,0.15) !important; border-color: rgba(232,121,249,0.5) !important; color: rgb(240,171,252) !important; }
.nav-color-4.bg-accent-500\/10 { background: rgba(251,146,60,0.15) !important; border-color: rgba(251,146,60,0.5) !important; color: rgb(253,186,116) !important; }

/* Affiliate tooltip — appended to body via JS so overflow doesn't clip it */
#affiliate-tooltip {
  position: fixed;
  background: rgba(20, 20, 24, 0.97);
  border: 1px solid rgba(250, 197, 50, 0.3);
  color: rgba(255,255,255,0.88);
  font-size: 0.72rem;
  font-weight: 500;
  white-space: nowrap;
  padding: 6px 12px;
  border-radius: 8px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s ease, transform 0.18s ease;
  box-shadow: 0 6px 20px rgba(0,0,0,0.5), 0 0 0 1px rgba(250,197,50,0.1);
  letter-spacing: 0.02em;
  z-index: 99999;
  transform: translateY(4px);
  font-family: 'Outfit', sans-serif;
}

#affiliate-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ═══════════════════════════════════════════════════════════════════════════
   MOBILE RESPONSIVE FIX
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 767px) {

  /* Header card — stack cleanly */
  header.component > .bg-card {
    border-radius: 10px !important;
  }

  /* Stats row — tighter on mobile */
  header.component .grid.grid-cols-3 {
    gap: 0 !important;
    padding: 10px 12px !important;
  }

  header.component .grid.grid-cols-3 > div p:first-child {
    font-size: 1.3rem !important;
  }

  /* Nav — mobile layout handled by drawer; hide horizontal nav links */
  header nav {
    padding: 0 !important;
  }

  header nav > div {
    align-items: center !important;
    padding: 0 !important;
  }

  /* Product grid — single column on small screens */
  .grid.grid-cols-2,
  .grid.grid-cols-3,
  .grid.grid-cols-4 {
    grid-template-columns: 1fr !important;
  }

  /* Cards — full width, comfortable height */
  a.block.h-full.bg-card {
    min-height: 0 !important;
  }

  /* Page padding */
  #app {
    padding: 10px !important;
  }

  /* Footer — stack cleanly */
  footer .flex.flex-wrap {
    flex-direction: column !important;
    gap: 10px !important;
  }
}

/* Medium screens (tablets) */
@media (min-width: 768px) and (max-width: 1023px) {
  .grid.grid-cols-3,
  .grid.grid-cols-4 {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   FEATURE: Custom Page Loader
   ═══════════════════════════════════════════════════════════════════════════ */

#page-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  background: rgb(16, 16, 18);
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

#page-loader.loader-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-logo {
  display: flex;
  align-items: center;
  justify-content: center;
}

.loader-logo img {
  max-height: 52px;
  border-radius: 10px;
  opacity: 0.9;
}

.loader-default-icon {
  width: 44px;
  height: 44px;
  color: rgba(101, 113, 255, 0.75);
}

.loader-ring {
  width: 32px;
  height: 32px;
  border: 2.5px solid rgba(101, 113, 255, 0.15);
  border-top-color: rgba(101, 113, 255, 0.9);
  border-radius: 50%;
  animation: loader-spin 0.75s linear infinite;
}

@keyframes loader-spin {
  to { transform: rotate(360deg); }
}

/* ═══════════════════════════════════════════════════════════════════════════
   FEATURE: Discord Bar
   ═══════════════════════════════════════════════════════════════════════════ */

.discord-bar-btn:hover {
  color: rgb(160, 170, 255) !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FEATURE: Payment Icons Strip
   ═══════════════════════════════════════════════════════════════════════════ */

.payment-icons-strip {
  border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.pay-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 7px;
  border: 1px solid transparent;
  transition: opacity 0.18s ease, transform 0.15s ease;
  white-space: nowrap;
}

.pay-chip:hover {
  opacity: 0.8;
  transform: translateY(-1px);
}

/* ═══════════════════════════════════════════════════════════════════════════
   FEATURE: Mobile Nav Drawer
   ═══════════════════════════════════════════════════════════════════════════ */

/* Drawer panel link hover */
@media (max-width: 767px) {
  /* Ensure the mobile nav row fills the full width */
  header nav > div > div.md\\:hidden {
    width: 100% !important;
  }

  /* Keep header compact on mobile */
  header nav > div {
    flex-wrap: nowrap !important;
  }
}
