/* Reset and Base Styles */
body {
  box-sizing: border-box;
  font-family: 'Montserrat', sans-serif;
  transition: background .4s ease, color .4s ease;
}

/* Default dark mode */
body {
  background: #0a0a0a;
  color: #ffffff;
}

/* Ivory mode */
body.ivory {
  background: #f8f5ef;
  color: #1a1a1a;
}

/* Ivory mode text colors */
body.ivory h1, 
body.ivory h2, 
body.ivory h3, 
body.ivory h4 { 
  color: #111 !important; 
}

body.ivory p, 
body.ivory a { 
  color: #444 !important; 
}

body.ivory .text-white { 
  color: #111 !important; 
}

body.ivory .text-gray-400,
body.ivory .text-gray-500,
body.ivory .text-gray-600 { 
  color: #666 !important; 
}

/* Glass effect */
.glass-effect {
  backdrop-filter: blur(10px);
  transition: all .3s ease;
}

body:not(.ivory) .glass-effect {
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .06);
}

body.ivory .glass-effect {
  background: rgba(255, 255, 255, .8);
  border: 1px solid rgba(0, 0, 0, .08);
}

/* Buttons */
.btn-primary {
  transition: all .3s ease;
  background: #fff;
  color: #0a0a0a;
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s ease;
}

.btn-primary:hover::before {
  left: 100%;
}

body.ivory .btn-primary {
  background: #111;
  color: #fff;
}

/* Background wrapper */
#app-wrapper {
  min-height: 100vh;
  transition: background .4s ease;
}

body:not(.ivory) #app-wrapper {
  background: linear-gradient(180deg, #0a0a0a 0%, #111111 50%, #0a0a0a 100%) !important;
}

body.ivory #app-wrapper {
  background: linear-gradient(180deg, #f8f5ef 0%, #f0e8d8 50%, #f8f5ef 100%) !important;
}

/* Typography */
.font-display {
  font-family: 'Cormorant Garamond', serif;
}

.font-body {
  font-family: 'Montserrat', sans-serif;
}

.gradient-text {
  background: linear-gradient(135deg, #ffffff 0%, #a0a0a0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

body.ivory .gradient-text {
  background: linear-gradient(135deg, #111111 0%, #666666 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Animations */
@keyframes fadeInUp { 
  from {
    opacity: 0;
    transform: translateY(30px);
  } 
  to {
    opacity: 1;
    transform: translateY(0);
  } 
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-fade-up { 
  animation: fadeInUp .8s ease forwards;
}

.animate-slide-in {
  animation: slideIn 0.6s ease-out forwards;
}

.animate-scale-in {
  animation: scaleIn 0.7s ease-out forwards;
}

/* Animation delays */
.delay-100 { animation-delay: 0.1s; opacity: 0; }
.delay-200 { animation-delay: 0.2s; opacity: 0; }
.delay-300 { animation-delay: 0.3s; opacity: 0; }
.delay-400 { animation-delay: 0.4s; opacity: 0; }
.delay-500 { animation-delay: 0.5s; opacity: 0; }
.delay-600 { animation-delay: 0.6s; opacity: 0; }

/* Product cards */
.product-card { 
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover { 
  transform: translateY(-8px);
}

.product-card:hover .product-image {
  transform: scale(1.05);
}

.product-image {
  transition: transform 0.5s ease;
}

/* Size buttons */
.size-btn.active {
  border-color: #ffffff;
  background-color: #ffffff;
  color: #0a0a0a;
}

body.ivory .size-btn.active {
  border-color: #111111;
  background-color: #111111;
  color: #ffffff;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* View transitions */
@view-transition { 
  navigation: auto; 
}
