/* ==========================================================================
   DealKhoj — Clean Minimal Affiliate Deals Site
   PropellerAds Compliant | Mobile-First
   ========================================================================== */

/* Design Tokens */
:root {
  --bg: #FBFAF7;
  --bg-card: #FFFFFF;
  --bg-subtle: #F4F2ED;
  --text: #111111;
  --text-muted: #6B6B6B;
  --text-faint: #9A9A9A;
  --border: #E8E5DF;
  --border-strong: #D4D0C7;
  --accent: #0B6E4F;
  --accent-hover: #085238;
  --accent-bg: #E8F3EE;
  --hot: #DC2626;
  --hot-bg: #FEF2F2;
  --warn: #B45309;
  --warn-bg: #FEF9C3;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --max-w: 1200px;
  --pad-x: clamp(1rem, 3vw, 2rem);

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.06);

  --transition: 180ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* Skip link for accessibility */
.skip-link {
  position: absolute; left: -9999px;
  background: var(--text); color: white;
  padding: 0.75rem 1rem; z-index: 1000;
  border-radius: var(--radius-sm);
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* Container */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

/* Typography */
.font-display { font-family: var(--font-display); font-weight: 500; letter-spacing: -0.01em; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.15;
  color: var(--text);
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.35rem); }

p { color: var(--text-muted); }

/* ==========================================================================
   Navigation
   ========================================================================== */
.nav {
  position: sticky;
  top: 0;
  background: rgba(251, 250, 247, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem var(--pad-x);
  max-width: var(--max-w);
  margin: 0 auto;
}

.logo {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-mark {
  width: 28px; height: 28px;
  background: var(--accent);
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 0.95rem;
  font-family: var(--font-body);
  letter-spacing: -0.03em;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 500;
  transition: color var(--transition);
  position: relative;
}

.nav-links a:hover, .nav-links a.active {
  color: var(--text);
}

.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

.nav-toggle {
  display: none;
  padding: 0.5rem;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
}

.nav-toggle svg { width: 24px; height: 24px; }

@media (max-width: 768px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 0;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; border-bottom: 1px solid var(--border); }
  .nav-links li:last-child { border-bottom: none; }
  .nav-links a {
    display: block;
    padding: 0.9rem var(--pad-x);
  }
  .nav-links a.active::after { display: none; }
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  padding: clamp(3rem, 8vw, 5rem) 0 clamp(2rem, 5vw, 3rem);
  text-align: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-bg);
  padding: 0.4rem 0.85rem;
  border-radius: 100px;
  margin-bottom: 1.25rem;
}

.hero-eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.3); }
}

.hero h1 {
  max-width: 24ch;
  margin: 0 auto 1rem;
}

.hero h1 em {
  font-style: italic;
  color: var(--accent);
  font-weight: 500;
}

.hero-sub {
  max-width: 52ch;
  margin: 0 auto 2rem;
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--text-muted);
}

.hero-ctas {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-md);
  transition: all var(--transition);
  border: 1px solid transparent;
  cursor: pointer;
  line-height: 1;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: white;
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }

.btn-secondary {
  background: var(--bg-card);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-secondary:hover { background: var(--bg-subtle); border-color: var(--text-muted); }

.btn-sm { padding: 0.6rem 1rem; font-size: 0.85rem; }

/* ==========================================================================
   Offer Strip (Bank Offers)
   ========================================================================== */
.offer-strip {
  background: var(--bg-subtle);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 0;
  overflow: hidden;
}

.offer-strip-inner {
  display: flex;
  gap: 1.5rem;
  animation: scroll-offers 40s linear infinite;
  white-space: nowrap;
  width: max-content;
}

@keyframes scroll-offers {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.offer-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 0.6rem 1rem;
  border-radius: 100px;
  font-size: 0.85rem;
  color: var(--text);
  font-weight: 500;
}

.offer-pill-icon {
  font-size: 1rem;
}

.offer-strip:hover .offer-strip-inner { animation-play-state: paused; }

/* ==========================================================================
   Sections
   ========================================================================== */
.section {
  padding: clamp(2.5rem, 6vw, 4.5rem) 0;
}

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

.section-head h2 {
  max-width: 28ch;
}

.section-head p {
  margin-top: 0.5rem;
  max-width: 52ch;
  font-size: 0.95rem;
}

.section-head-link {
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: gap var(--transition);
}

.section-head-link:hover { gap: 0.6rem; }

/* ==========================================================================
   Product Grid
   ========================================================================== */
.grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--transition);
  position: relative;
}

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

.product-img-wrap {
  aspect-ratio: 4/3;
  background: var(--bg-subtle);
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 300ms ease;
}

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

.product-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: var(--hot);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-sm);
  letter-spacing: 0.03em;
}

.product-retailer {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text);
}

.product-body {
  padding: 1rem 1.1rem 1.1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
}

.product-price-row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.product-price {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  font-family: var(--font-display);
}

.product-mrp {
  font-size: 0.85rem;
  color: var(--text-faint);
  text-decoration: line-through;
}

.product-discount {
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 600;
}

.product-cta {
  margin-top: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.product-cta-btn {
  flex: 1;
  padding: 0.7rem 1rem;
  background: var(--text);
  color: white;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  transition: background var(--transition);
}

.product-cta-btn:hover { background: var(--accent); }

/* ==========================================================================
   Categories
   ========================================================================== */
.categories {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.cat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1rem;
  text-align: center;
  transition: all var(--transition);
  display: block;
}

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

.cat-icon {
  width: 48px; height: 48px;
  background: var(--accent-bg);
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  color: var(--accent);
}

.cat-icon svg { width: 24px; height: 24px; }

.cat-title {
  font-weight: 600;
  color: var(--text);
  font-size: 0.95rem;
}

.cat-count {
  font-size: 0.8rem;
  color: var(--text-faint);
  margin-top: 0.15rem;
}

/* ==========================================================================
   How It Works
   ========================================================================== */
.how-it-works {
  background: var(--bg-subtle);
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 5vw, 3.5rem) var(--pad-x);
}

.steps {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-top: 2.5rem;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.step-num {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 500;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 1rem;
  font-style: italic;
}

.step h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0;
}

.step p {
  font-size: 0.95rem;
}

/* ==========================================================================
   FAQ
   ========================================================================== */
.faq-list {
  max-width: 780px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-question {
  width: 100%;
  padding: 1.25rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  gap: 1rem;
}

.faq-question span:last-child {
  flex-shrink: 0;
  width: 24px; height: 24px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 400;
  font-size: 1rem;
  transition: transform var(--transition);
}

.faq-item.open .faq-question span:last-child {
  transform: rotate(45deg);
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.faq-answer {
  display: none;
  padding: 0 0 1.25rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 68ch;
}

.faq-item.open .faq-answer { display: block; }

/* ==========================================================================
   Retailers Row
   ========================================================================== */
.retailers {
  display: flex;
  gap: clamp(1.5rem, 4vw, 3rem);
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  padding: 2rem 0;
}

.retailer-tag {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: -0.02em;
  opacity: 0.8;
  transition: opacity var(--transition);
}

.retailer-tag:hover { opacity: 1; color: var(--text); }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  background: var(--text);
  color: rgba(255, 255, 255, 0.7);
  padding: 3rem 0 2rem;
  margin-top: 4rem;
}

.footer-disclosure {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 2.5rem;
  font-size: 0.85rem;
  line-height: 1.6;
}

.footer-disclosure strong {
  color: white;
  font-weight: 600;
}

.footer-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  margin-bottom: 2.5rem;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
}

.footer-brand .logo {
  color: white;
  margin-bottom: 0.75rem;
}

.footer-brand p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.65);
  max-width: 40ch;
}

.footer-col h4 {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  color: white;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-col a {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.65);
  transition: color var(--transition);
}

.footer-col a:hover { color: white; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
}

/* ==========================================================================
   Legal Pages (Privacy, Terms, etc.)
   ========================================================================== */
.page-head {
  padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(1.5rem, 4vw, 2.5rem);
  border-bottom: 1px solid var(--border);
}

.page-head h1 {
  max-width: 30ch;
}

.page-head-sub {
  color: var(--text-muted);
  margin-top: 0.75rem;
  font-size: 1rem;
}

.page-meta {
  font-size: 0.85rem;
  color: var(--text-faint);
  margin-top: 1rem;
}

.prose {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 3rem) 0;
}

.prose h2 {
  font-size: 1.4rem;
  margin: 2.5rem 0 1rem;
}

.prose h2:first-child { margin-top: 0; }

.prose h3 {
  font-size: 1.1rem;
  margin: 1.75rem 0 0.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0;
}

.prose p, .prose li {
  color: var(--text);
  margin-bottom: 1rem;
  font-size: 1rem;
  line-height: 1.75;
}

.prose ul, .prose ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.prose li { margin-bottom: 0.4rem; }

.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}

.prose a:hover { text-decoration-thickness: 2px; }

.prose strong { color: var(--text); font-weight: 600; }

/* ==========================================================================
   Contact Page
   ========================================================================== */
.contact-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr 1fr;
  max-width: 960px;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 3rem) 0;
}

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

.contact-info {
  background: var(--bg-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.contact-info h3 {
  font-size: 1.15rem;
  margin-bottom: 1rem;
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0;
}

.contact-row {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  align-items: flex-start;
}

.contact-row-icon {
  width: 36px; height: 36px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}

.contact-row-icon svg { width: 18px; height: 18px; }

.contact-row-label { font-size: 0.8rem; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.04em; }
.contact-row-value { color: var(--text); font-weight: 500; }

.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  font: inherit;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--text);
  transition: border-color var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-bg);
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
  font-family: inherit;
}

/* ==========================================================================
   Utilities
   ========================================================================== */
.text-center { text-align: center; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.sr-only {
  position: absolute !important;
  width: 1px !important; height: 1px !important;
  padding: 0 !important; margin: -1px !important;
  overflow: hidden !important; clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important; border: 0 !important;
}

/* ==========================================================================
   Deals Page Specific
   ========================================================================== */
.filter-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.filter-chip {
  padding: 0.5rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}

.filter-chip:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.filter-chip.active {
  background: var(--text);
  color: white;
  border-color: var(--text);
}
