/* Ported 1:1 from frontend/src/globals.css so the PHP UI matches the React UI exactly. */

/* Custom scrollbar */
.custom-scrollbar::-webkit-scrollbar { width: 4px; }
.custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 999px; }
.custom-scrollbar::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.2); }
.custom-scrollbar { scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.1) transparent; }

/* Blob */
@keyframes blob {
  0% { transform: translate(0px, 0px) scale(1); }
  50% { transform: translate(15px, -25px) scale(1.05); }
  100% { transform: translate(0px, 0px) scale(1); }
}
.animate-blob { animation: blob 7s infinite; }

/* Marquee */
@keyframes marquee { 0% { transform: translateX(0%); } 100% { transform: translateX(-50%); } }
@keyframes marquee-right { 0% { transform: translateX(-50%); } 100% { transform: translateX(0%); } }
.animate-marquee { animation: marquee 20s linear infinite; }
.animate-marquee-right { animation: marquee-right 20s linear infinite; }

/* Promo marquee — measured right-to-left single sweep with constant speed.
   The track is transformed in px by the storefront script (app.js), which
   measures the real container and text widths, so short or long text always
   enters at the right border and exits past the left border at a steady pace.
   Default duration is 0s so it stays a static, readable line when JavaScript
   is unavailable (graceful degradation). */
.zi-marquee { position: relative; overflow: hidden; }
.zi-marquee__track {
  display: flex;
  width: max-content;
  white-space: nowrap;
  will-change: transform;
  animation: zi-marquee-sweep var(--zi-dur, 0s) linear infinite;
}
.zi-marquee__item { white-space: nowrap; flex: none; }
@keyframes zi-marquee-sweep {
  from { transform: translateX(var(--zi-from, 0px)); }
  to { transform: translateX(var(--zi-to, 0px)); }
}
@media (prefers-reduced-motion: reduce) {
  .zi-marquee__track { animation: none !important; }
}

/* Glow */
@keyframes glow {
  0%, 100% { background: linear-gradient(45deg, #3b82f6, #8b5cf6); background-size: 200% 200%; filter: drop-shadow(0 0 10px rgba(59, 130, 246, 0.3)); }
  50% { background-position: 100% 50%; filter: drop-shadow(0 0 15px rgba(139, 92, 246, 0.4)); }
}
@keyframes glow-border {
  0%, 100% { background: linear-gradient(45deg, #06b6d4, #3b82f6); background-size: 200% 200%; }
  50% { background-position: 100% 50%; }
}
.animate-glow { animation: glow 3s ease-in-out infinite; -webkit-text-fill-color: transparent; }
.animate-glow-border { animation: glow-border 4s ease-in-out infinite; }

/* Float / pulse / ping */
@keyframes float {
  0%, 100% { transform: translateY(0px) translateX(0px); opacity: 0.3; }
  33% { transform: translateY(-10px) translateX(5px); opacity: 0.5; }
  66% { transform: translateY(5px) translateX(-5px); opacity: 0.4; }
}
@keyframes pulse-slow { 0%, 100% { opacity: 0.25; transform: scale(1); } 50% { opacity: 0.4; transform: scale(1.05); } }
@keyframes ping-slow { 0% { transform: scale(1); opacity: 0.4; } 75%, 100% { transform: scale(1.5); opacity: 0; } }
.animate-float { animation: float 8s ease-in-out infinite; will-change: transform, opacity; transform: translateZ(0); backface-visibility: hidden; }
.animate-pulse-slow { animation: pulse-slow 6s ease-in-out infinite; will-change: transform, opacity; transform: translateZ(0); backface-visibility: hidden; }
.animate-ping-slow { animation: ping-slow 4s cubic-bezier(0, 0, 0.2, 1) infinite; will-change: transform, opacity; transform: translateZ(0); backface-visibility: hidden; }
.animate-delay-1000 { animation-delay: 1s; }
.animate-delay-2000 { animation-delay: 2s; }
.animate-delay-3000 { animation-delay: 3s; }
.animate-delay-4000 { animation-delay: 4s; }
.animation-delay-2000 { animation-delay: 2s; }
.animation-delay-4000 { animation-delay: 4s; }

/* Gradient */
@keyframes gradient-shift { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.animate-gradient { background-size: 200% 200%; animation: gradient-shift 8s ease-in-out infinite; will-change: background-position; }
.animate-gradient-x { background-size: 200% 200%; animation: gradient-shift 3s ease-in-out infinite; will-change: background-position; }

/* Spin */
@keyframes spin-slow { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.animate-spin-slow { animation: spin-slow 3s linear infinite; will-change: transform; }

/* Fade / slide / scale */
@keyframes fade-in-left { from { opacity: 0; transform: translateX(-20px); } to { opacity: 1; transform: translateX(0); } }
.animate-fade-in-left { animation: fade-in-left 0.8s ease-out forwards; }
@keyframes shake { 0%, 100% { transform: translateX(0); } 10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); } 20%, 40%, 60%, 80% { transform: translateX(5px); } }
.animate-shake { animation: shake 0.6s ease-in-out; }
@keyframes fade-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.animate-fade-in { animation: fade-in 0.3s ease-out; }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.animate-slideUp { animation: slideUp 0.4s ease-out; }
@keyframes slide-up { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slide-down { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
.animate-slide-up { animation: slide-up 0.3s ease-out; }
.animate-slide-down { animation: slide-down 0.3s ease-out; }
@keyframes scale-in { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
.animate-scale-in { animation: scale-in 0.2s ease-out; }
@keyframes progressBar { from { width: 100%; } to { width: 0%; } }
.animate-progressBar { animation: progressBar 5s linear forwards; }

/* Grid */
.bg-grid-16 { background-size: 16px 16px; }.bg-grid-white {
  background-image: linear-gradient(to right, rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.05) 1px, transparent 1px);
}

html, body, #root { background-color: #111827; }

/* Font utilities */
.cinzel-decorative-bold { font-family: "Cinzel Decorative", serif; font-weight: 700; font-style: normal; }
.cinzel-decorative-black { font-family: "Cinzel Decorative", serif; font-weight: 900; font-style: normal; }

/* CTA button (HeroSection) */
.cta-btn {
  display: flex; align-items: center; padding: 11px 33px; text-decoration: none; font-size: 25px; color: white;
  background: #6225e6; transition: 1s; box-shadow: 6px 6px 0 black; transform: skewX(-15deg); border: none;
  cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.cta-btn:focus { outline: none; }
.cta-btn:hover { transition: 0.5s; box-shadow: 10px 10px 0 #fbc638; }
.cta-btn .second { transition: 0.5s; margin-right: 0px; width: 50px; margin-left: 15px; position: relative; top: 0; display: flex; align-items: center; pointer-events: none; }
.cta-btn:hover .second { transition: 0.5s; margin-right: 45px; }
.cta-btn > * { pointer-events: none; }
.cta-btn .span { transform: skewX(15deg); font-weight: bold; display: flex; align-items: center; pointer-events: none; }
.cta-btn .one { transition: 0.4s; transform: translateX(-60%); }
.cta-btn .two { transition: 0.5s; transform: translateX(-30%); }
.cta-btn:hover .three, .cta-btn:hover .one, .cta-btn:hover .two { transform: translateX(0%); fill: #fbc638; transition: fill 0.3s ease; }

/* Hero marquee track */
.marquee-promo-track { animation: marquee-up 20s linear infinite; }
.marquee-promo-track:hover { animation-play-state: paused; }

/* Scrollbars */
.scrollbar-hide { -ms-overflow-style: none !important; scrollbar-width: none !important; }
.scrollbar-hide::-webkit-scrollbar { display: none !important; }
.nav-scroll-hide { -ms-overflow-style: none; scrollbar-width: none; }
.nav-scroll-hide::-webkit-scrollbar { width: 0; height: 0; }

/* Category chip shimmer */
@keyframes shimmer-fast { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
.animate-shimmer-fast { background-size: 200% 100%; animation: shimmer-fast 1.5s linear infinite; }
.delay-75 { animation-delay: 75ms; }
.font-russo { font-family: 'Russo One', sans-serif; }

/* Fullscreen maintenance */
@keyframes fullscreen-float { 0%, 100% { transform: translateY(0) scale(1); opacity: 0.2; } 50% { transform: translateY(-20px) scale(1.5); opacity: 0.6; } }
.animate-fullscreen-float { animation: fullscreen-float 4s ease-in-out infinite; }
@keyframes fullscreen-spin-slow { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.animate-fullscreen-spin-slow { animation: fullscreen-spin-slow 8s linear infinite; }

/* Hero */
@keyframes hero-float { 0%, 100% { transform: translateY(0px); } 50% { transform: translateY(-10px); } }
.animate-hero-float { animation: hero-float 3s ease-in-out infinite; }
@keyframes marquee-up { 0% { transform: translateY(0); } 100% { transform: translateY(-50%); } }
.animate-marquee-up { animation: marquee-up 20s linear infinite; }
@keyframes marquee-right-to-left { 0% { transform: translateX(0%); } 100% { transform: translateX(-50%); } }
.animate-marquee-right-to-left { animation: marquee-right-to-left 20s linear infinite; }
@keyframes fade-in-right { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
.animate-fade-in-right { animation: fade-in-right 0.8s ease-out forwards; }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

iframe { max-width: 100% !important; height: auto !important; }
* { max-width: 100%; box-sizing: border-box; }

/* ======================================================================
   Mobile: force white text on dark backgrounds (from React globals.css)
   ====================================================================== */
@media (max-width: 640px) {
  input, textarea, select, option, code, pre, kbd, samp {
    color: #fff !important; -webkit-text-fill-color: #fff !important; caret-color: #fff !important;
  }
  input::placeholder, textarea::placeholder {
    -webkit-text-fill-color: rgba(255, 255, 255, 0.4) !important; color: rgba(255, 255, 255, 0.4) !important;
  }
  input:disabled, textarea:disabled, select:disabled { -webkit-text-fill-color: rgba(255, 255, 255, 0.5) !important; }
  [class*="bg-gradient-to-br"][class*="slate"] p, [class*="bg-gradient-to-br"][class*="slate"] span,
  [class*="bg-white/5"] p, [class*="bg-white/5"] span, [class*="bg-white/5"] div { color: #fff !important; }
}

/* Tablet fixes */
@media (min-width: 1024px) and (max-width: 1279px) {
  body { overflow-x: hidden !important; }
}
