/* ============================================
   R.K PLYWOOD & HARDWARE — WOW EFFECTS v3.0
   Cinematic + Playful Premium Animations
============================================ */

/* ══════════════════════════════════════════
   CATEGORY SHOWCASE STRIP (Below Hero)
══════════════════════════════════════════ */
.category-showcase {
  position: relative;
  padding: 80px 0 100px;
  background: linear-gradient(180deg, #0D0D0D 0%, #111118 40%, #0D0D0D 100%);
  overflow: hidden;
  z-index: 2;
}

.category-showcase::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(200,134,10,0.4), transparent);
}

.category-showcase .section-header {
  margin-bottom: 48px;
}

/* Floating ambient orbs behind the cards */
.showcase-ambient {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.showcase-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
  animation: orbFloat 14s ease-in-out infinite;
}

.showcase-orb:nth-child(1) {
  width: 400px; height: 400px;
  background: radial-gradient(circle, #C8860A, transparent 70%);
  top: -10%; left: 10%;
  animation-delay: 0s;
}

.showcase-orb:nth-child(2) {
  width: 300px; height: 300px;
  background: radial-gradient(circle, #7C3AED, transparent 70%);
  top: 30%; right: 5%;
  animation-delay: -4s;
}

.showcase-orb:nth-child(3) {
  width: 250px; height: 250px;
  background: radial-gradient(circle, #059669, transparent 70%);
  bottom: -10%; left: 40%;
  animation-delay: -8s;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(30px, -20px) scale(1.1); }
  50% { transform: translate(-20px, 15px) scale(0.95); }
  75% { transform: translate(15px, 25px) scale(1.05); }
}

/* Category Cards Grid */
.showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  position: relative;
  z-index: 2;
}

/* Individual Category Card */
.showcase-card {
  position: relative;
  border-radius: 20px;
  padding: 28px 20px 24px;
  text-align: center;
  cursor: pointer;
  overflow: hidden;
  background: rgba(28,28,28,0.6);
  border: 1px solid rgba(255,255,255,0.06);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  will-change: transform;
  transform-style: preserve-3d;
  perspective: 800px;
}

.showcase-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(200,134,10,0.3), transparent 50%, rgba(200,134,10,0.1));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.showcase-card:hover::before {
  opacity: 1;
}

/* Spotlight glow on hover */
.showcase-card::after {
  content: '';
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--card-glow, rgba(200,134,10,0.15)), transparent 70%);
  top: var(--my, 50%);
  left: var(--mx, 50%);
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

.showcase-card:hover {
  transform: translateY(-12px) scale(1.04);
  box-shadow:
    0 20px 60px rgba(0,0,0,0.5),
    0 0 30px var(--card-glow, rgba(200,134,10,0.15));
  border-color: rgba(200,134,10,0.2);
}

/* Icon container */
.showcase-icon {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  background: linear-gradient(135deg, var(--card-bg1, rgba(200,134,10,0.15)), var(--card-bg2, rgba(200,134,10,0.05)));
  border: 1px solid rgba(255,255,255,0.05);
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

.showcase-icon::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 20px;
  background: conic-gradient(from var(--angle, 0deg), transparent 60%, var(--card-glow, rgba(200,134,10,0.4)) 80%, transparent 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: -1;
  animation: rotateGlow 3s linear infinite;
}

.showcase-card:hover .showcase-icon::before {
  opacity: 1;
}

.showcase-card:hover .showcase-icon {
  transform: scale(1.15) rotateY(10deg);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

@property --angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

@keyframes rotateGlow {
  to { --angle: 360deg; }
}

.showcase-name {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: #F5F5F0;
  letter-spacing: 0.01em;
}

.showcase-count {
  font-size: 0.78rem;
  color: var(--primary);
  font-weight: 500;
  opacity: 0.8;
  padding: 4px 12px;
  border-radius: 99px;
  background: rgba(200,134,10,0.08);
  border: 1px solid rgba(200,134,10,0.12);
}

.showcase-arrow {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(200,134,10,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.showcase-arrow svg {
  width: 14px;
  height: 14px;
  stroke: var(--primary);
}

.showcase-card:hover .showcase-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* Confetti burst effect on hover */
.showcase-confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  opacity: 0;
}

.showcase-card:hover .confetti-piece {
  animation: confettiBurst 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.confetti-piece:nth-child(1) { background: #C8860A; left: 30%; top: 40%; --tx: -30px; --ty: -50px; --rot: 180deg; animation-delay: 0s; }
.confetti-piece:nth-child(2) { background: #F0A030; left: 50%; top: 30%; --tx: 20px; --ty: -60px; --rot: 240deg; animation-delay: 0.05s; }
.confetti-piece:nth-child(3) { background: #7C3AED; left: 70%; top: 45%; --tx: 40px; --ty: -40px; --rot: 120deg; animation-delay: 0.1s; }
.confetti-piece:nth-child(4) { background: #059669; left: 40%; top: 60%; --tx: -20px; --ty: -55px; --rot: 300deg; animation-delay: 0.07s; }
.confetti-piece:nth-child(5) { background: #E84040; left: 60%; top: 35%; --tx: 35px; --ty: -45px; --rot: 200deg; animation-delay: 0.12s; }

@keyframes confettiBurst {
  0% {
    opacity: 1;
    transform: translate(0, 0) rotate(0deg) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(var(--tx), var(--ty)) rotate(var(--rot)) scale(0.5);
  }
}


/* ══════════════════════════════════════════
   MORPHING GRADIENT BACKGROUND
══════════════════════════════════════════ */
.morph-gradient-bg {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(
    var(--morph-angle, 135deg),
    var(--morph-c1, rgba(200,134,10,0.03)) 0%,
    var(--morph-c2, rgba(124,58,237,0.02)) 50%,
    var(--morph-c3, rgba(5,150,105,0.02)) 100%
  );
  transition: all 4s ease;
}


/* ══════════════════════════════════════════
   CINEMA SCROLL REVEAL (Enhanced)
══════════════════════════════════════════ */
.cinema-reveal {
  opacity: 0;
  transform: translateY(80px) scale(0.95);
  filter: blur(8px);
  transition: all 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.cinema-reveal.revealed {
  opacity: 1;
  transform: none;
  filter: blur(0);
}

.cinema-reveal-left {
  opacity: 0;
  transform: translateX(-100px) rotateY(8deg);
  transition: all 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.cinema-reveal-left.revealed {
  opacity: 1;
  transform: none;
}

.cinema-reveal-right {
  opacity: 0;
  transform: translateX(100px) rotateY(-8deg);
  transition: all 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.cinema-reveal-right.revealed {
  opacity: 1;
  transform: none;
}

/* Stagger delays for showcase cards */
.showcase-card:nth-child(1) { transition-delay: 0.05s; }
.showcase-card:nth-child(2) { transition-delay: 0.10s; }
.showcase-card:nth-child(3) { transition-delay: 0.15s; }
.showcase-card:nth-child(4) { transition-delay: 0.20s; }
.showcase-card:nth-child(5) { transition-delay: 0.25s; }
.showcase-card:nth-child(6) { transition-delay: 0.30s; }


/* ══════════════════════════════════════════
   FLOATING 3D ELEMENTS
══════════════════════════════════════════ */
.float-3d-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  perspective: 1200px;
  overflow: hidden;
}

.float-3d-shape {
  position: absolute;
  border-radius: 12px;
  opacity: 0.06;
  animation: float3D var(--dur, 16s) ease-in-out infinite;
  transform-style: preserve-3d;
}

.float-3d-shape:nth-child(1) {
  width: 100px; height: 100px;
  background: linear-gradient(135deg, #C8860A, #F0A030);
  top: 15%; left: 8%;
  --dur: 18s;
  animation-delay: 0s;
}

.float-3d-shape:nth-child(2) {
  width: 70px; height: 70px;
  background: linear-gradient(135deg, #7C3AED, #A78BFA);
  top: 60%; right: 12%;
  --dur: 22s;
  animation-delay: -4s;
  border-radius: 50%;
}

.float-3d-shape:nth-child(3) {
  width: 50px; height: 50px;
  background: linear-gradient(135deg, #059669, #34D399);
  bottom: 25%; left: 25%;
  --dur: 20s;
  animation-delay: -8s;
}

.float-3d-shape:nth-child(4) {
  width: 80px; height: 80px;
  background: linear-gradient(135deg, #E84040, #FB923C);
  top: 40%; right: 30%;
  --dur: 24s;
  animation-delay: -12s;
  border-radius: 16px;
  transform: rotate(45deg);
}

@keyframes float3D {
  0%, 100% {
    transform: translateY(0) rotateX(0deg) rotateY(0deg) rotateZ(0deg);
  }
  25% {
    transform: translateY(-25px) rotateX(15deg) rotateY(-10deg) rotateZ(5deg);
  }
  50% {
    transform: translateY(10px) rotateX(-10deg) rotateY(15deg) rotateZ(-5deg);
  }
  75% {
    transform: translateY(-15px) rotateX(8deg) rotateY(-8deg) rotateZ(3deg);
  }
}


/* ══════════════════════════════════════════
   GRADIENT WAVE SEPARATOR
══════════════════════════════════════════ */
.gradient-wave {
  position: relative;
  width: 100%;
  height: 80px;
  overflow: hidden;
}

.gradient-wave svg {
  position: absolute;
  bottom: 0;
  width: 200%;
  height: 100%;
  animation: waveSlide 8s linear infinite;
}

.gradient-wave svg path {
  fill: url(#waveGrad);
}

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


/* ══════════════════════════════════════════
   SPRING BOUNCE BUTTONS (Enhanced)
══════════════════════════════════════════ */
.btn-bounce {
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.btn-bounce:hover {
  transform: translateY(-6px) scale(1.05) !important;
}

.btn-bounce:active {
  transform: translateY(-2px) scale(0.98) !important;
  transition-duration: 0.1s !important;
}


/* ══════════════════════════════════════════
   GLOWING BORDER ANIMATION (Section Cards)
══════════════════════════════════════════ */
.glow-border {
  position: relative;
}

.glow-border::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: conic-gradient(
    from var(--border-angle, 0deg),
    transparent 50%,
    rgba(200,134,10,0.5) 80%,
    transparent 100%
  );
  animation: borderGlow 4s linear infinite;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.glow-border:hover::before {
  opacity: 1;
}

@property --border-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

@keyframes borderGlow {
  to { --border-angle: 360deg; }
}


/* ══════════════════════════════════════════
   HERO PARTICLE RAIN (Enhanced)
══════════════════════════════════════════ */
.hero-spark {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(200,134,10,0.6);
  box-shadow: 0 0 6px rgba(200,134,10,0.4);
  pointer-events: none;
  animation: sparkRise var(--spark-dur, 8s) linear infinite;
}

@keyframes sparkRise {
  0% {
    transform: translateY(0) translateX(0) scale(1);
    opacity: 0;
  }
  10% { opacity: 1; }
  90% { opacity: 0.5; }
  100% {
    transform: translateY(-100vh) translateX(var(--spark-drift, 20px)) scale(0.3);
    opacity: 0;
  }
}


/* ══════════════════════════════════════════
   TEXT GRADIENT WAVE ANIMATION
══════════════════════════════════════════ */
.text-wave-gradient {
  background: linear-gradient(
    90deg,
    #C8860A 0%,
    #F0A030 20%,
    #E8C06A 40%,
    #F0A030 60%,
    #C8860A 80%,
    #A06B08 100%
  );
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: textWaveGrad 4s ease-in-out infinite;
}

@keyframes textWaveGrad {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}


/* ══════════════════════════════════════════
   ENHANCED PRODUCT CARD HOVER EFFECTS
══════════════════════════════════════════ */
.product-card.wow-card {
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.5s ease !important;
}

.product-card.wow-card:hover {
  box-shadow:
    0 24px 80px rgba(0,0,0,0.5),
    0 0 0 1px rgba(200,134,10,0.15),
    inset 0 1px 0 rgba(255,255,255,0.06) !important;
}


/* ══════════════════════════════════════════
   SCROLL-TRIGGERED COUNTER PULSE
══════════════════════════════════════════ */
.stat-number.counting {
  animation: countPulse 0.15s ease-in-out;
}

@keyframes countPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}


/* ══════════════════════════════════════════
   MAGNETIC GLOW CURSOR TRAIL
══════════════════════════════════════════ */
.cursor-trail {
  position: fixed;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(200,134,10,0.3);
  pointer-events: none;
  z-index: 9998;
  transition: transform 0.2s ease, opacity 0.4s ease;
}


/* ══════════════════════════════════════════
   WHY CARDS ENHANCED HOVER
══════════════════════════════════════════ */
.why-card {
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.5s ease,
              border-color 0.5s ease !important;
}

.why-card:hover {
  border-color: rgba(200,134,10,0.2) !important;
  box-shadow:
    0 20px 60px rgba(0,0,0,0.4),
    0 0 30px rgba(200,134,10,0.08) !important;
}

.why-card:hover .why-icon {
  transform: scale(1.3) rotate(-5deg);
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}


/* ══════════════════════════════════════════
   SCROLL PROGRESS GLOW
══════════════════════════════════════════ */
.scroll-progress-bar {
  box-shadow: 0 0 12px rgba(200,134,10,0.6),
              0 0 24px rgba(200,134,10,0.3) !important;
}


/* ══════════════════════════════════════════
   NAVBAR GLASS MORPH UPGRADE
══════════════════════════════════════════ */
.navbar.scrolled {
  backdrop-filter: blur(24px) saturate(1.6) !important;
  -webkit-backdrop-filter: blur(24px) saturate(1.6) !important;
  box-shadow: 0 4px 30px rgba(0,0,0,0.5), 0 1px 0 rgba(200,134,10,0.08) !important;
}


/* ══════════════════════════════════════════
   CATALOG CTA BANNER ENHANCED
══════════════════════════════════════════ */
.catalog-cta-banner {
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.catalog-cta-banner:hover {
  transform: translateY(-6px) !important;
}


/* ══════════════════════════════════════════
   GALLERY HOVER ZOOM
══════════════════════════════════════════ */
.gallery-item .gallery-img-wrap img {
  transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

.gallery-item:hover .gallery-img-wrap img {
  transform: scale(1.1) !important;
}


/* ══════════════════════════════════════════
   FOOTER GLOW LINE
══════════════════════════════════════════ */
.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(200,134,10,0.3), rgba(124,58,237,0.2), transparent);
  animation: footerGlow 6s ease-in-out infinite;
}

@keyframes footerGlow {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}


/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */
@media (max-width: 768px) {
  .showcase-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .showcase-card {
    padding: 20px 14px 18px;
  }

  .showcase-icon {
    width: 56px;
    height: 56px;
    font-size: 1.5rem;
  }

  .showcase-name {
    font-size: 0.88rem;
  }

  .showcase-count {
    font-size: 0.72rem;
  }

  .category-showcase {
    padding: 50px 0 70px;
  }

  .float-3d-container { display: none; }
}

@media (max-width: 480px) {
  .showcase-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .showcase-card {
    padding: 16px 10px 14px;
    border-radius: 14px;
  }

  .showcase-icon {
    width: 48px;
    height: 48px;
    font-size: 1.3rem;
    border-radius: 12px;
  }

  .showcase-arrow { display: none; }
}
