/* ==========================================================================
   BELYSA Cosmetic — LUXURY ANIMATION SYSTEM
   1. Scroll-Triggered Reveal (Fade-Up)
   2. Product Card 3D Tilt
   3. Hero Parallax
   4. Custom Cursor
   5. Skeleton Loading Cards
   ========================================================================== */

/* ──────────────────────────────────────────────────
   1. SCROLL-TRIGGERED REVEAL
   ────────────────────────────────────────────────── */

/* Elements start invisible and below their position */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Staggered children delay */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-stagger > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-stagger > *:nth-child(2) { transition-delay: 0.15s; }
.reveal-stagger > *:nth-child(3) { transition-delay: 0.25s; }
.reveal-stagger > *:nth-child(4) { transition-delay: 0.35s; }
.reveal-stagger > *:nth-child(5) { transition-delay: 0.45s; }
.reveal-stagger > *:nth-child(6) { transition-delay: 0.55s; }

/* Visible state — added by JS IntersectionObserver */
.reveal.is-visible,
.reveal-stagger.is-visible > * {
  opacity: 1;
}

/* Fade only variant (for images, wide elements) */
.reveal-fade {
  opacity: 0;
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-fade.is-visible {
  opacity: 1;
}

/* Slide from left */
.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-left.is-visible {
  opacity: 1;
  transform: translateX(0);
}

/* Slide from right */
.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-right.is-visible {
  opacity: 1;
  transform: translateX(0);
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal-stagger > *,
  .reveal-fade,
  .reveal-left,
  .reveal-right {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}


/* ──────────────────────────────────────────────────
   2. PRODUCT CARD 3D TILT
   ────────────────────────────────────────────────── */

.product-card {
  transform-style: preserve-3d;
  /* perspective is applied inline via JS per card */
  will-change: transform;
}

/* Smooth reset when mouse leaves */
.product-card.tilt-reset {
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.product-card {
  transform: perspective(1000px) rotateX(0deg) rotateY(0deg) scale3d(1, 1, 1);
  transition: box-shadow 0.4s ease, border-color 0.4s ease;
}

/* Inner glow that follows the tilt */
.product-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(216, 189, 166, 0.14) 0%,
    transparent 65%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 10;
}

.product-card:hover::after {
  opacity: 1;
}


/* ──────────────────────────────────────────────────
   3. HERO PARALLAX
   ────────────────────────────────────────────────── */

.hero-parallax-layer {
  will-change: transform;
  /* transform applied by JS on scroll */
}

@media (prefers-reduced-motion: reduce) {
  .hero-parallax-layer {
    will-change: auto;
  }
}


/* ──────────────────────────────────────────────────
   4. CUSTOM CURSOR
   ────────────────────────────────────────────────── */

/* Hide default cursor on non-touch devices */
@media (hover: hover) and (pointer: fine) {
  body {
    cursor: none !important;
  }

  a, button, [role="button"], input, select, textarea, label,
  .product-card, .ritual-card, .faq-question, .btn-trendyol-icon,
  .luxury-cookie-modal, .luxury-cookie-modal * {
    cursor: none !important;
  }
}

/* Cursor dot */
.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 8px;
  height: 8px;
  background: #D8BDA6;
  border-radius: 50%;
  pointer-events: none;
  z-index: 999999;
  transform: translate(-50%, -50%);
  transition: width 0.2s ease, height 0.2s ease, background 0.2s ease, opacity 0.2s ease;
  will-change: transform;
}

/* Cursor ring (trailing) */
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  width: 36px;
  height: 36px;
  border: 1.5px solid rgba(216, 189, 166, 0.65);
  border-radius: 50%;
  pointer-events: none;
  z-index: 999998;
  transform: translate(-50%, -50%);
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              height 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.35s ease,
              opacity 0.3s ease;
  will-change: transform;
}

/* Hover state — cursor expands on interactive elements */
body.cursor-hover .cursor-dot {
  width: 6px;
  height: 6px;
  background: #1A1715;
}

body.cursor-hover .cursor-ring {
  width: 54px;
  height: 54px;
  border-color: rgba(26, 23, 21, 0.4);
}

/* Click state */
body.cursor-click .cursor-dot {
  width: 12px;
  height: 12px;
  background: #B89A82;
}

body.cursor-click .cursor-ring {
  width: 28px;
  height: 28px;
  border-color: rgba(216, 189, 166, 0.9);
}

/* Hidden when mouse leaves viewport */
.cursor-dot.cursor-hidden,
.cursor-ring.cursor-hidden {
  opacity: 0;
}

/* Only render on true pointer devices — hide on touch */
@media (hover: none) or (pointer: coarse) {
  .cursor-dot,
  .cursor-ring {
    display: none !important;
  }

  body, a, button {
    cursor: auto !important;
  }
}


/* ──────────────────────────────────────────────────
   6. LUXURY COOKIE CONSENT CARD
   ────────────────────────────────────────────────── */

.luxury-cookie-modal {
  position: fixed;
  bottom: 24px;
  right: 24px;
  max-width: 420px;
  width: calc(100% - 48px);
  background: rgba(250, 247, 244, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(216, 189, 166, 0.6);
  border-radius: 12px;
  box-shadow: 0 20px 50px -10px rgba(26, 23, 21, 0.22),
              0 0 0 1px rgba(255, 255, 255, 0.6) inset;
  padding: 24px 22px 20px;
  z-index: 100000;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transform: translateY(40px) scale(0.96);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.luxury-cookie-modal.is-active {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.cookie-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cookie-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans, 'Montserrat', sans-serif);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #B89A82;
}

.cookie-sparkle-icon {
  width: 22px;
  height: 22px;
  background: linear-gradient(135deg, #F5EFE9, #EAD7D1);
  border: 1px solid rgba(216, 189, 166, 0.6);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #8C6D53;
  box-shadow: 0 2px 8px rgba(216, 189, 166, 0.3);
}

.cookie-close-mini {
  background: none;
  border: none;
  color: #A99A90;
  font-size: 1.25rem;
  line-height: 1;
  padding: 4px;
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s ease;
}

.cookie-close-mini:hover {
  color: #1A1715;
  transform: rotate(90deg);
}

.cookie-title {
  font-family: var(--font-serif, 'Cormorant Garamond', serif);
  font-size: 1.35rem;
  font-weight: 600;
  color: #1A1715;
  letter-spacing: 0.02em;
  line-height: 1.25;
  margin: 0;
}

.cookie-text {
  font-family: var(--font-sans, 'Montserrat', sans-serif);
  font-size: 0.8125rem;
  line-height: 1.65;
  color: #70635B;
  font-weight: 300;
  margin: 0;
}

.cookie-text strong {
  font-weight: 600;
  color: #1A1715;
}

.cookie-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

/* Çekici Kabul Et Butonu — Altın Parıltı & Lüks Hissiyat */
.btn-cookie-accept {
  flex: 1;
  background: linear-gradient(135deg, #1A1715 0%, #2E2724 100%);
  color: #FAF7F4;
  border: 1px solid rgba(216, 189, 166, 0.5);
  padding: 13px 18px;
  border-radius: 6px;
  font-family: var(--font-sans, 'Montserrat', sans-serif);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(26, 23, 21, 0.18);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.btn-cookie-accept::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(216, 189, 166, 0.35) 50%,
    transparent 100%
  );
  transition: left 0.6s ease;
}

.btn-cookie-accept:hover {
  background: linear-gradient(135deg, #D8BDA6 0%, #C8A990 100%);
  color: #1A1715;
  border-color: #D8BDA6;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(216, 189, 166, 0.45);
}

.btn-cookie-accept:hover::before {
  left: 100%;
}

.btn-cookie-decline {
  background: transparent;
  color: #70635B;
  border: 1px solid rgba(216, 189, 166, 0.35);
  padding: 13px 16px;
  border-radius: 6px;
  font-family: var(--font-sans, 'Montserrat', sans-serif);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-cookie-decline:hover {
  background: rgba(216, 189, 166, 0.15);
  color: #1A1715;
  border-color: rgba(216, 189, 166, 0.7);
}

@media (max-width: 480px) {
  .luxury-cookie-modal {
    bottom: 16px;
    right: 16px;
    left: 16px;
    width: auto;
    padding: 20px 16px 16px;
    border-radius: 10px;
  }
  .cookie-title {
    font-size: 1.2rem;
  }
}

.skeleton-card {
  background: #FFFFFF;
  border: 1px solid rgba(216, 189, 166, 0.3);
  border-radius: 2px;
  overflow: hidden;
}

.skeleton-media {
  height: 330px;
  background: #F5EFE9;
  position: relative;
  overflow: hidden;
}

@media (min-width: 1025px) and (max-width: 1440px), (min-width: 1025px) and (max-height: 920px) {
  .skeleton-media {
    height: 250px;
  }
}

.skeleton-body {
  padding: 20px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skeleton-line {
  border-radius: 3px;
  background: #EDE4DC;
  position: relative;
  overflow: hidden;
}

.skeleton-line.w-30 { width: 30%; height: 10px; }
.skeleton-line.w-50 { width: 50%; height: 10px; }
.skeleton-line.w-70 { width: 70%; height: 12px; }
.skeleton-line.w-90 { width: 90%; height: 12px; }
.skeleton-line.w-100 { width: 100%; height: 12px; }
.skeleton-line.h-btn { width: 100%; height: 44px; border-radius: 2px; margin-top: 8px; }

/* Shimmer sweep animation */
.skeleton-media::after,
.skeleton-line::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.55) 50%,
    transparent 100%
  );
  transform: translateX(-100%);
  animation: shimmer 1.6s ease-in-out infinite;
}

.skeleton-line:nth-child(2)::after { animation-delay: 0.1s; }
.skeleton-line:nth-child(3)::after { animation-delay: 0.2s; }
.skeleton-line:nth-child(4)::after { animation-delay: 0.3s; }

@keyframes shimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Grid of skeleton cards */
.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
