/* Shopzaa: product browsing and price comparison styles. */

:root {
  /* Surfaces */
  --bg-canvas: #ffffff;
  --bg-surface: #ffffff;
  --bg-surface-soft: #f8fafc;
  --bg-surface-subtle: #f1f5f9;
  
  /* Text */
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  
  /* Accents */
  --accent-primary: #2563eb;
  --accent-primary-hover: #1d4ed8;
  --accent-primary-soft: #eff6ff;
  
  --accent-emerald: #059669;
  --accent-emerald-light: #ecfdf5;
  --accent-emerald-border: #a7f3d0;
  
  --accent-rose: #e11d48;
  --accent-rose-soft: #fff1f2;
  
  /* Borders */
  --border-subtle: #f1f5f9;
  --border-light: #e2e8f0;
  --border-medium: #cbd5e1;
  
  /* Shadows */
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px -2px rgba(0, 0, 0, 0.06), 0 2px 4px -2px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 14px 28px -4px rgba(0, 0, 0, 0.08), 0 4px 12px -3px rgba(0, 0, 0, 0.03);
  --shadow-xl: 0 20px 30px -5px rgba(0, 0, 0, 0.08);
  
  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-pill: 9999px;
  
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

/* Header */
.main-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  padding: 12px 24px;
}

.header-container {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

a:focus-visible, button:focus-visible, select:focus-visible {
  outline: 3px solid var(--accent-primary);
  outline-offset: 3px;
}

.search-wrapper { min-width: 220px; }
.nav-link { white-space: nowrap; }
.mobile-filter-toggle { display: none; }

.page-help {
  color: var(--text-secondary);
  font-size: 0.825rem;
  line-height: 1.6;
  margin-bottom: 18px;
}

.page-state {
  grid-column: 1 / -1;
  width: 100%;
  text-align: center;
  padding: 48px 20px;
  background: var(--bg-surface);
  border: 1px dashed var(--border-medium);
  border-radius: var(--radius-lg);
}

.page-state h3 { margin-bottom: 8px; }
.page-state p { color: var(--text-secondary); margin-bottom: 18px; }
.page-state a { display: inline-block; text-decoration: none; }
.store-offer-help { padding: 14px 18px; margin-bottom: 0; }

.brand-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text-primary);
}

/* Show two regions of the unchanged supplied PNG as a compact brand lockup. */
.brand-logo {
  --brand-mark-size: 42px;
  --brand-wordmark-size: 140px;
  flex-shrink: 0;
}

.brand-mark, .brand-wordmark {
  position: relative;
  display: block;
  overflow: hidden;
  flex-shrink: 0;
}

.brand-mark {
  width: var(--brand-mark-size);
  height: calc(var(--brand-mark-size) * 1.065);
}

.brand-mark img, .brand-wordmark img {
  position: absolute;
  display: block;
  max-width: none;
  height: auto;
}

.brand-mark img {
  width: calc(var(--brand-mark-size) * 2.039);
  left: calc(var(--brand-mark-size) * -0.5203);
  top: calc(var(--brand-mark-size) * -0.3317);
}

.brand-wordmark {
  width: var(--brand-wordmark-size);
  height: calc(var(--brand-wordmark-size) * 0.25);
}

.brand-wordmark img {
  width: calc(var(--brand-wordmark-size) * 1.30625);
  left: calc(var(--brand-wordmark-size) * -0.15625);
  top: calc(var(--brand-wordmark-size) * -0.90625);
}

.footer-logo {
  --brand-mark-size: 34px;
  --brand-wordmark-size: 126px;
  width: fit-content;
}

/* Header Navigation Links */
.main-nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  transition: var(--transition-fast);
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-surface-soft);
}

.nav-link.active {
  color: var(--accent-primary);
  background: var(--accent-primary-soft);
  font-weight: 700;
}

/* Search Box Form */
.search-wrapper {
  flex: 1;
  max-width: 500px;
}

.search-input-box {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.search-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-input-box input {
  width: 100%;
  padding: 9px 85px 9px 38px;
  font-size: 0.875rem;
  font-family: inherit;
  background: var(--bg-surface-soft);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill);
  color: var(--text-primary);
  transition: var(--transition-fast);
  outline: none;
}

.search-input-box input:focus {
  background: #ffffff;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.search-submit-btn {
  position: absolute;
  right: 4px;
  background: var(--accent-primary);
  color: #ffffff;
  border: none;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: var(--transition-fast);
}

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

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.live-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-surface-soft);
  border: 1px solid var(--border-light);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
}

.jev-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #2563eb;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.22);
  padding: 6px 13px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.02em;
}

.engine-dot {
  width: 7px;
  height: 7px;
  background: #10b981;
  border-radius: 50%;
}

.jev-spark-dot {
  width: 7px;
  height: 7px;
  background: #2563eb;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(37, 99, 235, 0.6);
}

/* Smart Contextual Specifications Section */
.smart-specs-section {
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px 12px;
  margin-bottom: 16px;
  animation: fadeIn 200ms ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.smart-specs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e2e8f0;
}

.smart-category-pill {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--accent-primary);
  background: var(--accent-primary-soft);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.smart-spec-group {
  margin-bottom: 14px;
}

.smart-spec-group:last-child {
  margin-bottom: 0;
}

.smart-spec-heading {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.smart-spec-chips {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.smart-spec-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-secondary);
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
  user-select: none;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
}

.smart-spec-item:hover {
  background: #ffffff;
  color: var(--text-primary);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.smart-spec-item.active {
  background: var(--accent-primary);
  color: #ffffff;
  font-weight: 600;
}

.smart-spec-item.active .smart-spec-count {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.smart-spec-item-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.smart-spec-count {
  font-size: 0.7rem;
  color: var(--text-muted);
  background: var(--bg-surface-soft);
  padding: 1px 6px;
  border-radius: 10px;
}

/* Product Tile Smart Spec Pills */
.tile-specs-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 10px;
}

.tile-spec-pill {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 2px 7px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  line-height: 1.3;
}

/* Tile JEV TypeSafe AI Deal Badge */
.tile-jev-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  border: 0;
  border-radius: var(--radius-sm);
  padding: 0;
  margin-bottom: 12px;
  font-size: 0.72rem;
  line-height: 1.2;
  color: var(--text-muted);
}

.tile-jev-badge.strong-buy {
  background: transparent;
  border-color: transparent;
}

.tile-jev-badge.good-deal {
  background: transparent;
  border-color: transparent;
}

.tile-jev-badge.wait {
  background: transparent;
  border-color: transparent;
}

.jev-score-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 500;
}

.tile-jev-badge.strong-buy .jev-score-pill { color: var(--text-secondary); }
.tile-jev-badge.good-deal .jev-score-pill { color: var(--text-secondary); }
.tile-jev-badge.wait .jev-score-pill { color: var(--text-secondary); }

.jev-verdict-tag {
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.65rem;
  padding: 2px 7px;
  border-radius: 4px;
}

.tile-jev-badge.strong-buy .jev-verdict-tag {
  background: var(--bg-surface-soft);
  color: var(--text-secondary);
}

.tile-jev-badge.good-deal .jev-verdict-tag {
  background: var(--bg-surface-soft);
  color: var(--text-secondary);
}

.tile-jev-badge.wait .jev-verdict-tag {
  background: var(--bg-surface-soft);
  color: var(--text-secondary);
}

/* ==========================================================================
   2-COLUMN APP LAYOUT: LHS SIDEBAR + RHS CONTENT
   ========================================================================== */
.app-layout {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  gap: 28px;
  padding: 24px;
  width: 100%;
  flex: 1;
}

/* LHS Sidebar Filters */
.lhs-sidebar {
  width: 260px;
  flex-shrink: 0;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 18px;
  align-self: flex-start;
  position: sticky;
  top: 76px;
  max-height: calc(100vh - 96px);
  overflow-y: auto;
  box-shadow: var(--shadow-sm);
}

.lhs-sidebar::-webkit-scrollbar {
  width: 4px;
}
.lhs-sidebar::-webkit-scrollbar-thumb {
  background: var(--border-medium);
  border-radius: 4px;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 16px;
}

.filter-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-primary);
}

.ui-icon {
  color: var(--text-secondary);
}

.btn-reset-filters {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-primary);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
}

.btn-reset-filters:hover {
  text-decoration: underline;
}

.filter-section {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 16px;
}

.filter-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.filter-heading {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 10px;
}

/* Category Menu in LHS */
.category-menu {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.category-nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: var(--transition-fast);
}

.category-nav-item:hover {
  background: var(--bg-surface-soft);
  color: var(--text-primary);
}

.category-nav-item.active {
  background: var(--text-primary);
  color: #ffffff;
}

.category-nav-item.active .cat-icon {
  color: #ffffff;
}

.category-nav-item.active .cat-count {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.cat-label-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cat-icon {
  color: var(--text-muted);
  flex-shrink: 0;
}

.cat-count {
  font-size: 0.7rem;
  background: var(--bg-surface-soft);
  color: var(--text-muted);
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  font-weight: 600;
}

/* Radio & Checkbox Groups in LHS */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-radio-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

.filter-radio-item input[type="radio"],
.filter-radio-item input[type="checkbox"] {
  accent-color: var(--accent-primary);
  width: 14px;
  height: 14px;
  cursor: pointer;
}

.filter-radio-item:hover {
  color: var(--text-primary);
}

/* Brand Chips in LHS */
.brand-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.brand-chip-btn {
  background: var(--bg-surface-soft);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: var(--transition-fast);
}

.brand-chip-btn:hover {
  border-color: var(--border-medium);
  color: var(--text-primary);
}

.brand-chip-btn.active {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
}

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.brand-browse { margin: 0 0 22px; padding: 16px; border: 1px solid var(--border-light); border-radius: 16px; background: var(--bg-surface); }
.brand-browse-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.brand-browse-header h2 { margin: 0; font-size: 1rem; font-weight: 700; }
.brand-select-wrap { min-width: 0; }
.brand-filter-select, .brand-search-input { min-height: 44px; padding: 10px 12px; border: 1px solid var(--border-light); border-radius: 10px; background: var(--bg-surface); color: var(--text-primary); font: inherit; font-size: .875rem; }
.brand-filter-select { width: 210px; max-width: 100%; cursor: pointer; }
.brand-search-input { width: 100%; margin-bottom: 10px; box-sizing: border-box; }
.brand-filter-section .brand-chips { max-height: 270px; overflow-y: auto; overscroll-behavior: contain; flex-direction: column; flex-wrap: nowrap; }
.brand-filter-section .brand-chip-btn { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 40px; padding: 8px 12px; border-radius: 10px; text-align: left; font-size: .85rem; flex-shrink: 0; }
.quick-brand-list { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; overscroll-behavior-x: contain; }
.quick-brand-list .brand-chip-btn { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; min-height: 44px; padding: 10px 14px; font-size: .875rem; white-space: nowrap; }
.brand-search-empty { margin: 8px 0; color: var(--text-secondary); font-size: .875rem; }
.tile-mobile-store { display: none; }

/* Compact filters retain native disclosure and keyboard behavior. */
.lhs-sidebar { width: 244px; padding: 16px; box-shadow: none; }
.lhs-sidebar details.filter-section { padding-bottom: 12px; margin-bottom: 12px; }
.lhs-sidebar summary.filter-heading { display: flex; align-items: center; justify-content: space-between; min-height: 44px; margin: 0; font-size: .85rem; text-transform: none; letter-spacing: 0; color: var(--text-primary); cursor: pointer; list-style: none; }
.lhs-sidebar summary.filter-heading::-webkit-details-marker { display: none; }
.lhs-sidebar summary.filter-heading::after { content: '+'; font-size: 1.1rem; color: var(--text-secondary); }
.lhs-sidebar details[open] > summary.filter-heading::after { content: '▴'; }
.lhs-sidebar details[open] > summary.filter-heading { margin-bottom: 8px; }
.lhs-sidebar summary:focus-visible { outline: 2px solid var(--accent-primary); outline-offset: 2px; border-radius: 4px; }
.lhs-sidebar .brand-chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 210px; gap: 6px; }
.lhs-sidebar .brand-chip-btn { flex-direction: column; justify-content: center; gap: 4px; padding: 6px; min-height: 60px; font-size: .75rem; overflow-wrap: anywhere; }
.lhs-sidebar .category-nav-item { min-height: 40px; font-weight: 500; }
.lhs-sidebar .filter-radio-item { min-height: 36px; }
.rhs-content > .content-header { justify-content: flex-end; padding-bottom: 0; border-bottom: 0; margin-bottom: 14px; }
.rhs-content > .content-header .title-meta-wrap { position: absolute; width: 1px; height: 1px; overflow: hidden; }
.brand-chip-btn:focus-visible, .brand-filter-select:focus-visible { outline: 3px solid var(--accent-primary); outline-offset: 2px; }

@media (max-width: 640px) {
  .brand-browse { padding: 12px; margin-bottom: 18px; }
  .brand-browse-header h2 { font-size: .9rem; }
  .brand-filter-select { width: 170px; font-size: 16px; }
  .brand-search-input { font-size: 16px; }
}

/* ==========================================================================
   RHS MAIN CONTENT
   ========================================================================== */
.rhs-content {
  flex: 1;
  min-width: 0;
}

.content-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-light);
}

.title-meta-wrap {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.page-title {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.results-badge {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.controls-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sort-box {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sort-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

.sort-select {
  padding: 6px 12px;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  background: #ffffff;
  color: var(--text-primary);
  cursor: pointer;
  outline: none;
}

.btn-refresh-deals {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.btn-refresh-deals:hover {
  background: var(--bg-surface-soft);
  border-color: var(--border-medium);
}

.spin-icon {
  transition: transform 0.6s ease;
}

.btn-refresh-deals:hover .spin-icon {
  transform: rotate(180deg);
}

/* Active Tags Bar */
.active-filters-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.active-filters-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.active-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-surface-soft);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
}

.active-tag-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
  display: flex;
  align-items: center;
}

.active-tag-remove:hover {
  color: var(--accent-rose);
}

/* Loading Banner */
.loading-banner {
  background: var(--accent-primary-soft);
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(37, 99, 235, 0.2);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-text strong {
  font-size: 0.875rem;
  color: var(--accent-primary);
  display: block;
}

.loading-text span {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   PRODUCT TILES GRID & CARDS
   ========================================================================== */
.products-tiles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 20px;
}

.product-tile {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: none;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
  display: flex;
  flex-direction: column;
}

.product-tile:hover {
  transform: none;
  border-color: var(--border-medium);
  box-shadow: var(--shadow-md);
}

/* Tile Media Box */
.tile-media-box {
  width: 100%;
  height: 210px;
  background: #ffffff;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 20px 18px;
  border-bottom: 1px solid var(--border-subtle);
}

.tile-media-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform var(--transition-base);
}

.product-tile:hover .tile-media-box img {
  transform: scale(1.04);
}

.tile-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--bg-surface-soft);
  color: #9f1239;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 4px;
}

.tile-category-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--bg-surface-soft);
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  text-transform: capitalize;
}

.tile-customer-rating {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 3px 7px;
  border-radius: 4px;
  background: #ecfdf5;
  color: #065f46;
  font-size: .72rem;
  font-weight: 700;
  white-space: nowrap;
}
.tile-customer-rating small { font-size: .85em; font-weight: 500; }
.customer-rating-caption { font-size: .58rem; font-weight: 500; }
.customer-rating-unavailable { background: var(--bg-surface-soft); color: var(--text-muted); }
.customer-ratings-panel { border: 1px solid var(--border-subtle); border-radius: 10px; padding: 16px; margin: 0 0 20px; }
.customer-ratings-panel h2 { font-size: .95rem; margin: 0 0 8px; }
.customer-rating-summary { color: #065f46; margin: 0 0 8px; }
.customer-ratings-panel ul { list-style: none; margin: 12px 0; padding: 0; }
.customer-ratings-panel li + li { border-top: 1px solid var(--border-subtle); margin-top: 8px; padding-top: 8px; }
.customer-ratings-panel li a { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; }
.customer-ratings-panel li small { display: block; color: var(--text-muted); font-size: .75rem; }

/* Tile Body */
.tile-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.tile-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 44px;
  margin-bottom: 8px;
}

/* Hero Price Row inside Tile */
.tile-price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 12px;
}

.tile-best-price {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
}

.tile-mrp-group {
  text-align: right;
}

.tile-mrp {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-decoration: line-through;
  display: block;
}

.tile-savings-tag {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--accent-emerald);
}

/* All Pricing Below Block */
.tile-stores-block {
  background: var(--bg-surface-soft);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  margin-top: auto;
}

.tile-stores-header {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-muted);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}

.tile-stores-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.tile-store-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  padding: 3px 6px;
  border-radius: 4px;
  transition: background var(--transition-fast);
  text-decoration: none;
  color: var(--text-primary);
}

.tile-store-item:hover {
  background: #ffffff;
}

.tile-store-item.is-lowest {
  background: var(--accent-emerald-light);
  color: var(--accent-emerald);
  font-weight: 700;
}

.tile-store-name {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lowest-pill {
  background: transparent;
  color: #047857;
  font-size: 0.58rem;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: var(--radius-pill);
  text-transform: none;
  letter-spacing: 0;
}

.tile-store-price {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 700;
}

/* Tile Action Toolbar */
.tile-actions {
  display: flex;
  gap: 6px;
  margin-top: 12px;
}

.btn-tile-buy {
  flex: 1;
  background: var(--accent-primary);
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.78rem;
  padding: 7px 10px;
  border-radius: 8px;
  text-align: center;
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 44px;
}

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

.btn-tile-offers {
  background: #ffffff;
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.78rem;
  padding: 7px 10px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-tile-offers:hover {
  background: var(--bg-surface-soft);
  color: var(--text-primary);
}

.btn-tile-details {
  background: var(--bg-surface-soft);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.76rem;
  padding: 7px 10px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.btn-tile-details:hover {
  background: #ffffff;
  border-color: var(--border-medium);
}

.tile-title-link {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.tile-title-link:hover {
  color: var(--accent-primary);
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 1000;
}

.modal-overlay.open { display: flex; }

.modal-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  max-width: 620px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  padding: 28px;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--bg-surface-soft);
  border: 1px solid var(--border-light);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-badge {
  background: var(--accent-primary-soft);
  color: var(--accent-primary);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}

.modal-title {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  margin: 6px 0 2px;
}

.modal-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* Modal JEV TypeSafe AI Card */
.modal-jev-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 20px;
}

.modal-jev-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e2e8f0;
}

.jev-tagline {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.76rem;
  font-weight: 700;
  color: #2563eb;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.jev-confidence-pill {
  font-size: 0.7rem;
  font-weight: 700;
  color: #059669;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.modal-jev-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.modal-jev-verdict {
  font-size: 1.05rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  display: inline-block;
  line-height: 1.2;
}

.modal-jev-verdict.strong-buy {
  background: #059669;
  color: #ffffff;
}

.modal-jev-verdict.good-deal {
  background: #2563eb;
  color: #ffffff;
}

.modal-jev-verdict.wait {
  background: #d97706;
  color: #ffffff;
}

.modal-jev-score-box {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.jev-score-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}

.jev-score-num {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  color: #0f172a;
}

.jev-score-scale {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 700;
}

.modal-jev-rec {
  font-size: 0.85rem;
  color: #334155;
  line-height: 1.45;
  margin-bottom: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
}

.modal-jev-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.btn-jev-reeval {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-jev-reeval:hover {
  background: var(--bg-surface-soft);
  color: #0f172a;
  border-color: #94a3b8;
}

.btn-jev-reeval:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.modal-matrix { margin-bottom: 20px; }
.modal-matrix h4, .calculator-box h4 {
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.calc-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.calculator-box {
  background: var(--bg-surface-soft);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 20px;
}

.card-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.card-pill {
  background: #ffffff;
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: var(--transition-fast);
}

.card-pill.active {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
}

.calculated-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--border-light);
  font-size: 0.8rem;
  font-weight: 600;
}

.calculated-price {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--accent-emerald);
}



.form-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.form-row input {
  flex: 1;
  min-width: 160px;
  padding: 8px 12px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.825rem;
  outline: none;
}

.form-row input:focus { border-color: var(--accent-primary); }

.btn-primary {
  background: var(--accent-primary);
  border: 1px solid var(--accent-primary);
  color: #ffffff;
  font-family: inherit;
  font-size: 0.825rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-fast);
}

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



/* Toast */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: #ffffff;
  border: 1px solid var(--border-medium);
  box-shadow: var(--shadow-xl);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-primary);
  min-width: 260px;
}

.toast-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-emerald);
  border-radius: 50%;
  flex-shrink: 0;
}

/* Footer */
.main-footer {
  background: #ffffff;
  border-top: 1px solid var(--border-light);
  padding: 24px 20px 16px;
  margin-top: auto;
}

.footer-container {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.footer-tagline {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 6px;
  text-align: center;
}

.footer-bottom {
  max-width: 1100px;
  margin: 0 auto;
  padding-top: 14px;
  font-size: 0.75rem;
  color: var(--text-light);
  text-align: center;
}

.footer-brand { display: flex; flex-direction: column; align-items: center; max-width: 100%; }
.footer-navigation { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 4px 20px; }
.footer-navigation a { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; color: var(--text-secondary); font-size: .825rem; text-decoration: none; }
.footer-navigation a:hover { color: var(--accent-primary); text-decoration: underline; }
.footer-navigation a[aria-current="page"] { color: var(--accent-primary); }
.footer-navigation a:focus-visible, .information-toc a:focus-visible, .information-content summary:focus-visible { outline: 3px solid var(--accent-primary); outline-offset: 3px; }
.information-page { max-width: 900px; margin: 0 auto; padding: 30px 24px 60px; }
.information-header { margin: 28px 0; }
.information-eyebrow { color: var(--accent-primary); font-size: .85rem; font-weight: 700; }
.information-header h1 { margin: 8px 0 12px; font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; font-size: clamp(1.8rem, 5vw, 2.5rem); line-height: 1.2; }
.information-header p { color: var(--text-secondary); line-height: 1.7; }
.information-header .policy-updated { margin-top: 12px; font-size: .85rem; color: var(--text-muted); }
.information-toc { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.information-toc a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 12px; border: 1px solid var(--border-light); border-radius: 10px; text-decoration: none; font-size: .85rem; color: var(--accent-primary); background: var(--bg-surface); }
.information-content { background: var(--bg-surface); border: 1px solid var(--border-light); border-radius: 18px; padding: 28px; }
.information-content section + section { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--border-light); }
.information-content h2 { margin: 0 0 12px; font-size: 1.15rem; line-height: 1.4; }
.information-content p { margin: 0 0 12px; font-size: .95rem; line-height: 1.8; color: var(--text-secondary); overflow-wrap: anywhere; }
.information-content p:last-child { margin-bottom: 0; }
.information-content a { color: var(--accent-primary); text-underline-offset: 3px; }
.about-section-heading { margin-bottom: 20px; font-size: 1.3rem; }
.about-faq { margin-top: 32px; }
.about-faq details { border-top: 1px solid var(--border-light); padding: 6px 0; }
.about-faq summary { min-height: 44px; padding: 12px 0; font-weight: 600; cursor: pointer; line-height: 1.5; }
.about-faq details p { padding: 0 0 12px; }
.information-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.information-actions a { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 12px 18px; text-decoration: none; }
@media (max-width: 640px) {
  .footer-navigation { gap: 0 16px; }
  .footer-navigation a { min-height: 44px; }
  .information-page { padding: 24px 16px 40px; }
  .information-content { padding: 20px 16px; }
  .information-content h2 { font-size: 1.05rem; }
}

/* Responsive Rules */
@media (max-width: 1200px) {
  .header-container { flex-wrap: wrap; gap: 12px; }
  .search-wrapper { margin-left: auto; }
  .main-nav-links { order: 3; width: 100%; overflow-x: auto; }
}

@media (max-width: 1024px) {
  .app-layout {
    flex-direction: column;
    padding: 16px;
  }
  .lhs-sidebar {
    width: 100%;
    position: static;
    max-height: none;
    display: none;
  }
  .lhs-sidebar.is-open { display: block; }
  .mobile-filter-toggle {
    display: block;
    align-self: flex-start;
    padding: 10px 16px;
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    font: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-primary);
    background: var(--accent-primary-soft);
    cursor: pointer;
  }
}

@media (max-width: 640px) {
  .products-tiles-grid {
    grid-template-columns: 1fr;
  }
  .main-header { padding: 12px 16px; }
  .header-container { gap: 10px; }
  .search-wrapper { flex-basis: 100%; order: 2; max-width: none; min-width: 0; }
  .main-nav-links { padding-bottom: 3px; }
  .nav-link { padding: 8px 10px; }
  .controls-toolbar { flex-wrap: wrap; }
  .sort-select { max-width: 190px; }
  .modal-overlay { padding: 12px; }
  .modal-card { padding: 22px 18px; }
  .modal-title { padding-right: 24px; }
  .toast-container { left: 16px; right: 16px; bottom: 16px; }
  .toast { min-width: 0; overflow-wrap: anywhere; }
}

/* ==========================================================================
   PAGE-SPECIFIC STYLES: PRODUCT DETAIL, DEALS, ABOUT, CATEGORY
   ========================================================================== */

/* Breadcrumb Navigation */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.breadcrumbs a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.breadcrumbs a:hover {
  color: var(--accent-primary);
}

.breadcrumbs span.crumb-sep {
  color: var(--border-medium);
}

.breadcrumbs span.crumb-active {
  color: var(--text-primary);
  font-weight: 600;
}

/* Dedicated Product Detail Page Layout */
.product-page-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}

.product-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
  gap: 36px;
  align-items: start;
}

@media (max-width: 900px) {
  .product-detail-grid {
    grid-template-columns: 1fr;
  }
}

.product-detail-media {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 90px;
}

.product-detail-media img {
  max-width: 100%;
  max-height: 380px;
  object-fit: contain;
  margin-bottom: 24px;
}

.product-detail-media .media-actions {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.product-detail-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.product-header-block {
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 18px;
}

.product-detail-brand {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-primary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.product-detail-title {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.25;
  margin-bottom: 10px;
}

.product-detail-variant {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.product-price-hero-box {
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.price-hero-main {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.price-hero-lowest {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--accent-emerald);
}

.price-hero-mrp {
  font-size: 1rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

.price-hero-savings {
  background: var(--accent-emerald-light);
  color: var(--accent-emerald);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
}

/* Store Comparison Table */
.detail-table-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.detail-table-header {
  padding: 14px 18px;
  background: var(--bg-surface-soft);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  font-size: 0.9rem;
}

.detail-store-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.85rem;
  transition: background var(--transition-fast);
}

.detail-store-row:last-child {
  border-bottom: none;
}

.detail-store-row:hover {
  background: #f8fafc;
}

.detail-store-row.is-winner {
  background: var(--accent-emerald-light);
}

.detail-store-price {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
}

.detail-store-row.is-winner .detail-store-price {
  color: var(--accent-emerald);
}

/* Specifications Grid */
.detail-specs-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.detail-specs-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.specs-key-value-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.spec-cell {
  background: var(--bg-surface-soft);
  border: 1px solid var(--border-light);
  padding: 10px 14px;
  border-radius: var(--radius-md);
}

.spec-cell-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 3px;
}

.spec-cell-val {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Deals Page Styles */
.deals-hero-banner {
  background: var(--bg-surface-soft);
  color: var(--text-primary);
  padding: 26px;
  border-radius: 12px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  border: 1px solid var(--border-light);
}

.deals-hero-text h1 {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 1.85rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.deals-hero-text p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  max-width: 600px;
}

.deals-stats-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.deals-stat-box {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 12px 18px;
  border-radius: var(--radius-lg);
  text-align: center;
}

.deals-stat-num {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  color: #10b981;
}

.deals-stat-label {
  font-size: 0.72rem;
  color: #cbd5e1;
  text-transform: uppercase;
}

/* About Page Styles */
.about-page-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 36px 20px 80px;
}

.about-header {
  text-align: center;
  margin-bottom: 40px;
}

.about-header h1 {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.about-header p {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto;
}

.about-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.about-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.about-card-icon {
  width: 44px;
  height: 44px;
  background: var(--accent-primary-soft);
  color: var(--accent-primary);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.about-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.about-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.about-transparency-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-xl);
  padding: 28px;
}

.about-transparency-box h2 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 10px;
}

.about-transparency-box p {
  font-size: 0.88rem;
  color: #475569;
  line-height: 1.6;
  margin-bottom: 14px;
}

@media (max-width: 900px) {
  .product-detail-media { position: static; }
}

@media (max-width: 640px) {
  .breadcrumbs { flex-wrap: wrap; }
  .product-detail-media { padding: 20px; }
  .product-price-hero-box { flex-wrap: wrap; gap: 12px; }
  .price-hero-main { flex-wrap: wrap; }
  .detail-store-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .detail-table-header { flex-wrap: wrap; gap: 8px; }
  .deals-hero-banner { padding: 24px 20px; }
  .deals-stats-strip { gap: 10px; }
  .deals-stat-box { padding: 10px 12px; }
  .about-transparency-box { padding: 20px; }
}

.price-check-label { display: block; color: #64748b; font-size: 0.68rem; font-weight: 400; margin-top: 3px; }
.tile-best-price { overflow-wrap: anywhere; }

/* Visual category navigation: real links remain usable without JavaScript. */
.category-strip { width: 100%; background: #fff; border-bottom: 1px solid var(--border-light); }
.category-strip-inner { display: grid; grid-template-columns: repeat(10, minmax(104px, 1fr)); gap: 4px; max-width: 1440px; margin: 0 auto; padding: 10px 24px 12px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: var(--border-medium) transparent; }
.category-shortcut { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 5px; min-height: 112px; padding: 4px; border-radius: 8px; color: var(--text-secondary); text-decoration: none; font-size: .75rem; font-weight: 500; line-height: 1.4; text-align: center; scroll-snap-align: start; }
.category-shortcut:hover { color: var(--accent-primary); background: var(--bg-surface-soft); }
.category-shortcut.active { color: var(--accent-primary); font-weight: 700; }
.category-shortcut.active::after { content: ''; position: absolute; left: 20%; right: 20%; bottom: 0; height: 2px; background: var(--accent-primary); border-radius: 2px; }
.category-shortcut:focus-visible { outline: 2px solid var(--accent-primary); outline-offset: -2px; }
.category-art { display: block; flex: 0 0 auto; width: 76px; height: 76px; background-image: url('/assets/category-atlas.jpg'); background-size: 300% 300%; background-repeat: no-repeat; }
.category-art-all { background: var(--bg-surface-soft); color: var(--text-secondary); border-radius: 12px; display: grid; place-items: center; width: 64px; height: 64px; margin: 6px; }
.category-art-smartphones { background-position: 0% 0%; }
.category-art-laptops { background-position: 50% 0%; }
.category-art-tablets { background-position: 100% 0%; }
.category-art-tvs { background-position: 0% 50%; }
.category-art-gaming { background-position: 50% 50%; }
.category-art-audio { background-position: 100% 50%; }
.category-art-smartwatches { background-position: 0% 100%; }
.category-art-air_conditioners { background-position: 50% 100%; }
.category-art-washing_machines { background-position: 100% 100%; }

/* Original store and manufacturer identities, kept readable at small sizes. */
.identity-logo { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 54px; width: 54px; height: 28px; padding: 3px; border-radius: 4px; background: #fff; }
.identity-logo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.identity-logo-dark { background: #172033; }
.identity-logo[hidden] { display: none; }
.brand-filter-section .brand-chip-btn { justify-content: center; }
.brand-filter-section .identity-logo { flex-basis: auto; width: 64px; max-width: 100%; height: 24px; }
.quick-brand-list .brand-chip-btn { flex-direction: column; justify-content: center; min-width: 96px; min-height: 76px; gap: 6px; padding: 10px 12px; font-size: .8rem; border-radius: 10px; }
.quick-brand-list .identity-logo { flex-basis: 28px; width: 68px; }
.store-identity { display: inline-flex; align-items: center; gap: 7px; min-width: 0; max-width: 100%; color: inherit; }
.store-identity > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.store-identity .identity-logo { flex-basis: 44px; width: 44px; height: 26px; }
.tile-store-name { min-width: 0; }
.tile-store-name > span { min-width: 0; }
.tile-store-item { gap: 8px; }
.tile-store-price { flex-shrink: 0; }
.product-detail-brand { display: flex; align-items: center; gap: 10px; }
.product-detail-brand .identity-logo { width: 68px; flex-basis: 68px; }

.brand-lockup-image { display: block; width: 230px; height: auto; }
.footer-logo .brand-lockup-image { width: 200px; }
.store-bank-offer { display: block; margin-top: 6px; font-size: .72rem; line-height: 1.5; font-weight: 500; color: #047857; overflow-wrap: anywhere; }
.tile-offer-callout { display: none; }
.store-offers { margin-top: 8px; min-width: 0; color: var(--text-primary); }
.store-offers > summary { color: var(--accent-primary); font-weight: 600; cursor: pointer; min-height: 44px; display: flex; align-items: center; gap: 8px; font-size: .8rem; }
.store-offers > summary::after { content: '+'; }
.store-offers[open] > summary::after { content: '▴'; }
.store-offers > summary::-webkit-details-marker { display: none; }
.offer-eligibility, .offer-unavailable { color: var(--text-secondary); font-size: .75rem; line-height: 1.6; display: block; margin: 6px 0 10px; }
.store-offers-list { display: grid; gap: 6px; }
.retailer-offer { border-bottom: 1px solid var(--border-light); }
.retailer-offer > summary { padding: 10px 0; min-height: 44px; font-size: .8rem; font-weight: 500; line-height: 1.6; cursor: pointer; overflow-wrap: anywhere; }
.offer-type { display: inline-block; font-size: .68rem; font-weight: 600; color: var(--accent-primary); margin-right: 6px; }
.offer-terms { padding: 0 0 12px; font-size: .78rem; line-height: 1.7; overflow-wrap: anywhere; }
.offer-terms p { margin-bottom: 10px; }
.offer-terms small { color: var(--text-secondary); }
.store-offers summary:focus-visible { outline: 2px solid var(--accent-primary); outline-offset: 2px; border-radius: 4px; }
.official-store-info { padding: 16px; border-top: 1px solid var(--border-light); color: var(--text-primary); }
.official-store-info > strong { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: .85rem; }
.official-store-info > strong > span:last-child { font-weight: 500; color: var(--text-secondary); }
.official-store-info p { font-size: .78rem; color: var(--text-secondary); line-height: 1.6; margin: 10px 0; }
.official-store-info > a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: .8rem; font-weight: 600; color: var(--accent-primary); text-decoration: none; }
.store-official-label { display: block; font-size: .65rem; color: var(--text-secondary); font-weight: 500; }
.store-bank-offer > span { display: block; font-size: .68rem; font-weight: 400; color: var(--text-muted); }
@media (max-width: 640px) { .brand-lockup-image { width: 190px; } }
