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

@layer base {
}

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

#category-section,
#category #products-list {
    scroll-margin-top: 100px;
    transition:
        opacity 0.5s ease-out,
        transform 0.5s ease-out;
    opacity: 0;
    transform: translateY(20px);
}

#category-section.visible,
#category #products-list.visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes loading {
    0% {
        left: -50%;
    }

    to {
        left: 100%;
    }
}


/* =========================================================
   LUNARSHOPE CUSTOM STYLES & LAYOUT
   ========================================================= */

/* ANÚNCIO ONLINE 24 HORAS (MARQUEE) */
.lunar-announcement {
  position: relative;
  z-index: 50;
  display: flex;
  align-items: center;
  width: 100%;
  height: 37px;
  overflow: hidden;
  color: #050505;
  background: #00FF44;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.lunar-announcement-track {
  display: flex;
  align-items: center;
  width: max-content;
  min-width: max-content;
  will-change: transform;
  animation: lunarAnnouncementScroll 28s linear infinite;
}

.lunar-announcement-group {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.lunar-announcement-item {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
  padding: 0 24px;
  color: #050505;
  font-family: "Geist", sans-serif;
  font-size: 13px;
  font-weight: 800;
  line-height: 37px;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.lunar-announcement-separator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: rgba(0, 0, 0, 0.40);
  font-size: 8px;
  line-height: 1;
}

.lunar-online-dot {
  position: relative;
  display: inline-block;
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 999px;
  background: #16c95d;
  box-shadow: 0 0 0 2px rgba(22, 201, 93, 0.12), 0 0 8px rgba(22, 201, 93, 0.55);
}

.lunar-online-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border: 1px solid rgba(22, 201, 93, 0.65);
  border-radius: 999px;
  animation: lunarOnlinePulse 1.8s ease-out infinite;
}

@keyframes lunarAnnouncementScroll {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-50%, 0, 0); }
}

@keyframes lunarOnlinePulse {
  0% { transform: scale(0.65); opacity: 0.9; }
  70%, 100% { transform: scale(1.8); opacity: 0; }
}

@media (max-width: 640px) {
  .lunar-announcement { height: 34px; }
  .lunar-announcement-item { gap: 7px; padding: 0 16px; font-size: 11px; line-height: 34px; }
  .lunar-announcement-track { animation-duration: 22s; }
  .lunar-online-dot { width: 7px; height: 7px; flex-basis: 7px; }
}

/* FUNDO GRID TÉCNICO (DARK CYBER) */
body {
  background-color: #0c0c10 !important;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px),
    radial-gradient(circle, rgba(255,255,255,.16) .7px, transparent 1px) !important;
  background-size: 46px 46px, 46px 46px, 23px 23px !important;
  background-position: center top, center top, 11px 11px !important;
  background-attachment: fixed !important;
}

/* NAVBAR LUNAR */
#lunar-navbar {
  --neon-green: #00FF44;
  --surface: #111112;
  --border: rgba(255,255,255,.10);
  position: sticky;
  top: 0;
  z-index: 40;
  width: 100%;
  padding: 12px 0;
  background: rgba(11, 11, 14, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,.07);
}

.lunar-container {
  width: min(1400px, calc(100% - 28px));
  margin: 0 auto;
}

.lunar-nav {
  position: relative;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.lunar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: #fff;
  text-decoration: none;
}

.lunar-logo {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  object-fit: contain;
  border-radius: 8px;
}

.lunar-brand-info {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.lunar-store-name {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #f5f5f5;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.02em;
}

.lunar-check {
  position: relative;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.lunar-menu {
  height: 44px;
  display: flex;
  align-items: center;
  padding: 3px 5px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 999px;
  background: rgba(17,17,18,.94);
}

.lunar-menu-item {
  position: relative;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255,255,255,.82);
  font-size: 12.5px;
  font-weight: 550;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}

.lunar-menu-item:hover {
  color: #fff;
  background: rgba(255,255,255,.07);
}

.lunar-menu-item svg,
.lunar-menu-item i {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.lunar-menu-item + .lunar-menu-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 1px;
  height: 16px;
  background: rgba(255,255,255,.08);
}

.lunar-search-trigger {
  width: 36px;
  min-width: 36px;
  padding: 0;
  border: 1px solid rgba(255,255,255,.13);
  color: rgba(255,255,255,.82);
  background: rgba(255,255,255,.04);
}

.lunar-search-trigger::before {
  display: none !important;
}

.lunar-search-trigger:hover {
  color: #00FF44;
  background: rgba(0, 255, 68, .08);
  border-color: rgba(0, 255, 68, .3);
}

.lunar-best-sellers {
  color: #00FF44;
}

.lunar-best-sellers:hover {
  color: #00FF44;
  background: rgba(0, 255, 68, .1);
}

.lunar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lunar-action {
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 16px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  background: rgba(18,18,22,.9);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, transform .1s ease;
}

.lunar-action:hover {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.22);
}

.lunar-action:active {
  transform: scale(0.98);
}

.lunar-action svg,
.lunar-action i {
  width: 16px;
  height: 16px;
}

.lunar-cart {
  color: #050505 !important;
  background: #00FF44 !important;
  border-color: #00FF44 !important;
  font-weight: 700 !important;
  box-shadow: 0 0 14px rgba(0, 255, 68, 0.3);
}

.lunar-cart:hover {
  background: #00d93a !important;
  border-color: #00d93a !important;
}

/* HERO SLIDER */
#custom-hero-slider { isolation: isolate; }
.custom-hero-slide { transition: opacity .55s ease; }
.custom-banner-dot { transition: width .25s ease, background .25s ease; }
.custom-banner-dot.is-active { width: 64px; }
.custom-banner-progress { display: block; }
.custom-banner-progress.is-running { animation: customHeroProgress 5s linear forwards; }
@keyframes customHeroProgress {
  from { width: 0%; }
  to { width: 100%; }
}

@media (max-width: 640px) {
  #custom-hero-slider { border-radius: 14px; }
  .custom-hero-container { aspect-ratio: 16 / 7 !important; }
  .custom-banner-dot { width: 28px !important; }
  .custom-banner-dot.is-active { width: 44px !important; }
}

/* CARDS DE COMUNIDADE (WHATSAPP, DISCORD, AVALIAÇÕES) */
.home-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.home-action-card {
  --action-color: #00FF44;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 18px;
  background: #111115;
  color: #fff;
  text-decoration: none !important;
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.home-action-card:hover {
  transform: translateY(-4px);
  border-color: var(--action-color);
  box-shadow: 0 14px 30px rgba(0,0,0,.35);
}

.home-action-card--whatsapp { --action-color: #25D366; }
.home-action-card--discord { --action-color: #5865F2; }
.home-action-card--reviews { --action-color: #00FF44; }

.home-action-cover {
  position: relative;
  display: flex;
  align-items: flex-end;
  height: 105px;
  padding: 16px;
  overflow: hidden;
  background-color: #1a1a1e;
}

.home-action-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.055) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.055) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(90deg, transparent 20%, black);
}

.home-action-icon {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
}

.home-action-notice {
  position: absolute;
  z-index: 2;
  right: 14px;
  bottom: 16px;
  padding: 6px 11px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 8px;
  background: rgba(13,13,16,.85);
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
  color: #00FF44;
  font-size: 11px;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

/* LUNAR PRODUCT CARDS */
.lunar-product-card {
  background: #111115 !important;
  border: 1px solid rgba(255, 255, 255, 0.09) !important;
  border-radius: 18px !important;
  text-decoration: none !important;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease !important;
}
.lunar-product-card:hover {
  transform: translateY(-4px) !important;
  border-color: rgba(0, 255, 68, 0.5) !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45), 0 0 20px rgba(0, 255, 68, 0.15) !important;
}

@media (max-width: 800px) {
  body {
    padding-bottom: 76px !important;
  }
  .home-actions {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory !important;
    -webkit-overflow-scrolling: touch !important;
    gap: 12px !important;
    padding: 4px 16px 12px 16px !important;
    margin-left: -16px !important;
    margin-right: -16px !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
  }
  .home-actions::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }
  .home-action-card {
    flex: 0 0 76% !important;
    min-width: 250px !important;
    max-width: 300px !important;
    scroll-snap-align: start !important;
  }
  .community-float {
    bottom: 84px !important;
    right: 14px !important;
  }
}

/* BOTÕES FLUTUANTES (WHATSAPP E DISCORD) */
.community-float {
  position: fixed;
  right: 22px;
  bottom: 24px;
  z-index: 45;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  pointer-events: none;
}

.community-float-item {
  position: relative;
  height: 48px;
  width: 48px;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-radius: 999px;
  color: #fff;
  text-decoration: none;
  pointer-events: auto;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  transition: width .25s cubic-bezier(0.4, 0, 0.2, 1), transform .15s ease;
}

.community-float-item:hover,
.community-float-item.is-open {
  width: 220px;
}

.community-float-item:active {
  transform: scale(.96);
}

.community-float-icon {
  width: 48px;
  min-width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.community-float-icon svg {
  width: 24px;
  height: 24px;
}

.community-float-info {
  min-width: 160px;
  padding-right: 16px;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateX(5px);
  transition: opacity .18s ease .05s, transform .18s ease .05s;
}

.community-float-item:hover .community-float-info,
.community-float-item.is-open .community-float-info {
  opacity: 1;
  transform: translateX(0);
}

.community-float-title {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
}

.community-float-stats {
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 5px;
  color: rgba(255,255,255,.8);
  font-size: 10px;
  font-weight: 500;
  white-space: nowrap;
}

.community-online-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #43e86b;
  box-shadow: 0 0 6px #43e86b;
}

.community-whatsapp {
  background: #25D366;
}
.community-whatsapp .community-float-icon {
  background: #25D366;
}

.community-discord {
  background: #5865F2;
}
.community-discord .community-float-icon {
  background: #5865F2;
}

/* LUNAR PRODUCT CARDS */
.lunar-product-card,
#products-list > a {
  background: #111115 !important;
  border: 1px solid rgba(255, 255, 255, 0.09) !important;
  border-radius: 18px !important;
  text-decoration: none !important;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease !important;
  overflow: hidden !important;
}
.lunar-product-card:hover,
#products-list > a:hover {
  transform: translateY(-4px) !important;
  border-color: rgba(0, 255, 68, 0.5) !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45), 0 0 20px rgba(0, 255, 68, 0.15) !important;
}
#products-list > a button {
  display: none !important;
}

/* ANTI-OVERFLOW PROTECTION (CORREÇÃO BUG LATERAL) */
html, body {
  width: 100% !important;
  max-width: 100vw !important;
  overflow-x: hidden !important;
  position: relative !important;
}

@media (max-width: 800px) {
  /* BOTOES DA NAVBAR EM FORMATO DE BOLA NO MOBILE */
  #lunar-navbar {
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
    padding: 8px 0 !important;
  }
  .lunar-nav {
    gap: 8px !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  .lunar-brand {
    min-width: 0 !important;
    flex-shrink: 1 !important;
    gap: 8px !important;
  }
  .lunar-store-name {
    max-width: 115px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: 14px !important;
  }
  .lunar-actions {
    gap: 6px !important;
    flex-shrink: 0 !important;
  }
  /* FORMATO DE BOLA PERFEITA */
  .lunar-round-btn,
  .lunar-action.lunar-round-btn,
  #cart-button,
  #guest-button,
  #profile-button {
    width: 38px !important;
    min-width: 38px !important;
    max-width: 38px !important;
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 !important;
    border-radius: 9999px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
  }
  .lunar-round-btn span,
  #cart-button span,
  #guest-button span,
  #guest-button i[data-lucide="chevron-down"],
  #guest-button svg.lucide-chevron-down {
    display: none !important;
  }
  .lunar-round-btn svg,
  .lunar-round-btn i,
  #cart-button svg,
  #cart-button i,
  #guest-button svg,
  #guest-button i {
    margin: 0 !important;
    width: 17px !important;
    height: 17px !important;
  }

  /* CORREÇÃO DO BUG LATERAL / CAROUSEL */
  .container,
  section {
    max-width: 100vw !important;
    box-sizing: border-box !important;
  }
  .home-actions {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory !important;
    -webkit-overflow-scrolling: touch !important;
    gap: 12px !important;
    padding: 4px 16px 12px 16px !important;
    margin-left: -16px !important;
    margin-right: -16px !important;
    width: calc(100% + 32px) !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
  }
  .home-actions::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }
  .home-action-card {
    flex: 0 0 76% !important;
    min-width: 240px !important;
    max-width: 285px !important;
    scroll-snap-align: start !important;
    box-sizing: border-box !important;
  }
  #custom-hero-slider {
    border-radius: 14px;
    max-width: 100% !important;
  }
  .custom-banner-dot { width: 28px !important; }
  .custom-banner-dot.is-active { width: 44px !important; }
  .community-float {
    bottom: 84px !important;
    right: 14px !important;
  }
  .popular-categories-track {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory !important;
    -webkit-overflow-scrolling: touch !important;
    gap: 12px !important;
    padding: 4px 16px 12px 16px !important;
    margin-left: -16px !important;
    margin-right: -16px !important;
    width: calc(100% + 32px) !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
  }
  .popular-categories-track::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }
  .popular-categories-track > div {
    flex: 0 0 min(58vw, 190px) !important;
    min-width: 160px !important;
    max-width: 200px !important;
    scroll-snap-align: start !important;
    box-sizing: border-box !important;
  }
}

/* POPULAR CATEGORIES (LUNAR SHOPE STYLE) */
.popular-categories-track {
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.popular-categories-track::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
.popular-category {
  background: #111115 !important;
  border: 1px solid rgba(255, 255, 255, 0.09) !important;
  border-radius: 18px !important;
  overflow: hidden !important;
  text-decoration: none !important;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease !important;
}
.popular-category:hover {
  transform: translateY(-4px) !important;
  border-color: rgba(0, 255, 68, 0.5) !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45), 0 0 20px rgba(0, 255, 68, 0.15) !important;
}
.popular-category-image {
  transition: transform 0.45s ease !important;
}
.popular-category:hover .popular-category-image {
  transform: scale(1.04) !important;
}
.popular-category-arrow {
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  background: rgba(255, 255, 255, 0.04) !important;
  color: rgba(255, 255, 255, 0.8) !important;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.25s ease !important;
}
.popular-category:hover .popular-category-arrow {
  background: #00FF44 !important;
  color: #050505 !important;
  border-color: #00FF44 !important;
  transform: translateX(3px) !important;
}

