/* Elite Store — pele KOPY (vermelho/preto).
 * Complementa o Tailwind CDN: só o que utilitários não cobrem
 * (estados controlados por JS, animações, pseudo-elementos). */

/* O atributo hidden sempre vence classes de display do Tailwind */
[hidden] {
  display: none !important;
}

/* ---------- Fundo ---------- */
.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%);
  -webkit-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));
  -webkit-mask-image: linear-gradient(hsl(var(--background)), rgba(0, 0, 0, 0.3), rgb(0, 0, 0, 0));
}

/* ---------- Scrollbar fina (sidebar, drawer, dropdowns) ---------- */
.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;
}

/* ---------- Carrinho (drawer lateral) ---------- */
body.cart-open {
  overflow: hidden;
  padding-right: var(--scrollbar-width, 0px);
}

.cart-backdrop {
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}

body.cart-open .cart-backdrop {
  opacity: 1;
  pointer-events: auto;
}

.cart-drawer {
  transform: translateX(105%);
  transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
  visibility: hidden;
}

.cart-drawer.is-open {
  transform: translateX(0);
  visibility: visible;
}

/* Conteúdo do destino da compra (preenchido via JS) */
.cart-target > span {
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.375rem;
  background: hsl(var(--primary) / 0.15);
  border: 1px solid hsl(var(--primary) / 0.3);
  color: hsl(var(--primary));
  font-weight: 700;
}

.cart-target > p {
  min-width: 0;
}

.cart-target b {
  display: block;
  font-weight: 600;
  line-height: 1.2;
}

.cart-target small {
  color: rgb(var(--muted-foreground));
  font-size: 0.75rem;
}

/* Item do carrinho (gerado via JS no formato do KOPY) */
.cart-item__controls button:disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* ---------- Formas de pagamento ---------- */
.payment-method {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgb(var(--border));
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.payment-method:hover {
  background: rgba(255, 255, 255, 0.05);
}

.payment-method.is-selected {
  border-color: hsl(var(--primary));
  background: hsl(var(--primary) / 0.1);
}

.payment-method.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.payment-method__mark {
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.payment-method__mark svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: rgb(var(--foreground));
}

.payment-method__mark--pix {
  background: #32bcad26;
  border-color: #32bcad4d;
}

.payment-method__mark--pix svg {
  fill: #32bcad;
}

.payment-method__mark--paypal svg {
  fill: #a5b8ff;
}

.payment-method__copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.payment-method__copy strong {
  font-size: 0.875rem;
  font-weight: 600;
}

.payment-method__copy small {
  font-size: 0.75rem;
  color: rgb(var(--muted-foreground));
}

.payment-method em {
  font-style: normal;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: rgb(var(--muted-foreground));
}

.payment-method.is-selected em {
  background: hsl(var(--primary) / 0.15);
  color: hsl(var(--primary));
}

/* ---------- Cupom ---------- */
.coupon-feedback.is-valid {
  color: #4ade80;
}

/* ---------- Feedback do catálogo ---------- */
.catalog-feedback__dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: hsl(var(--primary));
  display: inline-block;
  animation: pulse-dot 1.2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.catalog-feedback.is-ready {
  display: none;
}

.catalog-feedback.is-error {
  color: #f87171;
}

.catalog-feedback.is-error .catalog-feedback__dot {
  background: #f87171;
  animation: none;
}

/* ---------- Esqueleto de carregamento ---------- */
.product-skeleton-pill {
  width: 180px;
  height: 40px;
  border-radius: var(--radius);
  background: hsl(var(--primary) / 0.12);
  border: 2px solid hsl(var(--primary) / 0.35);
}

.product-skeleton {
  background: rgba(255, 255, 255, 0.01);
  padding-bottom: 0.75rem;
}

.product-skeleton i,
.product-skeleton span,
.product-skeleton b {
  display: block;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 0.375rem;
  position: relative;
  overflow: hidden;
}

.product-skeleton i {
  aspect-ratio: 16 / 9;
  border-radius: 0;
  margin-bottom: 0.75rem;
}

.product-skeleton span {
  height: 0.8rem;
  margin: 0.5rem 0.75rem 0;
  width: 70%;
}

.product-skeleton span + span {
  width: 45%;
}

.product-skeleton b {
  height: 2.25rem;
  margin: 0.75rem 0.75rem 0;
}

.product-skeleton i::after,
.product-skeleton span::after,
.product-skeleton b::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
  animation: skeleton-shine 1.4s infinite;
}

@keyframes skeleton-shine {
  to { transform: translateX(100%); }
}

/* ---------- Diálogos (produto / Pix) ---------- */
.kopy-dialog {
  background: rgb(var(--background));
  color: rgb(var(--foreground));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  padding: 0;
  width: min(92vw, 860px);
  max-height: min(90dvh, 720px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.kopy-dialog--pix {
  width: min(92vw, 430px);
}

.kopy-dialog::backdrop {
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(2px);
}

.kopy-dialog__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 10;
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(9, 9, 11, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgb(var(--muted-foreground));
  transition: color 0.15s, background 0.15s;
}

.kopy-dialog__close:hover {
  color: rgb(var(--foreground));
  background: rgba(255, 255, 255, 0.08);
}

.kopy-dialog[open] {
  animation: dialog-in 0.2s forwards;
}

@keyframes dialog-in {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Chips de meta do produto (duração, estoque, escolhas) */
.elite-product-card__media {
  aspect-ratio: 4 / 5;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 55%, rgba(255, 48, 65, 0.1), transparent 54%),
    #0b0809;
}

.elite-product-card__media > img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.dialog-meta span,
.package-meta span {
  font-size: 0.7rem;
  font-weight: 600;
  color: rgb(var(--muted-foreground));
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.375rem;
  padding: 0.2rem 0.5rem;
  white-space: nowrap;
}

/* ---------- Toasts (visual Toastify/KOPY) ---------- */
.store-toast {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 310px;
  max-width: 520px;
  width: fit-content;
  padding: 12px;
  background: rgb(var(--background));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  font-size: 0.875rem;
  animation: toast-in 0.25s ease;
}

.store-toast > span {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  background: #f8717126;
  color: #f87171;
}

.store-toast.is-success > span {
  background: #4ade8026;
  color: #4ade80;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- Resultado da busca (dropdown) ---------- */
.search-result-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.5rem 0.75rem;
  text-align: left;
  transition: background 0.12s;
  cursor: pointer;
}

.search-result-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.search-result-item img {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.375rem;
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.04);
}

.search-result-item .search-result-item__name {
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search-result-item .search-result-item__price {
  font-size: 0.8125rem;
  color: rgb(var(--muted-foreground));
  margin-left: auto;
  white-space: nowrap;
}

.search-result-empty {
  padding: 0.75rem;
  font-size: 0.8125rem;
  color: rgb(var(--muted-foreground));
  text-align: center;
}

/* ---------- Retorno de pagamento ---------- */
.payment-return.is-approved .payment-return__icon {
  background: #4ade8026;
  color: #4ade80;
}

.payment-return.is-failure .payment-return__icon {
  background: #f8717126;
  color: #f87171;
}

.payment-return.is-processing .payment-return__icon,
.payment-return.is-pending .payment-return__icon,
.payment-return.is-checking .payment-return__icon {
  background: hsl(var(--primary) / 0.15);
  color: hsl(var(--primary));
}

/* ---------- Ajustes menores ---------- */
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;
}

input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
}
