:root {
  --bg: #090a0f;
  --bg-elevated: #11131c;
  --bg-card: #131622;
  --bg-card-hover: #181c2b;
  --border: rgba(148, 163, 184, 0.14);
  --border-strong: rgba(56, 189, 248, 0.35);
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --sky: #38bdf8;
  --teal: #14b8a6;
  --emerald: #22c55e;
  --amber: #f59e0b;
  --rose: #fb7185;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.42);
}

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

html, body {
  margin: 0;
  padding: 0;
  background: radial-gradient(circle at 12% 0%, rgba(56, 189, 248, 0.08), transparent 40%),
              radial-gradient(circle at 88% 8%, rgba(20, 184, 166, 0.08), transparent 36%),
              var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select {
  font-family: inherit;
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 18px;
}

.accent {
  background: linear-gradient(135deg, var(--sky), var(--teal));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Header */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(9, 10, 15, 0.84);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 68px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
}

.brand-logo {
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(56, 189, 248, 0.22);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-title {
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-sub {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.22);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.92); }
}

.cta-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 13px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform 0.15s ease, filter 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.cta-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.cta-wpp {
  background: rgba(34, 197, 94, 0.14);
  color: #4ade80;
  border-color: rgba(34, 197, 94, 0.34);
}

.cta-tg {
  background: rgba(56, 189, 248, 0.14);
  color: #7dd3fc;
  border-color: rgba(56, 189, 248, 0.34);
}

.cta-bot {
  background: rgba(20, 184, 166, 0.14);
  color: #5eead4;
  border-color: rgba(20, 184, 166, 0.32);
}

.cta-lg {
  padding: 11px 20px;
  font-size: 0.9rem;
}

/* Main / Hero */
.main-content {
  padding-top: 26px;
  padding-bottom: 52px;
}

.hero {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 24px;
}

.hero-copy h1 {
  margin: 0 0 6px;
  font-size: clamp(1.45rem, 2.8vw, 2.05rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.hero-copy p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 680px;
}

.search-wrap {
  position: relative;
  max-width: 620px;
}

.search-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 13px 42px 13px 44px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 0.94rem;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.search-input::placeholder {
  color: var(--text-dim);
}

.search-input:focus {
  border-color: var(--sky);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.16);
}

.clear-search {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(148, 163, 184, 0.16);
  color: var(--text);
  cursor: pointer;
  font-size: 0.78rem;
}

/* Coupons Strip */
.coupons-section {
  margin-bottom: 24px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.08), rgba(56, 189, 248, 0.06));
  border: 1px solid rgba(56, 189, 248, 0.2);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-head h2 {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 700;
}

.section-hint {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.coupons-track {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.25) transparent;
}

.coupon-pill {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 190px;
  padding: 10px 13px;
  border-radius: 12px;
  background: rgba(9, 10, 15, 0.78);
  border: 1px dashed rgba(56, 189, 248, 0.42);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
  flex-shrink: 0;
}

.coupon-pill:hover {
  transform: translateY(-2px);
  border-color: var(--sky);
  background: rgba(17, 22, 34, 0.96);
}

.coupon-pill-top {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.coupon-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--sky);
  letter-spacing: 0.03em;
}

.coupon-store-tag {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(148, 163, 184, 0.16);
  color: var(--text-muted);
}

.coupon-desc {
  font-size: 0.76rem;
  color: var(--text-muted);
}

/* Toolbar */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.store-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.chip:hover {
  color: var(--text);
  border-color: rgba(148, 163, 184, 0.35);
}

.chip.active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(20, 184, 166, 0.2));
  border-color: var(--sky);
  color: #e0f2fe;
}

.chip-count {
  font-size: 0.72rem;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
  color: inherit;
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.results-count {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.sort-select {
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 500;
  outline: none;
  cursor: pointer;
}

.sort-select:focus {
  border-color: var(--sky);
}

/* Offers Grid */
.offers-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

@media (max-width: 1120px) {
  .offers-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  .offers-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px;
  }
}

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

/* Offer Card */
.offer-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

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

.card-media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 205px;
  padding: 14px;
  background: #ffffff;
  overflow: hidden;
}

.card-media img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.25s ease;
}

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

.card-media-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #111827, #1e293b);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.store-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 9px;
  border-radius: 8px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.store-mercadolivre { background: #ffe600; color: #1f2937; }
.store-aliexpress { background: #e62e04; color: #ffffff; }
.store-amazon { background: #ff9900; color: #111827; }
.store-shopee { background: #ee4d2d; color: #ffffff; }
.store-kabum { background: #0060b1; color: #ffffff; }
.store-magalu { background: #0086ff; color: #ffffff; }
.store-americanas { background: #e60014; color: #ffffff; }
.store-casasbahia { background: #0046c0; color: #ffffff; }
.store-default { background: #1e293b; color: #f8fafc; }

.discount-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 8px;
  border-radius: 8px;
  background: #16a34a;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  box-shadow: 0 2px 10px rgba(22, 163, 74, 0.45);
}

.card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 14px 15px 15px;
  gap: 9px;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.73rem;
  color: var(--text-dim);
}

.clicks-pill {
  color: #fbbf24;
  font-weight: 600;
}

.card-headline {
  display: inline-block;
  align-self: flex-start;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(245, 158, 11, 0.15);
  color: #fcd34d;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.card-title {
  margin: 0;
  font-size: 0.93rem;
  font-weight: 600;
  line-height: 1.38;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.56em;
}

.price-block {
  margin-top: auto;
  padding-top: 4px;
}

.price-old {
  display: block;
  font-size: 0.78rem;
  color: var(--text-dim);
  text-decoration: line-through;
  margin-bottom: 1px;
}

.price-now {
  font-size: 1.36rem;
  font-weight: 800;
  color: #4ade80;
  letter-spacing: -0.02em;
}

.price-check {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--sky);
}

.card-coupon-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px dashed rgba(56, 189, 248, 0.45);
  background: rgba(56, 189, 248, 0.08);
  color: #bae6fd;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.card-coupon-btn:hover {
  background: rgba(56, 189, 248, 0.16);
  border-color: var(--sky);
}

.card-coupon-info {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 10px;
  border: 1px solid rgba(20, 184, 166, 0.28);
  background: rgba(20, 184, 166, 0.08);
  color: #99f6e4;
  font-size: 0.76rem;
  font-weight: 600;
}

.card-actions {
  display: flex;
  gap: 8px;
  margin-top: 2px;
}

.btn-buy {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--sky), var(--teal));
  color: #04121d;
  font-size: 0.85rem;
  font-weight: 800;
  transition: filter 0.15s ease, transform 0.15s ease;
}

.btn-buy:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.btn-coins {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 11px;
  border-radius: 11px;
  border: 1px solid rgba(245, 158, 11, 0.42);
  background: rgba(245, 158, 11, 0.12);
  color: #fcd34d;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  transition: background 0.15s ease;
}

.btn-coins:hover {
  background: rgba(245, 158, 11, 0.22);
}

/* Skeleton */
.skeleton-card {
  height: 365px;
  border-radius: var(--radius);
  background: linear-gradient(90deg, var(--bg-card) 25%, #1a1f30 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.3s infinite;
  border: 1px solid var(--border);
}

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

/* Empty & Load More */
.empty-state {
  text-align: center;
  padding: 56px 20px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.empty-icon {
  font-size: 2.3rem;
  margin-bottom: 10px;
}

.empty-state h3 {
  margin: 0 0 8px;
}

.empty-state p {
  margin: 0 0 18px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.btn-secondary, .btn-load-more {
  padding: 11px 22px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: rgba(56, 189, 248, 0.12);
  color: #e0f2fe;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.btn-secondary:hover, .btn-load-more:hover {
  background: rgba(56, 189, 248, 0.22);
  transform: translateY(-1px);
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 26px;
}

/* Community Banner */
.community-banner {
  margin-top: 42px;
  padding: 24px 26px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(17, 24, 39, 0.95), rgba(15, 23, 42, 0.92));
  border: 1px solid rgba(56, 189, 248, 0.24);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.community-text h3 {
  margin: 0 0 6px;
  font-size: 1.12rem;
}

.community-text p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  max-width: 600px;
}

.community-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 26px 0 38px;
  background: rgba(6, 7, 11, 0.7);
}

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

.footer-brand {
  font-size: 0.88rem;
  color: var(--text);
}

.footer-disclaimer {
  margin: 0;
  max-width: 700px;
  font-size: 0.78rem;
  color: var(--text-dim);
  line-height: 1.5;
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--sky);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 11px 18px;
  border-radius: 12px;
  background: #0f172a;
  color: #f8fafc;
  border: 1px solid var(--sky);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  font-size: 0.86rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 90;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 680px) {
  .topbar-inner {
    flex-direction: column;
    align-items: stretch;
    padding-top: 10px;
    padding-bottom: 10px;
    gap: 10px;
  }
  .cta-group {
    justify-content: space-between;
  }
  .cta-btn {
    flex: 1;
    padding: 8px 10px;
    font-size: 0.78rem;
  }
  .toolbar-right {
    width: 100%;
    justify-content: space-between;
  }
}
