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);
  }
}



.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 {
  /* Grade removida - fundo liso */
}

.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;
}

/* Custom scrollbar */
.custom-scrollbar::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: hsl(var(--muted) / 0.3);
  border-radius: 10px;
  margin: 8px 0;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: hsl(var(--primary) / 0.4);
  border-radius: 10px;
  transition: background 0.2s ease, width 0.2s ease;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: hsl(var(--primary) / 0.7);
  background-clip: padding-box;
}

.custom-scrollbar::-webkit-scrollbar-thumb:active {
  background: hsl(var(--primary));
  background-clip: padding-box;
}

.custom-scrollbar::-webkit-scrollbar-corner {
  background: transparent;
}

/* Firefox scrollbar */
.custom-scrollbar {
  scrollbar-width: thin;
  scrollbar-color: hsl(var(--primary) / 0.4) hsl(var(--muted) / 0.3);
}

.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);
  }
}
/* Categories Dropdown */
#categories-dropdown {
  transform: translateY(-10px);
}

#categories-dropdown.opacity-100 {
  transform: translateY(0);
}

#categories-dropdown.visible {
  display: block !important;
}

/* Mobile Category Dropdown */
#mobile-category-dropdown-menu:not(.hidden) {
  animation: dropdownFadeIn 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Sidebar categories */

/* Prevent horizontal overflow */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

* {
  box-sizing: border-box;
}

/* Trust Banner Animations */
.trust-banner {
  backdrop-filter: blur(10px);
}

/* Trust Banner Scrolling Animation */
.trust-scroller {
  mask-image: linear-gradient(to right, transparent, white 15%, white 85%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, white 15%, white 85%, transparent);
}

.trust-scroll-list {
  animation: trust-scroll var(--animation-duration, 85s) linear infinite var(--animation-direction, reverse);
}

@keyframes trust-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* Secondary Navbar */
#secondary-categories-btn {
  position: relative;
}

#secondary-categories-btn::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: hsl(var(--primary));
  transition: width 0.3s ease;
}

#secondary-categories-btn:hover::after {
  width: 80%;
}

/* Hide scrollbar in secondary navbar */
.secondary-navbar-scroll {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

.secondary-navbar-scroll::-webkit-scrollbar {
  display: none;  /* Chrome, Safari and Opera */
}

/* Cart Drawer Position - Centralizado como o card de pesquisa */
.cart-drawer-position {
  left: 50%;
  transform: translateX(-50%);
  right: auto;
  max-width: calc(100vw - 2rem);
}

@media (min-width: 640px) {
  .cart-drawer-position {
    max-width: 400px;
  }
}

/* Hero Banner - Full Width */
.space-y-6 > .hero-banner-section {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  margin-top: calc(-8rem - 3rem + 130px);
}

.space-y-6 > .hero-banner-section img {
  width: 100%;
  border-radius: 0;
}

/* Prevenir flash ao carregar página com anúncio */
header:has(+ * #top-announce),
body:has(#top-announce) header {
  transition: top 0.1s ease-out;
}

/* Garantir que o header inicie com posição correta quando anúncio existe */
body:has(#top-announce) header {
  top: var(--announce-height, 3.5rem) !important;
}

/* Garantir que o secondary-navbar inicie com posição correta quando anúncio existe */
body:has(#top-announce) #secondary-navbar {
  top: calc(var(--announce-height, 3.5rem) + 72px) !important;
}

/* Remover transição durante carregamento inicial */
.secondary-navbar-no-transition,
.header-no-transition {
  transition: none !important;
}

/* Overlay com gradiente da cor primária ao passar o mouse - aparece apenas nas áreas transparentes */
.hover-gradient-overlay {
  position: relative;
}

.hover-gradient-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom right, hsl(var(--primary) / 0.15), hsl(var(--primary) / 0.05), transparent);
  opacity: 0;
  transition: opacity 0.2s ease;
  border-radius: inherit;
  pointer-events: none;
  z-index: 1;
}

.hover-gradient-overlay img,
.hover-gradient-overlay > div {
  position: relative;
  z-index: 10;
  background: transparent;
  mix-blend-mode: normal;
}

.group:hover .hover-gradient-overlay::before {
  opacity: 1;
}

/* Overlay com gradiente sempre visível - aparece apenas nas áreas transparentes */
.gradient-overlay {
  position: relative;
}

.gradient-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom right, hsl(var(--primary) / 0.15), hsl(var(--primary) / 0.05), transparent);
  opacity: 1;
  border-radius: inherit;
  pointer-events: none;
  z-index: 1;
}

.gradient-overlay img,
.gradient-overlay > div {
  position: relative;
  z-index: 10;
  background: transparent;
  mix-blend-mode: normal;
}

/* Prevenir flash de slides desorganizados no hero carousel */
#hero-carousel.hero-carousel-loading .keen-slider__slide {
  opacity: 0;
  visibility: hidden;
  position: absolute;
  width: 100%;
  height: 100%;
}

#hero-carousel.hero-carousel-ready .keen-slider__slide {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  position: relative;
}

/* Animação suave para o botão "Ver produto" */
@keyframes gentle-pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 hsl(var(--primary) / 0.4);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 0 8px hsl(var(--primary) / 0);
  }
}

@keyframes gentle-glow {
  0%, 100% {
    box-shadow: 0 0 3px hsl(var(--primary) / 0.2);
  }
  50% {
    box-shadow: 0 0 10px hsl(var(--primary) / 0.4), 0 0 18px hsl(var(--primary) / 0.2);
  }
}

/* Aplicar animação ao botão "Ver produto" */
button.btn-primary.animate-ver-produto,
button.btn-primary[onclick*="openDialog('redeem-"] {
  animation: gentle-pulse 2s ease-in-out infinite, gentle-glow 2s ease-in-out infinite;
  position: relative;
}

button.btn-primary.animate-ver-produto:hover,
button.btn-primary[onclick*="openDialog('redeem-"]:hover {
  animation: none;
  transform: scale(1.05);
  box-shadow: 0 0 20px hsl(var(--primary) / 0.5);
}

/* FAQ Accordion Styles */
.faq-item {
  transition: all 0.2s ease;
}

.faq-question {
  cursor: pointer;
  user-select: none;
}

.faq-answer {
  max-height: 0;
  transition: max-height 0.3s ease-out, opacity 0.2s ease-out;
  opacity: 0;
  overflow: hidden;
}

.faq-item.open .faq-answer {
  max-height: 1000px;
  opacity: 1;
  transition: max-height 0.4s ease-in, opacity 0.3s ease-in;
}

.faq-icon {
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

/* FAQ Sidebar Navigation */
.faq-nav-item.active,
.faq-nav-item-mobile.active {
  background-color: rgb(var(--muted));
  color: rgb(var(--foreground));
  font-weight: 600;
}

.faq-nav-item,
.faq-nav-item-mobile {
  text-decoration: none;
}

/* Scroll offset para seções */
.faq-section {
  scroll-margin-top: 120px;
}

/* FAQ Sidebar Fixa */
#faq-sidebar {
  position: fixed;
  left: 0;
  top: 8rem;
  width: 16rem;
  height: calc(100vh - 8rem);
  max-height: calc(100vh - 8rem);
  z-index: 5;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 2rem 1.5rem;
  background-color: rgb(var(--background));
  border-right: 1px solid rgb(var(--border));
}

/* Espaçador para sidebar - aplicado imediatamente */
.faq-sidebar-spacer {
  width: 16rem;
  flex-shrink: 0;
  min-width: 16rem;
}

#faq-sidebar.custom-scrollbar {
  scrollbar-width: thin;
  scrollbar-color: hsl(var(--primary) / 0.4) hsl(var(--muted) / 0.3);
}

#faq-sidebar.custom-scrollbar::-webkit-scrollbar {
  width: 8px;
}

#faq-sidebar.custom-scrollbar::-webkit-scrollbar-track {
  background: hsl(var(--muted) / 0.3);
  border-radius: 10px;
}

#faq-sidebar.custom-scrollbar::-webkit-scrollbar-thumb {
  background: hsl(var(--primary) / 0.4);
  border-radius: 10px;
  transition: background 0.2s ease;
}

#faq-sidebar.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: hsl(var(--primary) / 0.7);
}

.faq-sidebar-nav {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.faq-sidebar-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: rgb(var(--muted-foreground));
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.faq-sidebar-links {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.faq-sidebar-links .faq-nav-item {
  display: block;
  padding: 0.5rem 0.75rem;
  color: rgb(var(--muted-foreground));
  text-decoration: none;
  transition: all 0.2s ease;
  border-radius: 0.375rem;
  font-size: 0.875rem;
}

.faq-sidebar-links .faq-nav-item:hover {
  color: rgb(var(--foreground));
  background-color: rgb(var(--muted) / 0.5);
}

.faq-sidebar-links .faq-nav-item.active {
  color: rgb(var(--foreground));
  background-color: rgb(var(--muted));
  font-weight: 600;
}

@media (max-width: 1023px) {
  #faq-sidebar {
    display: none;
  }
}

/* Garantir que o footer fique acima do sidebar e do content-loader */
footer {
  position: relative;
  z-index: 60;
}

/* ============================================
   TELA DE CARREGAMENTO (LOADER)
   ============================================ */

.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgb(var(--background));
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.5s ease-out;
}

.page-loader.hidden {
  display: none;
}

.page-loader.fade-out {
  opacity: 0;
}

.loader-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  text-align: center;
}

/* Texto "Bem-vindo à" */
.loader-welcome {
  font-size: 0.875rem;
  font-weight: 400;
  color: rgb(var(--foreground));
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Logo no loader */
.loader-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
}

.loader-logo-image {
  max-width: 200px;
  max-height: 120px;
  width: auto;
  height: auto;
  object-fit: contain;
}

@media (max-width: 640px) {
  .loader-logo-image {
    max-width: 150px;
    max-height: 90px;
  }
}

/* Spinner simples - igual ao da pesquisa */
.loader-spinner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loader-spinner-svg {
  width: 40px;
  height: 40px;
  color: rgb(255 255 255 / 0.3);
}

.loader-spinner-fill {
  fill: hsl(var(--primary));
}

/* Texto do loader */
.loader-text {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.loader-title {
  font-size: 1.25rem;
  font-weight: 500;
  color: rgb(var(--foreground));
  margin: 0;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

/* Barra de progresso */
.loader-progress {
  width: 200px;
  height: 4px;
  background: rgb(var(--muted));
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.loader-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, hsl(var(--primary)), hsl(var(--primary) / 0.8));
  border-radius: 2px;
  transition: width 0.3s ease;
  position: relative;
  overflow: hidden;
}

.loader-progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* Responsividade */
@media (max-width: 640px) {
  .loader-spinner {
    width: 60px;
    height: 60px;
  }

  .loader-title {
    font-size: 1.25rem;
  }

  .loader-progress {
    width: 150px;
  }
}

/* ============================================
   LOADER DE CONTEÚDO (Para páginas internas)
   ============================================ */

.content-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgb(var(--background));
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.3s ease-out;
  pointer-events: all;
}

.content-loader.hidden {
  display: none;
}

.content-loader.fade-out {
  opacity: 0;
}

.content-loader-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* Spinner de pontos animados */
.content-loader-spinner {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
}

.spinner-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: hsl(var(--primary));
  animation: dot-bounce 1.4s ease-in-out infinite;
}

.spinner-dot:nth-child(1) {
  animation-delay: 0s;
}

.spinner-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.spinner-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes dot-bounce {
  0%, 80%, 100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  40% {
    transform: scale(1.2);
    opacity: 1;
  }
}

/* Responsividade para content loader */
@media (max-width: 640px) {
  .spinner-dot {
    width: 8px;
    height: 8px;
  }
}