/* unLockGames Deals Hub — Quidco-inspired cashback layout */
:root {
  --bg: #f6f7f9;
  --paper: #ffffff;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --yellow: #f5e14a;
  --yellow-ink: #111827;
  --blue: #2563eb;
  --blue-hover: #1d4ed8;
  --red: #e11d48;
  --purple: #6d28d9;
  --green: #059669;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 10px 28px rgba(16, 24, 40, 0.07);
  --radius: 16px;
  --header: #0f172a;
  --cyan: #22d3ee;
  --gold: #fbbf24;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  min-height: 100vh;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

.wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.deals-header {
  background: var(--header);
  color: #e2e8f0;
}

.deals-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
  flex-wrap: wrap;
}

.logo {
  display: inline-flex;
  align-items: baseline;
  gap: 0.08em;
  text-decoration: none;
  line-height: 1;
}

.logo-unlock {
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--cyan);
  font-size: 1.35rem;
}

.logo-games {
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-weight: 700;
  color: var(--gold);
  font-size: 1.45rem;
}

.header-search {
  display: flex;
  flex: 1;
  max-width: 420px;
  min-width: 180px;
}

.header-search input {
  flex: 1;
  border: 1px solid #334155;
  background: #1e293b;
  color: #f8fafc;
  border-radius: 999px 0 0 999px;
  padding: 0.55rem 1rem;
  font: inherit;
}

.header-search input::placeholder { color: #94a3b8; }

.header-search button,
.lang-btn {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.header-search button {
  background: var(--cyan);
  color: #0f172a;
  font-weight: 700;
  padding: 0.55rem 1rem;
  border-radius: 0 999px 999px 0;
}

.lang-switch {
  display: flex;
  gap: 0.35rem;
}

.lang-btn {
  background: #1e293b;
  color: #cbd5e1;
  border-radius: 999px;
  padding: 0.4rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 600;
}

.lang-btn.is-active {
  background: var(--yellow);
  color: var(--yellow-ink);
}

.deals-nav {
  background: #1e293b;
  border-top: 3px solid var(--cyan);
}

.deals-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem;
}

.deals-nav a {
  display: block;
  padding: 0.8rem 1rem;
  color: #cbd5e1;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
}

.deals-nav a:hover { color: var(--cyan); }

.deals-nav a.is-active,
.deals-nav a.nav-deals {
  color: var(--gold);
}

.hero {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.hero-inner { padding: 2.4rem 0 1.6rem; }

.eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
}

.hero h1 {
  margin-top: 0.55rem;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.hero p {
  margin-top: 0.8rem;
  max-width: 42rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 1.25rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.stats strong { color: var(--ink); }

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  padding: 1.1rem 0 0.4rem;
}

.chip {
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.42rem 0.9rem;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}

.chip:hover { border-color: #cbd5e1; }

.chip.is-active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.section { padding: 1.6rem 0 0.4rem; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section h2 {
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.section-count {
  color: var(--muted);
  font-size: 0.88rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.15rem;
}

.deal-card {
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.deal-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(16, 24, 40, 0.12);
}

.deal-card-media {
  position: relative;
  aspect-ratio: 16 / 11;
  min-height: 168px;
  background: linear-gradient(135deg, #dbeafe, #fef3c7);
  overflow: hidden;
}

.deal-card-media img.cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.deal-card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--yellow);
  color: var(--yellow-ink);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.28rem 0.5rem;
  border-radius: 4px;
  z-index: 1;
}

.deal-card-logo {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 136px;
  height: 136px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.14);
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 14px;
  z-index: 1;
}

.deal-card-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: none;
}

.deal-card-logo .fallback,
.brand-logo-lg .fallback {
  font-weight: 800;
  font-size: 1.05rem;
  line-height: 1.2;
  text-align: center;
  color: #0f172a;
  max-width: 100%;
  padding: 4px;
  word-break: break-word;
}

.deal-card-body {
  padding: 1.05rem 1rem 1.05rem;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  flex: 1;
}

.deal-card-brand {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.deal-card-title {
  font-size: 1.05rem;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.deal-card-desc {
  color: var(--muted);
  font-size: 0.88rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.deal-card-meta {
  margin-top: auto;
  padding-top: 0.7rem;
  color: var(--red);
  font-size: 0.82rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.empty {
  padding: 3rem 0;
  text-align: center;
  color: var(--muted);
}

.brand-hero {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 1rem 0 1.45rem;
}

.brand-hero > .wrap {
  display: flex;
  flex-direction: column;
}

.brand-hero-banner {
  display: none;
}

.brand-hero-main {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.25rem 1.5rem;
  align-items: center;
  padding: 0;
}

.brand-identity {
  display: flex;
  gap: 1.1rem;
  align-items: center;
  min-width: 0;
}

.brand-logo-lg {
  width: 148px;
  height: 52px;
  flex-shrink: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: block;
  padding: 0;
  overflow: hidden;
}

.brand-logo-lg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.brand-copy {
  min-width: 0;
}

.brand-kicker {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin: 0;
}

.brand-hero h1 {
  font-size: clamp(1.35rem, 2.8vw, 1.85rem);
  letter-spacing: -0.03em;
  line-height: 1.25;
  margin: 0.18rem 0 0;
}

.brand-meta {
  margin: 0.28rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.cta-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.55rem;
  flex-shrink: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.7rem 1.3rem;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  font: inherit;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
}

.btn-primary:hover { background: var(--blue-hover); }

.btn-ghost {
  background: transparent;
  color: var(--blue);
  font-weight: 700;
  min-height: auto;
  padding: 0;
}

.offer-list { padding: 1.6rem 0 2.5rem; }

.offer-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.1rem 1.15rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: center;
  margin-bottom: 0.8rem;
}

.offer-card h2 {
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.offer-card p {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.3rem;
}

.offer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.55rem;
}

.tag {
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.22rem 0.55rem;
}

.tag-code {
  background: #f5f3ff;
  color: var(--purple);
}

.tag-end {
  background: #fff1f2;
  color: var(--red);
}

.offer-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.45rem;
}

.copy-btn {
  background: #fff;
  border: 1px dashed #c4b5fd;
  color: var(--purple);
  border-radius: 8px;
  padding: 0.35rem 0.7rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.terms h2,
.terms h3 { color: var(--ink); margin-bottom: 0.5rem; font-size: 1rem; }

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.45rem;
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0 0 1rem;
}

.crumbs a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}

.crumbs a:hover {
  color: var(--ink);
}

.crumbs [aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
}

.crumb-sep {
  color: #d1d5db;
  font-weight: 400;
  user-select: none;
}

.seo-copy {
  color: #374151;
  max-width: 46rem;
}

.seo-copy p { margin: 0.7rem 0 0; }

.how-to {
  margin: 2rem 0 1.5rem;
}

.how-to h2,
.faq h2,
.related-wrap h2 {
  font-size: 1.2rem;
  margin-bottom: 0.8rem;
}

.how-to ol {
  padding-left: 1.2rem;
  color: #374151;
}

.how-to li { margin: 0.4rem 0; }

.faq details {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  margin-bottom: 0.55rem;
}

.faq summary {
  font-weight: 700;
  cursor: pointer;
}

.faq details p {
  margin-top: 0.55rem;
  color: #4b5563;
}

.related {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.7rem;
  margin: 0 0 2rem;
}

.related a {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  text-decoration: none;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.related a span {
  font-weight: 600;
  color: var(--muted);
  font-size: 0.82rem;
}

.offer-card h3 {
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.back-link {
  display: inline-flex;
  margin: 1rem 0 0;
  color: var(--blue);
  font-weight: 700;
  text-decoration: none;
}

.deals-footer {
  margin-top: 2.5rem;
  padding: 1.6rem 0 2rem;
  color: var(--muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--line);
}

.deals-footer #disclosure {
  font-size: 0.75rem;
  color: #9ca3af;
  line-height: 1.5;
  max-width: 42rem;
}

.deals-footer a { color: var(--ink); }

.status {
  padding: 3rem 0;
  text-align: center;
  color: var(--muted);
}

@media (max-width: 980px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .brand-hero-main { grid-template-columns: 1fr; }
  .cta-stack { align-items: stretch; }
  .cta-stack .btn { width: 100%; }
  .offer-card { grid-template-columns: 1fr; }
  .offer-actions { align-items: flex-start; }
}

@media (max-width: 640px) {
  .card-grid { grid-template-columns: 1fr; }
  .header-search { max-width: none; flex-basis: 100%; }
  .brand-logo-lg { width: 120px; height: 44px; }
  .brand-hero { padding: 0.85rem 0 1.15rem; }
}
