/* ============================================================
   ZOYA & ZARA Flowers — World-Class Luxury Preloader & UI Polish
   Haute Floristry • Dubai Atelier Design System (Awwwards Grade)
   ============================================================ */

/* ---------------- CSS Variables ---------------- */
:root {
  --zz-gold: #D4AF37;
  --zz-gold-light: #F7E7B4;
  --zz-gold-dark: #997A15;
  --zz-velvet: #16020A;
  --zz-velvet-deep: #0A0105;
  --zz-rose: #D80064;
  --zz-rose-light: #FFF0F5;
  --zz-cream: #FAF7F2;
  --zz-glass: rgba(255, 255, 255, 0.85);
  --zz-ease-luxury: cubic-bezier(0.77, 0, 0.175, 1);
  --zz-ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------------- Custom Luxury Scrollbar ---------------- */
::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}
::-webkit-scrollbar-track {
  background: #18030e;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #c5a059 0%, #8c6b2d 100%);
  border-radius: 9999px;
  border: 2px solid #18030e;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #f3d686 0%, #c5a059 100%);
}

/* ---------------- Preloader Overlay Structure ---------------- */
#zz-preloader {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100vh;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  pointer-events: auto;
  user-select: none;
  font-family: 'Playfair Display', Georgia, serif;
}

/* Dual Velvet Silk Curtains for split reveal */
.zz-curtain {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50.5%;
  background: radial-gradient(circle at center, #260414 0%, #13020a 55%, #080004 100%);
  z-index: 1;
  transition: transform 0.95s var(--zz-ease-luxury);
  will-change: transform;
}
.zz-curtain-left {
  left: 0;
  border-right: 1px solid rgba(212, 175, 55, 0.15);
}
.zz-curtain-right {
  right: 0;
  border-left: 1px solid rgba(212, 175, 55, 0.15);
}

/* Dismissed Curtains State */
#zz-preloader.zz-loaded .zz-curtain-left {
  transform: translateX(-101%);
}
#zz-preloader.zz-loaded .zz-curtain-right {
  transform: translateX(101%);
}

/* Ambient Background Canvas / Glow */
.zz-preloader-glow {
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(216, 0, 100, 0.22) 0%, rgba(212, 175, 55, 0.12) 40%, transparent 70%);
  filter: blur(40px);
  pointer-events: none;
  animation: zzAmbientPulse 4s ease-in-out infinite alternate;
  z-index: 2;
}

@keyframes zzAmbientPulse {
  0% { transform: scale(0.9) translate(-50%, -50%); opacity: 0.5; }
  100% { transform: scale(1.15) translate(-48%, -52%); opacity: 0.9; }
}

/* Subtle Floating Gold Stardust Particles */
.zz-stardust {
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(1.5px 1.5px at 20px 30px, #f6e7b0, rgba(0,0,0,0)),
    radial-gradient(1px 1px at 70px 120px, #d4af37, rgba(0,0,0,0)),
    radial-gradient(1.5px 1.5px at 150px 70px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(2px 2px at 220px 190px, #e8c872, rgba(0,0,0,0)),
    radial-gradient(1px 1px at 300px 140px, #f3b6b6, rgba(0,0,0,0)),
    radial-gradient(1.5px 1.5px at 380px 240px, #c5a059, rgba(0,0,0,0));
  background-repeat: repeat;
  background-size: 400px 320px;
  opacity: 0.35;
  animation: zzStardustDrift 20s linear infinite;
  z-index: 2;
  pointer-events: none;
}

@keyframes zzStardustDrift {
  0% { transform: translateY(0); }
  100% { transform: translateY(-320px); }
}

/* Preloader Content Box */
.zz-preloader-content {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  max-width: 90vw;
  width: 440px;
  padding: 2.5rem 1.5rem;
  transition: opacity 0.55s ease, transform 0.65s var(--zz-ease-luxury);
}

#zz-preloader.zz-loaded .zz-preloader-content {
  opacity: 0;
  transform: scale(0.92) translateY(-20px);
  pointer-events: none;
}

/* ─────── Logo-based Preloader Crest ─────── */
.zz-logo-wrap {
  position: relative;
  width: 220px;
  height: 110px;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.zz-logo-ring {
  position: absolute;
  inset: -12px -24px;
  border-radius: 24px;
  border: 1px dashed rgba(212, 175, 55, 0.4);
  animation: zzLogoGlow 3s ease-in-out infinite alternate;
}

.zz-logo-ring-inner {
  position: absolute;
  inset: -4px -14px;
  border-radius: 18px;
  border: 1px solid rgba(243, 182, 182, 0.25);
}

@keyframes zzLogoGlow {
  0% { box-shadow: 0 0 20px rgba(212, 175, 55, 0.15), inset 0 0 16px rgba(216, 0, 100, 0.08); }
  100% { box-shadow: 0 0 45px rgba(212, 175, 55, 0.35), inset 0 0 26px rgba(216, 0, 100, 0.18); }
}

.zz-preloader-logo {
  width: 200px;
  max-width: 82vw;
  height: auto;
  opacity: 0;
  transform: scale(0.9) translateY(6px);
  filter: drop-shadow(0 4px 18px rgba(216, 0, 100, 0.25)) drop-shadow(0 0 20px rgba(212, 175, 55, 0.4));
  animation: zzLogoReveal 1.1s cubic-bezier(0.16, 1, 0.3, 1) 0.15s forwards;
}

@keyframes zzLogoReveal {
  0% {
    opacity: 0;
    transform: scale(0.86) translateY(10px);
    filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.15));
  }
  60% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: drop-shadow(0 6px 24px rgba(216, 0, 100, 0.35)) drop-shadow(0 0 24px rgba(212, 175, 55, 0.5));
  }
}

/* ---------------- Brand Typography (Tagline only) ---------------- */
.zz-preloader-tagline {
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: rgba(247, 231, 180, 0.82);
  margin-bottom: 2.2rem;
  padding-left: 0.38em;
  opacity: 0;
  animation: zzFadeUp 0.8s ease 0.6s forwards;
}

@keyframes zzFadeUp {
  0% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 0.9; transform: translateY(0); }
}

/* ---------------- Hairline Progress Bar & Counter ---------------- */
.zz-progress-container {
  width: 240px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  opacity: 0;
  animation: zzFadeUp 0.7s ease 0.8s forwards;
}

.zz-progress-track {
  width: 100%;
  height: 2px;
  background: rgba(212, 175, 55, 0.18);
  border-radius: 9999px;
  overflow: visible;
  position: relative;
}

.zz-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #997A15 0%, #D4AF37 60%, #FFF2CF 100%);
  border-radius: 9999px;
  position: relative;
  transition: width 0.15s ease-out;
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.65);
}

/* Glowing comet head on progress bar */
.zz-progress-bar::after {
  content: '';
  position: absolute;
  right: -3px;
  top: -3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #FFF5D6;
  box-shadow: 0 0 12px 3px rgba(247, 231, 180, 0.9), 0 0 24px rgba(212, 175, 55, 0.7);
}

.zz-counter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.zz-preloader-status {
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: rgba(255, 235, 240, 0.75);
  font-style: italic;
  white-space: nowrap;
  transition: opacity 0.3s ease;
}

.zz-preloader-pct {
  font-family: 'Montserrat', monospace, sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #F7E7B4;
}

/* Skip link for instant access */
.zz-preloader-skip {
  margin-top: 1.6rem;
  background: transparent;
  border: none;
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(212, 175, 55, 0.65);
  cursor: pointer;
  padding: 4px 10px;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
  opacity: 0;
  animation: zzFadeUp 0.6s ease 1.2s forwards;
}
.zz-preloader-skip:hover {
  color: #FFF2CF;
  border-bottom-color: #D4AF37;
}

/* ---------------- Page Content Reveal Animations ---------------- */
body.zz-body-loading {
  overflow: hidden !important;
}

body.zz-body-loading .zz-page-reveal {
  opacity: 0.2;
  filter: blur(3px);
  transform: translateY(12px) scale(0.995);
}

.zz-page-reveal {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0px);
  transition: opacity 0.75s var(--zz-ease-luxury), filter 0.75s var(--zz-ease-luxury), transform 0.75s var(--zz-ease-luxury);
  will-change: opacity, transform, filter;
}

body.zz-revealed .zz-page-reveal {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0px);
}

/* ════════════════════════════════════════════════════════════
   ENHANCED WEBSITE UI ELEMENTS — PREMIUM POLISH
   ════════════════════════════════════════════════════════════ */

/* Sticky Glassmorphism Header Polish */
header.sticky,
header[style*="position: sticky"],
header[style*="position:sticky"] {
  background: rgba(255, 255, 255, 0.94) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  border-bottom: 1px solid rgba(212, 175, 55, 0.16) !important;
  box-shadow: 0 4px 30px -4px rgba(0, 0, 0, 0.04) !important;
  transition: all 0.3s ease;
}

/* Nav Link Hover Underline animation */
nav ul li a {
  position: relative;
}
nav ul li a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #d80064, #d4af37);
  transition: width 0.3s var(--zz-ease-spring), left 0.3s var(--zz-ease-spring);
  border-radius: 9999px;
}
nav ul li a:hover::after,
nav ul li a.active::after {
  width: 100%;
  left: 0;
}

/* Luxury Shimmer Button Effect */
.zz-btn-luxury,
a[href*="#collections"],
button[data-purpose*="submit"],
.bg-brand-magenta {
  position: relative;
  overflow: hidden;
  transition: all 0.35s var(--zz-ease-spring) !important;
}

.zz-btn-luxury::before,
a[href*="#collections"]::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -75%;
  width: 50%;
  height: 200%;
  background: linear-gradient(
    60deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.45) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(25deg);
  pointer-events: none;
  transition: all 0.75s ease;
}

.zz-btn-luxury:hover::before,
a[href*="#collections"]:hover::before {
  left: 140%;
}

.zz-btn-luxury:hover,
a[href*="#collections"]:hover {
  transform: translateY(-2.5px) !important;
  box-shadow: 0 14px 28px -6px rgba(216, 0, 100, 0.35), 0 0 12px rgba(212, 175, 55, 0.2) !important;
}

/* ─────── Product Card Luxury Elevation ─────── */
article,
.product-card,
[data-purpose*="product"] {
  transition: transform 0.45s var(--zz-ease-spring), box-shadow 0.45s var(--zz-ease-spring), border-color 0.45s ease !important;
}

article:hover,
.product-card:hover {
  transform: translateY(-7px) !important;
  box-shadow: 0 24px 48px -12px rgba(216, 0, 100, 0.14), 0 0 0 1px rgba(212, 175, 55, 0.3) !important;
}

/* Image Slow-Zoom within card */
article img,
.product-card img {
  transition: transform 0.85s var(--zz-ease-spring) !important;
}
article:hover img,
.product-card:hover img {
  transform: scale(1.06) !important;
}

/* ─────── Add to Cart Button Glow ─────── */
button[onclick*="addToCart"],
button[onclick*="triggerAddToCart"],
.add-to-cart-btn,
[data-action="add-to-cart"] {
  position: relative;
  overflow: hidden;
  transition: all 0.35s var(--zz-ease-spring) !important;
}

button[onclick*="addToCart"]:hover,
button[onclick*="triggerAddToCart"]:hover,
.add-to-cart-btn:hover,
[data-action="add-to-cart"]:hover {
  transform: translateY(-2px) scale(1.02) !important;
  box-shadow: 0 8px 24px -4px rgba(216, 0, 100, 0.4), 0 0 0 1px rgba(212, 175, 55, 0.25) !important;
}

button[onclick*="addToCart"]:active,
button[onclick*="triggerAddToCart"]:active {
  transform: scale(0.96) !important;
  transition-duration: 0.1s !important;
}

/* ─────── Price Tag Polish ─────── */
.font-bold:has(+ button),
[class*="price"] {
  font-variant-numeric: tabular-nums;
}

/* ─────── Section Divider Gradient Lines ─────── */
section + section {
  border-top: 1px solid rgba(212, 175, 55, 0.08);
}

/* ─────── Hero Section Floating Badge Glow ─────── */
.hero-banner-bg .animate-pulse {
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.6);
}

/* ─────── Footer Premium Dark ─────── */
footer {
  position: relative;
}
footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.3), transparent);
}

/* ─────── Selection Colors ─────── */
::selection {
  background: rgba(243, 182, 182, 0.35);
  color: #1a0510;
}

/* ─────── Form Input Focus Glow ─────── */
input:focus,
textarea:focus,
select:focus {
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15), 0 0 12px rgba(212, 175, 55, 0.08) !important;
  border-color: rgba(212, 175, 55, 0.4) !important;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

/* ─────── Smooth Image Loading ─────── */
img {
  opacity: 1;
  transition: opacity 0.5s ease;
}
img[loading="lazy"] {
  opacity: 0;
}
img[loading="lazy"].loaded,
img[loading="lazy"][complete] {
  opacity: 1;
}

/* ─────── Skeleton Shimmer for Loading States ─────── */
.zz-skeleton {
  background: linear-gradient(90deg, #f0eded 25%, #e5e2e1 50%, #f0eded 75%);
  background-size: 200% 100%;
  animation: zzShimmer 1.5s ease-in-out infinite;
  border-radius: 8px;
}

@keyframes zzShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ─────── Badge/Pill Styling ─────── */
.rounded-full[class*="bg-"] {
  transition: transform 0.3s var(--zz-ease-spring), box-shadow 0.3s ease;
}

/* ─────── Glassmorphism Panels ─────── */
.backdrop-blur-md,
.backdrop-blur-lg,
.backdrop-blur-xl,
[class*="backdrop-blur"] {
  border: 1px solid rgba(255, 255, 255, 0.12);
}

/* ─────── Premium CTA Gradient Text ─────── */
.zz-gradient-text {
  background: linear-gradient(135deg, #D4AF37 0%, #F7E7B4 40%, #D4AF37 70%, #997A15 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: zzGoldShimmer 4s ease-in-out infinite;
}

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

/* ---------------- Scroll Reveal (IntersectionObserver) ---------------- */
.zz-reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.85s var(--zz-ease-spring), transform 0.85s var(--zz-ease-spring);
  will-change: opacity, transform;
}

.zz-reveal.zz-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delays */
.zz-delay-1 { transition-delay: 0.1s; }
.zz-delay-2 { transition-delay: 0.2s; }
.zz-delay-3 { transition-delay: 0.3s; }
.zz-delay-4 { transition-delay: 0.4s; }

/* ---------------- Back to Top Floating Dial ---------------- */
#zz-back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(22, 2, 10, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(212, 175, 55, 0.4);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 0 15px rgba(212, 175, 55, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #F7E7B4;
  cursor: pointer;
  z-index: 10000;
  opacity: 0;
  transform: translateY(20px) scale(0.85);
  pointer-events: none;
  transition: all 0.35s var(--zz-ease-spring);
}

#zz-back-to-top.zz-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

#zz-back-to-top:hover {
  transform: translateY(-4px) scale(1.08);
  border-color: #F7E7B4;
  box-shadow: 0 14px 32px -4px rgba(216, 0, 100, 0.35), 0 0 20px rgba(212, 175, 55, 0.5);
  color: #FFFFFF;
}

#zz-back-to-top svg.zz-progress-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 48px;
  height: 48px;
  transform: rotate(-90deg);
}

#zz-back-to-top circle.zz-ring-bg {
  stroke: rgba(212, 175, 55, 0.15);
  fill: none;
  stroke-width: 2.5;
}

#zz-back-to-top circle.zz-ring-fill {
  stroke: #D4AF37;
  fill: none;
  stroke-width: 2.5;
  stroke-dasharray: 138;
  stroke-dashoffset: 138;
  transition: stroke-dashoffset 0.15s ease-out;
}

/* ---------------- WhatsApp Concierge Pulsing Status ---------------- */
.zz-concierge-pill {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(22, 2, 10, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(212, 175, 55, 0.35);
  padding: 0.55rem 1.15rem;
  border-radius: 9999px;
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.35), 0 0 15px rgba(212, 175, 55, 0.15);
  text-decoration: none;
  transition: all 0.35s var(--zz-ease-spring);
}

.zz-concierge-pill:hover {
  transform: translateY(-3px) scale(1.03);
  border-color: #25D366;
  box-shadow: 0 14px 35px -6px rgba(37, 211, 102, 0.3), 0 0 20px rgba(212, 175, 55, 0.3);
}

.zz-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #25D366;
  position: relative;
}

.zz-live-dot::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: #25D366;
  opacity: 0.75;
  animation: zzPulseLive 1.8s cubic-bezier(0.24, 0, 0.38, 1) infinite;
}

@keyframes zzPulseLive {
  0% { transform: scale(0.8); opacity: 0.9; }
  100% { transform: scale(2.6); opacity: 0; }
}

.zz-concierge-text {
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: #FAF7F2;
}

.zz-concierge-sub {
  font-size: 9px;
  color: #D4AF37;
  font-weight: 500;
  letter-spacing: 0.02em;
  display: block;
}

/* ---------------- Accessibility: Reduced Motion ---------------- */
@media (prefers-reduced-motion: reduce) {
  #zz-preloader {
    display: none !important;
  }
  .zz-page-reveal,
  .zz-reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .zz-curtain {
    transition: none !important;
  }
}

/* ---------------- Mobile Responsive Refinements ---------------- */
@media (max-width: 640px) {
  .zz-logo-wrap {
    width: 160px;
    height: 80px;
    margin-bottom: 1.25rem;
  }
  .zz-preloader-logo {
    width: 140px;
  }
  .zz-preloader-tagline {
    font-size: 9px;
    letter-spacing: 0.26em;
  }
  .zz-progress-container {
    width: 200px;
  }
  #zz-back-to-top {
    bottom: 5.5rem;
    right: 1.25rem;
    width: 42px;
    height: 42px;
  }
  .zz-concierge-pill {
    bottom: 5.5rem;
    left: 1.25rem;
    padding: 0.45rem 0.9rem;
  }
}
