:root {
  --bg: #0E0E0E;
  --bg-card: #1A1A1A;
  --accent: #C6FF00;
  --text: #F2F2F2;
  --text-dim: #9A9A9A;
  --border: #2A2A2A;

  --font-display: "Oswald", "Impact", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

a {
  color: inherit;
}

/* Header */

.site-header {
  position: relative;
  padding: 64px 0 44px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(14, 14, 14, 0.72) 0%, rgba(14, 14, 14, 0.88) 100%),
    url('img/header-bg.jpg') center 30% / cover no-repeat;
}

.site-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 6vw, 3.2rem);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

.site-title span {
  color: var(--accent);
}

.site-tagline {
  margin-top: 8px;
  color: var(--text-dim);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
}

.header-actions {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.legal-link {
  background: rgba(198, 255, 0, 0.1);
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.legal-link:hover {
  background: var(--accent);
  color: #0E0E0E;
}

/* Trust bar */

.trust-bar {
  border-bottom: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(10, 10, 10, 0.62) 0%, rgba(10, 10, 10, 0.72) 100%),
    url('img/divider-bg.jpg') center 60% / cover no-repeat;
}

.trust-bar-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 28px;
  padding: 24px 20px;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.trust-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--accent);
}

/* Meta bar (última atualização + contador) */

.meta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 12px;
  padding: 18px 0 0;
  color: var(--text-dim);
  font-size: 0.78rem;
  letter-spacing: 0.01em;
}

.meta-bar[hidden] {
  display: none;
}

.meta-sep {
  opacity: 0.5;
}

.meta-item:empty {
  display: none;
}

/* Top ofertas em destaque */

.top-ofertas {
  padding: 26px 0 6px;
}

.top-ofertas[hidden] {
  display: none;
}

.top-ofertas-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text);
  text-align: center;
  margin-bottom: 18px;
}

.top-ofertas-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  max-width: min(760px, 88%);
  margin: 0 auto;
}

.card-featured {
  border: 1px solid var(--accent);
  animation: pulseDestaque 2.6s ease-in-out infinite;
}

@keyframes pulseDestaque {
  0%, 100% {
    box-shadow: 0 0 0 1px rgba(198, 255, 0, 0.2), 0 0 8px rgba(198, 255, 0, 0.12);
  }
  50% {
    box-shadow: 0 0 0 1px rgba(198, 255, 0, 0.75), 0 0 16px rgba(198, 255, 0, 0.45);
  }
}

@media (prefers-reduced-motion: reduce) {
  .card-featured {
    animation: none;
    box-shadow: 0 0 0 1px rgba(198, 255, 0, 0.4);
  }
}

/* Filters bar (filtro de categoria + ordenação) */

.filters-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px 20px;
  padding: 28px 0 8px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.pill {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border);
  padding: 9px 20px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.pill:hover {
  border-color: var(--accent);
}

.pill.active {
  background: var(--accent);
  color: #0E0E0E;
  border-color: var(--accent);
}

/* Sort control */

.sort-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sort-label {
  font-size: 0.8rem;
  color: var(--text-dim);
  white-space: nowrap;
}

.sort-select {
  appearance: none;
  -webkit-appearance: none;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text);
  background: var(--bg-card) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23C6FF00" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M6 9l6 6 6-6"/></svg>') no-repeat right 10px center / 14px;
  border: 1px solid var(--border);
  padding: 9px 34px 9px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.sort-select:hover,
.sort-select:focus {
  border-color: var(--accent);
  outline: none;
}

/* Grid */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  padding: 28px 0 60px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

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

.card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--accent);
  color: #0E0E0E;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 4px 10px;
  border-radius: 6px;
  letter-spacing: 0.02em;
  z-index: 1;
}

.card-image-wrap {
  background: #fff;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.card-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;
}

.card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
}

.card-title {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
}

.card-prices {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.price-original {
  font-size: 0.85rem;
  color: var(--text-dim);
  text-decoration: line-through;
}

.price-promo {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.01em;
}

.card-cta {
  margin-top: auto;
  display: inline-block;
  text-align: center;
  background: var(--accent);
  color: #0E0E0E;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 11px 16px;
  border-radius: 8px;
  text-decoration: none;
  transition: filter 0.15s ease;
}

.card-cta:hover {
  filter: brightness(1.1);
}

.affiliate-note {
  font-size: 0.7rem;
  color: var(--text-dim);
  opacity: 0.8;
}

.empty-state {
  text-align: center;
  color: var(--text-dim);
  padding: 40px 0 80px;
}

/* Pagination */

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 20px 60px;
}

.pagination[hidden] {
  display: none;
}

.page-btn,
.page-num {
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.page-num {
  padding: 0;
}

.page-btn:hover:not(:disabled),
.page-num:hover:not(.active) {
  border-color: var(--accent);
}

.page-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.page-num.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #0E0E0E;
}

.page-ellipsis {
  color: var(--text-dim);
  padding: 0 2px;
  font-size: 0.85rem;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
}

.footer-highlight {
  background: var(--bg);
  padding: 28px 20px;
}

.footer-highlight-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

.footer-heading {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}

.footer-about {
  max-width: 520px;
}

.footer-disclosure {
  border-top: 1px solid var(--border);
  padding-top: 14px;
  width: 100%;
  max-width: 600px;
}

.footer-highlight p {
  color: var(--text-dim);
  font-size: 0.8rem;
  max-width: 700px;
  margin: 0 auto;
}

.copyright {
  color: var(--text-dim);
  font-size: 0.75rem;
  opacity: 0.7;
  text-align: center;
  padding: 22px 20px 26px;
}

/* Modal - Sobre / Informações Legais */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}

.modal-overlay[hidden] {
  display: none;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  max-width: 640px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 32px 28px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 6px;
  display: flex;
  border-radius: 50%;
  transition: color 0.15s ease, background 0.15s ease;
}

.modal-close:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.modal-close svg {
  width: 20px;
  height: 20px;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 20px;
  padding-right: 30px;
}

.modal-body h3 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--accent);
  margin: 20px 0 8px;
}

.modal-body h3:first-child {
  margin-top: 0;
}

.modal-body p {
  color: var(--text-dim);
  font-size: 0.88rem;
  line-height: 1.6;
}

/* Passos numerados (modal Como Comprar) */

.steps-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.step-number {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #0E0E0E;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-content {
  padding-top: 3px;
}

.step-title {
  display: block;
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text);
  margin-bottom: 4px;
}

/* Back to top button */

.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, filter 0.15s ease;
  z-index: 50;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  filter: brightness(1.1);
}

.back-to-top svg {
  width: 20px;
  height: 20px;
}

/* Responsive */

@media (max-width: 600px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .top-ofertas-grid {
    grid-template-columns: 1fr;
    gap: 14px;
    max-width: min(260px, 82%);
  }

  .top-ofertas-title {
    margin-bottom: 14px;
  }

  .meta-bar {
    font-size: 0.72rem;
    padding: 14px 0 0;
  }

  .filters-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 22px 0 8px;
  }

  .sort-control {
    justify-content: space-between;
  }

  .sort-select {
    flex: 1;
  }

  .card-body {
    padding: 12px;
  }

  .price-promo {
    font-size: 1.3rem;
  }

  .card-cta {
    font-size: 0.8rem;
    padding: 9px 12px;
  }

  .trust-bar-inner {
    gap: 6px 16px;
    padding: 10px 16px;
  }

  .trust-item {
    font-size: 0.72rem;
  }

  .back-to-top {
    width: 42px;
    height: 42px;
    right: 14px;
    bottom: 14px;
  }

  .modal {
    padding: 24px 20px;
    max-height: 90vh;
  }

  .modal-title {
    font-size: 1.15rem;
  }

  .pagination {
    gap: 6px;
    padding: 6px 14px 40px;
  }

  .page-btn,
  .page-num {
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    font-size: 0.78rem;
  }

  .page-num {
    padding: 0;
  }

  .header-actions {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 16px;
  }

  .legal-link {
    font-size: 0.7rem;
    padding: 6px 12px;
  }
}

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