/* Liquid Best 3D Experience - Premium Styles */
:root {
  --accent: #FF5C00;
  --accent-light: #FF8A3D;
  --dark: #0C0C0C;
  --card: #121212;
  --text: #F5F5F5;
  --text-muted: #A8A8A8;
  --warm-gray: #2A2826;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--dark);
  color: var(--text);
  position: relative;
}

/* Subtle premium noise/grain texture for luxe feel */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: 
    linear-gradient(rgba(255,255,255,0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.012) 1px, transparent 1px);
  background-size: 3px 3px;
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: screen;
}

/* Navbar */
.nav-link {
  position: relative;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--accent-light);
}

.nav-link:after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -2px;
  left: 0;
  background-color: var(--accent);
  transition: width 0.3s ease;
}

.nav-link:hover:after {
  width: 100%;
}

/* Hero */
.hero-bg {
  background: radial-gradient(circle at 50% 30%, #1F1C1A 0%, #0C0C0C 72%);
}

/* Can Viewer */
.can-viewer {
  width: 100%;
  max-width: 340px;
  height: 560px;
  margin: 0 auto;
  position: relative;
}

/* Subtle studio vignette for premium focus */
.can-viewer::after {
  content: '';
  position: absolute;
  inset: -8px;
  background: radial-gradient(
    circle at 50% 42%,
    transparent 55%,
    rgba(0,0,0,0.18) 82%,
    rgba(0,0,0,0.32) 100%
  );
  pointer-events: none;
  border-radius: 9999px;
  z-index: 1;
}

#scene {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

#can-wrapper {
  width: 280px;
  height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  user-select: none;
  filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.65));
  transition: filter 0.2s ease;
  will-change: transform;
}

#can-wrapper:active {
  cursor: grabbing;
  filter: drop-shadow(0 35px 70px rgba(0, 0, 0, 0.75));
}

/* Subtle floating levitation when idle (premium product feel) */
#can-main.floating {
  animation: canFloat 4.2s ease-in-out infinite;
}

@keyframes canFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3.5px); }
}

#can-main {
  width: 280px;
  height: auto;
  max-height: 480px;
  object-fit: contain;
  border-radius: 12px; /* slight soften edges */
  box-shadow: 
    0 10px 30px rgba(0, 0, 0, 0.5),
    inset 0 0 60px rgba(255, 255, 255, 0.06);
  transition: transform 0.05s linear, opacity 0.25s ease;
  will-change: transform;
}

#shine {
  position: absolute;
  top: 8%;
  left: 50%;
  transform: translateX(-50%);
  width: 78%;
  height: 82%;
  background: linear-gradient(
    125deg,
    rgba(255,255,255,0.0) 0%,
    rgba(255,255,255,0.38) 16%,
    rgba(255,255,255,0.16) 30%,
    rgba(255,255,255,0.0) 52%
  );
  border-radius: 18% 22% 18% 22% / 8% 12% 8% 12%;
  pointer-events: none;
  mix-blend-mode: screen;
  z-index: 2;
  transition: transform 0.1s ease-out;
  box-shadow: inset 0 0 80px rgba(255,255,255,0.06);
}

/* Variant Thumbnails */
.variant-card {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid transparent;
}

.variant-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

.variant-card.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
  transform: scale(1.02);
}

.variant-card img {
  transition: transform 0.3s ease;
}

.variant-card:hover img {
  transform: scale(1.04);
}

/* Buttons */
.btn-primary {
  background-color: var(--accent);
  color: white;
  font-weight: 600;
  padding: 14px 32px;
  border-radius: 9999px;
  transition: all 0.2s ease;
  box-shadow: 0 10px 15px -3px rgb(255 92 0 / 0.3), 0 4px 6px -4px rgb(255 92 0 / 0.3);
}

.btn-primary:hover {
  background-color: #E54D00;
  transform: translateY(-2px);
  box-shadow: 0 20px 25px -5px rgb(255 92 0 / 0.4), 0 8px 10px -6px rgb(255 92 0 / 0.4);
}

.btn-secondary {
  background-color: #1F1F1F;
  color: var(--text);
  font-weight: 600;
  padding: 12px 28px;
  border-radius: 9999px;
  border: 1px solid #3a3734;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background-color: #2A2A2A;
  border-color: #444;
  transform: translateY(-1px);
}

.btn-ghost {
  background-color: transparent;
  color: var(--text-muted);
  padding: 10px 20px;
  border-radius: 9999px;
  transition: all 0.2s ease;
}

.btn-ghost:hover {
  color: var(--text);
  background-color: #1A1A1A;
}

/* Feature Cards */
.feature-card {
  background-color: var(--card);
  border: 1px solid #222;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-6px);
  border-color: #333;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background-color: #1F1F1F;
  color: white;
  padding: 14px 24px;
  border-radius: 9999px;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.3);
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  z-index: 9999;
  border: 1px solid #333;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

/* Section Headers */
.section-header {
  position: relative;
  display: inline-block;
}

.section-header:after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 60%;
  height: 3px;
  background: linear-gradient(to right, var(--accent), transparent);
  border-radius: 3px;
}

/* Responsive */
@media (max-width: 768px) {
  .can-viewer {
    max-width: 280px;
    height: 460px;
  }
  
  #can-wrapper {
    width: 240px;
    height: 420px;
  }
  
  #can-main {
    width: 240px;
  }
}

/* Subtle animations */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.floating {
  animation: float 3s ease-in-out infinite;
}

/* ============================================
   MAJOR DESIGN ENHANCEMENTS - Premium 3D + UX
   ============================================ */

/* Premium 3D Can Stage */
#can-pedestal {
  transition: transform 0.05s linear, box-shadow 0.2s ease;
  box-shadow: 
    0 25px 50px -12px rgb(0 0 0 / 0.65),
    0 10px 10px -6px rgb(0 0 0 / 0.45),
    inset 0 12px 18px rgba(255,255,255,0.08),
    inset 0 -10px 14px rgba(0,0,0,0.85);
  background: radial-gradient(circle at 50% 28%, #252525 0%, #0f0f0f 65%, #080808 100%);
  border: 1px solid #2a2a2a;
}

#can-rimlight {
  transition: transform 0.05s linear, box-shadow 0.3s ease;
  pointer-events: none;
}

/* Enhanced Can Viewer Container */
.can-viewer {
  filter: drop-shadow(0 40px 80px rgba(0, 0, 0, 0.55));
}

#scene {
  perspective: 1400px;
  perspective-origin: 50% 42%;
}

/* Premium Variant Cards with 3D Hover Tilt */
.variant-card {
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1), 
              box-shadow 0.4s cubic-bezier(0.23, 1, 0.32, 1),
              border-color 0.2s ease;
  border: 2px solid transparent;
  background: #111;
  position: relative;
  overflow: hidden;
}

.variant-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, rgba(255,255,255,0.06) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 1;
}

.variant-card:hover::before {
  opacity: 1;
}

.variant-card:hover {
  transform: translateY(-10px) rotateX(6deg) rotateY(4deg);
  box-shadow: 0 30px 70px -15px rgb(0 0 0 / 0.35), 
              0 10px 20px -8px rgb(0 0 0 / 0.2);
  border-color: #333;
}

.variant-card.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 
              0 0 0 4px rgba(255, 92, 0, 0.12),
              0 25px 60px -15px rgb(0 0 0 / 0.3);
  transform: scale(1.015);
}

.variant-card.active::after {
  content: 'VIEWING';
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--accent);
  color: white;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  padding: 1px 9px 0;
  border-radius: 9999px;
  z-index: 10;
  box-shadow: 0 2px 4px rgb(0 0 0 / 0.3);
}

/* Mobile Menu */
#mobile-menu {
  animation: fadeIn 0.2s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.mobile-nav-link {
  color: #e5e5e5;
  font-weight: 500;
  transition: all 0.2s ease;
}

.mobile-nav-link:hover {
  color: var(--accent-light);
  transform: translateX(4px);
}

/* Scroll reveal animations for major sections */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: all 0.7s cubic-bezier(0.23, 1, 0.32, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Enhanced Feature Cards */
.feature-card {
  background-color: var(--card);
  border: 1px solid #2a2826;
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1), 
              border-color 0.3s ease,
              box-shadow 0.4s ease;
  position: relative;
  overflow: hidden;
}

.feature-card::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 60%;
  height: 40%;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255,255,255,0.06),
    transparent
  );
  transform: skewX(-25deg);
  transition: left 0.6s ease;
}

.feature-card:hover::after {
  left: 150%;
}

.feature-card:hover {
  transform: translateY(-8px);
  border-color: #383838;
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

/* Improved Button Polish */
.btn-primary:active {
  transform: translateY(0) scale(0.985);
}

.btn-secondary:active, .btn-ghost:active {
  transform: translateY(0) scale(0.985);
}

/* Better focus states for accessibility */
button:focus-visible,
.variant-card:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Subtle hero depth */
#experience {
  position: relative;
}

#experience::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 110%;
  height: 100%;
  background: radial-gradient(circle at 50% 35%, rgba(255,92,0,0.035) 0%, transparent 55%);
  pointer-events: none;
  z-index: -1;
}

/* Toast improvement */
.toast {
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.1);
}

/* Responsive refinements */
@media (max-width: 768px) {
  .can-viewer {
    max-width: 280px;
    height: 460px;
  }
  
  #can-wrapper {
    width: 240px;
    height: 420px;
  }
  
  #can-main {
    width: 240px;
  }
  
  #can-pedestal {
    width: 175px;
    height: 32px;
    bottom: 14%;
  }
}

/* Reduced motion respect */
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .variant-card,
  #can-wrapper,
  .feature-card {
    transition: none !important;
    animation: none !important;
  }
  
  #shine {
    transition: none;
  }
}

/* ============================================
   v3 UPDATES: Functional Cart + Shareable UX Polish
   ============================================ */

/* Mini cart items custom scroll */
.custom-scroll::-webkit-scrollbar {
  width: 5px;
}
.custom-scroll::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 20px;
}

/* Checkout modal polish */
#checkout-modal input:focus {
  box-shadow: 0 0 0 3px rgba(255, 92, 0, 0.1);
}

/* Subtle pulse for cart badge when updating */
#cart-count {
  transition: transform 0.2s cubic-bezier(0.23, 1, 0.32, 1), background-color 0.2s ease;
}

/* Sparkling bubbles foundation (ready for toggle) */
#bubbles-overlay {
  background: 
    radial-gradient(circle at 30% 20%, rgba(255,255,255,0.35) 0%, transparent 60%),
    radial-gradient(circle at 70% 65%, rgba(255,255,255,0.25) 0%, transparent 55%);
  animation: bubbles-drift 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes bubbles-drift {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-6px) scale(1.015); }
}

/* Premium focus + active states for new interactive elements */
.qty-btn:active {
  transform: scale(0.9);
  background-color: rgba(255,255,255,0.08);
}

/* Toast already styled, just ensure z high */
.toast {
  z-index: 99999;
}
