:root {
  --bg: #f0f2f5;
  --bg-white: #ffffff;
  --text: #1a1a2e;
  --text-secondary: #555770;
  --text-muted: #8a8da0;
  --primary: #e8491d;
  --primary-dark: #cc3a11;
  --primary-light: #fff0ec;
  --secondary: #1a1a2e;
  --accent: #2d6cdf;
  --accent-light: #e8f0fe;
  --success: #0f9d58;
  --success-light: #e6f7ef;
  --warning: #f5a623;
  --border: #dde1e8;
  --border-light: #eef0f4;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.1);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --container: 1240px;
  --header-height: 64px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  font-size: 14px;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--primary); }
ul, ol { list-style: none; }
input, button, select, textarea { font: inherit; }
button { cursor: pointer; border: none; background: none; }

/* === UTILITIES === */
.container { width: min(calc(100% - 2rem), var(--container)); margin: 0 auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; white-space: nowrap; }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* === AFFILIATE DISCLAIMER === */
.affiliate-disclaimer {
  background: var(--accent-light);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 0.6rem 1rem;
  font-size: 0.8rem;
  color: var(--accent);
  text-align: center;
}
.affiliate-disclaimer strong { font-weight: 600; }

/* === HEADER === */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  height: var(--header-height);
}
.header-inner {
  display: flex;
  align-items: center;
  height: var(--header-height);
  gap: 1.5rem;
}
.logo {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--secondary);
  letter-spacing: -0.03em;
  white-space: nowrap;
  flex-shrink: 0;
}
.logo span { color: var(--primary); }

/* Header Search */
.header-search {
  flex: 1;
  max-width: 560px;
  display: flex;
  border: 2px solid var(--primary);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.header-search input {
  flex: 1;
  border: none;
  padding: 0.6rem 1rem;
  font-size: 0.95rem;
  outline: none;
  min-width: 0;
}
.header-search button {
  background: var(--primary);
  color: #fff;
  padding: 0.6rem 1.2rem;
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  transition: background 0.2s;
}
.header-search button:hover { background: var(--primary-dark); }

/* Header Nav */
.main-nav { display: flex; gap: 1.25rem; align-items: center; flex-shrink: 0; }
.main-nav a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: color 0.2s;
}
.main-nav a:hover { color: var(--primary); }

/* Mobile menu toggle */
.menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; }
.menu-toggle span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; transition: 0.3s; }

/* === HERO === */
.hero {
  background: linear-gradient(135deg, #1a1a2e 0%, #2d2d5e 50%, #1a1a2e 100%);
  color: #fff;
  padding: 3.5rem 0 3rem;
  text-align: center;
}
.hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
  line-height: 1.15;
}
.hero p {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.75);
  max-width: 600px;
  margin: 0 auto 2rem;
}
.hero-search {
  max-width: 580px;
  margin: 0 auto 1.5rem;
  display: flex;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.hero-search input {
  flex: 1;
  border: none;
  padding: 1rem 1.25rem;
  font-size: 1.05rem;
  outline: none;
}
.hero-search button {
  background: var(--primary);
  color: #fff;
  padding: 1rem 2rem;
  font-weight: 700;
  font-size: 1rem;
  transition: background 0.2s;
}
.hero-search button:hover { background: var(--primary-dark); }

.hero-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; }
.hero-tags a {
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.85);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  transition: background 0.2s;
}
.hero-tags a:hover { background: rgba(255,255,255,0.22); color: #fff; }

/* === CATEGORIES BAR === */
.categories-bar {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0;
  overflow-x: auto;
}
.categories-bar-inner {
  display: flex;
  gap: 0.5rem;
  white-space: nowrap;
}
.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg);
  border: 1px solid var(--border);
  transition: all 0.2s;
  flex-shrink: 0;
}
.cat-pill:hover, .cat-pill.active {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
}
.cat-pill .cat-icon { font-size: 1.1rem; }

/* === SECTION === */
.section { padding: 2.5rem 0; }
.section-alt { background: var(--bg-white); }
.section-heading {
  margin-bottom: 1.5rem;
}
.section-heading h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.3rem;
}
.section-heading p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* === CATEGORY GRID (HOME) === */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 1rem;
}
.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.5rem 1rem;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: all 0.2s;
  gap: 0.6rem;
}
.category-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.category-card .cat-icon { font-size: 2rem; }
.category-card h3 { font-size: 0.9rem; font-weight: 600; }
.category-card span { font-size: 0.78rem; color: var(--text-muted); }

/* === PRODUCT GRID === */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}
.product-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.product-card-img {
  aspect-ratio: 1/1;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 1rem;
}
.product-card-img img {
  max-height: 100%;
  object-fit: contain;
}
.product-card-body {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.product-card-brand {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.04em;
}
.product-card-title {
  font-size: 0.92rem;
  font-weight: 600;
  margin: 0.3rem 0;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-card-rating {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
}
.stars { color: var(--warning); letter-spacing: 1px; }
.rating-count { color: var(--text-muted); }
.product-card-price {
  margin-top: auto;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.price-current {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text);
}
.price-old {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: line-through;
}
.price-discount {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--success);
  background: var(--success-light);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
}
.product-card-cta {
  margin-top: 0.75rem;
}
.product-card-cta .btn-primary {
  display: block;
  text-align: center;
  width: 100%;
}

/* === BUTTONS === */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: var(--primary);
  color: #fff;
  padding: 0.65rem 1.2rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.88rem;
  transition: background 0.2s;
  border: none;
}
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: var(--bg-white);
  color: var(--text);
  padding: 0.65rem 1.2rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.88rem;
  border: 1px solid var(--border);
  transition: all 0.2s;
}
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }
.btn-sm { padding: 0.45rem 0.85rem; font-size: 0.82rem; }

/* === CATEGORY PAGE LAYOUT === */
.category-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 1.5rem;
  align-items: start;
}

/* Sidebar Filters */
.filter-sidebar {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  position: sticky;
  top: calc(var(--header-height) + 1rem);
}
.filter-group { margin-bottom: 1.25rem; }
.filter-group:last-child { margin-bottom: 0; }
.filter-group h4 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.6rem;
  color: var(--text);
}
.filter-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
  cursor: pointer;
}
.filter-group label:hover { color: var(--primary); }
.filter-group input[type="checkbox"],
.filter-group input[type="radio"] {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
}
.filter-group select {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-size: 0.88rem;
}
.price-range {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.price-range input {
  width: 100%;
  padding: 0.45rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}
.filter-actions { display: flex; gap: 0.5rem; margin-top: 0.75rem; }

/* Category Header */
.category-header {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1rem;
}
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.breadcrumbs a { color: var(--accent); }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs .sep { color: var(--text-muted); }
.category-header h1 {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.3rem;
}
.category-header p {
  color: var(--text-muted);
  font-size: 0.92rem;
}
.category-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.75rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.product-count { font-size: 0.88rem; color: var(--text-muted); }
.sort-select {
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  background: var(--bg);
}

/* === PRODUCT DETAIL PAGE === */
.product-detail-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 1.5rem;
  align-items: start;
}
.product-gallery {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 2rem;
  text-align: center;
}
.product-gallery img {
  max-height: 400px;
  margin: 0 auto;
  object-fit: contain;
}
.product-info-main {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}
.product-info-main .brand {
  font-size: 0.82rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.04em;
}
.product-info-main h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0.4rem 0 0.75rem;
  line-height: 1.25;
}
.product-rating-summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}
.product-description {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

/* Specs Table */
.specs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.specs-table tr { border-bottom: 1px solid var(--border-light); }
.specs-table td {
  padding: 0.65rem 0.5rem;
  vertical-align: top;
}
.specs-table td:first-child {
  color: var(--text-muted);
  font-weight: 500;
  width: 40%;
}
.specs-table td:last-child {
  font-weight: 600;
  color: var(--text);
}

/* Price Comparison Box */
.price-compare-box {
  background: var(--bg-white);
  border: 2px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  position: sticky;
  top: calc(var(--header-height) + 1rem);
}
.price-compare-box .label {
  font-size: 0.78rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.04em;
}
.price-compare-box .price {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text);
  margin: 0.3rem 0;
}
.price-compare-box .price-old-detail {
  font-size: 0.95rem;
  color: var(--text-muted);
  text-decoration: line-through;
}
.price-compare-box .savings {
  display: inline-block;
  background: var(--success-light);
  color: var(--success);
  font-weight: 700;
  font-size: 0.82rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  margin-top: 0.3rem;
}
.price-compare-box .delivery {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0.75rem 0;
}
.price-compare-box .delivery strong { color: var(--success); }
.price-compare-box .cta-stack { display: grid; gap: 0.6rem; margin-top: 1rem; }
.price-compare-box .affiliate-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
  text-align: center;
}

/* Comparison Table (multi-store style) */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: 0.88rem;
}
.comparison-table th {
  background: var(--bg);
  padding: 0.65rem 0.75rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border);
}
.comparison-table td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}
.comparison-table tr:hover td { background: var(--primary-light); }
.comparison-table .store-name { font-weight: 600; }
.comparison-table .store-price { font-weight: 800; font-size: 1.05rem; }
.comparison-table .best-price { color: var(--success); }

/* === CONTENT / GUIDES === */
.guide-content {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 2rem;
  max-width: 800px;
}
.guide-content h1 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}
.guide-content .meta {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
}
.guide-content h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 2rem 0 0.75rem;
}
.guide-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 1.5rem 0 0.5rem;
}
.guide-content p {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1rem;
}
.guide-content ul, .guide-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}
.guide-content li {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 0.3rem;
}
.guide-content li::marker { color: var(--primary); }

/* === LEGAL PAGES === */
.legal-content {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 2.5rem;
  max-width: 800px;
  margin: 2rem auto;
}
.legal-content h1 {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}
.legal-content .updated {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 2rem;
}
.legal-content h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 2rem 0 0.75rem;
}
.legal-content p, .legal-content li {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 0.75rem;
}
.legal-content ul { padding-left: 1.5rem; }

/* === FOOTER === */
.site-footer {
  background: var(--secondary);
  color: rgba(255,255,255,0.7);
  padding: 2.5rem 0 1.5rem;
  margin-top: 3rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-col h4 {
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.footer-col a {
  display: block;
  font-size: 0.85rem;
  padding: 0.2rem 0;
  color: rgba(255,255,255,0.6);
  transition: color 0.2s;
}
.footer-col a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.82rem;
}

/* === COOKIE BANNER === */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--secondary);
  color: rgba(255,255,255,0.9);
  padding: 1.25rem;
  z-index: 9999;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
  display: none;
}
.cookie-banner.show { display: block; }
.cookie-banner-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.cookie-banner p { font-size: 0.88rem; flex: 1; min-width: 250px; }
.cookie-banner p a { color: var(--primary); text-decoration: underline; }
.cookie-banner-actions { display: flex; gap: 0.5rem; flex-shrink: 0; }
.cookie-banner-actions .btn-primary { padding: 0.5rem 1.2rem; font-size: 0.85rem; }
.cookie-banner-actions .btn-secondary { padding: 0.5rem 1.2rem; font-size: 0.85rem; color: rgba(255,255,255,0.8); border-color: rgba(255,255,255,0.3); background: transparent; }
.cookie-banner-actions .btn-secondary:hover { color: #fff; border-color: #fff; }

/* === NO RESULTS === */
.no-results {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}
.no-results h3 { margin-bottom: 0.5rem; color: var(--text-secondary); }

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  .category-layout { grid-template-columns: 200px 1fr; }
  .product-detail-layout { grid-template-columns: 1fr 320px; }
}

@media (max-width: 768px) {
  .header-search { display: none; }
  .main-nav { display: none; }
  .menu-toggle { display: block; }
  .main-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    padding: 1rem;
    box-shadow: var(--shadow-md);
  }
  .category-layout { grid-template-columns: 1fr; }
  .filter-sidebar { position: static; }
  .product-detail-layout { grid-template-columns: 1fr; }
  .price-compare-box { position: static; }
  .hero h1 { font-size: 1.6rem; }
  .hero-search { flex-direction: column; }
  .hero-search button { border-radius: 0; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .category-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .product-grid { grid-template-columns: 1fr 1fr; gap: 0.6rem; }
  .product-card-body { padding: 0.7rem; }
  .price-current { font-size: 1.1rem; }
  .category-grid { grid-template-columns: 1fr 1fr; }
}
