/* styles.css - Custom luxury styles for Shri Geeta Sarees Lookbook */

/* 1. Global Reset & Base Enhancements */
::selection {
  background-color: rgba(151, 71, 48, 0.2); /* Muted terracotta highlight */
  color: #3d0006; /* Deep Maroon text */
}

body {
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* 2. Custom Premium Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #fbf9f8; /* Warm Ivory background */
}

::-webkit-scrollbar-thumb {
  background: #3d0006; /* Deep Royal Maroon */
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #974730; /* Burnt Terracotta */
}

/* 3. Luxury Custom Cursor */
.custom-cursor {
  width: 20px;
  height: 20px;
  border: 1px solid #974730; /* Burnt Terracotta border */
  background-color: transparent;
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
              height 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
              background-color 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.custom-cursor-dot {
  width: 4px;
  height: 4px;
  background-color: #974730;
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
}

.custom-cursor.hover {
  width: 48px;
  height: 48px;
  background-color: rgba(151, 71, 48, 0.08);
  border-color: #3d0006;
}

/* Hide native cursor when custom cursor is active */
@media (min-width: 768px) {
  .cursor-none-active,
  .cursor-none-active a,
  .cursor-none-active button,
  .cursor-none-active input,
  .cursor-none-active select,
  .cursor-none-active textarea {
    cursor: none !important;
  }
}

/* 4. Page Transition Loader */
.page-loader {
  position: fixed;
  inset: 0;
  background-color: #fbf9f8;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
              visibility 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.page-loader.fade-out {
  opacity: 0;
  visibility: hidden;
}

.loader-logo {
  animation: logoPulse 1.6s ease-in-out infinite alternate;
}

@keyframes logoPulse {
  0% {
    transform: scale(0.96);
    opacity: 0.7;
  }
  100% {
    transform: scale(1.04);
    opacity: 1;
  }
}

/* 5. Smooth Micro-Interactions & Hover Effects */
.image-zoom-container {
  overflow: hidden;
  position: relative;
}

.image-zoom-container img {
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.image-zoom-container:hover img {
  transform: scale(1.05);
}

.underline-hover-effect {
  position: relative;
}

.underline-hover-effect::after {
  content: '';
  position: absolute;
  width: 100%;
  transform: scaleX(0);
  height: 1px;
  bottom: -2px;
  left: 0;
  background-color: #974730;
  transform-origin: bottom right;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.underline-hover-effect:hover::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

/* 6. Asymmetric Cards & Tonal Layers */
.editorial-card {
  box-shadow: 0 4px 20px rgba(61, 0, 6, 0.02);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.editorial-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(61, 0, 6, 0.05);
}

/* 7. Drawers & Overlays */
.drawer-overlay {
  background-color: rgba(61, 0, 6, 0.3);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), 
              visibility 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.drawer-overlay.active {
  opacity: 1;
  visibility: visible;
}

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

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

/* 8. Intersection Observer Reveal Animations */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

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

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.catalog-fade-in {
  opacity: 0;
  animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Utility to delay animations */
.delay-100 { transition-delay: 100ms !important; }
.delay-200 { transition-delay: 200ms !important; }
.delay-300 { transition-delay: 300ms !important; }
.delay-400 { transition-delay: 400ms !important; }

/* 9. Leaflet Map Grayscale Filter */
.grayscale-map {
  filter: grayscale(100%) invert(8%) contrast(95%);
  transition: filter 0.5s ease;
}

.grayscale-map:hover {
  filter: grayscale(20%) invert(0%) contrast(100%);
}

/* 10. 3D Perspective & Tilt System */
.perspective-container {
  perspective: 1200px;
  transform-style: preserve-3d;
}

.tilt-3d {
  perspective: 1000px;
  transform-style: preserve-3d;
  will-change: transform, box-shadow;
  transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translate3d(0, 0, 0);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), 
              box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.tilt-3d:hover {
  box-shadow: 0 24px 50px rgba(61, 0, 6, 0.12);
  transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translate3d(0, 0, 16px) scale3d(1.03, 1.03, 1.03);
}

/* Floating child elements inside 3D cards */
.tilt-3d-float {
  transform: translate3d(0, 0, 32px);
  transform-style: preserve-3d;
}

.tilt-3d-float-high {
  transform: translate3d(0, 0, 48px);
  transform-style: preserve-3d;
}

.tilt-3d-image {
  transform: translate3d(0, 0, 8px);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Hologram Parallax Hero 3D container styling simplified to flat layer to avoid perspective mapping click bugs */
.hero-3d-container {
  position: relative;
}

.hero-3d-bg {
  will-change: transform;
}

.hero-3d-text {
  position: relative;
  z-index: 20;
}


/* 11. Bécane-Inspired Horizontal Scroll Lookbook System */
.horizontal-scroll-container {
  position: relative;
  width: 100%;
}

.horizontal-slide-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  height: 100%;
  padding: 0 4rem;
  will-change: transform, opacity;
}

.text-outline-luxury {
  color: transparent;
  -webkit-text-stroke: 1px rgba(61, 0, 6, 0.15);
  font-family: 'Playfair Display', serif;
}

.text-outline-white {
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.25);
  font-family: 'Playfair Display', serif;
}

.horizontal-track-parent {
  cursor: grab;
}

.horizontal-track-parent:active {
  cursor: grabbing;
}

.horizontal-slide-img-container {
  overflow: hidden;
  position: relative;
  will-change: transform;
}

.horizontal-slide-img-container img {
  will-change: transform;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.horizontal-slide-img-container:hover img {
  transform: scale(1.08);
}

.floating-lookbook-badge {
  background: rgba(151, 71, 48, 0.9);
  backdrop-filter: blur(8px);
  color: #fbf9f8;
  padding: 0.5rem 1rem;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-weight: 600;
  position: absolute;
  z-index: 10;
  transform: translate3d(var(--tx, 0), var(--ty, 0), 20px);
  transition: transform 0.2s ease-out;
}

.slide-number-glow {
  font-family: 'Playfair Display', serif;
  font-size: 12rem;
  line-height: 0.8;
  color: rgba(61, 0, 6, 0.03);
  position: absolute;
  top: -2rem;
  left: -2rem;
  pointer-events: none;
  user-select: none;
}

/* Blueprint layout lines for sen-knife 2.0 precise layout */
.blueprint-grid {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  pointer-events: none;
  z-index: 1;
}

.blueprint-line-vert {
  border-right: 1px solid rgba(214, 175, 55, 0.03);
  height: 100%;
}

.blueprint-line-vert:last-child {
  border-right: none;
}

.blueprint-line-horiz {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(214, 175, 55, 0.03);
}

/* Sidebar Chapter Navigation */
.side-chapter-nav {
  position: fixed;
  right: 2.5rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  pointer-events: auto;
}

.side-chapter-item {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  cursor: pointer;
  background: transparent;
  border: none;
  padding: 4px 0;
  outline: none;
}

.side-chapter-label {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: rgba(61, 0, 6, 0.45);
  opacity: 0;
  transform: translateX(12px);
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
              color 0.4s ease;
  pointer-events: none;
  white-space: nowrap;
}

.side-chapter-dot-container {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.side-chapter-dot {
  width: 4px;
  height: 4px;
  background-color: rgba(61, 0, 6, 0.25);
  border-radius: 50%;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
              background-color 0.4s ease, 
              box-shadow 0.4s ease;
}

.side-chapter-item:hover .side-chapter-label {
  opacity: 1;
  transform: translateX(0);
  color: #3d0006;
}

.side-chapter-item:hover .side-chapter-dot {
  background-color: #3d0006;
  transform: scale(1.6);
  box-shadow: 0 0 8px rgba(61, 0, 6, 0.4);
}

.side-chapter-item.active .side-chapter-label {
  opacity: 1;
  transform: translateX(0);
  color: #3d0006;
  font-weight: 600;
}

.side-chapter-item.active .side-chapter-dot {
  background-color: #3d0006;
  transform: scale(2.0);
  box-shadow: 0 0 12px rgba(61, 0, 6, 0.6);
}



@media (max-width: 768px) {
  .side-chapter-nav {
    right: 1.25rem;
    gap: 1.25rem;
  }
  .side-chapter-label {
    display: none !important;
  }
}

/* 12. Inquiry Bag & Favorites Header Badge Legibility Fix */
.bag-badge-count, 
.wishlist-badge-count {
  color: #ffffff !important;
  background-color: #3d0006 !important; /* Force deep maroon bg for bag badge */
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-weight: 700 !important;
  font-size: 9px !important;
  line-height: 1 !important;
}

.wishlist-badge-count {
  background-color: #974730 !important; /* Force burnt terracotta bg for wishlist badge */
}

/* Ensure the hidden class works even with !important flex rules */
.bag-badge-count.hidden,
.wishlist-badge-count.hidden {
  display: none !important;
}

/* 13. Quick View Image Slideshow Premium Controls */
.qv-slideshow-dots {
  background: rgba(251, 249, 248, 0.85) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  padding: 6px 12px !important;
  border-radius: 9999px !important;
  border: 1px solid rgba(61, 0, 6, 0.08) !important;
  box-shadow: 0 4px 15px rgba(61, 0, 6, 0.05) !important;
}

.qv-dot {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.qv-slideshow-prev,
.qv-slideshow-next {
  box-shadow: 0 4px 12px rgba(61, 0, 6, 0.08) !important;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}




