/* CADENTRIS — Official Luxury Boutique Stylesheet
 * High-End Fashion D2C | Calm UI, Anti-Slop, Contemporary Ergonomics
 */
@import url('https://fonts.googleapis.com/css2?family=Anton&family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,600&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Syne:wght@500;600;700;800&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Syne', sans-serif;
  --font-impact: 'Syne', -apple-system, sans-serif;
  --font-mono: 'Space Grotesk', monospace;

  /* Official Brand Palette */
  --color-cadentris-pink: #E58FAE;
  --color-cadentris-pink-hover: #D27394;
  --color-cadentris-pink-soft: rgba(229, 143, 174, 0.12);
  --color-light-pink: #F9EBF1;
  --color-cream-white: #FDF8FA;
  --color-silver-gray: #B0B6BC;
  --color-silver-light: #E8ECEF;
  --color-taupe-gray: #8A8A8A;
  --color-text-main: #2A2427;
  --color-text-muted: #6B6266;
  --color-text-light: #9E969A;
  --color-dark-surface: #1E1A1C;

  /* Legacy mappings for seamless UI compatibility */
  --color-hot-pink: #E58FAE;
  --color-bubblegum: #E58FAE;
  --color-soft-pink: #F9EBF1;
  --color-acid-lime: #E58FAE;
  --color-neon-yellow: #F9EBF1;
  --color-obsidian: #2A2427;
  --color-chrome-silver: #B0B6BC;
  --color-bg-canvas: #FDF8FA;

  /* Refined Chrome Gradients & Ambient Glows */
  --gradient-chrome: linear-gradient(135deg, #FFFFFF 0%, #E8ECEF 40%, #B0B6BC 80%, #8A8A8A 100%);
  --gradient-pink-soft: linear-gradient(135deg, #E58FAE 0%, #D27394 100%);
  --gradient-card-luxury: linear-gradient(180deg, #FFFFFF 0%, #FDF8FA 100%);

  /* Modern Subtle Hairline Borders & Ambient Shadows */
  --border-subtle: 1px solid rgba(176, 182, 188, 0.28);
  --border-pink-subtle: 1px solid rgba(229, 143, 174, 0.35);
  --shadow-subtle: 0 4px 20px -2px rgba(42, 36, 39, 0.04);
  --shadow-card: 0 10px 30px -4px rgba(42, 36, 39, 0.06);
  --shadow-hover: 0 16px 36px -6px rgba(229, 143, 174, 0.16);
  --shadow-pink: 0 8px 24px -4px rgba(229, 143, 174, 0.32);
}

html {
  scroll-behavior: auto;
}

section[id] {
  scroll-margin-top: 5rem;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg-canvas);
  color: var(--color-text-main);
  overflow-x: hidden;
  line-height: 1.6;
}

.font-serif { font-family: var(--font-serif); }
.font-sans { font-family: var(--font-sans); }
.font-display { font-family: var(--font-display); }
.font-impact { font-family: var(--font-impact); }
.font-mono { font-family: var(--font-mono); }

/* Custom Luxury UI/UX Scrollbar */
html {
  scrollbar-width: thin;
  scrollbar-color: #E58FAE #FDF8FA;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #FDF8FA;
  border-left: 1px solid rgba(176, 182, 188, 0.15);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #E58FAE 0%, #D27394 100%);
  border-radius: 9999px;
  border: 2px solid #FDF8FA;
  box-shadow: inset 0 0 3px rgba(255, 255, 255, 0.5);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #D27394 0%, #B8597A 100%);
  box-shadow: 0 0 10px rgba(229, 143, 174, 0.5);
}

/* Subtle Announcement Marquee */
.y2k-ticker-pink, .y2k-ticker-lime {
  background-color: var(--color-cream-white);
  color: var(--color-text-muted);
  border-bottom: 1px solid rgba(176, 182, 188, 0.25);
}

.marquee-container {
  overflow: hidden;
  white-space: nowrap;
  position: relative;
}

.marquee-content {
  display: inline-flex;
  animation: marquee 38s linear infinite;
}

.marquee-content:hover {
  animation-play-state: paused;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Subtle Ambient Background */
.y2k-mesh-bg {
  background: radial-gradient(circle at 15% 15%, rgba(229, 143, 174, 0.08) 0%, transparent 45%),
              radial-gradient(circle at 85% 85%, rgba(176, 182, 188, 0.08) 0%, transparent 45%),
              var(--color-cream-white);
}

/* Luxury Modern Cards */
.y2k-box {
  background: #FFFFFF;
  border: 1px solid rgba(176, 182, 188, 0.3);
  box-shadow: 0 4px 20px -2px rgba(42, 36, 39, 0.04);
  border-radius: 1.5rem;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.y2k-box:hover {
  transform: translateY(-2px);
  border-color: rgba(229, 143, 174, 0.45);
  box-shadow: 0 12px 32px -4px rgba(229, 143, 174, 0.12);
}

/* Luxury Buttons */
.y2k-btn-pink {
  background: var(--color-cadentris-pink);
  color: #FFFFFF;
  border: 1px solid var(--color-cadentris-pink-hover);
  box-shadow: 0 4px 16px rgba(229, 143, 174, 0.28);
  font-weight: 600;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 9999px;
}

.y2k-btn-pink:hover {
  background: var(--color-cadentris-pink-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(229, 143, 174, 0.38);
}

.y2k-btn-lime {
  background: #FFFFFF;
  color: var(--color-text-main);
  border: 1px solid rgba(176, 182, 188, 0.45);
  box-shadow: 0 2px 8px rgba(42, 36, 39, 0.04);
  font-weight: 600;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 9999px;
}

.y2k-btn-lime:hover {
  background: var(--color-cream-white);
  border-color: var(--color-cadentris-pink);
  color: var(--color-cadentris-pink);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(229, 143, 174, 0.12);
}

.y2k-btn-black {
  background-color: var(--color-text-main);
  color: #FFFFFF;
  border: 1px solid var(--color-text-main);
  box-shadow: 0 4px 14px rgba(42, 36, 39, 0.12);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 9999px;
  font-weight: 600;
}

.y2k-btn-black:hover {
  background-color: #141112;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(42, 36, 39, 0.2);
}

/* Modern Minimal Product Card */
.product-card {
  background: #FFFFFF;
  border: 1px solid rgba(176, 182, 188, 0.28);
  border-radius: 1.25rem;
  box-shadow: 0 2px 12px rgba(42, 36, 39, 0.03);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: rgba(229, 143, 174, 0.45);
  box-shadow: 0 14px 34px -4px rgba(229, 143, 174, 0.14);
}

.product-card .img-zoom {
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-card:hover .img-zoom {
  transform: scale(1.03);
}

/* Lookbook Pin */
.lookbook-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  cursor: pointer;
  z-index: 20;
}

.lookbook-pin-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #FFFFFF;
  color: var(--color-cadentris-pink);
  border: 1px solid var(--color-silver-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.25s ease;
  position: relative;
}

.lookbook-pin-btn::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: rgba(229, 143, 174, 0.25);
  animation: pinPulse 2.4s infinite;
  z-index: -1;
}

@keyframes pinPulse {
  0% { transform: scale(0.8); opacity: 0.8; }
  100% { transform: scale(1.6); opacity: 0; }
}

.lookbook-pin:hover .lookbook-pin-btn {
  transform: scale(1.15);
  background: var(--color-cadentris-pink);
  color: #FFFFFF;
  border-color: var(--color-cadentris-pink);
}

.lookbook-popover {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  width: 240px;
  z-index: 30;
  pointer-events: none;
}

.lookbook-pin:hover .lookbook-popover,
.lookbook-pin.active .lookbook-popover {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

/* Subtle Shimmer Badge */
.hologram-shimmer {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(247, 212, 226, 0.35) 40%, rgba(176, 182, 188, 0.25) 70%, rgba(255, 255, 255, 0.95) 100%);
  background-size: 200% 200%;
  animation: hologramMove 8s ease infinite;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(176, 182, 188, 0.35);
}

@keyframes hologramMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* QRIS Laser Scanner */
.qris-laser {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-cadentris-pink), var(--color-silver-gray), transparent);
  box-shadow: 0 0 10px rgba(229, 143, 174, 0.5);
  animation: laserScan 2.4s ease-in-out infinite;
}

@keyframes laserScan {
  0% { top: 10%; opacity: 0; }
  25% { opacity: 1; }
  50% { top: 90%; opacity: 1; }
  75% { opacity: 1; }
  100% { top: 10%; opacity: 0; }
}

/* Modals & Drawers */
.drawer-backdrop {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.drawer-backdrop.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.drawer-panel {
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.drawer-panel.active {
  transform: translateX(0);
}

.modal-center {
  opacity: 0;
  visibility: hidden;
  transform: scale(0.97);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.drawer-backdrop.active .modal-center,
.modal-center.active {
  opacity: 1 !important;
  visibility: visible !important;
  transform: scale(1) !important;
}

/* Toast Container */
.toast-container {
  position: fixed;
  top: 84px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

@media (max-width: 640px) {
  .toast-container {
    top: 74px;
    left: 16px;
    right: 16px;
  }
  .toast-item {
    min-width: 0;
    max-width: 100%;
  }
}

.toast-item {
  pointer-events: auto;
  min-width: 280px;
  max-width: 380px;
  background: #FFFFFF;
  color: var(--color-text-main);
  padding: 14px 18px;
  border-radius: 16px;
  border: 1px solid rgba(176, 182, 188, 0.35);
  box-shadow: 0 10px 30px -4px rgba(42, 36, 39, 0.1), 0 4px 12px rgba(229, 143, 174, 0.08);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: toastIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(15px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.toast-item.hide {
  animation: toastOut 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes toastOut {
  to { opacity: 0; transform: translateY(-10px) scale(0.96); }
}

/* Range Slider */
input[type=range] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 5px;
  background: var(--color-light-pink);
  border: 1px solid rgba(176, 182, 188, 0.3);
  border-radius: 9999px;
  outline: none;
}

input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-cadentris-pink);
  border: 2px solid #FFFFFF;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: transform 0.15s ease;
}

input[type=range]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  background: var(--color-cadentris-pink-hover);
}

/* Camera Frame & AI Try-On */
.camera-frame {
  position: relative;
  width: 100%;
  max-width: 480px;
  height: 580px;
  margin: 0 auto;
  border-radius: 28px;
  overflow: hidden;
  background: #141112;
  border: 1px solid rgba(176, 182, 188, 0.35);
  box-shadow: 0 16px 40px -8px rgba(42, 36, 39, 0.18);
}

.camera-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

.camera-garment-overlay {
  position: absolute;
  top: 48%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 320px;
  height: 320px;
  pointer-events: none;
  transition: all 0.2s ease-out;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,0.3));
}

.camera-flash-overlay {
  position: absolute;
  inset: 0;
  background: #FFFFFF;
  opacity: 0;
  pointer-events: none;
  z-index: 50;
}

.camera-flash-overlay.flash {
  animation: flashSnap 0.4s ease-out;
}

@keyframes flashSnap {
  0% { opacity: 0.95; }
  100% { opacity: 0; }
}

.filter-y2k { filter: contrast(1.1) saturate(1.2) hue-rotate(-6deg); }
.filter-vintage { filter: sepia(0.15) contrast(1.05) brightness(0.98); }
.filter-blush { filter: saturate(1.15) brightness(1.03) hue-rotate(3deg); }
.filter-bw { filter: grayscale(1) contrast(1.15); }

.fit-pref-btn.active, .shape-btn.active {
  background-color: var(--color-cadentris-pink) !important;
  color: #FFFFFF !important;
  box-shadow: 0 4px 12px rgba(229, 143, 174, 0.3) !important;
  border-color: var(--color-cadentris-pink-hover) !important;
}

/* Biometric Scanner HUD */
.scan-laser-beam {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-cadentris-pink) 25%, #FFFFFF 50%, var(--color-cadentris-pink) 75%, transparent);
  box-shadow: 0 0 14px rgba(229, 143, 174, 0.7);
  pointer-events: none;
  z-index: 25;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.scan-laser-beam.active {
  opacity: 1;
  animation: scanLaserSweep 2.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes scanLaserSweep {
  0% { top: 8%; }
  50% { top: 88%; }
  100% { top: 8%; }
}

.scan-grid-overlay {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(to right, rgba(229, 143, 174, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(229, 143, 174, 0.06) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  z-index: 15;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.scan-grid-overlay.active {
  opacity: 1;
}

.scan-targeting-bracket {
  position: absolute;
  inset: 24px;
  pointer-events: none;
  z-index: 20;
  opacity: 0;
  transition: opacity 0.3s ease, inset 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.scan-targeting-bracket.active {
  opacity: 1;
  inset: 16px;
}

.bracket-corner {
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: var(--color-cadentris-pink);
}
.bracket-tl { top: 0; left: 0; border-top: 2px solid var(--color-cadentris-pink); border-left: 2px solid var(--color-cadentris-pink); border-top-left-radius: 6px; }
.bracket-tr { top: 0; right: 0; border-top: 2px solid var(--color-cadentris-pink); border-right: 2px solid var(--color-cadentris-pink); border-top-right-radius: 6px; }
.bracket-bl { bottom: 0; left: 0; border-bottom: 2px solid var(--color-cadentris-pink); border-left: 2px solid var(--color-cadentris-pink); border-bottom-left-radius: 6px; }
.bracket-br { bottom: 0; right: 0; border-bottom: 2px solid var(--color-cadentris-pink); border-right: 2px solid var(--color-cadentris-pink); border-bottom-right-radius: 6px; }

.scan-flash-overlay {
  position: absolute;
  inset: 0;
  background: #FFFFFF;
  opacity: 0;
  pointer-events: none;
  z-index: 40;
  transition: opacity 0.05s ease;
}

.scan-flash-overlay.flash {
  opacity: 0.95;
  transition: opacity 0.4s ease-out;
}

/* ========================================================
   SMART ANIMATE TRANSITIONS & FLUID REVEALS (GPU-Optimized)
   ======================================================== */
button, a, input, select, .product-card, .y2k-box, .lookbook-pin-btn, .pdp-size-btn, .cat-tab-btn {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.25s ease, border-color 0.25s ease, color 0.2s ease, box-shadow 0.25s ease;
}

/* Smooth Scroll Reveal (Lightweight Compositor Only) */
.smart-reveal-init {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.35s ease-out, transform 0.35s ease-out;
}

.smart-reveal-init.smart-revealed {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* Fluid Hover Glow for Cards */
.product-card:hover {
  transform: translateY(-4px);
  border-color: rgba(229, 143, 174, 0.45);
  box-shadow: 0 16px 32px -6px rgba(229, 143, 174, 0.16);
}

/* Fluid Button Hover */
.y2k-btn-pink:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(229, 143, 174, 0.38);
}

/* Smooth Table Row Highlight */
#full-size-chart-tbody tr {
  transition: background-color 0.2s ease;
}

#full-size-chart-tbody tr:hover {
  background-color: #FDF4F8 !important;
}

/* Custom Cursor Particle Canvas (Zero CSS filter overhead for 120fps scrolling) */
#cadentris-sparkle-canvas {
  filter: none;
}

/* ========================================================
   LENIS ULTRA-LUXURY SMOOTH SCROLL (CALM & FLUID INERTIA)
   ======================================================== */
html.lenis, html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

.lenis.lenis-smooth iframe {
  pointer-events: none;
}

/* ========================================================
   UNIFIED DESKTOP NAVBAR GLIDING INDICATOR (ALL 5 PAGES)
   ======================================================== */
header nav {
  position: relative;
}

header nav a {
  position: relative;
  transition: color 0.22s ease;
}

header nav a.nav-active {
  color: #E58FAE;
  font-weight: 700;
}

.cadentris-nav-glide {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #E58FAE;
  border-radius: 9999px;
  pointer-events: none;
  opacity: 0;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
              width 0.28s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.2s ease;
  will-change: transform, width, opacity;
}

