/* ==============================================================================
   Zee Scents - Luxury Haute Parfumerie Stylesheet (Original Approved Styles)
   File: assets/css/style.css
   ============================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Alex+Brush&family=Dancing+Script:wght@600;700&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400;1,600&family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
  --color-wine-950: #23070C;
  --color-wine-900: #3D0C14;
  --color-wine-800: #520F1B;
  --color-wine-700: #6E1423;
  --color-wine-600: #8E1B2E;
  --color-wine-500: #B0253D;
  --color-blush-50: #FAF4F4;
  --color-blush-100: #F7E4E4;
  --color-blush-200: #EFCACA;
  --color-sage-50: #F4F6F1;
  --color-sage-500: #7A9B6E;
  --color-sage-700: #4B6342;
  --color-bg-ivory: #FAF7F7;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 163px;
}

@media (max-width: 1023px) {
  html {
    scroll-padding-top: 114px;
  }
}

body {
  font-family: 'Poppins', 'Inter', system-ui, -apple-system, sans-serif;
  color: #2D2426;
  background-color: var(--color-bg-ivory);
}

.font-script {
  font-family: 'Alex Brush', 'Dancing Script', cursive;
}

.font-serif {
  font-family: 'Playfair Display', Georgia, serif;
}

/* Custom subtle scrollbar */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: #F4EBEB;
}
::-webkit-scrollbar-thumb {
  background: #C49F9F;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #6E1423;
}

.scrollbar-none::-webkit-scrollbar {
  display: none;
}
.scrollbar-none {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Mood Showcase 4s subtle zoom animation */
@keyframes moodZoom {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

.animate-mood-zoom {
  animation: moodZoom 4s ease-in-out infinite;
}

/* Custom shadows */
.shadow-luxury {
  box-shadow: 0 20px 40px -15px rgba(61, 12, 20, 0.15);
}
.shadow-card-soft {
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.07);
}
.shadow-sage-soft {
  box-shadow: 0 15px 35px -10px rgba(122, 155, 110, 0.25);
}

/* Toast animations */
@keyframes toastSlideIn {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.animate-toast-in {
  animation: toastSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Line clamp utilities */
.line-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================================
   ADD-TO-CART VIDEO-ACCURATE MICRO-INTERACTIONS (add-to-cart.mp4)
   ============================================================ */

@keyframes cartBottleDrop {
  0% {
    transform: translateY(-56px) scale(0.85);
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  75% {
    transform: translateY(0px) scale(1);
    opacity: 1;
  }
  88% {
    transform: translateY(-4px) scale(1);
  }
  100% {
    transform: translateY(0px) scale(1);
    opacity: 1;
  }
}

@keyframes cartSquashEffect {
  0% { transform: scale(1, 1); }
  35% { transform: scale(1.18, 0.80); }
  70% { transform: scale(0.95, 1.06); }
  100% { transform: scale(1, 1); }
}

@keyframes cartDriveOff {
  0% {
    transform: translateX(0) rotate(0deg);
    opacity: 1;
  }
  15% {
    transform: translateX(-6px) rotate(-3deg);
    opacity: 1;
  }
  100% {
    transform: translateX(180px) rotate(4deg);
    opacity: 0;
  }
}

@keyframes cartWheelSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(720deg); }
}

@keyframes cartSparkleBurst {
  0% {
    transform: translate(0, 0) scale(0);
    opacity: 1;
  }
  50% {
    transform: translate(var(--dx), var(--dy)) scale(1.25);
    opacity: 1;
  }
  100% {
    transform: translate(var(--dx), var(--dy)) scale(0.3);
    opacity: 0;
  }
}

@keyframes cartCheckPop {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  60% {
    transform: scale(1.25);
    opacity: 1;
  }
  85% {
    transform: scale(0.95);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.animate-cart-bottle-drop {
  animation: cartBottleDrop 0.45s cubic-bezier(0.35, 0.05, 0.65, 1) forwards;
}

.animate-cart-squash {
  animation: cartSquashEffect 0.3s ease-out forwards;
}

.animate-cart-drive {
  animation: cartDriveOff 0.52s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-wheel-spin {
  animation: cartWheelSpin 0.52s linear forwards;
  transform-box: fill-box;
  transform-origin: center;
}

.animate-cart-spark {
  animation: cartSparkleBurst 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-cart-check {
  animation: cartCheckPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* ============================================================
   PART 2 — SHOPIFY-STYLE POLISH ANIMATIONS
   GPU-accelerated: only transform + opacity (no layout thrash)
   ============================================================ */

/* --- 1. Product Card Lift on Hover --- */
.product-card-hover {
  transition: transform 200ms ease, box-shadow 200ms ease;
  will-change: transform;
}
.product-card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px -10px rgba(61, 12, 20, 0.18);
}

/* --- 2. Cart Icon Bounce when item added --- */
@keyframes cartIconBounce {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.35); }
  55%  { transform: scale(0.9); }
  75%  { transform: scale(1.12); }
  100% { transform: scale(1); }
}

@keyframes badgePop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.5); background-color: #16a34a; }
  70%  { transform: scale(0.88); }
  100% { transform: scale(1); background-color: #E53935; }
}

.animate-cart-icon-bounce {
  animation: cartIconBounce 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.animate-badge-pop {
  animation: badgePop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* --- 3. Section Reveal (Safe default: never hide content) --- */
.reveal-section {
  opacity: 1;
  transform: none;
}

/* --- 4. Mobile Menu Slide-in --- */
#mobile-menu-drawer {
  transform: translateX(-100%);
  transition: transform 280ms cubic-bezier(0.4, 0, 0.2, 1);
  /* Override hidden: the drawer now uses transform instead of display:none */
}
#mobile-menu-drawer.drawer-open {
  transform: translateX(0);
}

/* Mobile menu backdrop */
#mobile-menu-backdrop {
  opacity: 0;
  transition: opacity 280ms ease;
  pointer-events: none;
}
#mobile-menu-backdrop.backdrop-visible {
  opacity: 1;
  pointer-events: auto;
}

/* --- 5. Cart Drawer smooth slide (enhance existing) --- */
#cart-drawer {
  transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

#cart-backdrop {
  transition: opacity 300ms ease;
}
#cart-backdrop.hidden {
  opacity: 0;
  pointer-events: none;
}

/* --- 6. Product Image Zoom on Hover (product.php) --- */
.product-img-zoom-container {
  overflow: hidden;
}
.product-img-zoom-container img {
  transition: transform 400ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}
@media (hover: hover) {
  .product-img-zoom-container:hover img {
    transform: scale(1.06);
  }
}

/* --- 7. Skeleton Loading Shimmer --- */
@keyframes skeletonPulse {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

.skeleton {
  background: linear-gradient(90deg, #f0e8e8 25%, #e8dede 50%, #f0e8e8 75%);
  background-size: 800px 100%;
  animation: skeletonPulse 1.5s infinite linear;
  border-radius: 8px;
}

.skeleton-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  flex-shrink: 0;
  width: 155px;
}

@media (min-width: 640px) {
  .skeleton-card { width: 185px; }
}
@media (min-width: 1024px) {
  .skeleton-card { width: 205px; }
}

/* --- 8. Hero Crossfade (uses existing opacity transition, enhance timing) --- */
.hero-slide {
  transition: opacity 550ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- 9. Inline Add-to-Cart Button States --- */
.atc-btn-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.8;
}
.atc-btn-loading::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spinAnim 0.6s linear infinite;
  top: 50%;
  right: 8px;
  margin-top: -6px;
}
@keyframes spinAnim {
  to { transform: rotate(360deg); }
}
