/* ════════════════════════════════════════════════════════
   ALBIR — animations.css
   Keyframes, micro-interactions, ambient ornaments
════════════════════════════════════════════════════════ */

/* ── Hero Entrance (GSAP targets) ───────────────────── */
/* will-change removed — it creates compositing layers in Chrome
   that block pointer events on elements beneath them */

/* ── Floating Zanzibar Ornaments ─────────────────────
   These SVG orbs drift slowly across the hero background.
   Each has a unique path combining float + drift. */

.hero__particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

.hero__orb {
  position: absolute;
  pointer-events: none;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

/* Orb 1 — large, slow diagonal drift from bottom-right → top-left */
.hero__orb--1 {
  bottom: 15%;
  right: 8%;
  animation: orbDrift1 22s linear infinite;
}

/* Orb 2 — small diamond, mid-speed, left side upward */
.hero__orb--2 {
  top: 60%;
  left: 12%;
  animation: orbDrift2 16s linear infinite;
  animation-delay: -6s;
}

/* Orb 3 — gold 8-star, slow, crossing right-to-left */
.hero__orb--3 {
  top: 30%;
  right: -80px;
  animation: orbCross 28s linear infinite;
  animation-delay: -10s;
}

/* Orb 4 — circle, fast-ish, floats upward */
.hero__orb--4 {
  bottom: 30%;
  left: 40%;
  animation: orbFloat 12s ease-in-out infinite;
  animation-delay: -4s;
}

/* Orb 5 — large gold star, very slow crossing */
.hero__orb--5 {
  top: 10%;
  right: -100px;
  animation: orbCross 38s linear infinite;
  animation-delay: -18s;
}

/* Orb 6 — line ornament, mid drift */
.hero__orb--6 {
  top: 70%;
  left: -120px;
  animation: orbCrossReverse 25s linear infinite;
  animation-delay: -8s;
}

@keyframes orbCross {
  0%   { transform: translateX(0) translateY(0) rotate(0deg); opacity: 0; }
  5%   { opacity: 1; }
  95%  { opacity: 1; }
  100% { transform: translateX(-110vw) translateY(-60px) rotate(30deg); opacity: 0; }
}

@keyframes orbCrossReverse {
  0%   { transform: translateX(0) translateY(0) rotate(0deg); opacity: 0; }
  5%   { opacity: 1; }
  95%  { opacity: 1; }
  100% { transform: translateX(110vw) translateY(-80px) rotate(-20deg); opacity: 0; }
}

@keyframes orbDrift1 {
  0%   { transform: translateY(0) translateX(0) rotate(0deg); opacity: 0.8; }
  50%  { transform: translateY(-40px) translateX(-20px) rotate(18deg); opacity: 0.5; }
  100% { transform: translateY(0) translateX(0) rotate(0deg); opacity: 0.8; }
}

@keyframes orbDrift2 {
  0%   { transform: translateY(0) rotate(0deg); opacity: 0.6; }
  50%  { transform: translateY(-30px) rotate(45deg); opacity: 0.3; }
  100% { transform: translateY(0) rotate(0deg); opacity: 0.6; }
}

@keyframes orbFloat {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.5; }
  50%       { transform: translateY(-24px) scale(1.1); opacity: 0.3; }
}

/* ── Door star pulse ─────────────────────────────────── */
.door-star {
  transform-origin: 150px 130px;
  animation: doorStarSpin 20s linear infinite;
}

@keyframes doorStarSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ── AOS custom easing overrides ─────────────────────── */
[data-aos] { backface-visibility: hidden; }

/* ── Scroll-reveal text ───────────────────────────────── */
.reveal-text { overflow: hidden; }
.reveal-text span {
  display: block;
  transform: translateY(100%);
  transition: transform 0.7s var(--ease);
}
.reveal-text.revealed span { transform: translateY(0); }

/* ── Gold shimmer on hover ────────────────────────────── */
.shimmer-hover {
  position: relative;
  overflow: hidden;
}
.shimmer-hover::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(200,169,110,0.15), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s var(--ease);
  pointer-events: none;
  z-index: 2;
}
.shimmer-hover:hover::before { left: 150%; }

/* ── Pulse ring (cart badge) ──────────────────────────── */
@keyframes pulseRing {
  0%   { box-shadow: 0 0 0 0 rgba(200,169,110,0.4); }
  70%  { box-shadow: 0 0 0 8px rgba(200,169,110,0); }
  100% { box-shadow: 0 0 0 0 rgba(200,169,110,0); }
}
.pulse { animation: pulseRing 1.2s ease-out; }

/* ── Success checkmark animation ─────────────────────── */
.checkmark-circle {
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  stroke-width: 2;
  stroke-miterlimit: 10;
  stroke: var(--black);
  fill: none;
  animation: checkmarkStroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) 0.3s forwards;
}

.checkmark {
  width: 80px; height: 80px;
  border-radius: 50%;
  display: block;
  stroke-width: 2;
  stroke: var(--white);
  stroke-miterlimit: 10;
  background: var(--black);
  box-shadow: inset 0 0 0 var(--black);
  animation: checkmarkFill 0.4s ease-in-out 0.8s forwards,
             checkmarkScale 0.3s ease-in-out 1.1s both;
}

.checkmark__check {
  transform-origin: 50% 50%;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: checkmarkStroke 0.4s cubic-bezier(0.65, 0, 0.45, 1) 0.9s forwards;
}

@keyframes checkmarkStroke { 100% { stroke-dashoffset: 0; } }
@keyframes checkmarkScale {
  0%, 100% { transform: none; }
  50%       { transform: scale3d(1.1, 1.1, 1); }
}
@keyframes checkmarkFill {
  100% { box-shadow: inset 0 0 0 50px var(--black); }
}

/* ── Loading dots ─────────────────────────────────────── */
.loading-dots {
  display: inline-flex;
  gap: 5px;
  align-items: center;
}
.loading-dots span {
  width: 6px; height: 6px;
  background: currentColor;
  border-radius: 50%;
  animation: dotBounce 1.2s ease-in-out infinite;
}
.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotBounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40%            { transform: scale(1);   opacity: 1; }
}

/* ── Stagger children ─────────────────────────────────── */
.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.stagger-children.visible > *:nth-child(1) { transition-delay: 0s;    opacity: 1; transform: none; }
.stagger-children.visible > *:nth-child(2) { transition-delay: 0.1s;  opacity: 1; transform: none; }
.stagger-children.visible > *:nth-child(3) { transition-delay: 0.2s;  opacity: 1; transform: none; }
.stagger-children.visible > *:nth-child(4) { transition-delay: 0.3s;  opacity: 1; transform: none; }
.stagger-children.visible > *:nth-child(5) { transition-delay: 0.4s;  opacity: 1; transform: none; }
.stagger-children.visible > *:nth-child(6) { transition-delay: 0.5s;  opacity: 1; transform: none; }

/* ── Islamic Pattern Background ─────────────────────── */
.islamic-pattern-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.islamic-pattern-bg > * {
  width: 100%; height: 100%;
}

/* ── Scroll line in hero ──────────────────────────────── */
@keyframes scrollLine {
  0%   { transform: scaleY(1); transform-origin: top; }
  50%  { transform: scaleY(0); transform-origin: top; }
  51%  { transform: scaleY(0); transform-origin: bottom; }
  100% { transform: scaleY(1); transform-origin: bottom; }
}

/* ════════════════════════════════════════════════════════
   BMCC-STYLE MICRO-INTERACTIONS
   Enhanced hover states, lifts, glows, and transitions
════════════════════════════════════════════════════════ */

/* ── Product card enhanced lift ──────────────────────── */
.product-card {
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
  border-radius: var(--radius-md);
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.12);
}

/* Gold accent glow on card image wrap hover */
.product-card__image-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-md);
  box-shadow: inset 0 0 0 0 rgba(200,169,110,0);
  transition: box-shadow 0.4s var(--ease);
  pointer-events: none;
  z-index: 2;
}
.product-card:hover .product-card__image-wrap::after {
  box-shadow: inset 0 0 0 1.5px rgba(200,169,110,0.5);
}

/* ── Button glow on primary / accent hover ───────────── */
.btn--primary:hover {
  box-shadow: 0 8px 28px rgba(0,0,0,0.22), 0 2px 8px rgba(0,0,0,0.14);
}
.btn--accent:hover {
  box-shadow: 0 8px 28px rgba(200,169,110,0.35);
}
.btn--outline-white:hover {
  box-shadow: 0 6px 20px rgba(255,255,255,0.15);
}

/* ── Category tile enhanced ──────────────────────────── */
.category-tile {
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
}
.category-tile:hover {
  transform: scale(1.02) translateY(-4px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}

/* ── Section heading slide-in line ──────────────────── */
.section-label {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
}
.section-label::before {
  content: '';
  display: inline-block;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.6s var(--ease);
  vertical-align: middle;
}
[data-aos="fade-up"].aos-animate .section-label::before,
.section-label.visible::before {
  width: 28px;
}

/* ── Tilt card on hover (subtle 3-D feel) ────────────── */
.product-card {
  perspective: 800px;
}

/* ── Navigation link underline slide ────────────────── */
.nav-link::after {
  transition: width 0.35s var(--ease);
}

/* ── Footer social link bounce ───────────────────────── */
.social-link {
  transition:
    border-color var(--transition),
    color var(--transition),
    transform 0.3s var(--ease-bounce),
    box-shadow var(--transition);
}
.social-link:hover {
  transform: translateY(-3px) scale(1.08);
  box-shadow: 0 6px 20px rgba(200,169,110,0.2);
}

/* ── Cart badge pop ──────────────────────────────────── */
@keyframes cartBadgePop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.55); }
  70%  { transform: scale(0.9); }
  100% { transform: scale(1); }
}
.cart-badge.pop {
  animation: cartBadgePop 0.45s var(--ease-bounce) forwards;
}

/* ── Number counter ripple ───────────────────────────── */
@keyframes countUp {
  from { transform: translateY(6px); opacity: 0; }
  to   { transform: translateY(0);   opacity: 1; }
}
.count-updated {
  animation: countUp 0.3s var(--ease-bounce) forwards;
}

/* ── Image shimmer loading placeholder ──────────────── */
@keyframes shimmerLoad {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}
.img-loading {
  background: linear-gradient(
    90deg,
    var(--gray-100) 25%,
    var(--gray-200) 50%,
    var(--gray-100) 75%
  );
  background-size: 200% 100%;
  animation: shimmerLoad 1.4s ease-in-out infinite;
}

/* ── Focus ring pulse for accessibility ──────────────── */
@keyframes focusPulse {
  0%, 100% { outline-offset: 2px; }
  50%       { outline-offset: 5px; }
}

/* ── Drawer slide entrance ───────────────────────────── */
.cart-drawer {
  transition: transform 0.42s cubic-bezier(0.32, 0.72, 0, 1);
}

/* ── Toast upgrade ───────────────────────────────────── */
.toast {
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.08);
}

/* ── Scroll-triggered fade for sections ─────────────── */
@keyframes sectionFadeUp {
  from { opacity: 0; transform: translateY(32px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Header scroll shrink ────────────────────────────── */
.site-header {
  transition:
    box-shadow var(--transition),
    background var(--transition),
    height 0.3s var(--ease);
}
.site-header.scrolled {
  --header-h: 58px;
}

/* ── Link underline animation (nav + footer) ─────────── */
.footer-links a {
  position: relative;
  display: inline-block;
}
.footer-links a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.3s var(--ease);
}
.footer-links a:hover::after { width: 100%; }
