/* =============================================
   KANAFAA HOME - Modern Animations & Effects
   Advanced CSS Animations v3.0 - Imperial Grade
   ============================================= */

/* ---- Smooth Scroll ---- */
html { scroll-behavior: smooth; }

/* ---- Page Entrance Overlay ---- */
#page-reveal {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  animation: pageRevealFade 1.2s cubic-bezier(0.85, 0, 0.15, 1) 1.2s forwards;
}

[data-theme="dark"] #page-reveal {
  background: rgba(18, 18, 30, 0.4);
}

@keyframes pageRevealFade {
  to { opacity: 0; visibility: hidden; }
}

.reveal-logo {
  width: 120px;
  animation: logoBreath 1.5s ease-in-out infinite alternate;
}

@keyframes logoBreath {
  from { transform: scale(0.9); opacity: 0.6; filter: blur(2px); }
  to   { transform: scale(1.1); opacity: 1; filter: blur(0); }
}

/* ---- Scroll-Triggered Reveal Animations ---- */
@keyframes revealUp {
  0%   { opacity: 0; transform: translateY(60px) scale(0.96); filter: blur(4px); }
  100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

@keyframes revealLeft {
  0%   { opacity: 0; transform: translateX(-60px) scale(0.96); filter: blur(4px); }
  100% { opacity: 1; transform: translateX(0) scale(1); filter: blur(0); }
}

@keyframes revealRight {
  0%   { opacity: 0; transform: translateX(60px) scale(0.96); filter: blur(4px); }
  100% { opacity: 1; transform: translateX(0) scale(1); filter: blur(0); }
}

@keyframes revealScale {
  0%   { opacity: 0; transform: scale(0.85) rotate(-1deg); filter: blur(6px); }
  60%  { opacity: 1; filter: blur(0); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); filter: blur(0); }
}

@keyframes revealFade {
  0%   { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ---- Scroll Reveal Classes ---- */
[data-reveal] {
  opacity: 0;
  will-change: transform, opacity;
}

[data-reveal="up"] { transform: translateY(60px) scale(0.96); filter: blur(4px); }
[data-reveal="left"] { transform: translateX(-60px) scale(0.96); filter: blur(4px); }
[data-reveal="right"] { transform: translateX(60px) scale(0.96); filter: blur(4px); }
[data-reveal="scale"] { transform: scale(0.85) rotate(-1deg); filter: blur(6px); }
[data-reveal="fade"] { transform: translateY(20px); }

[data-reveal].revealed {
  opacity: 1;
  transform: none;
  filter: none;
  transition: 
    opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.6s ease;
}

[data-reveal][data-delay="1"] { transition-delay: 0.1s; }
[data-reveal][data-delay="2"] { transition-delay: 0.2s; }
[data-reveal][data-delay="3"] { transition-delay: 0.3s; }
[data-reveal][data-delay="4"] { transition-delay: 0.4s; }
[data-reveal][data-delay="5"] { transition-delay: 0.5s; }
[data-reveal][data-delay="6"] { transition-delay: 0.6s; }

/* ---- Hero Particle Canvas ---- */
#hero-particles {
  position: absolute;
  inset: 0;
  z-index: 7;
  pointer-events: none;
  opacity: 0.6;
}

/* ---- Magnetic Button Effect ---- */
.magnetic-btn {
  position: relative;
  transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
  transform-origin: center;
}

/* ---- Glass Morphism Cards ---- */
.glass-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .glass-card {
  background: rgba(0, 0, 0, 0.25);
  border-color: rgba(255, 255, 255, 0.08);
}

/* ---- Staggered Text Animation ---- */
@keyframes textRevealWord {
  0%   { opacity: 0; transform: translateY(100%) rotateX(-40deg); }
  100% { opacity: 1; transform: translateY(0) rotateX(0deg); }
}

.text-reveal-wrapper {
  overflow: hidden;
  display: inline-block;
}

.text-reveal-word {
  display: inline-block;
  animation: textRevealWord 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* ---- Product Card Advanced Hover ---- */
.product-card {
  transition: 
    transform 0.5s cubic-bezier(0.23, 1, 0.32, 1),
    box-shadow 0.5s cubic-bezier(0.23, 1, 0.32, 1),
    border-color 0.3s ease;
}

.product-card:hover {
  transform: translateY(-12px) !important;
  box-shadow: 
    0 30px 60px rgba(179, 155, 125, 0.15),
    0 15px 30px rgba(0, 0, 0, 0.1) !important;
}

.product-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(179,155,125,0.05), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.product-card:hover::after {
  opacity: 1;
}

/* ---- Ripple Effect on Buttons ---- */
.btn-primary,
.btn-outline,
.prod-cart-btn,
.filter-tab {
  position: relative;
  overflow: hidden;
}

.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transform: scale(0);
  animation: rippleEffect 0.6s linear;
  pointer-events: none;
}

@keyframes rippleEffect {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* ---- Floating Orbs Background ---- */
.floating-orbs {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 1;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.15;
  animation: orbFloat var(--duration, 8s) ease-in-out infinite alternate;
}

@keyframes orbFloat {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(30px, -40px) scale(1.1); }
  66%  { transform: translate(-20px, 20px) scale(0.95); }
  100% { transform: translate(15px, -30px) scale(1.05); }
}

/* ---- Skeleton Loading ---- */
@keyframes skeletonShimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-2) 25%,
    var(--bg-3) 37%,
    var(--bg-2) 63%
  );
  background-size: 400% 100%;
  animation: skeletonShimmer 1.4s ease infinite;
  border-radius: var(--radius-sm);
}

/* ---- Number Counter Enhanced ---- */
.stat-num {
  background: linear-gradient(135deg, var(--gold), #836e52);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 2.8rem !important;
  font-weight: 800 !important;
}

.stat-item {
  position: relative;
  overflow: hidden;
}

.stat-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.stat-item:hover::before {
  transform: scaleX(1);
}

/* ---- Section Tag Pulse ---- */
@keyframes tagPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(179, 155, 125, 0.4); }
  50%       { box-shadow: 0 0 0 8px rgba(179, 155, 125, 0); }
}

.section-tag {
  animation: tagPulse 2.5s ease infinite;
  transition: all 0.3s ease;
}

.section-tag:hover {
  background: rgba(179,155,125,0.2);
  transform: scale(1.05);
}

/* ---- Liquid Background Blobs ---- */
.liquid-blobs {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

.blob {
  position: absolute;
  width: 500px;
  height: 500px;
  background: linear-gradient(135deg, var(--gold-dim), transparent);
  border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
  filter: blur(80px);
  animation: blobMorph 15s linear infinite alternate;
  opacity: 0.2;
}

@keyframes blobMorph {
  0% { border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; transform: translate(0, 0) rotate(0deg); }
  50% { border-radius: 60% 40% 30% 70% / 50% 60% 40% 60%; transform: translate(50px, 100px) rotate(90deg); }
  100% { border-radius: 30% 70% 40% 60% / 60% 40% 50% 40%; transform: translate(-50px, 50px) rotate(180deg); }
}

.blob-1 { top: -10%; left: -10%; background: radial-gradient(circle, var(--gold) 0%, transparent 70%); }
.blob-2 { bottom: -10%; right: -10%; background: radial-gradient(circle, #836e52 0%, transparent 70%); animation-delay: -5s; }

/* ---- Feature Card Enhanced ---- */
.feature-card {
  position: relative;
  overflow: hidden;
  transition: 
    transform 0.5s cubic-bezier(0.23, 1, 0.32, 1),
    box-shadow 0.5s cubic-bezier(0.23, 1, 0.32, 1),
    border-color 0.3s ease;
}

.feature-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), #836e52);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.feature-card:hover::after {
  transform: scaleX(1);
}

.feature-card:hover {
  transform: translateY(-14px) !important;
  box-shadow: 
    0 30px 60px rgba(179, 155, 125, 0.12),
    0 15px 30px rgba(0, 0, 0, 0.08) !important;
}

/* ---- Feat Icon Animated Ring ---- */
.feat-icon {
  position: relative;
}

.feat-icon::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.feature-card:hover .feat-icon::after {
  opacity: 0.5;
  transform: scale(1.1);
}

/* ---- Category Card Enhanced ---- */
.cat-card {
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.cat-card:hover {
  transform: scale(1.02) !important;
  z-index: 2;
}

.cat-card img {
  transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.cat-card:hover img {
  transform: scale(1.12) !important;
}

/* ---- Gallery Enhanced Hover ---- */
.gal-item {
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.gal-item:hover {
  transform: scale(1.02);
  z-index: 2;
}

/* ---- Scroll Progress Bar ---- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), #836e52, var(--gold));
  background-size: 200% 100%;
  animation: progressGlow 2s linear infinite;
  z-index: 9999;
  transition: width 0.1s linear;
}

@keyframes progressGlow {
  0%   { background-position: 0% center; }
  100% { background-position: 200% center; }
}

/* ---- Cursor Glow Effect ---- */
.cursor-glow {
  position: fixed;
  width: 300px;
  height: 300px;
  pointer-events: none;
  z-index: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(179, 155, 125, 0.06) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease;
  mix-blend-mode: normal;
}

@media (hover: none) {
  .cursor-glow { display: none; }
}

/* ---- Tilt Effect for Cards ---- */
.tilt-card {
  transform-style: preserve-3d;
  perspective: 1000px;
}

/* ---- Nav Link Underline Animated ---- */
.nav-list > li > a {
  position: relative;
  overflow: hidden;
}

.nav-list > li > a::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), transparent);
  transform: translateX(-101%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-list > li:hover > a::before,
.nav-list > li > a.active::before {
  transform: translateX(0);
}

/* ---- Logo Hover Animation ---- */
.header-inner .logo img {
  transition: transform 0.4s ease;
}

.header-inner .logo:hover img {
  transform: scale(1.08) rotate(-2deg) !important;
  filter: drop-shadow(0 4px 12px rgba(179, 155, 125, 0.3));
}

/* ---- Search Bar Focus Glow ---- */
.search-bar {
  transition: 
    border-color 0.3s ease,
    box-shadow 0.4s ease,
    transform 0.3s ease;
}

.search-bar:focus-within {
  transform: scale(1.02) !important;
  box-shadow: 
    0 0 0 3px rgba(179,155,125,0.15),
    0 8px 24px rgba(179, 155, 125, 0.1) !important;
}

/* ---- Cart Button Shake Animation ---- */
@keyframes cartShake {
  0%, 100% { transform: rotate(0deg); }
  20%       { transform: rotate(-8deg); }
  40%       { transform: rotate(8deg); }
  60%       { transform: rotate(-4deg); }
  80%       { transform: rotate(4deg); }
}

.cart-btn-modern.shake {
  animation: cartShake 0.5s ease;
}

/* ---- Footer Social Hover ---- */
.footer-social a {
  position: relative;
  overflow: hidden;
}

.footer-social a::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  transform: scale(0);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.footer-social a[title="Facebook"]::before { background: #1877F2; }
.footer-social a[title="Instagram"]::before { background: #E4405F; }
.footer-social a[title="TikTok"]::before { background: #000; }

.footer-social a:hover::before { transform: scale(1); }
.footer-social a:hover i { position: relative; z-index: 1; }

/* ---- Back to Top Animated ---- */
/* Moved floating button styles to furnhome.css to avoid conflicts */

/* ---- Testimonial Card Enhanced ---- */
.testi-card {
  position: relative;
  overflow: hidden;
  transition: 
    transform 0.5s cubic-bezier(0.23, 1, 0.32, 1),
    box-shadow 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.testi-card::before {
  content: '"';
  position: absolute;
  top: -20px;
  right: 20px;
  font-size: 8rem;
  color: var(--gold);
  opacity: 0.06;
  font-family: Georgia, serif;
  line-height: 1;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.5s ease;
}

html[lang="ar"] .testi-card::before { right: auto; left: 20px; }

.testi-card:hover::before {
  opacity: 0.12;
  transform: scale(1.1) rotate(-5deg);
}

.testi-card:hover {
  transform: translateY(-8px) !important;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.1) !important;
}

/* ---- Image Reveal on Load ---- */
@keyframes imageReveal {
  0%   { clip-path: inset(0 100% 0 0); }
  100% { clip-path: inset(0 0% 0 0); }
}

@keyframes imageRevealAR {
  0%   { clip-path: inset(0 0 0 100%); }
  100% { clip-path: inset(0 0 0 0%); }
}

/* ---- Promo Section Enhanced ---- */
.promo-inner {
  position: relative;
  overflow: hidden;
}

.promo-inner::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -100px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(179, 155, 125, 0.15), transparent 70%);
  transform: translateY(-50%);
  pointer-events: none;
  animation: orbFloat 6s ease-in-out infinite alternate;
}

html[lang="ar"] .promo-inner::after { right: auto; left: -100px; }

/* ---- Smooth Page Transitions ---- */
body {
  animation: pageEnter 1.2s cubic-bezier(0.23, 1, 0.32, 1);
}

@keyframes pageEnter {
  from { opacity: 0; transform: translateY(15px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- Enhanced Section Headers ---- */
.section-header h2 {
  position: relative;
  display: inline-block;
}

.section-header h2::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  border-radius: 2px;
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.3s;
}

.section-header.revealed h2::after,
.section-header h2:hover::after {
  width: 60%;
}

/* ---- Gradient Text Effect ---- */
.gradient-text {
  background: linear-gradient(135deg, var(--gold), #836e52, var(--gold));
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientFlow 4s linear infinite;
}

@keyframes gradientFlow {
  0%   { background-position: 0% center; }
  100% { background-position: 200% center; }
}

/* ---- Side Cart Slide Animation Enhanced ---- */
.side-cart {
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.side-cart:not(.active) {
  transform: translateX(100%);
}

[lang="ar"] .side-cart:not(.active) {
  transform: translateX(-100%);
}

.side-cart.active {
  transform: translateX(0) !important;
}

/* ---- Header Scroll Effect ---- */
#header.scrolled {
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.12) !important;
  background: rgba(255, 255, 255, 0.7) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

[data-theme="dark"] #header.scrolled {
  background: rgba(13, 13, 24, 0.7) !important;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

/* ---- Product Image Zoom Smooth ---- */
.prod-img {
  overflow: hidden;
}

.prod-img img {
  transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
  will-change: transform;
}

.product-card:hover .prod-img img {
  transform: scale(1.1) !important;
}

/* ---- Badge Animate In ---- */
@keyframes badgeIn {
  0%   { transform: scale(0) rotate(-15deg); }
  70%  { transform: scale(1.15) rotate(5deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.prod-badge {
  animation: badgeIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* ---- Filter Tab Active State Enhanced ---- */
.filter-tab {
  position: relative;
  overflow: hidden;
  transition: 
    background 0.3s ease,
    color 0.3s ease,
    border-color 0.3s ease,
    transform 0.2s ease,
    box-shadow 0.3s ease;
}

.filter-tab:hover {
  transform: translateY(-2px);
}

.filter-tab.active {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(179, 155, 125, 0.35) !important;
}

/* ---- Loader Enhanced (Truck Design) ---- */
#loader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 2147483647;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  transition: opacity 1s cubic-bezier(0.23, 1, 0.32, 1), visibility 1s;
}

#loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader {
  width: fit-content;
  height: fit-content;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.truckWrapper {
  width: 200px;
  height: 100px;
  display: flex;
  flex-direction: column;
  position: relative;
  align-items: center;
  justify-content: flex-end;
  overflow-x: hidden;
}

.truckBody {
  width: 130px;
  height: auto;
  margin-bottom: 6px;
  animation: motion 1s linear infinite;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

.truckBody path {
  fill: var(--gold) !important;
}

@keyframes motion {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(3px); }
}

.truckTires {
  width: 130px;
  height: fit-content;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0px 10px 0px 15px;
  position: absolute;
  bottom: 0;
}

.truckTires svg, .truckTire {
  width: 24px;
  animation: spin 0.6s linear infinite;
}

.truckTire circle {
  fill: var(--charcoal);
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.road {
  width: 100%;
  height: 2px;
  background-color: var(--charcoal);
  position: relative;
  bottom: 0;
  align-self: flex-end;
  border-radius: 3px;
  margin-top: 2px;
}

.road::before, .road::after {
  content: "";
  position: absolute;
  height: 100%;
  background-color: var(--gold-dim);
  border-radius: 3px;
  animation: roadAnimation 1.4s linear infinite;
}

.road::before {
  width: 20px;
  right: -50%;
  border-left: 10px solid var(--bg);
}

.road::after {
  width: 10px;
  right: -65%;
  border-left: 4px solid var(--bg);
}

.lampPost {
  position: absolute;
  bottom: 0;
  right: -90%;
  height: 90px;
  animation: roadAnimation 1.4s linear infinite;
}

.lampSvg path {
  fill: var(--gold-dim);
}

@keyframes roadAnimation {
  0% { transform: translateX(0px); }
  100% { transform: translateX(-350px); }
}

/* Add loading text */
#loader::after {
  content: 'KANAFA HOME...';
  position: absolute;
  bottom: 20%;
  font-family: 'Tajawal', sans-serif;
  letter-spacing: 4px;
  color: var(--gold);
  font-weight: 700;
  font-size: 0.9rem;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.4; transform: scale(0.98); }
  50% { opacity: 1; transform: scale(1.02); }
}


/* ---- Modal Enhanced ---- */
.product-modal {
  backdrop-filter: blur(0px);
  transition: opacity 0.4s ease, backdrop-filter 0.4s ease, visibility 0.4s ease;
}

.product-modal.visible {
  backdrop-filter: blur(4px);
}

.modal-content {
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease;
}

/* ---- Scroll Snap for Slider ---- */
.hero-slider {
  position: relative;
}

/* ---- Animated Dots for Slider ---- */
.dot {
  transition: 
    width 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    background 0.3s ease;
  cursor: pointer;
}

.dot.active {
  animation: dotExpand 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

@keyframes dotExpand {
  0%   { width: 8px; }
  50%  { width: 32px; }
  100% { width: 24px; }
}

/* ---- Animated Border for Highlighted Elements ---- */
@keyframes borderRotate {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.animated-border {
  position: relative;
}

.animated-border::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--gold), #836e52, var(--gold), #836e52);
  background-size: 300% 300%;
  animation: borderRotate 3s ease infinite;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s;
}

.animated-border:hover::before {
  opacity: 1;
}

/* ---- Text Scramble Animation ---- */
@keyframes textScramble {
  0%   { opacity: 0; }
  50%  { opacity: 0.6; }
  100% { opacity: 1; }
}

/* ---- Number Animation ---- */
@keyframes countUp {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

.stat-num.counting {
  animation: countUp 0.4s ease;
}

/* ---- Promo Tag Shimmer ---- */
.promo-tag {
  position: relative;
  overflow: hidden;
}

.promo-tag::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: promoShimmer 3s ease infinite;
}

@keyframes promoShimmer {
  0%   { left: -100%; }
  100% { left: 200%; }
}

/* ---- Section Divider Wave ---- */
.wave-divider {
  position: relative;
  overflow: hidden;
}

.wave-divider::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 200%;
  height: 60px;
  background: var(--bg);
  border-radius: 50% 50% 0 0;
  animation: waveMove 4s linear infinite;
  transform-origin: bottom center;
}

@keyframes waveMove {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ---- Mobile Touch Feedback ---- */
@media (hover: none) {
  .product-card:active {
    transform: scale(0.98) !important;
    transition: transform 0.1s ease;
  }
  
  .btn-primary:active,
  .btn-outline:active {
    transform: scale(0.96) !important;
    transition: transform 0.1s ease;
  }
  
  .filter-tab:active {
    transform: scale(0.96) !important;
  }
}

/* ---- Typed Text Cursor ---- */
.typed-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--gold);
  animation: cursorBlink 1s ease infinite;
  vertical-align: text-bottom;
  margin-left: 2px;
}

@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ---- Stagger Children Animation ---- */
.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
}

.stagger-children.revealed > * {
  animation: revealFade 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.stagger-children.revealed > *:nth-child(1) { animation-delay: 0.05s; }
.stagger-children.revealed > *:nth-child(2) { animation-delay: 0.10s; }
.stagger-children.revealed > *:nth-child(3) { animation-delay: 0.15s; }
.stagger-children.revealed > *:nth-child(4) { animation-delay: 0.20s; }
.stagger-children.revealed > *:nth-child(5) { animation-delay: 0.25s; }
.stagger-children.revealed > *:nth-child(6) { animation-delay: 0.30s; }

/* ---- Enhanced AOS (override) ---- */
[data-aos] {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-aos].visible {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* ---- Header Glass Effect on Scroll ---- */
#header {
  transition: 
    box-shadow 0.4s ease,
    background 0.4s ease,
    border-color 0.4s ease;
}

/* ---- Reduce Motion Accessibility ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .scroll-progress { display: none; }
  .cursor-glow { display: none; }
  .orb { animation: none; }
  .whatsapp-float::before { animation: none; }
}
