input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type=number] {
  -moz-appearance: textfield;
}

@keyframes fade-in {
  from {
      background-color: rgba(0, 0, 0, 0);
  }
  to {
      background-color: rgba(0, 0, 0, 0.8);
  }
}

@keyframes fade-out {
  from {
      background-color: rgba(0, 0, 0, 0.8);
  }
  to {
      background-color: rgba(0, 0, 0, 0);
  }
}

@keyframes slide-in {
  from {
      transform: translateX(500px);
  }
  to {
      transform: translateX(0px);
  }
}

@keyframes slide-out {
  from {
      transform: translateX(0px);
  }
  to {
      transform: translateX(500px);
  }
}

body.cart-open {
  overflow: hidden;
  padding-right: var(--scrollbar-width, 0px);
}

#cart-drawer[data-state="open"] {
  animation: fade-in 0.4s forwards;
}

#cart-drawer[data-state="closed"] {
  animation: fade-out 0.4s forwards;
}

#cart-drawer[data-state="open"] > div {
  animation: slide-in 0.4s forwards;
}

#cart-drawer[data-state="closed"] > div {
  animation: slide-out 0.4s forwards;
}

.dialog[data-state="open"] {
  animation: fade-in 0.4s forwards;
}

.dialog[data-state="closed"] {
  animation: fade-out 0.4s forwards;
}

.dialog[data-state="open"] > div {
  animation: dialog-in 0.2s forwards;
}

.dialog[data-state="closed"] > div {
  animation: dialog-out 0.2s forwards;
}

@keyframes dialog-in {
  from {
      opacity: 0;
      scale: 50%;
  }
  to {
      opacity: 1;
      scale: 100%;
  }
}

@keyframes dialog-out {
  from {
      opacity: 1;
      scale: 100%;
  }
  to {
      opacity: 0;
      scale: 50%;
  }
}

.reveal-fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  transition-delay: var(--delay, 0s);
}

.reveal-fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.centralcart-content iframe {
  aspect-ratio: 16 / 9;
  border-radius: 0.5rem;
  width: 100%;
  height: auto;
}

.grid-background {
  background-image: linear-gradient(to right,hsla(0,0%,100%,.03) 1px,transparent 1px),linear-gradient(to bottom,hsla(0,0%,100%,.03) 1px,transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 60% 85% at 40% 30%, #000 0%, #fff0 110%)
}

.custom-bg-mask {
	mask-image: linear-gradient(hsl(var(--background)), rgba(0, 0, 0, 0.3), rgb(0, 0, 0, 0));
}

@keyframes loading {
  0% {
      left: -50%;
  }

  to {
      left: 100%;
  }
}

/* Top donators shine */
.top-donators-pill::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 70%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  pointer-events: none;
  transition: left 0.5s ease-in;
}

.top-donators-pill:hover::after {
  left: 120%;
  transition: left 0.6s ease-out;
}

.detail-dash {
  background-image: linear-gradient(to right, rgba(255, 255, 255, 0.1) 50%, hsl(var(--foreground) / 0) 0%);
  background-position: center bottom;
  background-size: 16px;
  background-repeat: repeat-x;
  width: 100%;
  height: 1px;
}

/* Sidebar categories */
.custom-scrollbar::-webkit-scrollbar {
  width: 3px;
  height: 3px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: hsl(var(--primary));
  border-radius: 0.25rem;
}

.cat-dropdown {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: top;
}

.cat-dropdown:not(.hidden) {
  animation: slideDown 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: scaleY(0);
  }
  to {
    opacity: 1;
    transform: scaleY(1);
  }
}

#mobile-categories-dropdown:not(.hidden) {
  animation: slideInMobile 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideInMobile {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mobile-subcategories:not(.hidden) {
  animation: slideInSub 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideInSub {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
/* Sidebar categories */

/* === Visual enhancements === */

/* Animated gradient border on package cards */
.package {
  position: relative;
  isolation: isolate;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.35s ease, border-color 0.35s ease;
}

.package::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  padding: 2px;
  background: conic-gradient(from var(--angle, 0deg), transparent 0deg, hsl(var(--primary)) 90deg, transparent 180deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: -1;
}

@property --angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

.package:hover::before {
  opacity: 1;
  animation: rotate-gradient 3s linear infinite;
}

@keyframes rotate-gradient {
  to { --angle: 360deg; }
}

.package:hover {
  box-shadow: 0 20px 60px -15px hsl(var(--primary) / 0.45),
              0 0 30px -5px hsl(var(--primary) / 0.3);
  transform: translateY(-6px) scale(1.02);
}

.package img {
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.4s ease;
}

.package:hover img {
  transform: scale(1.06);
  filter: brightness(1.08) saturate(1.15);
}

/* Shine sweep on primary buttons */
.btn-primary {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -150%;
  width: 60%;
  height: 100%;
  background: linear-gradient(110deg, transparent 0%, rgba(255,255,255,0.35) 50%, transparent 100%);
  transform: skewX(-20deg);
  pointer-events: none;
  transition: left 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}

.btn-primary:hover::after {
  left: 150%;
}

.btn-primary > * {
  position: relative;
  z-index: 2;
}

/* Glow pulse for primary CTA */
.open-cart {
  box-shadow: 0 0 0 0 hsl(var(--primary) / 0);
  animation: cart-pulse 2.4s ease-in-out infinite;
}

@keyframes cart-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 hsl(var(--primary) / 0.4),
                0 0 20px -2px hsl(var(--primary) / 0.4);
  }
  50% {
    box-shadow: 0 0 0 6px hsl(var(--primary) / 0),
                0 0 30px 0 hsl(var(--primary) / 0.55);
  }
}

/* Hero animated gradient orbs */
@keyframes float-orb {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -40px) scale(1.05); }
  66% { transform: translate(-25px, 30px) scale(0.95); }
}

.fixed.inset-0 > .size-\[30rem\] {
  animation: float-orb 18s ease-in-out infinite;
}

.fixed.inset-0 > .size-\[45rem\] {
  animation: float-orb 22s ease-in-out infinite reverse;
}

/* Headline gradient sheen */
section h1 .text-primary {
  background: linear-gradient(110deg, hsl(var(--primary)) 0%, hsl(var(--primary) / 0.7) 30%, #fff 50%, hsl(var(--primary) / 0.7) 70%, hsl(var(--primary)) 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: headline-sheen 6s linear infinite;
}

@keyframes headline-sheen {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Category card hover lift */
section a[href^="/category/"] {
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.35s ease;
}

section a[href^="/category/"]:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 40px -12px hsl(var(--primary) / 0.4);
}

/* Navbar logo subtle glow */
header h1 {
  text-shadow: 0 0 20px hsl(var(--primary) / 0.25);
}

/* Footer Tebex pulse */
footer svg[aria-label="Tebex"] {
  transition: filter 0.3s ease;
}

footer svg[aria-label="Tebex"]:hover {
  filter: drop-shadow(0 0 8px hsl(var(--primary) / 0.5)) brightness(1.2);
}

/* Smooth scroll-in for product cards */
@keyframes card-enter {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.package {
  animation: card-enter 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
}

.package:nth-child(1)  { animation-delay: 0.05s; }
.package:nth-child(2)  { animation-delay: 0.10s; }
.package:nth-child(3)  { animation-delay: 0.15s; }
.package:nth-child(4)  { animation-delay: 0.20s; }
.package:nth-child(5)  { animation-delay: 0.25s; }
.package:nth-child(6)  { animation-delay: 0.30s; }
.package:nth-child(7)  { animation-delay: 0.35s; }
.package:nth-child(8)  { animation-delay: 0.40s; }

/* === Fire effect for "novidades" category cards === */
.fire-card {
  position: relative;
  isolation: isolate;
  border-radius: 0.7rem;
}

/* Animated fire glow around the card */
.fire-card::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 0.9rem;
  background: conic-gradient(
    from var(--fire-angle, 0deg),
    #ff2200,
    #ff6a00,
    #ffcc00,
    #ff6a00,
    #ff2200,
    #ff0033,
    #ff2200
  );
  filter: blur(14px);
  opacity: 0.55;
  z-index: -2;
  animation: fire-rotate 6s linear infinite, fire-flicker 0.18s steps(1) infinite;
  pointer-events: none;
}

/* Flames at the bottom of the card */
.fire-card::after {
  content: '';
  position: absolute;
  left: -4px;
  right: -4px;
  bottom: -10px;
  height: 38px;
  background:
    radial-gradient(ellipse at 10% 100%, rgba(255,200,40,0.95) 0%, rgba(255,90,0,0.7) 30%, transparent 60%),
    radial-gradient(ellipse at 30% 100%, rgba(255,170,30,0.9)  0%, rgba(255,60,0,0.6)  35%, transparent 65%),
    radial-gradient(ellipse at 50% 100%, rgba(255,230,80,0.95) 0%, rgba(255,90,0,0.7) 30%, transparent 60%),
    radial-gradient(ellipse at 70% 100%, rgba(255,170,30,0.9)  0%, rgba(255,60,0,0.6)  35%, transparent 65%),
    radial-gradient(ellipse at 90% 100%, rgba(255,200,40,0.95) 0%, rgba(255,90,0,0.7) 30%, transparent 60%);
  filter: blur(3px);
  mix-blend-mode: screen;
  z-index: -1;
  pointer-events: none;
  animation: fire-flames 1.1s ease-in-out infinite alternate;
}

@property --fire-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

@keyframes fire-rotate {
  to { --fire-angle: 360deg; }
}

@keyframes fire-flicker {
  0%   { opacity: 0.55; }
  20%  { opacity: 0.70; }
  40%  { opacity: 0.45; }
  60%  { opacity: 0.85; }
  80%  { opacity: 0.50; }
  100% { opacity: 0.65; }
}

@keyframes fire-flames {
  0% {
    transform: scaleY(1) scaleX(1);
    filter: blur(3px) hue-rotate(0deg);
  }
  50% {
    transform: scaleY(1.25) scaleX(0.96);
    filter: blur(4px) hue-rotate(-8deg);
  }
  100% {
    transform: scaleY(1.05) scaleX(1.04);
    filter: blur(3px) hue-rotate(6deg);
  }
}

/* Make the actual card border glow orange on novidades */
.fire-card .package {
  border-color: rgba(255, 120, 0, 0.55) !important;
  box-shadow:
    0 0 18px -2px rgba(255, 90, 0, 0.5),
    0 0 40px -10px rgba(255, 200, 0, 0.35),
    inset 0 0 12px -4px rgba(255, 140, 0, 0.4);
}

.fire-card .package:hover {
  border-color: rgba(255, 200, 0, 0.9) !important;
  box-shadow:
    0 0 25px -2px rgba(255, 90, 0, 0.85),
    0 0 60px -10px rgba(255, 220, 0, 0.7),
    0 20px 60px -15px rgba(255, 70, 0, 0.6),
    inset 0 0 16px -4px rgba(255, 180, 0, 0.55);
}

/* Override the rotating primary border with fire colors on hover */
.fire-card .package::before {
  background: conic-gradient(
    from var(--angle, 0deg),
    transparent 0deg,
    #ffcc00 60deg,
    #ff4400 120deg,
    transparent 180deg
  ) !important;
}

/* Embers floating up */
.fire-grid {
  position: relative;
}

.fire-card .package::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(circle at 15% 90%, rgba(255,220,80,0.9) 0%, transparent 1.5%),
    radial-gradient(circle at 45% 95%, rgba(255,180,40,0.9) 0%, transparent 1.2%),
    radial-gradient(circle at 75% 88%, rgba(255,240,120,0.9) 0%, transparent 1.4%),
    radial-gradient(circle at 25% 80%, rgba(255,160,30,0.8) 0%, transparent 1%),
    radial-gradient(circle at 60% 92%, rgba(255,220,90,0.85) 0%, transparent 1.3%);
  pointer-events: none;
  opacity: 0;
  animation: ember-rise 3s linear infinite;
  mix-blend-mode: screen;
  z-index: 3;
}

@keyframes ember-rise {
  0% {
    opacity: 0;
    transform: translateY(0) scale(1);
  }
  15% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(-90%) scale(0.3);
  }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .fire-card::before,
  .fire-card::after,
  .fire-card .package::after {
    animation: none;
  }
}

/* FiveM connect button - green accent on hover */
header a[href="#"]:has(i[data-lucide="gamepad-2"]) {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

header a[href="#"]:has(i[data-lucide="gamepad-2"]):hover {
  border-color: hsl(var(--primary) / 0.5);
  box-shadow: 0 0 20px -2px hsl(var(--primary) / 0.4);
}
