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;
  appearance: textfield;
}

/* Prevenir scroll horizontal */
html, body {
  overflow-x: hidden !important;
  max-width: 100vw !important;
  width: 100% !important;
  position: relative;
}

body {
  position: relative;
}

img, video, iframe {
  max-width: 100%;
  height: auto;
}

section, main, .container {
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

/* Prevenir zoom automático no mobile ao focar em inputs */
@media screen and (max-width: 768px) {
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="number"],
  input[type="search"],
  input[type="password"],
  textarea,
  select {
    font-size: 16px !important;
  }
}

/* Modern Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: hsl(var(--background));
}

::-webkit-scrollbar-thumb {
  background: hsl(var(--primary) / 0.3);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: hsl(var(--primary) / 0.5);
}

/* Smooth transitions */
* {
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

@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);
  }
}


#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 {
  position: relative;
  background-color: hsl(270 20% 8%);
  background-image:
    /* Padrão de pontos principais - mais próximos */
    radial-gradient(circle, hsl(270 35% 25% / 0.4) 1.5px, transparent 1.5px),
    /* Padrão secundário para profundidade */
    radial-gradient(circle, hsl(270 30% 20% / 0.2) 1px, transparent 1px),
    /* Efeito de gradiente sutil para profundidade */
    radial-gradient(circle at 20% 30%, hsl(270 30% 12% / 0.3) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, hsl(270 25% 10% / 0.2) 0%, transparent 50%);
  background-size: 24px 24px, 12px 12px, 100% 100%, 100% 100%;
  background-position: 0 0, 6px 6px, 0 0, 0 0;
  background-attachment: fixed;
}

/* Gradiente radial para efeito central */
.bg-gradient-radial {
  background: radial-gradient(circle, var(--tw-gradient-stops));
}



/* Footer - escuro no modo escuro */
footer,
footer[class*="bg-gradient"],
footer[class*="bg-background"] {
  background: hsl(12 0% 10%) !important;
  background-color: hsl(12 0% 10%) !important;
  background-image: none !important;
  border-top-color: rgba(255, 255, 255, 0.15) !important;
}

footer [class*="border-white/10"],
footer .border-t {
  border-color: rgba(255, 255, 255, 0.15) !important;
}

footer [class*="bg-white/5"] {
  background-color: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

footer [class*="hover:bg-white/5"],
footer [class*="hover:bg-primary/20"] {
  background-color: rgba(255, 255, 255, 0.1) !important;
}

footer h2,
footer .text-foreground {
  color: hsl(0 0% 95%) !important;
}

footer .text-foreground-secondary {
  color: hsl(0 0% 75%) !important;
}

footer svg {
  color: hsl(0 0% 95%) !important;
}

footer a {
  color: hsl(0 0% 80%) !important;
  transition: color 0.2s ease;
}

footer a:hover {
  color: hsl(var(--primary)) !important;
}

/* Navbar - sempre escuro */
header,
header.sticky,
header[class*="bg-background"] {
  background: hsl(12 0% 10%) !important;
  background-color: hsl(12 0% 10%) !important;
  border-bottom-color: rgba(255, 255, 255, 0.15) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  overflow: visible !important;
  overflow-x: hidden !important;
  overflow-y: visible !important;
  width: 100%;
  z-index: 100 !important;
  position: sticky;
  top: 0;
  max-height: none !important;
  height: auto !important;
}

header button,
header a {
  position: relative;
  z-index: 101 !important;
  pointer-events: auto !important;
  cursor: pointer !important;
}

/* Garantir que o container do navbar não cause overflow */
header .container {
  overflow: visible !important;
  overflow-x: hidden !important;
  overflow-y: visible !important;
  max-width: 100%;
  position: relative;
  z-index: 100;
  max-height: none !important;
  height: auto !important;
}

header nav {
  position: relative;
  z-index: 100;
  overflow: visible !important;
  overflow-x: hidden !important;
  overflow-y: visible !important;
  max-height: none !important;
  height: auto !important;
}

/* Resultados de pesquisa - FORA do header */
#search-result,
#search-result-mobile {
  z-index: 9999 !important;
  max-height: 450px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch;
  border-radius: 0.5rem;
}

#search-result-mobile {
  max-height: 400px !important;
}

/* Dropdowns também devem aparecer fora */
header [class*="dropdown"],
header [id*="dropdown"],
header [class*="menu"],
#support-menu,
#profile-menu {
  overflow: visible !important;
  position: absolute !important;
  z-index: 102 !important;
}

/* Garantir que dropdowns apareçam fora */
#support-menu,
#profile-menu {
  top: calc(100% + 0.5rem) !important;
}

/* Remover scroll do header completamente */
header {
  overflow-y: visible !important;
  overflow-x: hidden !important;
  max-height: none !important;
  height: auto !important;
}

/* Elementos do header não devem ter scroll, exceto resultados de pesquisa */
header > *:not(#search-result):not(#search-result-mobile),
header nav > *:not(#search-result):not(#search-result-mobile),
header .container > *:not(#search-result):not(#search-result-mobile) {
  overflow-y: visible !important;
}

/* Navbar mobile - evitar corte */
@media (max-width: 640px) {
  header nav {
    overflow-x: hidden !important;
    overflow-y: visible !important;
  }

  header .container {
    padding-left: 1rem;
    padding-right: 1rem;
    overflow: visible !important;
    overflow-y: visible !important;
    overflow-x: hidden !important;
  }
}

header [class*="border-white/10"] {
  border-color: rgba(255, 255, 255, 0.1) !important;
}

header [class*="bg-white/5"] {
  background-color: rgba(255, 255, 255, 0.05) !important;
}

header [class*="hover:bg-white/5"] {
  background-color: rgba(255, 255, 255, 0.1) !important;
}

/* Texto no header - sempre claro */
header h1,
header .text-foreground {
  color: hsl(0 0% 95%) !important;
}

header .text-foreground-secondary {
  color: hsl(0 0% 70%) !important;
}

header svg {
  color: hsl(0 0% 95%) !important;
}

header .text-muted-foreground {
  color: hsl(0 0% 70%) !important;
}

/* Glass morphism effect */
.glass {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Card hover effects */
.card-hover {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
}

.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%;
  }
}

.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);
  }
}

/* Custom Checkbox */
#terms-checkbox {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

#terms-checkbox + label {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.2s ease;
  background-color: transparent;
}

#terms-checkbox + label:hover {
  border-color: hsl(var(--primary) / 0.5);
}

#terms-checkbox:focus + label {
  outline: 2px solid hsl(var(--primary) / 0.5);
  outline-offset: 2px;
}

#terms-checkbox:checked + label {
  background-color: hsl(var(--primary));
  border-color: hsl(var(--primary));
}

#terms-checkbox:checked + label svg {
  opacity: 1;
}

#terms-checkbox + label svg {
  opacity: 0;
  transition: opacity 0.2s ease;
}

/* Order Bump Animations */
@keyframes gradient {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.animate-gradient {
  background-size: 200% 200%;
  animation: gradient 3s ease infinite;
}

/* Skeleton Loading Animation */
@keyframes skeleton-pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.package-skeleton {
  animation: skeleton-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.package-skeleton > div {
  animation: skeleton-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Urgency Badge Animation */
@keyframes urgency-pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.9;
    transform: scale(1.02);
  }
}

.urgency-badge {
  animation: urgency-pulse 2s ease-in-out infinite;
}

/* Stock Low Warning */
.stock-low-warning {
  position: relative;
}

.stock-low-warning::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, rgba(239, 68, 68, 0.3), rgba(220, 38, 38, 0.3));
  border-radius: inherit;
  z-index: -1;
  animation: urgency-pulse 2s ease-in-out infinite;
}

/* Badges de Urgência e Social Proof - Profissionais */
.urgency-badge {
  animation: pulse-urgency 2s ease-in-out infinite;
}

@keyframes pulse-urgency {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
  }
}

/* Delivery Badge */
.delivery-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.5rem;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: white;
}

.delivery-badge-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.delivery-badge-text {
  white-space: nowrap;
}

/* Sidebar categories */
