/**
 * Additional Custom Styles for Makeup Destination
 * Enhances TailwindCSS with custom animations and effects
 */

/* Hide scrollbar for all browsers */
html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
}

html,
body {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

/* Fade-in-up animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out forwards;
}

/* Scroll animation preparation */
.scroll-animate {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-animate.animate-fade-in-up {
  opacity: 1;
  transform: translateY(0);
}

/* Gold shimmer effect */
@keyframes goldShimmer {
  0% {
    background-position: -200% center;
  }
  100% {
    background-position: 200% center;
  }
}

.gold-shimmer {
  background: linear-gradient(
    90deg,
    #c8a95f 0%,
    #e8c97f 50%,
    #c8a95f 100%
  );
  background-size: 200% auto;
  animation: goldShimmer 3s linear infinite;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Image zoom container */
.image-zoom-container {
  overflow: hidden;
  position: relative;
}

.image-zoom-container img,
.image-zoom-container .bg-cover {
  transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.image-zoom-container:hover img,
.image-zoom-container:hover .bg-cover {
  transform: scale(1.08);
}

/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
}

/* Custom scrollbar styling */
::-webkit-scrollbar {
    display: none;
}

/* Cart notification */
.cart-notification {
  position: fixed;
  top: 100px;
  right: 20px;
  background: rgba(36, 34, 30, 0.98);
  border: 1px solid #c8a95f;
  border-radius: 12px;
  padding: 16px 24px;
  color: white;
  font-weight: 500;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 20px rgba(200, 169, 95, 0.2);
  z-index: 9999;
  transform: translateX(400px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  backdrop-filter: blur(10px);
}

.cart-notification.show {
  transform: translateX(0);
  opacity: 1;
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #c8a95f;
  color: #161512;
  font-size: 11px;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Accordion animation */
.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.accordion-content.accordion-open {
  max-height: 500px;
  transition: max-height 0.3s ease-in;
}

/* Button hover effects */
.btn-primary {
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s;
  z-index: -1;
}

.btn-primary:hover::before {
  left: 100%;
}

/* Glassmorphism effect */
.glass-effect {
  background: rgba(36, 34, 30, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Loading spinner */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.spinner {
  border: 3px solid rgba(200, 169, 95, 0.1);
  border-top-color: #c8a95f;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 0.8s linear infinite;
}

/* Pulse animation for notifications */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Text gradient */
.text-gradient {
  background: linear-gradient(135deg, #c8a95f 0%, #e8c97f 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Card hover lift effect */
.card-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Testimonial slider */
.testimonial-slider {
  scroll-behavior: smooth;
  cursor: grab;
}

.testimonial-slider:active {
  cursor: grabbing;
}

.testimonial-slider::-webkit-scrollbar {
  display: none;
}

/* Before/After slider styles */
.before-after-slider {
  position: relative;
  cursor: ew-resize;
  user-select: none;
}

.slider-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #c8a95f;
  z-index: 10;
  cursor: ew-resize;
}

.slider-handle::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
  background: #c8a95f;
  border-radius: 50%;
  box-shadow: 0 0 20px rgba(200, 169, 95, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Mobile menu animation */
#mobile-menu {
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Focus styles for accessibility */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #c8a95f;
  outline-offset: 2px;
}

/* Print styles */
@media print {
  header,
  footer,
  .no-print {
    display: none !important;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
