:root {
  --bg: #f8fafc;
  --bg-soft: #fff7f8;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --text: #0f172a;
  --muted: #64748b;
  --accent: #ef4444;
  --accent-dark: #dc2626;
  --accent-soft: #fee2e2;
  --border: #e2e8f0;
  --success: #16a34a;
  --warning-bg: #fff7ed;
  --warning-border: #fdba74;
  --warning-text: #9a3412;
  --shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
  --shadow-soft: 0 10px 24px rgba(15, 23, 42, 0.06);
  --radius: 22px;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: linear-gradient(180deg, #fffafc 0%, var(--bg) 240px);
  color: var(--text);
  line-height: 1.55;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

/* Header */

.topbar {
  background: rgba(17, 24, 39, 0.96);
  color: white;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
}

.nav {
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: nowrap;
}

.logo {
  flex: 0 0 auto;
  font-size: 1.72rem;
  font-weight: 800;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.logo span { color: #fb7185; }

.header-search {
  flex: 1 1 560px;
  max-width: 560px;
  min-width: 280px;
  margin-left: 4px;
  margin-right: auto;
  position: relative;
}

.header-search-wrap {
  position: relative;
  width: 100%;
}

.header-search-input {
  width: 100%;
  min-height: 46px;
  padding: 12px 46px 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-size: 1rem;
  background: #fff;
  color: var(--text);
}

.header-search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.header-search-button {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #475569;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
}

.header-search-button:hover {
  background: #f8fafc;
  color: var(--accent-dark);
}

.nav-links {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.nav-links a {
  padding: 10px 12px;
  border-radius: 12px;
  color: #f8fafc;
  font-weight: 700;
  opacity: 0.95;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  background: rgba(255, 255, 255, 0.12);
}

.header-search-suggestions {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
  overflow: hidden;
  display: none;
  z-index: 300;
  max-height: 340px;
  overflow-y: auto;
}

.header-search-suggestions.show {
  display: block;
}

.header-search-suggestion {
  display: block;
  padding: 12px 14px;
  border-bottom: 1px solid #f1f5f9;
  color: var(--text);
  background: #fff;
}

.header-search-suggestion:last-child {
  border-bottom: 0;
}

.header-search-suggestion:hover,
.header-search-suggestion.active {
  background: #fff7f8;
}

.header-search-suggestion-title {
  font-weight: 700;
  line-height: 1.3;
}

.header-search-suggestion-meta {
  margin-top: 4px;
  font-size: 0.84rem;
  color: var(--muted);
}

/* Hero */

.hero {
  padding: 54px 0 22px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 24px;
  background: linear-gradient(135deg, #fff1f2, #ffffff);
  border: 1px solid var(--border);
  border-radius: 30px;
  padding: 36px;
  box-shadow: var(--shadow);
}

.eyebrow {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #991b1b;
  font-weight: 800;
  font-size: 0.84rem;
  margin-bottom: 14px;
}

h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 4vw, 3.7rem);
  line-height: 1.04;
}

.hero p,
.lead {
  color: var(--muted);
  font-size: 1.06rem;
}

.button-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 18px;
  border-radius: 14px;
  font-weight: 800;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-primary:hover {
  background: var(--accent-dark);
}

.btn-secondary {
  background: white;
  border-color: var(--border);
}

.btn-ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.16);
  color: white;
}

/* Sections */

.panel {
  background: linear-gradient(180deg, #111827, #1f2937);
  color: white;
  border-radius: 24px;
  padding: 24px;
}

.panel p,
.panel li {
  color: #d1d5db;
}

.section {
  padding: 16px 0 34px;
}

.section-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-header h2,
.page-title {
  margin: 0;
  font-size: 1.9rem;
}

.small {
  font-size: 0.92rem;
  color: var(--muted);
}

.page-hero {
  padding: 42px 0 20px;
}

.page-shell {
  background: white;
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 28px;
  box-shadow: var(--shadow);
}

.content h2,
.content h3 {
  margin-top: 1.6rem;
}

.content p,
.content li {
  color: #334155;
}

.content ul {
  padding-left: 1.2rem;
}

.disclosure,
.notice {
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  color: var(--warning-text);
  padding: 16px 18px;
  border-radius: 16px;
}

.notice-good {
  background: #ecfdf5;
  border-color: #86efac;
  color: #166534;
}

/* Cards */

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.card,
.mini-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.card-media {
  aspect-ratio: 4 / 3;
  width: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, #e2e8f0, #f8fafc);
}

.card-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.badge {
  display: inline-block;
  width: fit-content;
  background: var(--accent-soft);
  color: #991b1b;
  font-size: 0.78rem;
  font-weight: 800;
  border-radius: 999px;
  padding: 6px 10px;
}

.card h3,
.mini-card h3 {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.3;
}

.price-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.price {
  font-size: 1.45rem;
  font-weight: 900;
  color: var(--accent-dark);
}

.old-price {
  color: var(--muted);
  text-decoration: line-through;
  font-weight: 700;
}

.save {
  background: #dcfce7;
  color: #166534;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.meta,
.card p,
.mini-card p {
  color: var(--muted);
}

.meta {
  font-size: 0.94rem;
}

/* Horizontal deal cards */

.deal-card-horizontal {
  display: grid;
  grid-template-columns: 180px 1fr;
  align-items: stretch;
  overflow: hidden;
}

.deal-card-image-wrap {
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  border-right: 1px solid var(--border);
}

.deal-card-image {
  width: 100%;
  height: 140px;
  object-fit: contain;
  background: white;
}

.deal-card-body-horizontal {
  padding: 16px 18px;
  gap: 10px;
  justify-content: center;
}

.deal-card-top h3 {
  margin: 6px 0 0;
  font-size: 1.05rem;
  line-height: 1.35;
}

.deal-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.deal-card-actions {
  margin-top: 4px;
}

.promo-code {
  margin-top: 2px;
  display: inline-block;
  width: fit-content;
  background: #fff7ed;
  color: #9a3412;
  border: 1px solid #fdba74;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 0.92rem;
  font-weight: 600;
}

.coupon-pill {
  margin-top: 10px;
  display: inline-block;
  width: fit-content;
  background: #dc2626;
  color: #ffffff;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.coupon-pill strong {
  color: #ffffff;
}

/* Filters / inputs */

.filter-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.search-input {
  flex: 1 1 260px;
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0 14px;
  font-size: 1rem;
}

.pills,
.chip-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.pill,
.chip {
  background: white;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 700;
}

.chip.active {
  background: var(--accent-soft);
  border-color: #fca5a5;
}

/* Other blocks */

.footer {
  margin-top: 34px;
  background: #111827;
  color: #cbd5e1;
  padding: 28px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 20px;
}

.footer h3,
.footer h4 {
  color: white;
  margin-top: 0;
}

.footer-links {
  display: grid;
  gap: 8px;
}

.kpi-grid,
.feature-grid,
.info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.kpi,
.feature,
.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow-soft);
}

.kpi strong {
  font-size: 1.7rem;
  display: block;
  margin-bottom: 6px;
}

.featured-strip {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.callout {
  background: linear-gradient(135deg, #111827, #1e293b);
  color: white;
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.callout p {
  color: #dbe4f0;
}

.number-list {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 8px;
}

.template-box {
  background: var(--surface);
  border: 1px dashed #cbd5e1;
  border-radius: 18px;
  padding: 18px;
  white-space: pre-wrap;
  font-family: "Courier New", monospace;
  font-size: 0.95rem;
  color: #334155;
}

.mini-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.highlight {
  background: linear-gradient(135deg, #ffffff, #fff1f2);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--shadow);
}

/* Featured homepage sliders */

.featured-row,
#featured-amazon-grid,
#featured-walmart-grid {
  width: 100%;
  max-width: 100%;
}

.featured-slider {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.featured-viewport {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.featured-viewport::-webkit-scrollbar {
  display: none;
}

.featured-track {
  display: flex;
  flex-wrap: nowrap;
  gap: 20px;
  width: max-content;
  padding: 4px 2px 10px;
}

.featured-track .mini-card,
.featured-row .mini-card {
  flex: 0 0 280px;
  width: 280px;
  min-width: 280px;
  max-width: 280px;
  margin: 0;
}

.featured-arrow {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  font-size: 20px;
  font-weight: 700;
  flex: 0 0 auto;
  z-index: 2;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

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

.featured-arrow:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
}

.featured-arrow-left,
.featured-arrow-right {
  align-self: center;
}

#featured-amazon-grid .notice,
#featured-walmart-grid .notice {
  width: 100%;
}

/* Article pages */

.article-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  align-items: start;
}

.article-content {
  max-width: 760px;
}

.article-content h2,
.article-content h3 {
  margin-top: 24px;
}

.article-content p {
  margin-bottom: 16px;
  line-height: 1.7;
}

.article-content ul {
  padding-left: 20px;
}

.article-deals {
  position: sticky;
  top: 100px;
}

.deal-sidebar-title {
  margin-bottom: 12px;
}

.deal-sidebar-wrapper {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 10px;
}

.deal-sidebar-viewport {
  max-height: 520px;
  overflow-y: auto;
  padding-right: 6px;
  scroll-behavior: smooth;
}

.deal-sidebar-viewport::-webkit-scrollbar {
  width: 6px;
}

.deal-sidebar-viewport::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 6px;
}

.deal-sidebar-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 40px;
}

.article-deals .deal-card-horizontal {
  display: grid;
  grid-template-columns: 90px 1fr;
  align-items: stretch;
}

.article-deals .deal-card-image-wrap {
  padding: 8px;
}

.article-deals .deal-card-image {
  height: 80px;
}

.article-deals .deal-card-body-horizontal {
  padding: 10px 12px;
}

.article-deals .price {
  font-size: 1.1rem;
}

.article-deals .btn {
  min-height: 40px;
  padding: 10px 14px;
}

.deal-scroll-btn {
  width: 100%;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
  font-size: 16px;
  padding: 8px 10px;
  border-radius: 10px;
  box-shadow: var(--shadow-soft);
}

.deal-scroll-btn:hover {
  background: #f8fafc;
}

.deal-scroll-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Responsive */

@media (max-width: 940px) {
  .hero-grid,
  .footer-grid,
  .kpi-grid,
  .feature-grid,
  .info-grid,
  .featured-strip,
  .mini-grid,
  .article-layout {
    grid-template-columns: 1fr;
  }

  .article-deals {
    position: static;
  }

  .deal-sidebar-viewport {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }
}

@media (max-width: 768px) {
  .nav {
    flex-wrap: wrap;
    align-items: stretch;
    gap: 10px;
    padding: 12px 0;
  }

  .header-search {
    order: 3;
    flex: 1 1 100%;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
  }

  .nav-links {
    width: 100%;
    justify-content: flex-start;
  }

  .featured-slider {
    gap: 8px;
  }

  .featured-track {
    gap: 16px;
  }

  .featured-track .mini-card,
  .featured-row .mini-card {
    flex: 0 0 240px;
    width: 240px;
    min-width: 240px;
    max-width: 240px;
  }

  .featured-arrow {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }

  .deal-card-horizontal {
    grid-template-columns: 1fr;
  }

  .deal-card-image-wrap {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .deal-card-image {
    height: 180px;
  }
}

@media (max-width: 640px) {
  .hero-grid,
  .page-shell,
  .callout,
  .highlight {
    padding: 22px;
  }

  .container {
    width: min(var(--max), calc(100% - 20px));
  }

  .section-header h2,
  .page-title {
    font-size: 1.55rem;
  }

  .logo {
    font-size: 1.4rem;
  }
}
/* Best Of hub page */

.best-of-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.best-of-card {
  display: block;
  background: linear-gradient(135deg,#fff1f2,#ffffff);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 20px;
  box-shadow: var(--shadow-soft);
}

.best-of-card h3 {
  margin: 0 0 8px;
}

.best-of-card p {
  margin: 0;
  color: var(--muted);
}

/* Homepage Best Of right rail */

.home-split-layout {
  display: grid;
  grid-template-columns: 1.45fr 0.8fr;
  gap: 28px;
  align-items: start;
}

.home-main-column {
  min-width: 0;
}

.home-feature-intro {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 18px;
  color: #334155;
  box-shadow: var(--shadow-soft);
}

.home-bestof-rail {
  min-width: 0;
}

.home-bestof-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 18px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 96px;
}

.home-bestof-list {
  display: grid;
  gap: 12px;
}

.home-bestof-item {
  display: block;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  background: #fff;
}

.home-bestof-item strong {
  display: block;
  margin-bottom: 4px;
}

.home-bestof-item span {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.4;
}

.home-bestof-item:hover,
.best-of-card:hover {
  background: #fff7f8;
}

@media (max-width: 940px) {
  .best-of-grid {
    grid-template-columns: 1fr;
  }

  .home-split-layout {
    grid-template-columns: 1fr;
  }

  .home-bestof-box {
    position: static;
  }
}
/* HERO WITH BEST OF SIDEBAR */

.hero-layout {
  display: grid;
  grid-template-columns: 1.6fr 0.8fr;
  gap: 28px;
  align-items: start;
}

.hero-main {
  background: linear-gradient(135deg,#fff1f2,#ffffff);
  border: 1px solid var(--border);
  border-radius: 30px;
  padding: 36px;
  box-shadow: var(--shadow);
}

.hero-bestof {
  min-width: 0;
}

.hero-bestof-box {
  background: linear-gradient(135deg,#fff1f2,#ffffff);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.hero-bestof-list {
  display: grid;
  gap: 12px;
}

.hero-bestof-item {
  display: block;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  background: white;
}

.hero-bestof-item strong {
  display: block;
  margin-bottom: 4px;
}

.hero-bestof-item span {
  display: block;
  font-size: 0.9rem;
  color: var(--muted);
}

.hero-bestof-item:hover {
  background: #fff7f8;
}

/* MOBILE */

@media (max-width: 940px) {

  .hero-layout {
    grid-template-columns: 1fr;
  }

}
