/* ==========================================================
   VERV — LUXURY KINETIC STREETWEAR (TAILWIND & CUSTOM STYLES)
   Engineered for Cloudflare Pages
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Archivo+Black&family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  --bg-obsidian: #08090B;
  --bg-surface: #0E1013;
  --bg-card: rgba(18, 21, 26, 0.7);
  --cyan-glow: #00F5D4;
  --cyan-dim: #0ea5e9;
  --electric-accent: #16C7B7;
  --volt-accent: #E6FF00;
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-cyan: rgba(0, 245, 212, 0.35);
  --safe-area-inset-top: env(safe-area-inset-top, 0px);
  --safe-area-inset-bottom: env(safe-area-inset-bottom, 0px);
  --safe-area-inset-left: env(safe-area-inset-left, 0px);
  --safe-area-inset-right: env(safe-area-inset-right, 0px);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  background-color: #08090b;
  color: #f3f4f6;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  background-color: #08090b;
  overflow-x: hidden;
  selection-background-color: #00f5d4;
  selection-color: #000;
}

::selection {
  background: #00F5D4;
  color: #000;
}

/* Typography */
.font-display {
  font-family: 'Archivo Black', sans-serif;
  letter-spacing: -0.03em;
}
.font-mono {
  font-family: 'JetBrains Mono', monospace;
}

/* Glowing ambient animations */
@keyframes ambientGlow {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.25; }
  50% { transform: translate(30px, -20px) scale(1.15); opacity: 0.45; }
}
.ambient-glow-1 { animation: ambientGlow 12s ease-in-out infinite; }
.ambient-glow-2 { animation: ambientGlow 16s ease-in-out infinite reverse; }

/* Marquee */
@keyframes marqueeScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.animate-marquee {
  display: inline-block;
  white-space: nowrap;
  animation: marqueeScroll 25s linear infinite;
}
.animate-marquee:hover { animation-play-state: paused; }

/* Glassmorphism */
.glass-panel {
  background: rgba(14, 16, 20, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.glass-panel-cyan {
  background: rgba(10, 20, 24, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 245, 212, 0.35);
  box-shadow: 0 0 30px rgba(0, 245, 212, 0.08);
}

/* Custom Cyber Scrollbar — desktop only */
@media (min-width: 768px) {
  ::-webkit-scrollbar { width: 7px; height: 7px; }
  ::-webkit-scrollbar-track { background: #08090b; }
  ::-webkit-scrollbar-thumb { background: #20262e; border-radius: 4px; }
  ::-webkit-scrollbar-thumb:hover { background: #00F5D4; }
}

/* Hide scrollbar utility */
.scrollbar-none { -ms-overflow-style: none; scrollbar-width: none; }
.scrollbar-none::-webkit-scrollbar { display: none; }

/* Sketch Lines */
.sketch-path {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: drawLine 3.5s cubic-bezier(0.4, 0, 0.2, 1) forwards infinite alternate;
}
@keyframes drawLine { to { stroke-dashoffset: 0; } }

/* Card Hover Shimmer */
.card-shine {
  position: absolute; top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle, rgba(0, 245, 212, 0.12) 0%, transparent 70%);
  opacity: 0; pointer-events: none; transition: opacity 0.4s ease;
}
.group:hover .card-shine { opacity: 1; }

/* ==========================================================
   SVG PRODUCT SCHEMATICS & LASER SCANLINE ANIMATIONS
   ========================================================== */
@keyframes cardScanBeam {
  0%   { top: -5%; opacity: 0; }
  20%  { opacity: 0.9; }
  80%  { opacity: 0.9; }
  100% { top: 105%; opacity: 0; }
}

.svg-product-container { position: relative; overflow: hidden; }
.svg-product-container::after {
  content: '';
  position: absolute; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #00F5D4, #FFFFFF, #00F5D4, transparent);
  box-shadow: 0 0 12px #00F5D4, 0 0 24px #00F5D4;
  opacity: 0; pointer-events: none; z-index: 20;
}
.group:hover .svg-product-container::after {
  animation: cardScanBeam 2.5s ease-in-out infinite;
}

.corner-bracket {
  position: absolute; width: 12px; height: 12px;
  opacity: 0; transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none; z-index: 15;
}
.group:hover .corner-bracket { opacity: 0.9; }
.corner-bracket-tl { top: 10px; left: 10px; border-top: 1.5px solid #00F5D4; border-left: 1.5px solid #00F5D4; }
.corner-bracket-tr { top: 10px; right: 10px; border-top: 1.5px solid #00F5D4; border-right: 1.5px solid #00F5D4; }
.corner-bracket-bl { bottom: 10px; left: 10px; border-bottom: 1.5px solid #00F5D4; border-left: 1.5px solid #00F5D4; }
.corner-bracket-br { bottom: 10px; right: 10px; border-bottom: 1.5px solid #00F5D4; border-right: 1.5px solid #00F5D4; }

.svg-product-img { transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), filter 0.5s ease; }
.group:hover .svg-product-img {
  transform: scale(1.05);
  filter: drop-shadow(0 0 25px rgba(0, 245, 212, 0.4));
}

/* ==========================================================
   MOBILE-FIRST ENHANCEMENTS
   ========================================================== */

/* Minimum touch target */
button, a, [role="button"], select { touch-action: manipulation; }

/* ── Body padding to clear fixed bottom bar on mobile ── */
@media (max-width: 640px) {
  body { padding-bottom: 76px; }
}

/* ── Hero: more compact on phones ── */
@media (max-width: 640px) {
  #top { padding-top: 1.5rem; padding-bottom: 2.5rem; }
  #top h1 { font-size: 2.85rem; line-height: 0.92; }
}

/* ── Product grid: 2 columns below 480px ── */
@media (max-width: 480px) {
  #productCatalogGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.625rem;
  }
  [data-product-card] .p-5 { padding: 0.75rem; }
}

/* ── Category pills: horizontal scroll with snapping ── */
@media (max-width: 640px) {
  #categoryPillsContainer {
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    padding-bottom: 0.5rem;
  }
  #categoryPillsContainer > button {
    scroll-snap-align: start;
    flex-shrink: 0;
  }
}

/* ── Quick View Modal → bottom sheet on mobile ── */
@media (max-width: 640px) {
  #quickViewModal .flex.min-h-full {
    align-items: flex-end;
    padding: 0;
  }
  #quickViewModal .relative.w-full {
    border-radius: 1.5rem 1.5rem 0 0;
    max-height: 92dvh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 0 !important;
    padding-bottom: calc(1.25rem + var(--safe-area-inset-bottom));
  }
}

/* ── Checkout Modal → bottom sheet on mobile ── */
@media (max-width: 640px) {
  #checkoutModal .flex.min-h-full {
    align-items: flex-end;
    padding: 0;
  }
  #checkoutModal .relative.w-full {
    border-radius: 1.5rem 1.5rem 0 0;
    max-height: 94dvh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 0 !important;
    padding-bottom: calc(1.25rem + var(--safe-area-inset-bottom));
  }
}

/* ── Cart Drawer → full width on mobile ── */
@media (max-width: 640px) {
  #cartDrawer .fixed.inset-y-0.right-0 {
    left: 0 !important;
    padding-left: 0;
  }
  #cartDrawer .w-screen { max-width: 100vw; }
  #cartDrawer .w-screen.max-w-md {
    padding-bottom: calc(1.5rem + var(--safe-area-inset-bottom));
  }
}

/* ── Sticky bottom action bar (mobile only) ── */
#mobileBottomBar {
  display: none;
}
@media (max-width: 640px) {
  #mobileBottomBar {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 38;
    background: rgba(8, 9, 11, 0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0.625rem 1rem;
    padding-bottom: calc(0.625rem + var(--safe-area-inset-bottom));
    gap: 0.625rem;
    align-items: center;
  }
}

/* ── Out-of-stock overlay ── */
.product-oos-overlay {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.42);
  display: flex; align-items: center; justify-content: center;
  z-index: 5; pointer-events: none;
}
