/* ============ DealNest — shell styles ============ */
:root {
  --navy: #101f3c;
  --navy-2: #1a2f55;
  --orange: #ff6b1a;
  --orange-dark: #e55a0f;
  --blue: #2563eb;
  --bg: #f6f7fb;
  --card: #ffffff;
  --text: #1e293b;
  --muted: #64748b;
  --line: #e6e9f2;
  --star: #f59e0b;
  --radius: 14px;
  --shadow: 0 2px 12px rgba(16, 31, 60, 0.08);
  --shadow-lg: 0 10px 32px rgba(16, 31, 60, 0.14);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.2s ease;
}
.site-header.scrolled { box-shadow: 0 4px 18px rgba(16, 31, 60, 0.1); }
.header-inner {
  display: flex; align-items: center; gap: 28px;
  height: 68px;
}
.logo { display: flex; align-items: center; gap: 9px; text-decoration: none; font-size: 1.35rem; font-weight: 800; letter-spacing: -0.5px; }
.logo em { font-style: normal; color: var(--orange); }
.main-nav { display: flex; gap: 22px; margin-left: 8px; }
.main-nav a { text-decoration: none; font-weight: 600; font-size: 0.95rem; color: var(--text); opacity: 0.85; }
.main-nav a:hover { color: var(--orange); opacity: 1; }
.search { margin-left: auto; display: flex; align-items: center; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 4px 4px 4px 16px; }
.search input { border: 0; background: transparent; outline: none; font-size: 0.9rem; width: 170px; color: var(--text); }
.search button { border: 0; background: var(--navy); color: #fff; border-radius: 999px; width: 34px; height: 34px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.search button:hover { background: var(--orange); }
.menu-toggle { display: none; background: none; border: 0; cursor: pointer; flex-direction: column; gap: 5px; padding: 8px; }
.menu-toggle span { width: 22px; height: 2.5px; background: var(--navy); border-radius: 2px; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 60%, #27407a 100%);
  color: #fff; overflow: hidden;
}
.hero-inner {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px;
  align-items: center; padding: 72px 20px 80px;
}
.hero-kicker {
  display: inline-block; font-size: 0.78rem; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--orange); background: rgba(255, 107, 26, 0.12); border: 1px solid rgba(255, 107, 26, 0.35);
  padding: 6px 14px; border-radius: 999px; margin-bottom: 18px;
}
.hero h1 { font-size: clamp(2.1rem, 4.5vw, 3.3rem); line-height: 1.12; letter-spacing: -1px; margin-bottom: 16px; }
.hero-sub { color: #c3cede; font-size: 1.08rem; max-width: 480px; margin-bottom: 28px; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 30px; }
.btn { display: inline-block; text-decoration: none; font-weight: 700; padding: 14px 28px; border-radius: 12px; transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease; border: 0; cursor: pointer; font-size: 1rem; }
.btn-primary { background: var(--orange); color: #fff; box-shadow: 0 6px 20px rgba(255, 107, 26, 0.4); }
.btn-primary:hover { background: var(--orange-dark); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: #fff; border: 1.5px solid rgba(255, 255, 255, 0.35); }
.btn-ghost:hover { border-color: #fff; transform: translateY(-2px); }
.hero-trust { list-style: none; display: flex; gap: 22px; flex-wrap: wrap; color: #c3cede; font-size: 0.9rem; font-weight: 600; }
.hero-trust li { display: flex; align-items: center; gap: 7px; }
.hero-trust svg { color: #4ade80; flex-shrink: 0; }

.hero-visual { position: relative; height: 380px; }
.hero-card {
  position: absolute; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: 16px; width: 210px; color: var(--text);
}
.hero-card .hc-badge { position: absolute; top: -12px; right: 12px; background: var(--orange); color: #fff; font-weight: 800; font-size: 0.8rem; padding: 4px 12px; border-radius: 999px; }
.hero-card .hc-badge.hot { background: #dc2626; }
.hero-card .hc-img { height: 110px; border-radius: 8px; background: linear-gradient(135deg, #e0e7ff, #fef3c7); margin-bottom: 12px; }
.hero-card .hc-line { height: 10px; border-radius: 5px; background: var(--line); margin-bottom: 8px; }
.hero-card .hc-line.short { width: 55%; }
.hc1 { top: 10px; left: 6%; transform: rotate(-6deg); animation: float 6s ease-in-out infinite; }
.hc2 { top: 110px; right: 8%; transform: rotate(5deg); animation: float 7s ease-in-out infinite 1s; }
.hc3 { bottom: 0; left: 28%; transform: rotate(-3deg); animation: float 8s ease-in-out infinite 0.5s; }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -14px; } }

/* ---------- Sections ---------- */
section { padding: 64px 0; }
.section-title { font-size: clamp(1.5rem, 3vw, 2.1rem); letter-spacing: -0.5px; margin-bottom: 6px; }
.section-sub { color: var(--muted); margin-bottom: 28px; font-size: 1.02rem; }

/* ---------- Categories ---------- */
.categories { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 48px 0; }
.cat-strip { display: flex; gap: 12px; flex-wrap: wrap; }
.cat-pill {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  background: var(--bg); border: 1.5px solid var(--line); border-radius: 999px;
  padding: 12px 22px; font-weight: 700; font-size: 0.95rem; transition: all 0.15s ease;
}
.cat-pill:hover { border-color: var(--orange); color: var(--orange); transform: translateY(-2px); box-shadow: var(--shadow); }
.cat-ico { font-size: 1.2rem; }

/* ---------- Deals grid ---------- */
.deals-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.sync-pill {
  display: inline-flex; align-items: center; gap: 8px; font-size: 0.82rem; font-weight: 700;
  color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px;
  white-space: nowrap; margin-top: 6px;
}
.sync-pill .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--star); animation: pulse 1.6s ease-in-out infinite; }
.sync-pill.live { color: #15803d; }
.sync-pill.live .dot { background: #22c55e; animation: none; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px; }
.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden; position: relative; display: flex; flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.card-img { display: block; aspect-ratio: 4 / 3; background: #eef1f7; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.card:hover .card-img img { transform: scale(1.05); }
.badge {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  background: #dc2626; color: #fff; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.6px;
  padding: 5px 12px; border-radius: 999px; text-transform: uppercase;
}
.discount {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  background: var(--navy); color: #fff; font-size: 0.78rem; font-weight: 800;
  padding: 5px 10px; border-radius: 8px;
}
.card-body { padding: 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-title { font-size: 0.98rem; line-height: 1.45; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-title a { text-decoration: none; }
.card-title a:hover { color: var(--blue); }
.rating { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--muted); font-weight: 600; }
.stars { display: inline-flex; gap: 1px; color: var(--star); }
.stars svg { width: 15px; height: 15px; }
.price-row { display: flex; align-items: baseline; gap: 10px; margin-top: auto; }
.price { font-size: 1.45rem; font-weight: 800; letter-spacing: -0.5px; }
.list-price { color: var(--muted); text-decoration: line-through; font-size: 0.92rem; }
.btn-deal {
  display: block; text-align: center; text-decoration: none; font-weight: 800;
  background: var(--orange); color: #fff; border-radius: 10px; padding: 12px;
  transition: background 0.15s ease, transform 0.15s ease;
}
.btn-deal:hover { background: var(--orange-dark); transform: translateY(-1px); }

/* Skeleton placeholders */
.skeleton { pointer-events: none; }
.shimmer { position: relative; overflow: hidden; background: var(--line); }
.shimmer::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.65), transparent);
  animation: shimmer 1.8s infinite;
}
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.sk-img { aspect-ratio: 4 / 3; }
.sk-body { padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.sk-line { height: 13px; border-radius: 6px; }
.sk-stars { height: 16px; width: 110px; border-radius: 8px; }
.sk-price { height: 26px; width: 40%; border-radius: 8px; }
.sk-btn { height: 44px; border-radius: 10px; }

/* Compact syncing state (shown while the deals feed is unavailable) */
.empty-state {
  grid-column: 1 / -1; text-align: center;
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 44px 24px;
}
.empty-state .es-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--star); display: inline-block; margin-bottom: 12px;
  animation: pulse 1.6s ease-in-out infinite;
}
.empty-state h3 { font-size: 1.15rem; margin-bottom: 8px; }
.empty-state p { color: var(--muted); max-width: 430px; margin: 0 auto; font-size: 0.95rem; line-height: 1.6; }

/* ---------- How it works ---------- */
.how { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-bottom: 40px; }
.step { background: var(--bg); border-radius: var(--radius); padding: 28px 24px; border: 1px solid var(--line); }
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%; background: var(--navy); color: #fff;
  font-weight: 800; margin-bottom: 14px;
}
.step h3 { margin-bottom: 8px; font-size: 1.08rem; }
.step p { color: var(--muted); font-size: 0.95rem; }
.trust-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; background: var(--navy); border-radius: var(--radius); padding: 30px; color: #fff; }
.trust-item { text-align: center; }
.trust-item strong { display: block; font-size: 1.7rem; color: var(--orange); letter-spacing: -0.5px; }
.trust-item span { font-size: 0.85rem; color: #c3cede; }

/* ---------- Newsletter ---------- */
.newsletter { background: linear-gradient(135deg, #fff7ed, #ffedd5); }
.newsletter-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; }
.newsletter-inner h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); letter-spacing: -0.5px; margin-bottom: 8px; }
.newsletter-inner p { color: var(--muted); }
.newsletter-form { display: flex; gap: 10px; flex-wrap: wrap; }
.newsletter-form input {
  flex: 1; min-width: 220px; border: 1.5px solid var(--line); border-radius: 12px;
  padding: 14px 18px; font-size: 1rem; outline: none; background: #fff;
}
.newsletter-form input:focus { border-color: var(--orange); }
.form-note { width: 100%; font-size: 0.9rem; font-weight: 600; min-height: 1.4em; }
.form-note.ok { color: #15803d; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #c3cede; padding: 56px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.4fr; gap: 36px; padding-bottom: 40px; }
.footer-grid .logo span { color: #fff; }
.footer-about { font-size: 0.92rem; margin-top: 14px; max-width: 320px; }
.footer-col h4 { color: #fff; font-size: 0.95rem; margin-bottom: 14px; letter-spacing: 0.4px; }
.footer-col a { display: block; text-decoration: none; font-size: 0.92rem; margin-bottom: 10px; opacity: 0.85; }
.footer-col a:hover { color: var(--orange); opacity: 1; }
.disclosure { font-size: 0.85rem; line-height: 1.65; opacity: 0.9; }
.disclosure strong { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.12); padding: 20px; text-align: center; font-size: 0.82rem; opacity: 0.75; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--navy); color: #fff; padding: 13px 24px; border-radius: 12px;
  font-size: 0.92rem; font-weight: 600; opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease; z-index: 200; max-width: 90vw; text-align: center;
  box-shadow: var(--shadow-lg);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; padding: 56px 20px; }
  .hero-visual { display: none; }
  .steps { grid-template-columns: 1fr; }
  .trust-bar { grid-template-columns: repeat(2, 1fr); }
  .newsletter-inner { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .main-nav {
    display: none; position: absolute; top: 68px; left: 0; right: 0;
    background: #fff; flex-direction: column; padding: 12px 20px 20px;
    border-bottom: 1px solid var(--line); gap: 4px; margin: 0;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .menu-toggle { display: flex; margin-left: auto; }
  .search { margin-left: 0; }
  .search input { width: 110px; }
  .header-inner { gap: 14px; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .search { display: none; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
  .card-body { padding: 14px; }
  .price { font-size: 1.2rem; }
}
