/* ── Base ────────────────────────────────────────────────────────────────── */
* {
  border-color: rgb(var(--border));
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body, 'Roboto Condensed', 'Arial Narrow', Arial, sans-serif);
  background: rgb(var(--background));
  color: rgb(var(--foreground));
  overflow-x: hidden;
}

.page-title {
  font-family: var(--font-body, 'Roboto Condensed', 'Arial Narrow', Arial, sans-serif);
  letter-spacing: 0.04em;
}

/* Button text colour — overrides Tailwind's text-black on primary backgrounds */
.bg-primary {
  color: rgb(var(--btn-text, 0 0 0)) !important;
}

/* Secondary colour utilities — fallback for Tailwind CDN */
.text-secondary {
  color: rgb(var(--secondary));
}
.text-secondary\/70 {
  color: rgb(var(--secondary) / 0.7);
}
.bg-secondary\/10 {
  background-color: rgb(var(--secondary) / 0.1);
}
.bg-secondary\/20 {
  background-color: rgb(var(--secondary) / 0.2);
}
.border-secondary\/20 {
  border-color: rgb(var(--secondary) / 0.2);
}
.border-secondary\/30 {
  border-color: rgb(var(--secondary) / 0.3);
}
.opacity-secondary {
  opacity: 0.6;
}

input,
select {
  appearance: none;
  background-color: rgb(var(--background));
  border: 1px solid rgb(250 250 250 / 0.1);
  border-radius: var(--radius);
  color: rgb(var(--foreground));
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  height: 2rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
}

input:focus-visible,
select:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--primary);
}

/* ── Light mode ──────────────────────────────────────────────────────────── */
[data-theme="light"] {
  --background:       248 248 250;
  --foreground:       18 18 22;
  --text-default:     18 18 22;
  --border:           210 210 218;
  --sidebar:          #ececf0;
  --muted:            235 235 242;
  --muted-contrast:   222 222 232;
  --muted-foreground: 95 100 115;
}

[data-theme="light"] .product-card {
  background-color: rgba(0, 0, 0, 0.03);
  box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.07) inset;
}
[data-theme="light"] .content-card {
  box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.08) inset;
}
[data-theme="light"] .btn-outline {
  background-color: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.12);
  color: rgb(var(--foreground));
}
[data-theme="light"] .btn-outline:hover { background-color: rgba(0, 0, 0, 0.06); }
[data-theme="light"] .btn-ghost:hover   { background-color: rgba(0, 0, 0, 0.06); }
[data-theme="light"] input,
[data-theme="light"] select             { border-color: rgba(0, 0, 0, 0.14); }

/* ── Utility ─────────────────────────────────────────────────────────────── */
[x-cloak] {
  display: none !important;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn-primary {
  background-color: rgb(var(--primary));
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
  padding: 0.5rem 1rem;
  transition: opacity 150ms cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 600;
  font-size: 0.875rem;
  font-family: var(--font-body, 'Roboto Condensed', 'Arial Narrow', Arial, sans-serif);
}
.btn-primary:hover {
  opacity: 0.8;
}

.btn-cart {
  background-image: linear-gradient(to right, var(--primary), var(--primary));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  font-weight: 600;
  color: #ffffff;
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: var(--radius);
  overflow: hidden;
}
.btn-cart:hover {
  opacity: 0.9;
}
.btn-cart:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-secondary {
  background-color: color-mix(in srgb, var(--primary) 20%, transparent);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  transition: opacity 150ms cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 600;
  font-size: 0.875rem;
  font-family: var(--font-body, 'Roboto Condensed', 'Arial Narrow', Arial, sans-serif);
  color: var(--primary);
  border: 1px solid color-mix(in srgb, var(--primary) 20%, transparent);
}
.btn-secondary:hover {
  opacity: 0.8;
}

.btn-outline {
  background-color: rgb(255 255 255 / 0.01);
  backdrop-filter: blur(4px);
  transition-property: color, background-color, border-color;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
  font-weight: 600;
  border: 1px solid rgb(250 250 250 / 0.1);
  border-radius: var(--radius);
  padding-left: 1rem;
  padding-right: 1rem;
  height: 2.25rem;
  display: flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  line-height: 1.25rem;
}
.btn-outline:hover {
  background-color: rgb(255 255 255 / 0.05);
}
.btn-outline:disabled {
  opacity: 0.5;
}

.btn-ghost {
  background-color: transparent;
  transition-property: color, background-color, border-color;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
  font-weight: 600;
  border-radius: var(--radius);
  padding-left: 1rem;
  padding-right: 1rem;
  height: 2.25rem;
  display: flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  line-height: 1.25rem;
}
.btn-ghost:hover {
  background-color: rgb(250 250 250 / 0.05);
}
.btn-ghost:disabled {
  opacity: 0.5;
}

/* ── Cards & Components ──────────────────────────────────────────────────── */
.package-card__actions {
  display: flex;
  height: 3rem;
  border-radius: var(--radius);
  overflow: hidden;
}

.product-card {
  background-color: rgba(255, 255, 255, 0.03);
  box-shadow: 0px 0px 0px 1px rgba(255, 255, 255, 0.05) inset;
  transition: box-shadow 300ms ease;
}

.product-card:hover {
  box-shadow: 0px 0px 0px 1px rgba(255, 255, 255, 0.09) inset;
}

.content-card {
  background-color: var(--sidebar);
  border-radius: 0.5rem;
  box-shadow: 0px 0px 0px 2px rgba(255, 255, 255, 0.03) inset;
}

/* Details icon button */
.product-card__details-btn {
  width: 2.125rem;
  height: 2.125rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background-color: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.6);
  transition:
    background-color 200ms ease,
    color 200ms ease,
    border-color 200ms ease;
}

.product-card__details-btn:hover:not(:disabled) {
  background-color: rgba(255, 255, 255, 0.11);
  color: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.28);
}

/* Cart button */
/* Cart button — Atualizado para estilo Outline */
.package-card__cart-btn {
  background-color: transparent;
  border: 1px solid rgb(var(--primary));
  color: rgb(var(--primary));
  height: 2.125rem;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  padding: 0 0.875rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    background-color 200ms ease,
    color 200ms ease;
  box-shadow: none;
}

.package-card__cart-btn:hover:not(:disabled) {
  background-color: color-mix(in srgb, rgb(var(--primary)) 10%, transparent);
}

.package-card__cart-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Remove / in-cart button */
.package-card__remove-btn {
  background-color: rgba(255, 255, 255, 0.05);
  height: 2.125rem;
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  padding: 0 0.875rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.5rem;
  color: rgba(255, 255, 255, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    background-color 200ms ease,
    color 200ms ease;
}

.package-card__remove-btn:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.8);
}

/* Out of stock button */
.product-card__out-btn {
  height: 2.125rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background-color: rgba(255, 255, 255, 0.02);
  color: rgba(255, 255, 255, 0.2);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: not-allowed;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
}

/* ── Animations ──────────────────────────────────────────────────────────── */
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

@keyframes floatingLogo {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-8px); }
}
.logo-float { animation: floatingLogo 4s ease-in-out infinite; }

@keyframes sidebarGlow {
  0%, 100% { box-shadow: 0 0 0 rgba(29,215,110,0); }
  50%       { box-shadow: 0 0 25px rgba(29,215,110,.12); }
}
.sidebar-animated { animation: sidebarGlow 5s ease-in-out infinite; }

@keyframes banner-shimmer {
  0%   { transform: translateX(-150%) skewX(-20deg); }
  100% { transform: translateX(400%)  skewX(-20deg); }
}
@keyframes banner-glow {
  0%, 100% { filter: brightness(1) saturate(1); }
  50%       { filter: brightness(1.25) saturate(1.4) drop-shadow(0 0 12px currentColor); }
}
.sale-banner-shimmer { animation: banner-shimmer 2.5s ease-in-out infinite; }
.sale-banner-pulse   { animation: banner-glow 2s ease-in-out infinite; }

.custom-scrollbar::-webkit-scrollbar       { width: 4px; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 999px; }

/* ── PIN input ───────────────────────────────────────────────────────────── */
.pin-boxes { display: flex; gap: 10px; justify-content: center; }
.pin-box {
  width: 48px; height: 56px;
  border: 2px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  background: rgba(255,255,255,0.05);
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  caret-color: transparent;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}
.pin-box:focus  { border-color: rgb(var(--primary)); background: rgba(255,255,255,0.08); }
.pin-box.filled { border-color: rgb(var(--primary)); }
.pin-box.error  { border-color: #ef4444 !important; animation: pin-shake 0.3s ease; }
@keyframes pin-shake {
  0%,100% { transform: translateX(0); }
  25%      { transform: translateX(-4px); }
  75%      { transform: translateX(4px); }
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .product-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }
}
