/* DealWise — deep navy + gold on white. Original theme. */
:root {
  --navy: #0B1B33;
  --navy-deep: #071223;
  --navy-ink: #13233d;
  --gold: #C99B3F;
  --gold-bright: #E3B85C;
  --paper: #ffffff;
  --soft: #f4f6fa;
  --card: #ffffff;
  --line: #e3e8f0;
  --ink-soft: #5a6b84;
  --radius: 14px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--paper);
  color: var(--navy-ink);
  line-height: 1.55;
}
a { color: var(--navy); }

/* Header */
.site-header {
  background: #fff;
  border-bottom: 3px solid var(--gold);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 10px rgba(11,27,51,.10);
}
.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-logo { height: 52px; width: auto; display: block; border-radius: 8px; }
.brand-name { font-size: 27px; font-weight: 800; letter-spacing: .2px; line-height: 1; white-space: nowrap; }
.brand-name .deal { color: var(--navy); }
.brand-name .wise { color: var(--gold); }
.brand-tag { display: block; font-size: 12px; color: var(--ink-soft); font-weight: 500; margin-top: 3px; white-space: nowrap; }
.nav { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.nav a {
  color: var(--navy); text-decoration: none; font-weight: 650; font-size: 14px;
  padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff;
  transition: border-color .15s, background .15s, color .15s;
  white-space: nowrap;
}
.nav a:hover { border-color: var(--gold); }
.nav a.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.navs { margin-left: auto; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.navs .nav { margin-left: 0; }
.nav-sub a { font-size: 12px; padding: 5px 11px; font-weight: 600; }
.search { display: flex; gap: 6px; align-items: center; }
.search input {
  border: 1.5px solid var(--line); border-radius: 999px;
  padding: 8px 14px; font-size: 14px; width: 180px;
  color: var(--navy-ink); background: var(--soft);
}
.search input:focus { outline: none; border-color: var(--gold); background: #fff; }
.search button {
  background: var(--navy); color: #fff; border: none; border-radius: 999px;
  padding: 8px 16px; font-weight: 700; font-size: 14px; cursor: pointer;
}
.search button:hover { background: var(--navy-deep); }

/* Hero */
.hero { max-width: 1180px; margin: 0 auto; padding: 32px 20px 6px; }
.hero h1 { margin: 0 0 6px; font-size: 30px; letter-spacing: -.3px; color: var(--navy); }
.hero p { margin: 0 0 4px; color: var(--ink-soft); font-size: 16px; }
.updated { font-size: 13px; color: var(--ink-soft); }

/* Grid + cards */
.grid {
  max-width: 1180px; margin: 0 auto; padding: 22px 20px 40px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
  gap: 20px;
}
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(11,27,51,.14); }
.card-media { position: relative; aspect-ratio: 16 / 10; background: var(--soft); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #0B1B33 0%, #1d3a63 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 44px; font-weight: 800; color: #E3B85C;
}
.price-badge {
  position: absolute; left: 12px; top: 12px;
  background: var(--gold); color: var(--navy);
  font-weight: 800; font-size: 21px; letter-spacing: -.2px;
  padding: 5px 13px; border-radius: 999px;
  box-shadow: 0 2px 8px rgba(0,0,0,.28);
}
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-title { margin: 0; font-size: 15.5px; line-height: 1.4; font-weight: 650; }
.card-title a { color: inherit; text-decoration: none; }
.card-title a:hover { color: var(--navy); text-decoration: underline; }
.card-meta { font-size: 13px; color: var(--ink-soft); display: flex; gap: 8px; flex-wrap: wrap; }
.store-pill {
  background: #e9edf5; color: var(--navy); font-weight: 700;
  padding: 2px 10px; border-radius: 999px;
}
.card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 6px; }
.time { font-size: 12.5px; color: var(--ink-soft); }
.btn {
  display: inline-block; background: var(--navy); color: #fff !important;
  font-weight: 700; font-size: 14px; text-decoration: none;
  padding: 9px 16px; border-radius: 10px; white-space: nowrap;
  transition: background .15s;
}
.btn:hover { background: var(--navy-deep); }

/* Pagination */
.pager { max-width: 1180px; margin: 0 auto; padding: 0 20px 44px; display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; }
.pager a, .pager span.cur {
  padding: 9px 16px; border-radius: 10px; border: 1px solid var(--line);
  background: #fff; text-decoration: none; font-weight: 650; font-size: 14.5px; color: var(--navy-ink);
}
.pager a:hover { border-color: var(--gold); }
.pager span.cur { background: var(--navy); color: #fff; border-color: var(--navy); }
.pager .pageinfo { border: none; background: none; color: var(--ink-soft); }

/* Empty state */
.empty { max-width: 1180px; margin: 0 auto; padding: 40px 20px 80px; text-align: center; color: var(--ink-soft); }

/* Search page */
.sr-wrap { max-width: 1180px; margin: 0 auto; padding: 30px 20px 0; }
.sr-wrap h1 { color: var(--navy); margin: 0 0 6px; font-size: 28px; }
.sr-sub { color: var(--ink-soft); margin: 0 0 4px; }
.sr-form { display: flex; gap: 8px; margin: 18px 0 6px; max-width: 520px; }
.sr-form input {
  flex: 1; border: 1.5px solid var(--line); border-radius: 999px;
  padding: 10px 16px; font-size: 15px; color: var(--navy-ink); background: var(--soft);
}
.sr-form input:focus { outline: none; border-color: var(--gold); background: #fff; }
.sr-form button {
  background: var(--navy); color: #fff; border: none; border-radius: 999px;
  padding: 10px 22px; font-weight: 700; font-size: 15px; cursor: pointer;
}
.sr-form button:hover { background: var(--navy-deep); }

/* Footer */
.site-footer { background: var(--navy); color: #cfd8e6; margin-top: 20px; }
.footer-inner { max-width: 1180px; margin: 0 auto; padding: 30px 20px; font-size: 13.5px; }
.footer-inner p { margin: 6px 0; }
.footer-inner .brand-line { font-weight: 800; color: #fff; font-size: 15px; }
.footer-inner .brand-line .wise { color: var(--gold-bright); }

@media (max-width: 720px) {
  .hero h1 { font-size: 24px; }
  .header-inner { padding: 10px 14px; }
  .nav { margin-left: 0; }
  .search { width: 100%; }
  .search input { flex: 1; width: auto; }
  .grid { padding: 16px 14px 30px; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .price-badge { font-size: 17px; }
  .btn { padding: 8px 12px; font-size: 13px; }
  .brand-name { font-size: 23px; }
}

/* Save buttons (always visible; tapping while logged out sends you to sign in) */
.save-btn { display: flex; position: absolute; top: 8px; right: 8px; width: 34px; height: 34px;
  border-radius: 50%; border: 1px solid rgba(10,37,64,.12); background: rgba(255,255,255,.94);
  font-size: 17px; line-height: 1; color: #0a2540; cursor: pointer; align-items: center;
  justify-content: center; z-index: 2; padding: 0; }
.save-btn.saved { color: #e11d48; border-color: #e11d48; }

/* Auth area in header */
.auth-area { display: flex; gap: 10px; align-items: center; margin-left: 12px; font-size: 14px; white-space: nowrap; }
.auth-area[hidden] { display: none; }
.auth-area a { color: var(--navy); font-weight: 600; text-decoration: none; }
.auth-area a:hover { text-decoration: underline; }
.auth-who { color: var(--muted); max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
.linklike { background: none; border: none; padding: 0; color: var(--navy); font: inherit;
  font-size: 14px; font-weight: 600; cursor: pointer; }
.linklike:hover { text-decoration: underline; }

/* Account / saved pages */
.auth-wrap { max-width: 860px; margin: 0 auto; padding: 34px 18px 60px; }
.auth-wrap h1 { font-size: 28px; margin: 0 0 6px; color: var(--navy); }
.auth-sub { color: var(--muted); margin: 0 0 20px; }
.auth-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 18px 0; }
@media (max-width: 720px) { .auth-cols { grid-template-columns: 1fr; } }
.auth-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
.auth-card h2 { font-size: 18px; margin: 0 0 12px; color: var(--navy); }
.auth-card label { display: block; font-size: 13px; font-weight: 600; color: var(--navy); margin: 10px 0 4px; }
.auth-card input { width: 100%; box-sizing: border-box; padding: 10px 12px; font-size: 15px;
  border: 1px solid var(--line); border-radius: 10px; }
.auth-card button[type="submit"] { margin-top: 14px; width: 100%; padding: 11px; font-size: 15px;
  font-weight: 700; color: #fff; background: var(--navy); border: none; border-radius: 10px; cursor: pointer; }
.auth-card button[type="submit"]:hover { background: #143a66; }
.auth-msg { font-size: 14px; margin: 10px 0 0; min-height: 20px; }
.auth-msg.err { color: #b42318; }
.auth-msg.ok { color: #067647; }

/* Newsletter signup (footer) */
.nl-block { margin: 20px 0 4px; padding: 18px; background: rgba(255,255,255,.06);
  border-radius: 12px; }
.nl-title { font-weight: 800; color: #fff; margin: 0 0 10px; font-size: 15px; }
.nl-form { display: flex; gap: 8px; }
.nl-form input { flex: 1; min-width: 0; padding: 10px 12px; border-radius: 10px;
  border: 1px solid rgba(255,255,255,.18); font-size: 14px; background: #fff; color: #0a2540; }
.nl-form button { padding: 10px 18px; border-radius: 10px; border: none;
  background: var(--gold); color: #0a2540; font-weight: 800; cursor: pointer; font-size: 14px;
  white-space: nowrap; }
.nl-form button:hover { background: var(--gold-bright); }
.nl-msg { font-size: 13px; margin: 8px 0 0; min-height: 18px; color: #cbd5e1; }
.nl-msg.ok { color: #6ee7b7; }
.nl-msg.err { color: #fda4af; }
@media (max-width: 720px) { .nl-form { flex-direction: column; } }
