@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --bg: #0a0a0b;
  --bg2: #111113;
  --bg3: #1a1a1e;
  --bg4: #222228;
  --border: rgba(255,255,255,0.07);
  --border-hover: rgba(255,255,255,0.14);
  --text: #f0f0f2;
  --text2: #a0a0b0;
  --text3: #606070;
  --accent: #7c6af7;
  --accent2: #9d8fff;
  --accent-glow: rgba(124,106,247,0.18);
  --success: #22c55e;
  --danger: #ef4444;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 48px rgba(0,0,0,0.6);
  --transition: 0.2s cubic-bezier(0.4,0,0.2,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── NAV ── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,10,11,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #fff 0%, var(--accent2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
}

.topbar nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.topbar nav a {
  color: var(--text2);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.topbar nav a:hover {
  color: var(--text);
  background: var(--bg3);
}

.topbar nav a.active {
  color: var(--text);
  background: var(--bg3);
}

.cart-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  font-family: 'Inter', sans-serif;
}

.cart-btn:hover {
  border-color: var(--accent);
  color: var(--accent2);
  background: var(--accent-glow);
}

.cart-badge {
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 20px;
  min-width: 20px;
  text-align: center;
}

/* ── CONTAINER ── */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 40px 32px;
}

.small-container {
  max-width: 480px;
  margin: 0 auto;
}

/* ── HERO ── */
.hero {
  text-align: center;
  padding: 64px 32px 48px;
}

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-glow);
  border: 1px solid rgba(124,106,247,0.3);
  color: var(--accent2);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 20px;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(28px, 5vw, 52px);
  font-weight: 700;
  letter-spacing: -1.5px;
  line-height: 1.15;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #fff 30%, var(--text2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  color: var(--text2);
  font-size: 17px;
  max-width: 480px;
  margin: 0 auto;
}

/* ── FILTER BAR ── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.filter-btn {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text2);
  padding: 7px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  font-family: 'Inter', sans-serif;
}

.filter-btn:hover, .filter-btn.active {
  background: var(--accent-glow);
  border-color: var(--accent);
  color: var(--accent2);
}

/* ── GRID ── */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

/* ── CARD ── */
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  position: relative;
}

.card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.card-img-wrap {
  position: relative;
  overflow: hidden;
  background: var(--bg3);
  height: 220px;
}

.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.card:hover .card-img-wrap img {
  transform: scale(1.04);
}

.card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text2);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 3px 9px;
  border-radius: 20px;
}

.card-content {
  padding: 18px 20px 20px;
}

.card-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
  letter-spacing: -0.2px;
}

.card-desc {
  font-size: 13px;
  color: var(--text3);
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-price {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
}

.card-price span {
  font-size: 12px;
  font-weight: 400;
  color: var(--text3);
}

/* ── BUTTONS ── */
button, .btn {
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  outline: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 500;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
}

.btn-primary:hover {
  background: var(--accent2);
  box-shadow: 0 0 20px var(--accent-glow);
}

.btn-icon {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text2);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  font-size: 16px;
}

.btn-icon:hover {
  background: var(--accent-glow);
  border-color: var(--accent);
  color: var(--accent2);
}

.btn-full {
  width: 100%;
  padding: 13px;
  font-size: 15px;
  border-radius: var(--radius-sm);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text2);
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
}

.btn-outline:hover {
  border-color: var(--border-hover);
  color: var(--text);
}

/* ── FORM PAGES ── */
.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  background: var(--bg);
}

.auth-logo {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #fff 0%, var(--accent2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 32px;
}

.auth-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 36px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
}

.auth-card h1 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.auth-card .subtitle {
  color: var(--text2);
  font-size: 14px;
  margin-bottom: 28px;
}

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text2);
  margin-bottom: 6px;
}

input, textarea, select {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  transition: var(--transition);
  outline: none;
}

input::placeholder, textarea::placeholder {
  color: var(--text3);
}

input:focus, textarea:focus, select:focus {
  border-color: var(--accent);
  background: var(--bg4);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

textarea {
  resize: vertical;
  min-height: 90px;
}

.auth-footer {
  margin-top: 20px;
  text-align: center;
  font-size: 13px;
  color: var(--text3);
}

.auth-footer a {
  color: var(--accent2);
  text-decoration: none;
  font-weight: 500;
}

.auth-footer a:hover { text-decoration: underline; }

/* ── DIVIDER ── */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 24px 0;
}

/* ── CHECKOUT ── */
.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
  align-items: start;
}

@media (max-width: 768px) {
  .checkout-layout { grid-template-columns: 1fr; }
}

.section-title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text3);
  margin-bottom: 14px;
}

.cart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.cart-item:last-child { border-bottom: none; }

.cart-item-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.cart-item-qty {
  font-size: 13px;
  color: var(--text3);
  margin-top: 2px;
}

.cart-item-price {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.order-summary {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--text2);
  margin-bottom: 10px;
}

.summary-row.total {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  padding-top: 14px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}

.pix-result {
  margin-top: 20px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px;
}

.pix-result .pix-code {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px;
  font-family: monospace;
  font-size: 12px;
  color: var(--text2);
  word-break: break-all;
  margin-top: 8px;
}

.pix-note {
  font-size: 12px;
  color: var(--text3);
  margin-top: 10px;
}

/* ── ADMIN ── */
.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 12px;
}

.admin-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }

/* ── TOAST ── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 13px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow);
  animation: toast-in 0.3s ease;
  max-width: 300px;
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: all;
}

.toast.success { border-left: 3px solid var(--success); }
.toast.error   { border-left: 3px solid var(--danger); }

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

@keyframes toast-out {
  to { opacity: 0; transform: translateY(12px); }
}

/* ── LOADING SKELETON ── */
.skeleton {
  background: linear-gradient(90deg, var(--bg3) 25%, var(--bg4) 50%, var(--bg3) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

.skel-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.skel-img  { height: 220px; }
.skel-line { height: 14px; margin: 14px 20px 8px; }
.skel-line.short { width: 60%; margin-bottom: 20px; }

/* ── EMPTY STATE ── */
.empty {
  text-align: center;
  padding: 64px 24px;
  color: var(--text3);
}

.empty-icon { font-size: 40px; margin-bottom: 14px; opacity: 0.5; }
.empty h3 { font-size: 16px; font-weight: 600; color: var(--text2); margin-bottom: 6px; }
.empty p { font-size: 14px; }

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  .topbar { padding: 0 16px; }
  .container { padding: 24px 16px; }
  .auth-card { padding: 28px 20px; }
  .topbar nav a:not(.cart-btn) { display: none; }
}
