/* LoOnDeals - Local and Online Deals */

.support-reminder {
  margin: 20px 0;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}
.support-reminder p { margin: 10px 0; }
.support-reminder .btn { margin: 4px 0; }
.support-amounts { border: 0; margin: 20px 0; }
.support-amounts legend { margin-bottom: 10px; }

:root {
  --primary: #ff5a1f;
  --primary-dark: #e04a10;
  --dark: #182c2c;
  --light: #f7f8f8;
  --gold: #fca311;
  --text: #263c3c;
  --muted: #637575;
  --border: #e2e9e7;
  --success: #1d9a5f;
  --error: #d63349;
  --radius: 12px;
  --shadow: 0 6px 24px rgba(26, 26, 46, 0.10);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--light);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .logo, .hero-logo {
  font-family: 'Sora', 'Inter', sans-serif;
  letter-spacing: -0.02em;
}

::selection { background: rgba(255, 90, 31, 0.2); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d4d4de; border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

main { flex: 1; }

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

.muted { color: var(--muted); }

button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #e26729; outline-offset: 4px; }
[hidden] { display: none !important; }

/* ---------- Header ---------- */

.announcement {
  padding: 7px 20px;
  text-align: center;
  background: #edf4f1;
  color: #37534b;
  font-size: 0.72rem;
}
.announcement strong { margin-left: 5px; }

.site-header {
  background: #182c2c;
  border-bottom: 1px solid #304343;
  position: sticky;
  top: 0;
  z-index: 10;
}

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-top: 22px;
  padding-bottom: 22px;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  text-decoration: none;
  letter-spacing: -0.5px;
}

.logo-o { color: var(--primary); }

.tagline {
  font-size: 0.8rem;
  color: #b7cac4;
  border-left: 1px solid #49605a;
  padding-left: 12px;
}

.nav-links {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 20px;
  white-space: nowrap;
  font-size: 0.85rem;
}

.nav-links a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

.nav-links a:hover { color: var(--primary); }
.nav-user { color: #b7cac4; font-weight: 500; }
.site-header .search-bar { flex: 1; max-width: 650px; margin: 0; padding: 11px 18px; box-shadow: none; }
.site-header:has(.search-bar) .tagline { display: none; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  border: none;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.15s ease;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(255, 90, 31, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  box-shadow: 0 6px 22px rgba(255, 90, 31, 0.45);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary) !important;
}

.btn-outline:hover { background: rgba(255, 90, 31, 0.08); }

.btn-outline-light {
  background: transparent;
  border: 2px solid #fff;
  color: #fff !important;
}

.btn-outline-light:hover { background: rgba(255, 255, 255, 0.12); }

.btn-light {
  background: #fff;
  color: var(--primary) !important;
}

.btn-sm { padding: 6px 16px; font-size: 0.85rem; }
.btn-lg { padding: 14px 34px; font-size: 1.05rem; }
.btn-block { width: 100%; padding: 14px; font-size: 1rem; }

/* ---------- Hero ---------- */

.hero {
  background: linear-gradient(135deg, #0f0f1a 0%, #2d2d55 40%, var(--primary-dark) 100%);
  background-size: 200% 200%;
  animation: heroGradient 12s ease infinite;
  color: #fff;
  text-align: center;
  padding: 110px 0;
}

@keyframes heroGradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.hero-logo {
  font-size: clamp(2.8rem, 8vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -2px;
  background: linear-gradient(90deg, #ffffff, #ffd8c4);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-logo .logo-o {
  background: linear-gradient(90deg, var(--primary), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-tagline {
  font-size: clamp(1rem, 3vw, 1.4rem);
  color: var(--gold);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 3px;
  margin: 8px 0 20px;
}

.hero-motto {
  max-width: 620px;
  margin: 0 auto 32px;
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.85);
}

.hero-motto strong { color: #fff; }

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Sections ---------- */

.section { padding: 60px 0 10px; }

.section-title {
  text-align: center;
  font-size: 1.8rem;
  margin-bottom: 16px;
  color: var(--dark);
}

.section-text {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  font-size: 1.05rem;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 24px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 36px rgba(26, 26, 46, 0.14);
}

.card-icon { font-size: 2.4rem; margin-bottom: 12px; }
.card h3 { margin-bottom: 8px; color: var(--dark); }
.card p { color: var(--muted); font-size: 0.95rem; }

.cta {
  background: var(--primary);
  color: #fff;
  text-align: center;
  padding: 56px 0;
  margin-top: 60px;
}

.cta h2 { margin-bottom: 20px; font-size: 1.8rem; }

/* ---------- Auth pages ---------- */

.auth-page {
  display: flex;
  justify-content: center;
  padding: 48px 20px;
}

.auth-card {
  background: #fff;
  border: 1px solid var(--border);
  border-top: 4px solid transparent;
  border-image: linear-gradient(90deg, var(--primary), var(--gold)) 1;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 36px;
  width: 100%;
  max-width: 460px;
}

.auth-card h1 { font-size: 1.6rem; color: var(--dark); }
.auth-card > .muted { margin-bottom: 24px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-group { margin-bottom: 18px; }

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: var(--dark);
}

.form-group input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.15s ease;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 90, 31, 0.15);
}

.field-error { color: var(--error); font-size: 0.85rem; margin-top: 4px; display: block; }

/* display:block above would override the hidden attribute without this */
.field-error[hidden] { display: none; }

.auth-switch { text-align: center; margin-top: 20px; font-size: 0.95rem; }
.auth-switch a { color: var(--primary); font-weight: 700; text-decoration: none; }

/* ---------- Flash messages ---------- */

.flash-wrap { padding-top: 16px; }

.flash {
  border-radius: 8px;
  padding: 12px 18px;
  margin-bottom: 10px;
  font-weight: 600;
}

.flash-success { background: #e2f7ec; color: var(--success); border: 1px solid #b9e8d1; }
.flash-error { background: #fdeaee; color: var(--error); border: 1px solid #f3c2cd; }
.flash-info { background: #e8f0fe; color: #2456c8; border: 1px solid #c6d8f7; }

/* ---------- Deals page ---------- */

.deals-page { padding: 36px 20px 60px; }

.discovery-strip { background: #fff; border-bottom: 1px solid var(--border); font-size: 0.75rem; color: var(--muted); }
.discovery-strip .container { display: flex; justify-content: space-between; gap: 16px; padding-top: 12px; padding-bottom: 12px; }
.discovery-strip span:first-child { color: #1b6451; font-weight: 700; }
.breadcrumbs { display: flex; gap: 10px; font-size: 0.72rem; color: var(--muted); margin-bottom: 24px; }
.breadcrumbs a { text-decoration: none; color: #3a7462; }
.eyebrow { color: #507569; font-size: 0.66rem; letter-spacing: 0.16em; font-weight: 800; margin-bottom: 8px; }
.heading-dot { color: var(--primary); }

.deals-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.deals-header h1 {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  line-height: 1.2;
  color: var(--dark);
  margin-bottom: 12px;
}
.deals-header .muted { font-size: 0.85rem; }

#locate-btn {
  background: #fff;
  color: #265744 !important;
  border: 1px solid #c9dcd2;
  box-shadow: none;
  padding: 12px 20px;
}

#locate-btn:hover {
  background: #edf4f1;
}

.category-browser { margin-bottom: 36px; }
.category-browser .chips { display: flex; gap: 28px; flex-wrap: nowrap; margin: 0; overflow-x: auto; padding: 4px 4px 12px; }
.category-browser .category-tile { display: flex; flex: 0 0 106px; flex-direction: column; align-items: center; gap: 10px; padding: 0; border: 0; border-radius: 0; background: none; color: #4b6260; box-shadow: none; font-size: 0.78rem; }
.category-icon { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; background: #e9f0ee; font-size: 1.9rem; border: 2px solid transparent; transition: background 0.15s, transform 0.15s; }
.category-browser .category-tile.active { color: #1d4b3b; font-weight: 800; background: none; box-shadow: none; }
.category-tile.active .category-icon { background: #fce8dc; border-color: #eea77d; }
.category-tile:hover .category-icon { transform: translateY(-3px); background: #fce8dc; }

.deals-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.deals-sidebar {
  position: sticky;
  top: 110px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: none;
}
.filter-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.filter-heading h2 { font-family: inherit; font-size: 0.83rem; }
.text-button { color: #376a58; border: 0; background: none; text-decoration: underline; font-size: 0.75rem; cursor: pointer; }
.deals-controls .mode-select { margin-bottom: 16px; font-size: 0.8rem; padding-left: 12px; border-radius: 8px; box-shadow: none; }
.filter-tip { border-radius: 10px; padding: 16px; background: #f0f5f2; color: #4e6a5e; font-size: 0.75rem; }
.filter-tip > span { display: block; color: #ce6b37; font-size: 1.5rem; margin-bottom: 8px; }
.filter-tip strong { display: block; margin-bottom: 8px; color: #2d4b3f; }
.results-toolbar { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 18px; min-height: 32px; }
.results-toolbar h2 { font-size: 1.05rem; }
.results-toolbar > span { font-size: 0.75rem; color: var(--muted); }

.sidebar-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  margin-bottom: 6px;
}

.deals-sidebar .mode-select { width: 100%; }

/* Vertical filter lists inside the sidebar */
.deals-sidebar .chips {
  flex-direction: column;
  gap: 6px;
  margin-bottom: 0;
}

.deals-sidebar .chip {
  width: 100%;
  text-align: left;
  border-radius: 10px;
  padding: 8px 12px;
}

.deals-sidebar .subchips {
  margin-top: 6px;
  margin-bottom: 0;
  padding-left: 10px;
}

.zip-row { display: flex; gap: 6px; }
.zip-row .zip-input { flex: 1; width: auto; min-width: 0; }

.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 10px 18px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search-bar:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 90, 31, 0.15);
}

.search-icon {
  border: none;
  padding: 0;
  background: transparent;
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
  color: #658075;
}

.search-input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  font-size: 0.95rem;
  font-family: inherit;
  background: transparent;
  color: var(--text);
}

.search-clear {
  border: none;
  background: var(--light);
  color: var(--muted);
  width: 24px;
  height: 24px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1;
}

.search-clear:hover { background: var(--primary); color: #fff; }
.search-clear[hidden] { display: none; }

.ai-note {
  background: #f3efff;
  border: 1px solid #ddd3f7;
  color: #5b21b6;
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.mode-select {
  appearance: none;
  -webkit-appearance: none;
  padding: 10px 44px 10px 18px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: inherit;
  color: var(--dark);
  background: #fff url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236c6c7d' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") no-repeat right 14px center / 14px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(26, 26, 46, 0.06);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.mode-select:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 14px rgba(255, 90, 31, 0.18);
}

.mode-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 90, 31, 0.15);
}

.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.chip {
  border: 1.5px solid var(--border);
  background: #fff;
  border-radius: 999px;
  padding: 6px 16px;
  font-weight: 600;
  font-size: 0.88rem;
  font-family: inherit;
  cursor: pointer;
  color: var(--muted);
  transition: all 0.15s ease;
}

.chip:hover { border-color: var(--primary); color: var(--primary); }

.chip.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 3px 10px rgba(255, 90, 31, 0.3);
}

.subchips { margin-top: -12px; margin-bottom: 18px; }
.subchips[hidden] { display: none; }

.chip-sub {
  font-size: 0.82rem;
  padding: 4px 14px;
  border-style: dashed;
}

.deal-tags {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.deal-cat {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 1px 7px;
  border-radius: 999px;
}

.offline-bar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  background: linear-gradient(135deg, #fff 0%, #fff1e8 100%);
  border: 1px solid #ffd8c4;
  border-radius: var(--radius);
  padding: 12px;
  box-shadow: var(--shadow);
}

/* display:flex above would override the hidden attribute without this */
.offline-bar[hidden] { display: none; }

.offline-location {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.offline-or { color: var(--muted); font-size: 0.85rem; font-weight: 600; text-align: center; }

.zip-input {
  width: 110px;
  padding: 8px 12px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  font-size: 0.95rem;
  font-family: inherit;
}

.zip-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 90, 31, 0.15);
}

.deal-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
.deal-grid[aria-busy="true"] { opacity: 0.55; }
.deal-grid > .empty-state, .deal-grid > .muted, .deal-grid > .ai-note { grid-column: 1 / -1; }

.deal-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(26, 46, 36, 0.02);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.deal-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(26, 46, 36, 0.09);
  border-color: #b9cfc4;
}
.deal-image { position: relative; background: #f0f3f1; aspect-ratio: 1.2; display: grid; place-items: center; isolation: isolate; }
.deal-image img { position: absolute; inset: 0; width: 100%; height: 100%; padding: 20px; object-fit: contain; background: #f8faf9; }

.deal-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 16px 8px;
}

.deal-side {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  text-align: left;
  padding: 4px 16px 16px;
}

.discount-badge {
  background: #e9f4ec;
  color: #20613c;
  font-weight: 800;
  font-size: 0.68rem;
  padding: 3px 8px;
  border-radius: 5px;
}

.deal-save {
  color: var(--success);
  font-weight: 700;
  font-size: 0.7rem;
}

.starts-chip {
  background: #ede9fe;
  color: #6d28d9;
  font-weight: 700;
  font-size: 0.7rem;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.deal-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.badge {
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 1px 8px;
  border-radius: 999px;
}

.badge-online { background: #e8f0fe; color: #2456c8; }
.badge-local { background: #ffe8de; color: var(--primary-dark); }

.deal-distance { font-size: 0.65rem; font-weight: 700; color: var(--success); }

.deal-title { font-family: 'Inter', sans-serif; font-weight: 700; font-size: 0.9rem; color: var(--dark); line-height: 1.5; overflow-wrap: anywhere; }
.deal-store { font-size: 0.7rem; color: var(--muted); font-weight: 500; overflow-wrap: anywhere; }
.deal-desc {
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.deal-details { font-size: 0.72rem; color: var(--muted); }
.deal-details summary { cursor: pointer; color: #3a7462; padding: 3px 0; }
.deal-details[open] summary { margin-bottom: 6px; }

.deal-pricing {
  display: flex;
  align-items: flex-start;
  flex-direction: column-reverse;
  gap: 6px;
  margin-top: 0;
}

.deal-pricing s { color: var(--muted); font-size: 0.75rem; }
.deal-price { font-size: 1.15rem; font-weight: 800; color: #254b3b; overflow-wrap: anywhere; }

.deal-card .btn { align-self: flex-start; margin-top: 2px; }
.deal-side .btn { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 10px 14px; font-size: 0.75rem; border-radius: 7px; box-shadow: none; margin-top: 6px; }

.construction-notice {
  grid-column: 1 / -1;
  background: repeating-linear-gradient(-45deg, #fff7e0 0 16px, #ffefc7 16px 32px);
  border: 1.5px dashed var(--gold);
  color: #8a6100;
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: 0.95rem;
  line-height: 1.5;
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 56px 24px;
  background: #fff;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
}

.empty-emoji {
  font-size: 3rem;
  animation: pulse 1.6s ease-in-out infinite;
}

.empty-state h3 { color: var(--dark); margin: 10px 0 6px; }

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

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 24px;
}

.pager[hidden] { display: none; }

.pager-info { color: var(--muted); font-weight: 600; font-size: 0.9rem; }

.pager .btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--dark);
  color: rgba(255, 255, 255, 0.85);
  text-align: center;
  padding: 28px 0;
}

.site-footer .muted { color: rgba(255, 255, 255, 0.5); }

/* ---------- Responsive ---------- */

/* ---------- Watch list & alerts ---------- */
.alert-bell { position: relative; }
.alert-bell[hidden] { display: none; }
.alert-bell-btn {
  position: relative; background: none; border: 0; cursor: pointer;
  font-size: 1.15rem; line-height: 1; padding: 4px; color: #fff;
}
.alert-badge {
  position: absolute; top: -4px; right: -6px; min-width: 18px; height: 18px;
  padding: 0 5px; border-radius: 9px; background: var(--primary); color: #fff;
  font-size: 0.68rem; font-weight: 700; line-height: 18px; text-align: center;
}
.alert-badge[hidden], .alert-panel[hidden] { display: none; }
.alert-panel {
  position: absolute; right: 0; top: calc(100% + 10px); width: min(340px, 92vw);
  max-height: 420px; overflow-y: auto; background: #fff; color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  white-space: normal; z-index: 20; text-align: left;
}
.alert-panel-head {
  display: flex; justify-content: space-between; padding: 12px 14px;
  border-bottom: 1px solid var(--border); color: var(--dark);
}
.nav-links .alert-panel a { color: var(--primary); }
.alert-list { list-style: none; margin: 0; padding: 0; }
.alert-item, .alert-empty { padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: 0.82rem; }
.alert-item.is-unread { background: #fff4ee; }
.nav-links .alert-item a { color: var(--dark); font-weight: 600; }
.alert-meta { display: block; margin-top: 2px; }
.watchlist-page { padding: 48px 20px; display: flex; justify-content: center; }
.watchlist-card { max-width: 620px; width: 100%; }
.watch-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.watch-form select {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--border);
  border-radius: 8px; font-size: 1rem; background: #fff;
}
.watch-heading { margin-top: 28px; font-size: 1.1rem; color: var(--dark); }
.watch-items { list-style: none; padding: 0; margin: 12px 0 20px; }
.watch-item {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 0.9rem;
}
.reward-balances { display: grid; gap: 12px; margin-bottom: 8px; }
.reward-balance {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px;
  padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--radius); background: #fbfcfc;
}
.reward-balance .muted:first-child { flex-basis: 100%; font-size: 0.85rem; }
.reward-amount { font-size: 1.6rem; color: var(--dark); margin-right: auto; }
.reward-hint { font-size: 0.85rem; }
.reward-confirm {
  margin-top: 16px; padding: 18px; border: 2px solid var(--primary);
  border-radius: var(--radius); background: #fff8f4;
}
.reward-confirm h2 { font-size: 1.1rem; color: var(--dark); margin-bottom: 6px; }
.reward-confirm-actions { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.reward-minus { color: var(--dark); white-space: nowrap; }
.reward-void { color: var(--muted); text-decoration: line-through; white-space: nowrap; }
.reward-status {
  display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 10px;
  font-size: 0.72rem; font-weight: 700; background: #eef2f1; color: var(--muted);
}
.reward-status-requested { background: #fff1e6; color: var(--primary-dark); }
.reward-status-sent { background: #e2f7ec; color: var(--success); }
.watch-match { color: var(--success); font-weight: 600; font-size: 0.8rem; }

@media (max-width: 1200px) {
  .deal-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .nav-user { display: none; }
  .nav { gap: 18px; }
}

@media (max-width: 800px) {
  .deals-layout { grid-template-columns: minmax(0, 1fr); }
  .deals-sidebar { position: static; }
  .deals-sidebar .chips { flex-direction: row; flex-wrap: wrap; }
  .deals-sidebar .chip { width: auto; text-align: center; }
  .deals-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; }
  .deals-controls label[for="country-select"] { grid-column: 1; grid-row: 1; }
  .deals-controls label[for="mode-select"] { grid-column: 2; grid-row: 1; }
  .deals-controls .mode-select { min-width: 0; margin: 0; }
  .filter-tip { display: none; }
  .deals-sidebar { gap: 14px; }
  .nav { flex-wrap: wrap; padding-top: 16px; padding-bottom: 16px; }
  .site-header .search-bar { flex-basis: 100%; max-width: none; order: 3; }
  .site-header:has(.search-bar) .nav-links > a:first-child { display: none; }
  .deal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .category-browser .chips { gap: 12px; }
  .category-browser .category-tile { flex-basis: 86px; }
  .category-icon { width: 64px; height: 64px; }
  .discovery-strip .container span:last-child { display: none; }
}

@media (max-width: 640px) {
  .tagline { display: none; }
  .hero { padding: 64px 0; }
  .form-row { grid-template-columns: 1fr; }
  .auth-card { padding: 26px 20px; }
  .watch-form-row { grid-template-columns: 1fr; }
  /* Anchor the alert panel to the sticky header so it stays on screen. */
  .alert-bell { position: static; }
  .alert-panel { left: 12px; right: 12px; width: auto; top: calc(100% - 6px); }
  .deals-header { flex-direction: column; align-items: flex-start; }
  .deal-card { flex-direction: column; align-items: stretch; }
  .deal-side { align-items: flex-start; text-align: left; }
  .nav { gap: 10px; }
  .logo { font-size: 1.3rem; }
  .nav-links { gap: 8px 12px; font-size: 0.78rem; flex-wrap: wrap; white-space: normal; }
  .announcement { font-size: 0.65rem; }
  .announcement strong { display: none; }
  .deals-page { padding-top: 22px; }
  .deal-grid { gap: 12px; }
  .deal-main { padding: 12px 12px 8px; }
  .deal-side { padding: 4px 12px 12px; }
  .deal-top { align-items: flex-start; }
  .deal-cat { display: none; }
  .deal-image img { padding: 12px; }
  .deal-title { font-size: 0.8rem; }
  .deal-price { font-size: 1rem; }
  .pager { gap: 8px; flex-wrap: wrap; }
  .pager-info { font-size: 0.75rem; }
}

@media (max-width: 360px) {
  .deal-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
