/* ============================================================
   GRAB DEALS — MAIN STYLESHEET
   ============================================================ */

@import url('/partials/mega-nav.css');

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

:root {
  --blue:       #1a73e8;
  --blue-dark:  #1557b0;
  --green:      #1e8c45;
  --amber:      #f59e0b;
  --red:        #dc2626;
  --gray-50:    #f9fafb;
  --gray-100:   #f3f4f6;
  --gray-200:   #e5e7eb;
  --gray-400:   #9ca3af;
  --gray-600:   #4b5563;
  --gray-800:   #1f2937;
  --amazon:     #ff9900;
  --walmart:    #0071ce;
  --radius:     10px;
  --shadow:     0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:  0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--gray-800);
  background: var(--gray-50);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ============================================================ HEADER */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--gray-200);
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  z-index: 100;
}
.site-header.sticky { position: sticky; top: 0; }

.nav-bar {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo {
  font-size: 20px;
  font-weight: 700;
  color: var(--gray-800);
  text-decoration: none;
  white-space: nowrap;
}

.nav-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }

/* ============================================================ BUTTONS */
.btn-primary {
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s;
}
.btn-primary:hover { background: var(--blue-dark); }
.btn-primary.full-width { width: 100%; margin-bottom: 10px; }

.btn-ghost {
  background: transparent;
  color: var(--gray-600);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 7px 14px;
  font-size: 14px;
  cursor: pointer;
  transition: all .15s;
}
.btn-ghost:hover { background: var(--gray-100); color: var(--gray-800); }
.btn-ghost.full-width { width: 100%; margin-bottom: 8px; }

/* ============================================================ HOME PAGE */
.page-home { display: flex; flex-direction: column; min-height: 100vh; }

.sa-disclosure {
  text-align: center;
  font-size: 12px;
  color: var(--gray-600);
  background: #fffbeb;
  border-bottom: 1px solid #fde68a;
  padding: 8px 16px;
  margin: 0;
}

.home-main { flex: 1; }

.hero {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 40px 24px 40px;
  background: #fff;
  border-bottom: 1px solid var(--gray-200);
}

.hero .search-form {
  margin: 0 auto 28px;
}

.search-ai-label {
  font-size: 13px;
  color: #1a73e8;
  text-align: center;
  margin-bottom: 10px;
  font-weight: 500;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 20px;
  max-width: 720px;
  margin: 24px auto 0;
  padding: 16px 20px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
}
.hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  min-width: 0;
}
.hero-stat .stat-num {
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-800);
  line-height: 1.2;
  max-width: 220px;
}
.hero-stat .stat-label {
  font-size: 12px;
  color: var(--gray-600);
  line-height: 1.3;
  max-width: 180px;
}
.hero-stat-divider {
  width: 1px;
  height: 36px;
  background: var(--gray-200);
  flex-shrink: 0;
}
@media (max-width: 520px) {
  .hero-stat-divider { display: none; }
  .hero-stats { flex-direction: column; }
}

/* Homepage category strip: light section (overrides mega-nav dark .mega-hot-zone) */
body.page-home .mega-hot-zone.mega-hot-zone--below-hero {
  background: #f8f9fa;
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
  padding: 22px 0 24px;
}
body.page-home .mega-hot-zone.mega-hot-zone--below-hero .mega-hot-heading {
  color: var(--gray-800);
  text-shadow: none;
}
body.page-home .mega-hot-zone.mega-hot-zone--below-hero .mega-hot-heading .mega-hot-bolt {
  filter: none;
}

.hero-title {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 700;
  color: var(--gray-800);
  line-height: 1.25;
  margin-bottom: 14px;
}
.hero-title-line1,
.hero-title-line2 {
  display: block;
}
.hero-title-line2 {
  margin-top: 0.08em;
}

.hero-sub {
  font-size: 17px;
  color: var(--gray-600);
  max-width: 520px;
  margin: 0 auto 16px;
}

.hero-signup-cta {
  font-size: 15px;
  color: var(--gray-600);
  margin: 0 auto 28px;
  max-width: 560px;
}
.hero-signup-cta .hero-signup-dot {
  margin: 0 6px;
  color: var(--gray-400);
}
.btn-link-signup {
  background: none;
  border: none;
  color: var(--blue);
  font-size: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  padding: 0 2px;
  font-family: inherit;
}
.btn-link-signup:hover {
  color: var(--blue-dark);
}

/* ============================================================ SEARCH BOX */
.search-form { width: 100%; max-width: 680px; margin: 0 auto 24px; }

.search-box {
  display: flex;
  align-items: center;
  background: #fff;
  border: 2px solid var(--gray-200);
  border-radius: 999px;
  padding: 6px 8px 6px 20px;
  box-shadow: var(--shadow-md);
  transition: border-color .2s, box-shadow .2s;
}
.search-box:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(26,115,232,.15);
}

.search-icon { font-size: 18px; margin-right: 10px; flex-shrink: 0; }

.search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 16px;
  color: var(--gray-800);
  background: transparent;
}
.search-input::placeholder { color: var(--gray-400); }

.search-btn {
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 10px 22px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s;
}
.search-btn:hover { background: var(--blue-dark); }

/* Mini search (results header) */
.search-form-mini { flex: 1; max-width: 520px; }
.search-box-mini {
  display: flex;
  align-items: center;
  background: var(--gray-50);
  border: 1.5px solid var(--gray-200);
  border-radius: 999px;
  padding: 4px 6px 4px 14px;
}
.search-box-mini:focus-within { border-color: var(--blue); background: #fff; }
.search-icon-mini { font-size: 14px; margin-right: 8px; }
.search-input-mini { flex: 1; border: none; outline: none; font-size: 14px; background: transparent; }
.search-btn-mini {
  background: var(--blue); color: #fff; border: none;
  border-radius: 999px; padding: 6px 14px; font-size: 13px;
  font-weight: 500; cursor: pointer;
}

/* ============================================================ TRENDING */
.trending { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 8px; }
.trending-label { font-size: 13px; color: var(--gray-400); align-self: center; }
.trending-pill {
  background: var(--gray-100); color: var(--gray-600); border: 1px solid var(--gray-200);
  border-radius: 999px; padding: 5px 14px; font-size: 13px; cursor: pointer; transition: all .15s;
}
.trending-pill:hover { background: var(--blue); color: #fff; border-color: var(--blue); }

/* ============================================================ DEALS STRIP */
.deals-strip { padding: 40px 24px; max-width: 1200px; margin: 0 auto; }

.deals-affiliate-notice {
  font-size: 12px;
  color: var(--gray-600);
  text-align: center;
  margin: 0 0 16px;
  line-height: 1.45;
}

.section-title { font-size: 20px; font-weight: 600; margin-bottom: 20px; }

.deals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  align-items: stretch;
  padding: 12px;
}
@media (max-width: 1024px) {
  .deals-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }
}
@media (max-width: 640px) {
  .deals-grid {
    grid-template-columns: 1fr;
  }
}

/* Slickdeals-style homepage cards */
.deal-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.deal-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
.deal-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 12px;
  color: #666;
}
.deal-card-new-badge {
  background: #ff4757;
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}
.deal-card-attribution {
  text-align: right;
  line-height: 1.35;
}
.deal-card-image {
  width: 100%;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f9fa;
  overflow: hidden;
  padding: 8px;
}
.deal-card-image img {
  max-width: 100%;
  max-height: 144px;
  object-fit: contain;
}
.deal-card-body {
  padding: 12px;
}
.deal-card-title {
  font-size: 14px;
  font-weight: 500;
  color: #1a202c;
  line-height: 1.4;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.deal-card-ship {
  font-size: 12px;
  color: #00b894;
  margin-top: 4px;
  font-weight: 500;
}
.deal-card-price-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}
.deal-price-current {
  font-size: 22px;
  font-weight: 700;
  color: #1a202c;
}
.deal-price-original {
  font-size: 14px;
  color: #999;
  text-decoration: line-through;
}
.deal-discount-badge {
  background: #ff4757;
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
}
.deal-card-meta {
  font-size: 12px;
  color: #666;
  margin-bottom: 8px;
}
.deal-card-coupon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff3cd;
  border: 1px dashed #ffc107;
  color: #856404;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 8px;
}
.deal-card-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-top: 1px solid #f0f0f0;
  font-size: 12px;
  color: #666;
}
.deal-vote-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #666;
  font-size: 12px;
}
.deal-vote-btn:hover {
  background: #f0f4ff;
  border-color: #1251cc;
  color: #1251cc;
}
.deal-vote-muted { opacity: 0.85; }
.deal-card-comments { flex-shrink: 0; }
.deal-card-get-btn {
  margin-left: auto;
  background: #1251cc;
  color: #fff;
  border: none;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.deal-card-get-btn:hover {
  filter: brightness(1.05);
}
.deal-load-spinner {
  text-align: center;
  padding: 24px;
  color: #666;
  font-size: 14px;
  grid-column: 1 / -1;
}
.deal-load-spinner__ring {
  display: inline-block;
  width: 32px;
  height: 32px;
  border: 3px solid #e2e8f0;
  border-top-color: #1251cc;
  border-radius: 50%;
  animation: deal-spin-loader 0.8s linear infinite;
}
.deal-load-spinner__txt { margin-top: 8px; }
@keyframes deal-spin-loader {
  to { transform: rotate(360deg); }
}
.deal-load-more-wrap {
  text-align: center;
  padding: 24px;
  grid-column: 1 / -1;
}
.deal-load-more-btn {
  background: #1251cc;
  color: #fff;
  border: none;
  padding: 12px 32px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.deal-load-more-note {
  font-size: 12px;
  color: #999;
  margin-top: 8px;
}
.deal-end-msg {
  text-align: center;
  padding: 24px;
  color: #999;
  font-size: 13px;
  grid-column: 1 / -1;
}
.scroll-sentinel {
  height: 20px;
  width: 100%;
}

/* --- Dazzle deal cards (homepage grid) --- */
.deal-card--dazzle {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  padding: 18px 16px 16px;
  border: 2px solid transparent;
  background-clip: padding-box;
  min-height: 440px;
  display: flex;
  flex-direction: column;
}
.deal-card--dazzle .deal-card-spacer {
  flex: 1;
  min-height: 4px;
}
.deal-card--dazzle.deal-card--amazon {
  background: linear-gradient(#fff, #fff) padding-box,
    linear-gradient(135deg, #ff9900, #ffb84d, #ff6600) border-box;
  box-shadow: 0 8px 28px rgba(255, 153, 0, 0.2);
}
.deal-card--dazzle.deal-card--walmart {
  background: linear-gradient(#fff, #f0f9ff) padding-box,
    linear-gradient(135deg, #0071ce, #38bdf8, #005a9c) border-box;
  box-shadow: 0 8px 28px rgba(0, 113, 206, 0.18);
}
.deal-card--dazzle:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
}
.deal-card-glow {
  position: absolute;
  inset: -40%;
  z-index: 0;
  background: conic-gradient(from 180deg at 50% 50%, transparent, rgba(250, 204, 21, 0.12), transparent 40%);
  animation: deal-glow-spin 8s linear infinite;
  pointer-events: none;
  opacity: 0.9;
}
.deal-card--dazzle > *:not(.deal-card-glow) {
  position: relative;
  z-index: 1;
}
.deal-card--dazzle .deal-flash-ribbon {
  position: absolute;
  z-index: 2;
}
@keyframes deal-glow-spin {
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .deal-card-glow { animation: none; opacity: 0.35; }
}

.deal-flash-ribbon {
  position: absolute;
  top: 12px;
  right: -32px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 36px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: #fff;
  background: linear-gradient(90deg, #dc2626, #f97316);
  transform: rotate(38deg);
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.45);
  animation: ribbon-glint 2s ease-in-out infinite;
}
.deal-flash-ico {
  animation: bolt-mini 0.9s ease-in-out infinite;
}
@keyframes ribbon-glint {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.15); }
}
@keyframes bolt-mini {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}
@media (prefers-reduced-motion: reduce) {
  .deal-flash-ribbon { animation: none; }
  .deal-flash-ico { animation: none; }
}

.deal-icon-strip {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
  font-size: 20px;
  line-height: 1;
}
.deal-ico--bounce {
  display: inline-block;
  animation: ico-bounce 1.8s ease-in-out infinite;
}
@keyframes ico-bounce {
  0%, 100% { transform: translateY(0); }
  35% { transform: translateY(-4px); }
}
@media (prefers-reduced-motion: reduce) {
  .deal-ico--bounce { animation: none; }
}

.deal-badge--pulse {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(90deg, #fef08a, #fde047);
  color: #854d0e;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 10px;
  box-shadow: 0 0 0 0 rgba(250, 204, 21, 0.7);
  animation: deal-badge-ring 1.6s ease-out infinite;
}
.deal-badge-pct {
  font-size: 15px;
  color: #b45309;
}
@keyframes deal-badge-ring {
  0% { box-shadow: 0 0 0 0 rgba(250, 204, 21, 0.55); }
  70% { box-shadow: 0 0 0 10px rgba(250, 204, 21, 0); }
  100% { box-shadow: 0 0 0 0 rgba(250, 204, 21, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .deal-badge--pulse { animation: none; }
}

@media (max-width: 520px) {
  .deal-card--dazzle {
    min-height: 400px;
  }
  .deal-card-skeleton--tile {
    min-height: 400px;
  }
}

.deal-badge {
  display: inline-block;
  background: #fef3c7; color: #92400e;
  font-size: 12px; font-weight: 600;
  padding: 2px 8px; border-radius: 999px; margin-bottom: 8px;
}
.deal-retailer {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; margin-bottom: 6px;
}
.deal-retailer.amazon { color: var(--amazon); }
.deal-retailer.walmart { color: var(--walmart); }
.deal-title { font-size: 14px; font-weight: 500; margin-bottom: 8px; line-height: 1.4; }
.deal-coupon {
  font-size: 13px;
  margin: 0 0 10px;
  line-height: 1.35;
}
.deal-coupon strong {
  font-weight: 700;
}
.deal-price { margin-bottom: 12px; }
.price-now { font-size: 18px; font-weight: 700; color: var(--green); }
.price-was { font-size: 13px; color: var(--gray-400); text-decoration: line-through; margin-left: 6px; }
.deal-btn {
  background: none; border: 1px solid var(--blue); color: var(--blue);
  border-radius: var(--radius); padding: 6px 14px; font-size: 13px;
  cursor: pointer; width: 100%; transition: all .15s;
}
.deal-btn:hover { background: var(--blue); color: #fff; }

a.deal-affiliate {
  display: block;
  text-align: center;
  text-decoration: none;
  box-sizing: border-box;
}
a.deal-affiliate:hover { color: #fff; text-decoration: none; }

.deal-thumb {
  margin: 0 0 12px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--gray-50);
  height: 140px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.deal-card--dazzle .deal-thumb {
  height: 80px;
  margin-bottom: 10px;
}
.deal-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.deal-card--dazzle .deal-thumb img {
  max-height: 80px;
  width: auto;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}
.deal-img-placeholder {
  font-size: 48px;
  text-align: center;
  padding: 12px 0;
  background: #f9fafb;
  border-radius: 8px;
  height: 80px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}
.deal-thumb-emoji {
  font-size: 44px;
  text-align: center;
  padding: 16px;
  line-height: 1;
}

.deal-coupon-row {
  margin: 10px 0 12px;
}
.deal-coupon-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 13px;
  font-weight: 700;
  color: #166534;
  background: #f0fdf4;
  border: 2px dashed #22c55e;
  border-radius: 999px;
  padding: 6px 12px;
}
.deal-coupon-check {
  font-size: 14px;
}

.deal-search-hint {
  display: block;
  width: 100%;
  margin-top: 8px;
  background: transparent;
  border: none;
  color: var(--gray-600);
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}
.deal-search-hint:hover { color: var(--blue); }

.deals-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.deal-filter {
  background: #fff;
  border: 1px solid var(--gray-200);
  color: var(--gray-600);
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
}
.deal-filter:hover { border-color: var(--gray-400); }
.deal-filter.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.deals-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--gray-600);
  padding: 24px;
  font-size: 14px;
}

/* Deal card loading skeleton */
.deal-card-skeleton {
  pointer-events: none;
}
.deal-card-skeleton .sk {
  background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
  background-size: 200% 100%;
  animation: sk-shimmer 1.2s ease-in-out infinite;
  border-radius: 6px;
}
.deal-card-skeleton--tile {
  border-radius: 16px;
  border: 2px solid var(--gray-200);
  min-height: 440px;
  background: linear-gradient(145deg, #fffbeb, #fff);
}
.deal-card-skeleton--tile .sk-flash {
  position: absolute;
  top: 10px;
  right: -20px;
  width: 100px;
  height: 18px;
  transform: rotate(35deg);
}
.deal-card-skeleton--tile .sk-icons {
  height: 22px;
  width: 72px;
  margin-bottom: 8px;
}
.deal-card-skeleton .sk-badge { height: 22px; width: 64px; margin-bottom: 10px; }
.deal-card-skeleton .sk-line { height: 12px; margin-bottom: 8px; }
.deal-card-skeleton .sk-line.short { width: 40%; }
.deal-card-skeleton .sk-btn { height: 34px; width: 100%; margin-top: 8px; border-radius: var(--radius); }
.deal-card-skeleton--tile { position: relative; overflow: hidden; }
@keyframes sk-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* ============================================================ RESULTS PAGE */
.page-results .mega-header { position: sticky; top: 0; }
.results-main { max-width: 1200px; margin: 0 auto; padding: 0 24px 120px; }
.page-results .mega-hot-zone--below-hero {
  margin: 0 -24px 20px;
  padding-left: 0;
  padding-right: 0;
}
.page-results .mega-hot-zone--below-hero .mega-inner {
  padding-left: 16px;
  padding-right: 16px;
}

.results-meta {
  margin-bottom: 20px;
  padding-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.results-query-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.results-label { font-size: 14px; color: var(--gray-400); }
.results-query { font-size: 20px; font-weight: 600; }
.results-source-badge {
  font-size: 12px; background: var(--gray-100); color: var(--gray-600);
  padding: 2px 10px; border-radius: 999px; border: 1px solid var(--gray-200);
}
.results-cache-badge {
  font-size: 12px; background: #d1fae5; color: #065f46;
  padding: 2px 10px; border-radius: 999px;
}
.results-time { font-size: 13px; color: var(--gray-400); }

/* ============================================================ RESULTS TABLE */
.table-wrapper { overflow-x: auto; margin-bottom: 32px; }

.results-table {
  width: 100%; border-collapse: collapse;
  background: #fff; border: 1px solid var(--gray-200);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow);
}

.results-table th {
  background: var(--gray-50); padding: 12px 14px;
  font-size: 12px; font-weight: 600; color: var(--gray-600);
  text-align: left; text-transform: uppercase; letter-spacing: .05em;
  border-bottom: 1px solid var(--gray-200);
}

.results-table td {
  padding: 14px 14px; border-bottom: 1px solid var(--gray-100);
  font-size: 14px; vertical-align: middle;
}
.results-table tr:last-child td { border-bottom: none; }
.results-table tr:hover td { background: var(--gray-50); }
.results-table tr { cursor: pointer; transition: background .1s; }

.col-rank { width: 40px; text-align: center; }
.col-price { width: 110px; white-space: nowrap; }
.col-coupon { width: 130px; }
.col-rating { width: 90px; }
.col-auth { width: 110px; }
.col-action { width: 110px; text-align: right; }

.rank-badge {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--gray-100); color: var(--gray-600);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
}
.rank-badge.rank-1 { background: #fef9c3; color: #713f12; }
.rank-badge.rank-2 { background: #f1f5f9; color: #334155; }
.rank-badge.rank-3 { background: #fef3e8; color: #7c3005; }

.product-title-cell { font-weight: 500; line-height: 1.4; max-width: 280px; }
.product-retailer { font-size: 11px; font-weight: 700; text-transform: uppercase; margin-top: 3px; }
.product-retailer.amazon { color: var(--amazon); }
.product-retailer.walmart { color: var(--walmart); }

.price-cell .price-now { font-weight: 700; color: var(--green); font-size: 16px; }
.price-cell .price-was { font-size: 12px; color: var(--gray-400); text-decoration: line-through; }
.price-cell .discount { font-size: 11px; color: var(--green); font-weight: 600; }

.coupon-code {
  display: inline-flex; align-items: center; gap: 6px;
  background: #f0fdf4; color: #166534; border: 1px dashed #86efac;
  border-radius: 6px; padding: 3px 8px; font-size: 12px; font-weight: 600;
  font-family: monospace; cursor: pointer; transition: all .15s;
}
.coupon-code:hover { background: #dcfce7; }
.coupon-verified { font-size: 10px; }
.no-coupon { color: var(--gray-400); font-size: 13px; }

.rating-cell { display: flex; align-items: center; gap: 4px; }
.stars { color: var(--amber); font-size: 13px; }
.rating-num { font-weight: 600; font-size: 14px; }
.review-count { color: var(--gray-400); font-size: 11px; }

.trust-bar-wrap { display: flex; align-items: center; gap: 6px; }
.trust-bar-bg { flex: 1; height: 6px; background: var(--gray-200); border-radius: 999px; overflow: hidden; }
.trust-bar-fill { height: 100%; border-radius: 999px; transition: width .4s; }
.trust-score-num { font-size: 12px; font-weight: 600; min-width: 28px; }

.buy-btn {
  background: var(--blue); color: #fff; border: none;
  border-radius: var(--radius); padding: 7px 14px; font-size: 13px;
  font-weight: 500; cursor: pointer; white-space: nowrap; transition: background .15s;
}
.buy-btn:hover { background: var(--blue-dark); }

/* ============================================================ PRODUCT DETAIL CARDS */
.product-cards { display: flex; flex-direction: column; gap: 16px; margin-bottom: 32px; }

.product-card {
  background: #fff; border: 1px solid var(--gray-200);
  border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow); display: none;
}
.product-card.expanded { display: block; }

.card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; }
.card-title { font-size: 16px; font-weight: 600; flex: 1; margin-right: 16px; }
.card-close { background: none; border: none; font-size: 18px; cursor: pointer; color: var(--gray-400); }

.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.card-section { }
.card-section-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--gray-400); margin-bottom: 6px; }
.card-section-content { font-size: 14px; line-height: 1.5; }

.usage-tip { background: #eff6ff; border-left: 3px solid var(--blue); padding: 10px 14px; border-radius: 0 var(--radius) var(--radius) 0; font-size: 14px; color: #1e40af; }

/* ============================================================ SUGGESTIONS */
.suggestions-section { margin-bottom: 32px; }
.suggestions-title { font-size: 17px; font-weight: 600; margin-bottom: 16px; }
.suggestions-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.suggestion-card {
  background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius);
  padding: 14px; cursor: pointer; transition: all .15s;
}
.suggestion-card:hover { border-color: var(--blue); box-shadow: var(--shadow-md); }
.suggestion-emoji { font-size: 24px; margin-bottom: 8px; }
.suggestion-text { font-size: 14px; font-weight: 500; margin-bottom: 4px; }
.suggestion-sub { font-size: 12px; color: var(--gray-400); }

/* ============================================================ LOADING */
.loading-state { text-align: center; padding: 80px 24px; }
.loading-spinner {
  width: 40px; height: 40px; border: 3px solid var(--gray-200);
  border-top-color: var(--blue); border-radius: 50%;
  animation: spin .8s linear infinite; margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { color: var(--gray-400); font-size: 15px; }

.empty-state { text-align: center; padding: 80px 24px; }
.empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-text { color: var(--gray-400); font-size: 16px; margin-bottom: 20px; }

/* ============================================================ CHAT WIDGET */
.chat-widget {
  position: fixed; bottom: 0; right: 24px;
  width: 360px; background: #fff;
  border: 1px solid var(--gray-200); border-bottom: none;
  border-radius: var(--radius) var(--radius) 0 0;
  box-shadow: 0 -4px 20px rgba(0,0,0,.1);
  z-index: 200;
  transition: transform .25s ease;
}

.chat-header {
  background: var(--blue); color: #fff;
  padding: 12px 16px; border-radius: var(--radius) var(--radius) 0 0;
  cursor: pointer; display: flex; justify-content: space-between; align-items: center;
}
.chat-title { font-size: 14px; font-weight: 600; }
.chat-meta { display: flex; align-items: center; gap: 10px; }
.chat-turns { font-size: 12px; opacity: .85; }
.chat-toggle-icon { font-size: 11px; }

.chat-body { padding: 0; }
.chat-messages { height: 220px; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }

.chat-msg { display: flex; }
.chat-msg.assistant { justify-content: flex-start; }
.chat-msg.user { justify-content: flex-end; }

.chat-bubble {
  max-width: 80%; padding: 8px 12px; border-radius: 12px;
  font-size: 13px; line-height: 1.5;
}
.chat-msg.assistant .chat-bubble { background: var(--gray-100); color: var(--gray-800); border-bottom-left-radius: 3px; }
.chat-msg.user .chat-bubble { background: var(--blue); color: #fff; border-bottom-right-radius: 3px; }

.chat-input-row {
  display: flex; gap: 8px; padding: 10px 12px;
  border-top: 1px solid var(--gray-200);
}
.chat-input {
  flex: 1; border: 1px solid var(--gray-200); border-radius: var(--radius);
  padding: 8px 12px; font-size: 13px; outline: none;
}
.chat-input:focus { border-color: var(--blue); }
.chat-send-btn {
  background: var(--blue); color: #fff; border: none;
  border-radius: var(--radius); padding: 8px 14px; font-size: 13px;
  cursor: pointer; white-space: nowrap;
}
.chat-widget.collapsed .chat-body { display: none; }

/* ============================================================ MODALS */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 500; padding: 24px;
}

.modal {
  background: #fff; border-radius: 14px;
  padding: 32px; width: 100%; max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
  position: relative;
}
.modal-close {
  position: absolute; top: 16px; right: 16px;
  background: none; border: none; font-size: 18px;
  cursor: pointer; color: var(--gray-400);
}
.modal-title { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.modal-sub { color: var(--gray-600); font-size: 15px; margin-bottom: 24px; }

.gate-icon { font-size: 40px; margin-bottom: 12px; }

.auth-tabs { display: flex; gap: 0; margin-bottom: 20px; border-bottom: 2px solid var(--gray-200); }
.auth-tab {
  background: none; border: none; padding: 10px 20px;
  font-size: 15px; cursor: pointer; color: var(--gray-400);
  border-bottom: 2px solid transparent; margin-bottom: -2px;
}
.auth-tab.active { color: var(--blue); border-bottom-color: var(--blue); font-weight: 600; }

.auth-input {
  width: 100%; border: 1px solid var(--gray-200); border-radius: var(--radius);
  padding: 11px 14px; font-size: 15px; margin-bottom: 12px; outline: none;
}
.auth-input:focus { border-color: var(--blue); }

.auth-error {
  background: #fef2f2; color: #dc2626; border: 1px solid #fca5a5;
  border-radius: var(--radius); padding: 10px 14px; font-size: 13px; margin-bottom: 12px;
}
.auth-footer { font-size: 12px; color: var(--gray-400); text-align: center; margin-top: 12px; }

/* ============================================================ FOOTER */
.site-footer {
  background: #fff; border-top: 1px solid var(--gray-200);
  padding: 24px; text-align: center;
  font-size: 13px; color: var(--gray-400);
}
.footer-disclosure { font-size: 11px; margin-top: 6px; }

/* ============================================================ RESPONSIVE */
@media (max-width: 640px) {
  .hero { padding: 48px 16px 40px; }
  .search-form-mini { display: none; }
  .chat-widget { right: 0; width: 100%; border-radius: var(--radius) var(--radius) 0 0; }
  .results-table th, .results-table td { padding: 10px 8px; font-size: 13px; }
  .col-auth, .col-coupon { display: none; }
}

/* ============================================================ DYNAMIC HOMEPAGE (GrabDeals.ai) */
.gd-inner { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }

.gd-social-bar {
  background: #F5A623; color: #111; font-size: 14px; font-weight: 600;
  border-bottom: 2px solid #d97706;
}
.gd-social-inner {
  display: flex; flex-wrap: wrap; gap: 16px 24px; padding: 10px 20px; justify-content: center;
}
.gd-social-link { color: #111; text-decoration: none; }
.gd-social-link:hover { text-decoration: underline; }

.gd-header-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 10px 0;
}
.gd-header-logo .mega-logo-mark { font-size: 18px; }
.gd-header-search { flex: 1; display: flex; gap: 8px; min-width: 200px; max-width: 420px; }
.gd-header-search input {
  flex: 1; border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 8px 12px; font-size: 14px;
}
.gd-header-search-btn {
  background: var(--blue); color: #fff; border: none; border-radius: var(--radius); padding: 8px 16px; font-weight: 600; cursor: pointer;
}
.gd-header-auth { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-left: auto; }

.gd-store-pills {
  display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 0 14px;
}
.gd-store-pill {
  border: 1px solid var(--gray-200); background: #fff; border-radius: 999px; padding: 6px 14px; font-size: 13px; cursor: pointer; font-weight: 600;
}
.gd-store-pill--active { background: var(--blue); color: #fff; border-color: var(--blue); }

.gd-home-main { padding-bottom: 48px; }

.gd-hero {
  background: linear-gradient(165deg, #eff6ff 0%, #fff 55%); padding: 36px 0 28px; border-bottom: 1px solid var(--gray-200);
}
.gd-hero-title { font-size: clamp(24px, 4vw, 34px); font-weight: 800; margin-bottom: 16px; text-align: center; }
.gd-hero-search { display: flex; gap: 10px; max-width: 640px; margin: 0 auto 16px; }
.gd-hero-input {
  flex: 1; border: 2px solid var(--gray-200); border-radius: 12px; padding: 14px 16px; font-size: 16px;
}
.gd-hero-go {
  background: var(--blue); color: #fff; border: none; border-radius: 12px; padding: 0 22px; font-weight: 700; cursor: pointer; font-size: 16px;
}
.gd-trending-inline { text-align: center; color: var(--gray-600); font-size: 14px; }
.gd-trend-link { background: none; border: none; color: var(--blue); cursor: pointer; font: inherit; text-decoration: underline; padding: 0 2px; }

.gd-section-title { font-size: 22px; font-weight: 800; margin-bottom: 8px; }
.gd-live-dot { font-size: 12px; font-weight: 700; color: var(--green); text-transform: uppercase; vertical-align: middle; }

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.gd-latest { padding: 28px 0; }
.gd-latest-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px 20px; margin-bottom: 16px; }
.gd-updated { font-size: 13px; color: var(--gray-600); }
.gd-update-flash { font-size: 13px; font-weight: 700; color: var(--green); }
.gd-filter-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.gd-filter-btn {
  border: 1px solid var(--gray-200); background: #fff; border-radius: 999px; padding: 6px 14px; font-size: 13px; cursor: pointer; font-weight: 600;
}
.gd-filter-btn--active { background: var(--blue); color: #fff; border-color: var(--blue); }

.gd-deals-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
@media (max-width: 900px) { .gd-deals-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .gd-deals-grid { grid-template-columns: 1fr; } }

.gd-card {
  background: #fff; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow);
  display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s;
}
.gd-card:hover { transform: translateY(-4px); box-shadow: 0 10px 28px rgba(0,0,0,.1); }
.gd-card-link { text-decoration: none; color: inherit; padding: 14px 14px 0; display: block; flex: 1; }
.gd-store-badge {
  display: inline-block; font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 6px; margin-bottom: 8px;
}
.gd-store-badge--amazon { background: #ff9900; color: #111; }
.gd-store-badge--walmart { background: var(--walmart); color: #fff; }
.gd-card-img { width: 100%; height: 200px; object-fit: cover; border-radius: 10px; display: block; background: var(--gray-100); }
.gd-card-img--ph { display: flex; align-items: center; justify-content: center; font-size: 48px; }
.gd-card-title { font-size: 15px; font-weight: 700; margin: 12px 0 8px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gd-card-price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.gd-price-now { font-size: 26px; font-weight: 800; color: var(--green); }
.gd-price-was { font-size: 15px; color: var(--gray-400); text-decoration: line-through; }
.gd-save-row { margin-top: 8px; }
.gd-save-pill { display: inline-block; background: #fee2e2; color: #991b1b; font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 999px; }
.gd-card-meta { font-size: 13px; color: var(--gray-600); margin-top: 8px; }
.gd-coupon { font-size: 12px; margin-top: 8px; }
.gd-coupon--muted { color: var(--gray-400); }
.gd-card-time { display: block; font-size: 11px; color: var(--gray-400); margin-top: 10px; }
.gd-card-actions { padding: 12px 14px 14px; }
.gd-card-btn {
  display: block; width: 100%; text-align: center; padding: 12px; border-radius: 10px; font-weight: 700; font-size: 15px; text-decoration: none; border: none; cursor: pointer;
}
.gd-card-btn--grab { background: var(--blue); color: #fff; }
.gd-card-btn--grab:hover { background: var(--blue-dark); }
.gd-card-btn--view { background: var(--gray-100); color: var(--gray-800); border: 1px solid var(--gray-200); }

.gd-cat-blocks { padding: 20px 0 32px; background: var(--gray-50); border-top: 1px solid var(--gray-200); }
.gd-cat-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
}
@media (max-width: 900px) { .gd-cat-grid { grid-template-columns: repeat(2, 1fr); } }
.gd-cat-tile {
  border: none; border-radius: 14px; padding: 20px 14px; font-size: 15px; font-weight: 700; cursor: pointer; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 8px; color: #111; box-shadow: var(--shadow); transition: transform .12s;
}
.gd-cat-tile:hover { transform: scale(1.02); }
.gd-cat-emoji { font-size: 32px; }
.gd-cat-tile--el { background: linear-gradient(145deg, #dbeafe, #eff6ff); }
.gd-cat-tile--home { background: linear-gradient(145deg, #dcfce7, #f0fdf4); }
.gd-cat-tile--beauty { background: linear-gradient(145deg, #fce7f3, #fdf2f8); }
.gd-cat-tile--fashion { background: linear-gradient(145deg, #ffedd5, #fff7ed); }
.gd-cat-tile--sports { background: linear-gradient(145deg, #e0e7ff, #eef2ff); }
.gd-cat-tile--books { background: linear-gradient(145deg, #fef3c7, #fffbeb); }
.gd-cat-tile--gaming { background: linear-gradient(145deg, #ede9fe, #f5f3ff); }
.gd-cat-tile--kids { background: linear-gradient(145deg, #cffafe, #ecfeff); }

.gd-trending-section { padding: 28px 0 40px; }
.gd-trending-sub { color: var(--gray-600); margin-bottom: 14px; font-size: 14px; }
.gd-trending-pills { display: flex; flex-wrap: wrap; gap: 10px; }
.gd-trend-pill {
  border: 1px solid var(--blue); color: var(--blue); background: #fff; border-radius: 999px; padding: 8px 16px; font-size: 14px; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
}
.gd-trend-pill:hover { background: var(--blue); color: #fff; }
.gd-trend-c { font-size: 12px; opacity: 0.85; }

.gd-empty { color: var(--gray-600); padding: 24px; text-align: center; }

.gd-card-skeleton .gd-sk-img { height: 200px; border-radius: 10px; background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%); background-size: 200% 100%; animation: gd-pulse 1.2s ease-in-out infinite; }
.gd-card-skeleton .gd-sk-line { height: 12px; border-radius: 6px; margin-top: 12px; background: var(--gray-200); animation: gd-pulse 1.2s ease-in-out infinite; }
.gd-card-skeleton .gd-sk-short { width: 60%; }
.gd-card-skeleton .gd-sk-badge { width: 80px; height: 22px; margin-bottom: 8px; }
.gd-card-skeleton .gd-sk-price { width: 45%; height: 28px; margin-top: 16px; }
.gd-card-skeleton .gd-sk-btn { height: 44px; border-radius: 10px; margin-top: 16px; }
@keyframes gd-pulse {
  0% { opacity: 0.55; }
  50% { opacity: 1; }
  100% { opacity: 0.55; }
}

.gd-toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: #111; color: #fff; padding: 12px 20px; border-radius: 999px; font-size: 14px; z-index: 600; box-shadow: 0 8px 32px rgba(0,0,0,.2);
}

.product-emoji-placeholder {
  font-size: 48px;
  background: #f0f4ff;
  border-radius: 8px;
  width: 200px;
  height: 200px;
  max-width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}
