/* ============================================================
   COMPARI THEME v2 — Modern, Fresh, Mobile-First
   Google Fonts: Inter (body) + Plus Jakarta Sans (headings)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Plus+Jakarta+Sans:wght@700;800&display=swap');

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

:root {
  /* Brand */
  --primary:        #f47b20;
  --primary-dark:   #d96610;
  --primary-light:  #fff4eb;
  --primary-mid:    #fde3c8;

  /* Neutrals */
  --bg:             #f5f6fa;
  --surface:        #ffffff;
  --surface-2:      #fafafa;
  --border:         #e8eaed;
  --border-strong:  #d1d5db;

  /* Text */
  --text-1:         #111827;
  --text-2:         #374151;
  --text-3:         #6b7280;
  --text-4:         #9ca3af;

  /* Semantic */
  --green:          #16a34a;
  --green-bg:       #dcfce7;
  --amber:          #d97706;
  --amber-bg:       #fef3c7;
  --red:            #dc2626;
  --red-bg:         #fee2e2;
  --blue:           #2563eb;
  --blue-bg:        #dbeafe;

  /* Typography */
  --font-body:      'Inter', -apple-system, system-ui, sans-serif;
  --font-head:      'Plus Jakarta Sans', 'Inter', sans-serif;

  /* Spacing */
  --r-sm:   8px;
  --r-md:   12px;
  --r-lg:   16px;
  --r-xl:   20px;
  --r-2xl:  24px;

  /* Shadows */
  --shadow-xs:  0 1px 2px rgba(0,0,0,.06);
  --shadow-sm:  0 1px 8px rgba(0,0,0,.08);
  --shadow-md:  0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:  0 8px 32px rgba(0,0,0,.12);
  --shadow-card: 0 2px 8px rgba(0,0,0,.07), 0 0 0 1px rgba(0,0,0,.04);

  /* Transitions */
  --ease: cubic-bezier(.4,0,.2,1);
  --t-fast: 140ms var(--ease);
  --t-base: 220ms var(--ease);
}

/* ============================================================ BASE */
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; font-family: var(--font-body); border: none; background: none; }

/* ============================================================ SKIP LINK */
.skip-link {
  position: absolute; top: -100%; left: 8px;
  background: var(--primary); color: #fff;
  padding: 8px 16px; border-radius: var(--r-sm);
  font-size: 13px; font-weight: 600; z-index: 9999;
}
.skip-link:focus { top: 8px; }

/* ============================================================ TOPBAR */
.compari-topbar {
  background: var(--text-1);
  color: var(--text-4);
  font-size: 11.5px;
  padding: 6px 0;
  letter-spacing: .01em;
}
.compari-topbar .inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.topbar-left { display: flex; align-items: center; gap: 6px; }
.topbar-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); flex-shrink: 0; animation: pulse-dot 2s ease infinite; }
@keyframes pulse-dot { 0%,100%{opacity:1} 50%{opacity:.4} }
.topbar-right { display: flex; gap: 20px; }
.topbar-right a { color: var(--text-4); transition: color var(--t-fast); }
.topbar-right a:hover { color: #fff; }

/* ============================================================ HEADER */
.compari-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 500;
  box-shadow: var(--shadow-sm);
}
.header-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  text-decoration: none;
}
.logo-icon {
  width: 36px; height: 36px;
  background: var(--primary);
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.logo-text { font-family: var(--font-head); font-size: 22px; font-weight: 800; letter-spacing: -.5px; line-height: 1; }
.logo-text .dot { color: var(--primary); }

/* Search */
.header-search {
  flex: 1;
  max-width: 620px;
  position: relative;
}
.search-field {
  display: flex;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: 100px;
  overflow: hidden;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.search-field:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(244,123,32,.12);
  background: var(--surface);
}
.search-field input {
  flex: 1;
  border: none;
  background: none;
  padding: 10px 16px;
  font-size: 14px;
  font-family: var(--font-body);
  color: var(--text-1);
  outline: none;
  min-width: 0;
}
.search-field input::placeholder { color: var(--text-4); }
.search-field button {
  background: var(--primary);
  color: #fff;
  padding: 0 20px;
  font-size: 13px;
  font-weight: 600;
  display: flex; align-items: center; gap: 6px;
  transition: background var(--t-fast);
  border-radius: 0 100px 100px 0;
  flex-shrink: 0;
}
.search-field button:hover { background: var(--primary-dark); }
.search-field .btn-icon { font-size: 15px; }

/* Search suggestions */
.search-suggestions {
  position: absolute;
  top: calc(100% + 8px);
  left: 0; right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  z-index: 600;
  display: none;
  overflow: hidden;
}
.search-suggestions.active { display: block; }
.sugg-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background var(--t-fast);
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--text-2);
}
.sugg-item:last-child { border-bottom: none; }
.sugg-item:hover { background: var(--primary-light); }
.sugg-thumb {
  width: 38px; height: 38px;
  background: var(--bg);
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  overflow: hidden;
}
.sugg-thumb img { width: 100%; height: 100%; object-fit: contain; }
.sugg-name { flex: 1; font-size: 13px; font-weight: 500; }
.sugg-price { font-size: 13px; font-weight: 700; color: var(--primary); flex-shrink: 0; }

/* Header actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.hdr-btn {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 12px;
  border-radius: var(--r-md);
  color: var(--text-3);
  font-size: 11px;
  font-weight: 500;
  transition: background var(--t-fast), color var(--t-fast);
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
}
.hdr-btn:hover { background: var(--primary-light); color: var(--primary); }
.hdr-btn .icon { font-size: 20px; line-height: 1; }

/* Mobile menu toggle */
.mobile-menu-btn {
  display: none;
  width: 40px; height: 40px;
  border-radius: var(--r-md);
  align-items: center; justify-content: center;
  color: var(--text-2);
  font-size: 22px;
  transition: background var(--t-fast);
  flex-shrink: 0;
}
.mobile-menu-btn:hover { background: var(--bg); }

/* ============================================================ NAV */
.compari-nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.compari-nav .inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.compari-nav .inner::-webkit-scrollbar { display: none; }
.compari-nav a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-3);
  white-space: nowrap;
  position: relative;
  transition: color var(--t-fast);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.compari-nav a:hover { color: var(--primary); }
.compari-nav a.current,
.compari-nav a:hover { border-bottom-color: var(--primary); color: var(--primary); }
.compari-nav .nav-emoji { font-size: 15px; }
.nav-badge {
  background: var(--red);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 100px;
  margin-left: 2px;
}

/* Mobile nav drawer */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 800;
  display: none;
}
.mobile-nav.open { display: flex; }
.mobile-nav-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(4px);
}
.mobile-nav-drawer {
  position: relative;
  width: 280px;
  background: var(--surface);
  height: 100%;
  overflow-y: auto;
  padding: 20px 0;
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
}
.drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}
.drawer-close {
  width: 32px; height: 32px;
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-3); font-size: 20px;
  transition: background var(--t-fast);
}
.drawer-close:hover { background: var(--bg); }
.drawer-section-title {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-4);
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 12px 20px 4px;
}
.drawer-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  transition: background var(--t-fast), color var(--t-fast);
}
.drawer-link:hover { background: var(--primary-light); color: var(--primary); }
.drawer-link .dl-emoji { font-size: 18px; width: 26px; text-align: center; }
.drawer-link .dl-count {
  margin-left: auto;
  font-size: 11px;
  background: var(--bg);
  color: var(--text-4);
  padding: 1px 7px;
  border-radius: 100px;
}

/* ============================================================ LAYOUT */
.compari-wrap {
  max-width: 1280px;
  margin: 24px auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  align-items: start;
}
.compari-wrap.no-sidebar { grid-template-columns: 1fr; }

/* ============================================================ SIDEBAR */
.compari-sidebar { position: sticky; top: 80px; }
.sidebar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: var(--shadow-xs);
}
.sidebar-card-title {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .07em;
  border-bottom: 1px solid var(--border);
}
.cat-menu li a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  border-bottom: 1px solid var(--border);
  transition: background var(--t-fast), color var(--t-fast);
}
.cat-menu li:last-child a { border-bottom: none; }
.cat-menu li a:hover { background: var(--primary-light); color: var(--primary); }
.cat-menu li.current-cat a {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}
.cat-menu .cat-count {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-4);
  background: var(--bg);
  padding: 2px 7px;
  border-radius: 100px;
}

/* Filter form */
.filter-group {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.filter-group:last-child { border-bottom: none; }
.filter-group h5 {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 10px;
}
.price-range-inputs {
  display: flex; gap: 8px; align-items: center;
}
.price-range-inputs input {
  flex: 1; min-width: 0;
  padding: 7px 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 13px;
  font-family: var(--font-body);
  outline: none;
  transition: border-color var(--t-fast);
  background: var(--bg);
}
.price-range-inputs input:focus { border-color: var(--primary); background: var(--surface); }
.price-range-inputs span { color: var(--text-4); font-size: 12px; flex-shrink: 0; }
.filter-check {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
}
.filter-check:last-child { margin-bottom: 0; }
.filter-check input { accent-color: var(--primary); width: 15px; height: 15px; }
.sort-select {
  width: 100%;
  padding: 8px 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 13px;
  font-family: var(--font-body);
  color: var(--text-1);
  background: var(--bg);
  outline: none;
  cursor: pointer;
  transition: border-color var(--t-fast);
}
.sort-select:focus { border-color: var(--primary); }
.btn-filter {
  width: 100%;
  padding: 9px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--r-md);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-body);
  margin-top: 6px;
  transition: background var(--t-fast), transform var(--t-fast);
}
.btn-filter:hover { background: var(--primary-dark); }
.btn-filter:active { transform: scale(.98); }
.btn-reset {
  width: 100%;
  padding: 7px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  font-size: 12px;
  font-family: var(--font-body);
  color: var(--text-3);
  margin-top: 6px;
  transition: border-color var(--t-fast), color var(--t-fast);
}
.btn-reset:hover { border-color: var(--primary); color: var(--primary); }

/* Shop pills in sidebar */
.shop-pills { padding: 12px 16px; display: flex; flex-direction: column; gap: 6px; }
.shop-pill-link {
  display: flex; align-items: center; justify-content: center;
  padding: 8px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  font-size: 12px;
  font-weight: 700;
  transition: border-color var(--t-fast), transform var(--t-fast);
  text-decoration: none;
}
.shop-pill-link:hover { border-color: var(--primary); transform: translateX(2px); }

/* Recent products mini list */
.mini-product-list { padding: 8px; }
.mini-product-item {
  display: flex; gap: 10px; align-items: center;
  padding: 8px;
  border-radius: var(--r-md);
  transition: background var(--t-fast);
  text-decoration: none;
  color: inherit;
}
.mini-product-item:hover { background: var(--primary-light); }
.mini-thumb { font-size: 26px; flex-shrink: 0; width: 36px; text-align: center; }
.mini-info { flex: 1; min-width: 0; }
.mini-name {
  font-size: 12px; font-weight: 600; color: var(--text-1);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mini-price { font-size: 12px; font-weight: 700; color: var(--primary); margin-top: 1px; }

/* ============================================================ HERO */
.compari-hero {
  background: linear-gradient(135deg, #fff7f0 0%, #fff 50%, #f0f4ff 100%);
  padding: 52px 20px 44px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.compari-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 0%, rgba(244,123,32,.07), transparent);
  pointer-events: none;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--primary-light);
  border: 1px solid var(--primary-mid);
  color: var(--primary-dark);
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 16px;
  letter-spacing: .02em;
}
.compari-hero h1 {
  font-family: var(--font-head);
  font-size: clamp(24px, 4vw, 40px);
  font-weight: 800;
  color: var(--text-1);
  line-height: 1.2;
  margin-bottom: 12px;
  letter-spacing: -.02em;
}
.compari-hero h1 .accent { color: var(--primary); }
.compari-hero .subtitle {
  font-size: 16px;
  color: var(--text-3);
  max-width: 520px;
  margin: 0 auto 28px;
  line-height: 1.6;
}

/* Hero search bar (large) */
.hero-search {
  max-width: 640px;
  margin: 0 auto 24px;
}
.hero-search-field {
  display: flex;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 100px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.hero-search-field:focus-within {
  border-color: var(--primary);
  box-shadow: 0 4px 24px rgba(244,123,32,.15);
}
.hero-search-field input {
  flex: 1; min-width: 0;
  padding: 14px 20px;
  font-size: 15px;
  font-family: var(--font-body);
  border: none; background: none; outline: none;
  color: var(--text-1);
}
.hero-search-field input::placeholder { color: var(--text-4); }
.hero-search-field button {
  background: var(--primary);
  color: #fff;
  padding: 12px 28px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-body);
  border-radius: 0 100px 100px 0;
  transition: background var(--t-fast);
  display: flex; align-items: center; gap: 7px;
  flex-shrink: 0;
}
.hero-search-field button:hover { background: var(--primary-dark); }

.popular-searches {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px;
  margin-bottom: 32px;
}
.search-tag {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 5px 13px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-3);
  cursor: pointer;
  transition: border-color var(--t-fast), color var(--t-fast), background var(--t-fast), transform var(--t-fast);
  text-decoration: none;
  box-shadow: var(--shadow-xs);
}
.search-tag:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
  transform: translateY(-1px);
}

/* Stats */
.hero-stats {
  display: flex; justify-content: center; gap: 0;
  flex-wrap: wrap;
  max-width: 560px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.hero-stat {
  flex: 1; min-width: 100px;
  padding: 14px 16px;
  text-align: center;
  border-right: 1px solid var(--border);
}
.hero-stat:last-child { border-right: none; }
.hero-stat strong {
  display: block;
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.1;
}
.hero-stat span { font-size: 11px; color: var(--text-4); font-weight: 500; }

/* ============================================================ SECTION TITLE */
.section-title {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 800;
  color: var(--text-1);
  margin-bottom: 16px;
  letter-spacing: -.01em;
}
.section-title .see-all {
  margin-left: auto;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  display: flex; align-items: center; gap: 4px;
}
.section-title .see-all:hover { text-decoration: underline; }

/* ============================================================ CATEGORY GRID */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 32px;
}
.cat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 18px 10px 14px;
  text-align: center;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--t-base), border-color var(--t-base), transform var(--t-base);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  text-decoration: none; color: inherit;
  position: relative;
  overflow: hidden;
}
.cat-card::after {
  content: '';
  position: absolute; inset: 0;
  background: var(--primary-light);
  opacity: 0;
  transition: opacity var(--t-fast);
}
.cat-card:hover { box-shadow: var(--shadow-md); border-color: var(--primary); transform: translateY(-3px); }
.cat-card:hover::after { opacity: 1; }
.cat-card > * { position: relative; z-index: 1; }
.cat-emoji { font-size: 34px; line-height: 1; }
.cat-name { font-size: 12px; font-weight: 600; color: var(--text-1); }
.cat-count { font-size: 10px; color: var(--text-4); }

/* ============================================================ PROMO BANNER */
.promo-banner {
  background: linear-gradient(135deg, var(--primary) 0%, #e05500 100%);
  border-radius: var(--r-2xl);
  padding: 20px 24px;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(244,123,32,.3);
}
.promo-banner::before {
  content: '🛍️';
  position: absolute;
  right: -10px; top: -10px;
  font-size: 80px;
  opacity: .15;
  pointer-events: none;
}
.promo-banner h2 { font-family: var(--font-head); font-size: 18px; font-weight: 800; margin-bottom: 4px; }
.promo-banner p { font-size: 13px; opacity: .88; }
.promo-banner a {
  background: #fff;
  color: var(--primary);
  padding: 10px 22px;
  border-radius: 100px;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
  white-space: nowrap;
  transition: transform var(--t-fast);
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.promo-banner a:hover { transform: scale(1.03); }

/* ============================================================ PRODUCT CARD */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
  gap: 14px;
  margin-bottom: 32px;
}
.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 14px;
  display: flex; flex-direction: column; gap: 10px;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--t-base), border-color var(--t-base), transform var(--t-base);
  position: relative;
  text-decoration: none; color: inherit;
  overflow: hidden;
}
.product-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
  transform: translateY(-3px);
}
.product-badge {
  position: absolute;
  top: 10px; left: 10px;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 100px;
  z-index: 1;
  letter-spacing: .02em;
}
.product-badge.new { background: var(--green); }
.product-badge.hot { background: #f59e0b; }
.product-img {
  width: 100%; height: 145px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: background var(--t-fast);
}
.product-card:hover .product-img { background: var(--primary-light); }
.product-img img { max-width: 100%; max-height: 145px; object-fit: contain; }
.product-img .no-image { font-size: 54px; opacity: .3; }
.product-name {
  font-size: 13px; font-weight: 600; color: var(--text-1);
  line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.product-shops { font-size: 11px; color: var(--text-4); display: flex; align-items: center; gap: 4px; }
.product-old-price { font-size: 12px; color: var(--text-4); text-decoration: line-through; }
.product-price { margin-top: auto; }
.product-price .from { font-size: 10px; font-weight: 500; color: var(--text-4); display: block; text-transform: uppercase; letter-spacing: .05em; }
.product-price .amount { font-family: var(--font-head); font-size: 20px; font-weight: 800; color: var(--primary); line-height: 1.1; }

/* ============================================================ RESULTS */
.results-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 10px 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.results-info { font-size: 13px; color: var(--text-3); }
.results-info strong { color: var(--text-1); font-weight: 600; }
.no-products {
  grid-column: 1/-1;
  text-align: center;
  padding: 56px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
}
.np-icon { font-size: 52px; margin-bottom: 14px; }
.no-products h3 { font-family: var(--font-head); font-size: 18px; color: var(--text-2); margin-bottom: 6px; }
.no-products p { font-size: 13px; color: var(--text-4); }

/* ============================================================ BREADCRUMB */
.compari-breadcrumb {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: 12px; color: var(--text-4);
  margin-bottom: 20px;
}
.compari-breadcrumb a { color: var(--text-4); transition: color var(--t-fast); }
.compari-breadcrumb a:hover { color: var(--primary); }
.compari-breadcrumb .sep { color: var(--border-strong); }
.compari-breadcrumb .current { color: var(--text-2); font-weight: 500; }

/* ============================================================ SINGLE PRODUCT */
.product-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-bottom: 28px;
}
.product-gallery {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
  padding: 24px;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  box-shadow: var(--shadow-xs);
}
.gallery-main {
  width: 100%; height: 300px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  border-radius: var(--r-xl);
  overflow: hidden;
}
.gallery-main img { max-width: 100%; max-height: 300px; object-fit: contain; }
.gallery-main .no-img { font-size: 96px; opacity: .2; }
.gallery-thumbs { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.gallery-thumb {
  width: 58px; height: 58px;
  border: 2px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden; cursor: pointer;
  transition: border-color var(--t-fast);
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
}
.gallery-thumb:hover, .gallery-thumb.active { border-color: var(--primary); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: contain; }

.product-info {
  display: flex; flex-direction: column; gap: 16px;
}
.product-category-tag {
  display: inline-flex; align-items: center;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-size: 11px; font-weight: 700;
  padding: 3px 10px;
  border-radius: 100px;
  letter-spacing: .03em;
  align-self: flex-start;
}
.product-info h1 {
  font-family: var(--font-head);
  font-size: 22px; font-weight: 800;
  color: var(--text-1); line-height: 1.35;
  letter-spacing: -.01em;
}
.product-rating { display: flex; align-items: center; gap: 8px; }
.stars { color: #f59e0b; font-size: 16px; letter-spacing: 2px; }
.rating-text { font-size: 12px; color: var(--text-4); }

.price-box {
  background: var(--primary-light);
  border: 1.5px solid var(--primary-mid);
  border-radius: var(--r-xl);
  padding: 16px 18px;
}
.price-box-main { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.price-big { font-family: var(--font-head); font-size: 32px; font-weight: 800; color: var(--primary); line-height: 1; }
.price-old { font-size: 14px; color: var(--text-4); text-decoration: line-through; }
.discount-badge {
  background: var(--red);
  color: #fff;
  font-size: 11px; font-weight: 700;
  padding: 3px 8px;
  border-radius: 100px;
}
.price-shops { font-size: 12px; color: var(--text-3); margin-top: 4px; }

.product-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 11px 22px;
  background: var(--primary);
  color: #fff;
  border-radius: 100px;
  font-size: 14px; font-weight: 600;
  transition: background var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
  box-shadow: 0 2px 8px rgba(244,123,32,.3);
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(244,123,32,.35); color: #fff; }
.btn-outline {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 11px 22px;
  background: var(--surface);
  color: var(--primary);
  border: 1.5px solid var(--primary);
  border-radius: 100px;
  font-size: 14px; font-weight: 600;
  transition: background var(--t-fast), transform var(--t-fast);
  text-decoration: none;
  white-space: nowrap;
}
.btn-outline:hover { background: var(--primary-light); transform: translateY(-1px); color: var(--primary); }

.product-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.product-tag {
  background: var(--bg);
  color: var(--text-3);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
}

/* ============================================================ PRICE COMPARE */
.price-compare {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}
.price-compare-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.price-compare-header h3 {
  font-family: var(--font-head);
  font-size: 15px; font-weight: 800;
  color: var(--text-1);
}
.price-compare-header span { font-size: 12px; color: var(--text-4); }
.price-row {
  display: flex; align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  gap: 14px;
  transition: background var(--t-fast);
}
.price-row:last-child { border-bottom: none; }
.price-row:hover { background: var(--primary-light); }
.price-row.best {
  background: var(--green-bg);
  border-left: 3px solid var(--green);
}
.shop-name {
  width: 120px; flex-shrink: 0;
  font-size: 13px; font-weight: 700;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.shop-badge {
  font-size: 9px; font-weight: 700;
  padding: 2px 6px;
  border-radius: 100px;
}
.shop-badge.best { background: var(--green-bg); color: var(--green); }
.shop-badge.promo { background: var(--red-bg); color: var(--red); }
.shop-delivery { flex: 1; font-size: 12px; color: var(--text-3); }
.shop-stock { font-size: 11px; font-weight: 600; margin-top: 3px; display: flex; align-items: center; gap: 4px; }
.stock-dot { width: 6px; height: 6px; border-radius: 50%; }
.stock-in .stock-dot { background: var(--green); }
.stock-in { color: var(--green); }
.stock-low .stock-dot { background: var(--amber); }
.stock-low { color: var(--amber); }
.stock-out .stock-dot { background: var(--red); }
.stock-out { color: var(--red); }
.shop-price-col { text-align: right; flex-shrink: 0; }
.shop-price-col .sp { font-family: var(--font-head); font-size: 20px; font-weight: 800; color: var(--primary); display: block; }
.shop-price-col .sp-old { font-size: 11px; color: var(--text-4); text-decoration: line-through; display: block; }
.btn-buy {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 8px 16px;
  background: var(--primary);
  color: #fff;
  border-radius: 100px;
  font-size: 12px; font-weight: 600;
  transition: background var(--t-fast), transform var(--t-fast);
  flex-shrink: 0;
  text-decoration: none;
  white-space: nowrap;
}
.btn-buy:hover { background: var(--primary-dark); transform: scale(1.03); color: #fff; }

/* ============================================================ SPECS */
.specs-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  margin-bottom: 24px;
}
.specs-box-title {
  font-size: 15px; font-weight: 700;
  font-family: var(--font-head);
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-1);
}
.specs-table { width: 100%; border-collapse: collapse; }
.specs-table tr:nth-child(even) { background: var(--surface-2); }
.specs-table td { padding: 9px 20px; font-size: 13px; border-bottom: 1px solid var(--border); vertical-align: top; }
.specs-table td:first-child { color: var(--text-3); font-weight: 500; width: 42%; }
.specs-table td:last-child { color: var(--text-1); font-weight: 600; }
.specs-table tr:last-child td { border-bottom: none; }

/* ============================================================ MAGAZINE STRIP */
.mag-strip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
  padding: 20px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-xs);
}
.mag-logos { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.mag-pill {
  padding: 7px 16px;
  border: 1.5px solid var(--border);
  border-radius: 100px;
  font-size: 12px; font-weight: 700;
  color: var(--text-3);
  cursor: pointer;
  transition: all var(--t-fast);
  text-decoration: none;
  background: var(--surface);
}
.mag-pill:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); transform: translateY(-1px); }

/* ============================================================ TOAST */
.compari-toast {
  position: fixed;
  bottom: 24px; right: 24px;
  background: var(--text-1);
  color: #fff;
  padding: 12px 18px;
  border-radius: var(--r-xl);
  font-size: 13px; font-weight: 500;
  z-index: 9999;
  box-shadow: var(--shadow-lg);
  transform: translateY(24px) scale(.95);
  opacity: 0;
  transition: all var(--t-base);
  pointer-events: none;
  max-width: 360px;
  display: flex; align-items: center; gap: 8px;
}
.compari-toast.show { transform: translateY(0) scale(1); opacity: 1; }
.compari-toast.success { background: var(--green); }
.compari-toast.error { background: var(--red); }
.compari-toast.info { background: var(--primary); }

/* ============================================================ PAGINATION */
.pagination-wrap { display: flex; justify-content: center; gap: 6px; margin-top: 28px; flex-wrap: wrap; }
.page-numbers { list-style: none; display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.page-numbers li a,
.page-numbers li span {
  display: flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px;
  padding: 0 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  font-size: 13px; font-weight: 500;
  transition: all var(--t-fast);
  text-decoration: none; color: var(--text-2);
  background: var(--surface);
}
.page-numbers li .current { background: var(--primary); color: #fff; border-color: var(--primary); }
.page-numbers li a:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }

/* ============================================================ FOOTER */
.compari-footer { background: var(--text-1); color: #9ca3af; font-size: 13px; margin-top: 48px; }
.footer-top {
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 20px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}
.footer-logo { font-family: var(--font-head); font-size: 22px; font-weight: 800; color: #fff; margin-bottom: 8px; }
.footer-logo .dot { color: var(--primary); }
.footer-desc { font-size: 12px; line-height: 1.7; color: #6b7280; margin-bottom: 16px; }
.footer-col h4 { font-size: 12px; font-weight: 700; color: #fff; margin-bottom: 12px; text-transform: uppercase; letter-spacing: .07em; }
.footer-col li { margin-bottom: 8px; }
.footer-col li a { color: #9ca3af; transition: color var(--t-fast); font-size: 13px; }
.footer-col li a:hover { color: var(--primary); }
.footer-divider { border: none; border-top: 1px solid #1f2937; margin: 0; }
.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #4b5563;
  gap: 12px;
  flex-wrap: wrap;
}
.footer-bottom a { color: #4b5563; transition: color var(--t-fast); }
.footer-bottom a:hover { color: var(--primary); }

/* ============================================================ RESPONSIVE — Tablet */
@media (max-width: 1024px) {
  .compari-wrap { grid-template-columns: 200px 1fr; gap: 18px; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 24px; }
}

/* ============================================================ RESPONSIVE — Mobile */
@media (max-width: 768px) {
  /* Layout */
  .compari-wrap { grid-template-columns: 1fr; }
  .compari-sidebar { display: none; }
  .compari-topbar { display: none; }
  .mobile-menu-btn { display: flex; }
  .header-actions { display: none; }

  /* Header */
  .header-main { padding: 10px 16px; gap: 10px; }
  .logo-text { font-size: 20px; }
  .logo-icon { width: 32px; height: 32px; font-size: 18px; }
  .header-search { max-width: none; }
  .search-field input { font-size: 14px; padding: 9px 14px; }
  .search-field button span.btn-text { display: none; }
  .search-field button { padding: 0 16px; }

  /* Nav */
  .compari-nav .inner { padding: 0 12px; }
  .compari-nav a { padding: 10px 10px; font-size: 12px; gap: 4px; }

  /* Hero */
  .compari-hero { padding: 32px 16px 28px; }
  .compari-hero h1 { font-size: 24px; }
  .compari-hero .subtitle { font-size: 14px; }
  .hero-search-field input { padding: 12px 16px; font-size: 14px; }
  .hero-search-field button { padding: 10px 18px; }
  .hero-stats { border-radius: var(--r-lg); }
  .hero-stat { padding: 12px 10px; }
  .hero-stat strong { font-size: 18px; }

  /* Main content */
  .compari-wrap { margin: 16px auto; padding: 0 14px; }
  .cat-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .cat-card { padding: 14px 8px 10px; border-radius: var(--r-lg); }
  .cat-emoji { font-size: 28px; }
  .cat-name { font-size: 11px; }

  /* Product grid — 2 columns on mobile */
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .product-card { padding: 10px; border-radius: var(--r-lg); }
  .product-img { height: 120px; border-radius: var(--r-md); }
  .product-name { font-size: 12px; }
  .product-price .amount { font-size: 17px; }

  /* Single product */
  .product-detail-grid { grid-template-columns: 1fr; gap: 16px; }
  .gallery-main { height: 220px; }
  .product-info h1 { font-size: 18px; }
  .price-big { font-size: 26px; }

  /* Price compare */
  .price-row { flex-wrap: wrap; gap: 10px; padding: 12px 14px; }
  .shop-name { width: auto; }
  .btn-buy { width: 100%; justify-content: center; }

  /* Promo banner */
  .promo-banner { flex-direction: column; align-items: flex-start; border-radius: var(--r-xl); padding: 16px; }
  .promo-banner h2 { font-size: 16px; }
  .promo-banner a { width: 100%; text-align: center; }

  /* Footer */
  .footer-top { grid-template-columns: 1fr 1fr; padding: 28px 16px; gap: 20px; }
  .footer-bottom { flex-direction: column; text-align: center; padding: 14px 16px; }

  /* Toast */
  .compari-toast { left: 16px; right: 16px; bottom: 16px; }
}

@media (max-width: 400px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-stats { flex-direction: row; }
  .hero-stat { flex: 1; padding: 10px 8px; }
}

/* ============================================================ UTILITIES */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

/* ============================================================ PRINT */
@media print {
  .compari-topbar, .compari-header, .compari-nav, .compari-sidebar, .compari-footer { display: none; }
  .compari-wrap { grid-template-columns: 1fr; margin: 0; padding: 0; }
}
