/* ============================================================================
 * MAZHAR WEAR — ANIMATIONS, CARBON-FIBER WEAVE, PRELOADER & CRIMSON GLOWS
 * File: assets/css/animations.css
 * ============================================================================ */

/* ============================================================================
 * 1. CARBON-FIBER WEAVE BACKGROUND TEXTURE (Hero / Header / Feature Strips)
 * EDIT HERE: Adjust opacity to make carbon weave subtler or stronger
 * ============================================================================ */
.mw-carbon-bg {
  background-color: #0B0D11;
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 0),
    linear-gradient(27deg, #101319 5px, transparent 5px),
    linear-gradient(207deg, #101319 5px, transparent 5px),
    linear-gradient(27deg, #151922 5px, transparent 5px),
    linear-gradient(207deg, #151922 5px, transparent 5px),
    linear-gradient(90deg, #0D1015 10px, transparent 10px);
  background-size: 20px 20px, 20px 20px, 20px 20px, 20px 20px, 20px 20px, 20px 20px;
  background-position: 0 0, 0 5px, 10px 0, 0 10px, 10px 5px, 0 0;
}

/* ============================================================================
 * 2. ANIMATED BRAND PRELOADER (0.8s Carbon & Crimson Upward Wipe)
 * ============================================================================ */
.mw-preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background:
    radial-gradient(circle at 50% 42%, rgba(230, 46, 45, 0.22) 0%, rgba(11, 13, 17, 0.98) 60%),
    #0B0D11;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.55s cubic-bezier(0.77, 0, 0.175, 1), opacity 0.45s ease;
  will-change: transform;
}

.mw-preloader.is-hidden {
  transform: translateY(-102%);
  pointer-events: none;
}

.mw-preloader-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.mw-preloader-logo {
  animation: mwLogoPulse 0.75s ease-out forwards;
}

.mw-preloader-bar-track {
  width: 240px;
  height: 3px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  overflow: hidden;
}

.mw-preloader-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #B81D1C, #E62E2D, #FF5A59);
  box-shadow: 0 0 18px rgba(230, 46, 45, 0.85);
  animation: mwPreloaderFill 0.72s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.mw-preloader-tagline {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  color: #8A94A6;
  text-transform: uppercase;
}

@keyframes mwPreloaderFill {
  from { width: 0%; }
  to   { width: 100%; }
}

@keyframes mwLogoPulse {
  0%   { opacity: 0; transform: scale(0.92) translateY(10px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* ============================================================================
 * 3. KINETIC MARQUEE INFINITE TICKER
 * ============================================================================ */
@keyframes mwMarqueeScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ============================================================================
 * 4. BUTTON SHEEN SWEEP & CRIMSON NEON HOVER GLOWS
 * ============================================================================ */
.mw-btn-crimson::before {
  content: '';
  position: absolute;
  top: 0;
  left: -120%;
  width: 75%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  transform: skewX(-22deg);
  transition: left 0.55s ease;
}

.mw-btn-crimson:hover::before {
  left: 140%;
}

/* ============================================================================
 * 5. FLOATING WHATSAPP PULSE RING & BADGE ALERTS
 * ============================================================================ */
.mw-fab-pulse {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid #25D366;
  animation: mwPulseRing 2.2s cubic-bezier(0.24, 0, 0.38, 1) infinite;
  pointer-events: none;
}

@keyframes mwPulseRing {
  0%   { transform: scale(0.95); opacity: 0.85; }
  75%  { transform: scale(1.42); opacity: 0; }
  100% { transform: scale(1.42); opacity: 0; }
}

.mw-pulse-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #E62E2D;
  box-shadow: 0 0 0 0 rgba(230, 46, 45, 0.7);
  animation: mwCrimsonPulse 1.8s infinite;
}

@keyframes mwCrimsonPulse {
  0%   { box-shadow: 0 0 0 0 rgba(230, 46, 45, 0.7); }
  70%  { box-shadow: 0 0 0 9px rgba(230, 46, 45, 0); }
  100% { box-shadow: 0 0 0 0 rgba(230, 46, 45, 0); }
}

/* ============================================================================
 * 6. TOAST ENTRY & FLOATING HERO STAT PILL MOTION
 * ============================================================================ */
@keyframes mwToastIn {
  from { opacity: 0; transform: translateY(14px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.mw-float-slow {
  animation: mwFloatSlow 5.5s ease-in-out infinite;
}

@keyframes mwFloatSlow {
  0%, 100% { transform: translateY(-50%); }
  50%      { transform: translateY(calc(-50% - 10px)); }
}

/* Loading Shimmer for AJAX Catalog Filter */
.mw-is-loading {
  opacity: 0.45;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

/* Respect Reduced Motion Accessibility Preferences */
@media (prefers-reduced-motion: reduce) {
  .mw-marquee-track,
  .mw-fab-pulse,
  .mw-float-slow,
  .mw-preloader-bar-fill {
    animation: none !important;
  }
}

