/* ========== RESET & VARIABLES ========== */
:root {
  --primary: #4f46e5;
  --primary-light: #818cf8;
  --primary-dark: #3730a3;
  --accent: #06b6d4;
  --bg: #f0f2f5;
  --card: #ffffff;
  --text: #111827;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --border: #e5e7eb;
  --border-light: #f3f4f6;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.04);
  --shadow: 0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -2px rgba(0,0,0,.05);
  --shadow-md: 0 8px 25px -5px rgba(0,0,0,.1), 0 4px 10px -6px rgba(0,0,0,.05);
  --shadow-lg: 0 20px 50px -12px rgba(0,0,0,.15);
  --shadow-xl: 0 25px 60px -12px rgba(0,0,0,.2);
  --font-ka: 'Noto Sans Georgian', sans-serif;
  --font-en: 'Inter', sans-serif;
  --nova: #ef4444;
  --gorgia: #3b82f6;
  --extra: #10b981;
  --mihouse: #f59e0b;
  --transition: .25s cubic-bezier(.4,0,.2,1);
}

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

body {
  font-family: var(--font-ka);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

/* ========== HERO ========== */
.hero {
  position: relative;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 30%, #4338ca 60%, #6366f1 100%);
  padding-bottom: 40px;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(99,102,241,.3) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(6,182,212,.2) 0%, transparent 40%),
    radial-gradient(circle at 50% 80%, rgba(139,92,246,.15) 0%, transparent 50%);
  pointer-events: none;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,.15) 0%, transparent 70%);
  pointer-events: none;
}
.hero-content { position: relative; z-index: 2; }

/* Nav */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: white;
  font-size: 20px;
  font-weight: 700;
  font-family: var(--font-en);
  letter-spacing: -.5px;
}
.logo-svg { width: 36px; height: 36px; }

.nav-stats {
  display: flex;
  gap: 20px;
  align-items: center;
}
.nav-stat {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,.7);
  font-size: 13px;
}
.nav-stat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.nav-stat-logo {
  height: 24px;
  width: auto;
  flex-shrink: 0;
  opacity: .95;
  border-radius: 4px;
}
.nav-stat-num { color: white; font-weight: 600; font-family: var(--font-en); }
.nav-stat-label { opacity: .7; }

/* Hero Text */
.hero-text {
  text-align: center;
  padding: 40px 0 32px;
  max-width: 700px;
  margin: 0 auto;
}
.hero-text h1 {
  font-size: 40px;
  font-weight: 800;
  color: white;
  line-height: 1.2;
  margin-bottom: 12px;
}
.gradient-text {
  background: linear-gradient(135deg, #67e8f9, #a5b4fc, #c4b5fd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: 16px;
  color: rgba(255,255,255,.65);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.7;
}

/* Search */
.search-wrapper {
  max-width: 680px;
  margin: 0 auto;
}
.search-box {
  display: flex;
  align-items: center;
  background: white;
  border-radius: 60px;
  padding: 6px 6px 6px 20px;
  box-shadow: var(--shadow-xl), 0 0 0 1px rgba(255,255,255,.1);
  transition: box-shadow var(--transition);
}
.search-box:focus-within {
  box-shadow: var(--shadow-xl), 0 0 0 3px rgba(99,102,241,.3);
}
.search-icon {
  width: 22px;
  height: 22px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.search-box input {
  flex: 1;
  padding: 14px 12px;
  border: none;
  font-size: 16px;
  font-family: var(--font-ka);
  outline: none;
  background: transparent;
  color: var(--text);
}
.search-box input::placeholder { color: var(--text-muted); }
.search-box button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 28px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-ka);
  transition: all var(--transition);
  white-space: nowrap;
}
.search-box button:hover { background: var(--primary-dark); transform: scale(1.02); }
.search-box button:active { transform: scale(.98); }
.btn-arrow { width: 18px; height: 18px; }

/* Quick Tags */
.quick-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 0 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.tag-label { font-size: 13px; color: rgba(255,255,255,.5); }
.tag {
  padding: 6px 14px;
  background: rgba(255,255,255,.1);
  color: rgba(255,255,255,.8);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  font-family: var(--font-ka);
  transition: all var(--transition);
  backdrop-filter: blur(4px);
}
.tag:hover {
  background: rgba(255,255,255,.2);
  color: white;
  border-color: rgba(255,255,255,.3);
  transform: translateY(-1px);
}

/* Wave */
.hero-wave {
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  line-height: 0;
}
.hero-wave svg { width: 100%; height: 60px; }

/* ========== MAIN ========== */
.main { flex: 1; padding: 24px 0 40px; }

/* ========== SECTION BLOCKS ========== */
.section-block {
  margin-bottom: 32px;
  background: white;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}
.section-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}
.section-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.section-icon svg {
  width: 24px;
  height: 24px;
}
.fuel-icon {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: white;
}
.compare-icon {
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  color: white;
}
.cat-section-icon {
  background: linear-gradient(135deg, #06b6d4, #0891b2);
  color: white;
}
.section-header h2 {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
}
.section-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ========== FUEL PRICES ========== */
.fuel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}
.fuel-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.fuel-card-header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: var(--border-light);
}
.fuel-company-logo {
  height: 32px;
  width: auto;
  max-width: 120px;
  display: block;
}
.fuel-card-body { padding: 4px 0; }
.fuel-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-light);
  transition: background var(--transition);
}
.fuel-row:last-child { border-bottom: none; }
.fuel-row:hover { background: #fafbfc; }
.fuel-type {
  font-size: 13px;
  color: var(--text-secondary);
}
.fuel-prices {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.fuel-price {
  font-size: 16px;
  font-weight: 700;
  font-family: var(--font-en);
  color: var(--text);
}
.fuel-self {
  font-size: 11px;
  color: var(--success);
  font-family: var(--font-en);
  background: rgba(16,185,129,.08);
  padding: 2px 6px;
  border-radius: 4px;
}

/* ========== COMPARISONS ========== */
.comparisons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.comparison-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: all var(--transition);
}
.comparison-card:hover {
  box-shadow: var(--shadow);
  border-color: var(--primary-light);
}
.comparison-title {
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
  background: var(--border-light);
  border-bottom: 1px solid var(--border);
  line-height: 1.4;
}
.comparison-items { padding: 4px 0; }
.comparison-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  gap: 12px;
}
.comparison-item + .comparison-item {
  border-top: 1px solid var(--border-light);
}
.comparison-store {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.comp-store-logo {
  height: 24px;
  width: auto;
  border-radius: 4px;
}
.comp-store-name {
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-en);
}
.comparison-details {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  min-width: 0;
}
.comp-product-name {
  font-size: 11px;
  color: var(--text-muted);
  text-decoration: none;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}
.comp-product-name:hover { color: var(--primary); }
.comp-price {
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font-en);
  color: var(--text);
}
.comp-price.cheaper {
  color: var(--success);
}

/* ========== CATEGORIES ========== */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}
.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 10px;
  background: var(--border-light);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-ka);
}
.category-card:hover {
  background: white;
  border-color: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.cat-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.cat-icon svg {
  width: 22px;
  height: 22px;
  color: white;
}
.category-card:hover .cat-icon {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  transform: scale(1.05);
}
.cat-name {
  font-size: 12px;
  font-weight: 500;
  text-align: center;
  line-height: 1.3;
  color: var(--text);
}
.cat-count {
  font-size: 11px;
  color: var(--text-muted);
  background: white;
  padding: 2px 8px;
  border-radius: 10px;
  font-family: var(--font-en);
}
.category-card:hover .cat-count {
  background: var(--primary);
  color: white;
}

/* Filters Bar */
.filters-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0 20px;
  gap: 16px;
  flex-wrap: wrap;
}
.filters-left { display: flex; align-items: baseline; gap: 12px; }
.results-title { font-size: 18px; font-weight: 700; }
.results-count {
  font-size: 13px;
  color: var(--text-muted);
  background: var(--border-light);
  padding: 4px 10px;
  border-radius: 20px;
}
.filters-right { display: flex; gap: 10px; }
.filter-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0 4px 0 12px;
  transition: border-color var(--transition);
}
.filter-pill:hover { border-color: var(--primary-light); }
.filter-pill svg { width: 16px; height: 16px; color: var(--text-muted); flex-shrink: 0; }
.filter-pill select {
  padding: 10px 8px;
  border: none;
  font-family: var(--font-ka);
  font-size: 13px;
  color: var(--text);
  background: transparent;
  cursor: pointer;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

/* Loading */
.loading-state { text-align: center; padding: 80px 20px; }
.loading-state p { color: var(--text-muted); font-size: 15px; margin-top: 20px; }
.loading-dots { display: flex; gap: 8px; justify-content: center; }
.loading-dots span {
  width: 12px; height: 12px;
  background: var(--primary);
  border-radius: 50%;
  animation: loadBounce .6s ease-in-out infinite alternate;
}
.loading-dots span:nth-child(2) { animation-delay: .2s; }
.loading-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes loadBounce {
  from { opacity: .3; transform: translateY(0); }
  to { opacity: 1; transform: translateY(-10px); }
}

/* Results Grid */
.results-grid { }
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

/* Product Card */
.product-card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border);
}

.product-image {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid var(--border-light);
}
.product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;
  transition: transform .4s ease;
}
.product-card:hover .product-image img { transform: scale(1.05); }
.product-image .no-image {
  font-size: 56px;
  opacity: .3;
}

.store-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  color: white;
  letter-spacing: .3px;
  font-family: var(--font-en);
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
  z-index: 2;
  backdrop-filter: blur(4px);
}
.store-tag.has-logo {
  padding: 0;
  border-radius: 6px;
  background: transparent !important;
  box-shadow: 0 2px 10px rgba(0,0,0,.2);
  overflow: hidden;
}
.store-tag img {
  height: 26px;
  width: auto;
  display: block;
  border-radius: 5px;
}
.discount-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--danger);
  color: white;
  font-family: var(--font-en);
  z-index: 2;
}

.product-info {
  padding: 14px 16px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.product-name {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 40px;
}
.product-name a {
  color: var(--text);
  text-decoration: none;
  transition: color var(--transition);
}
.product-name a:hover { color: var(--primary); }

.product-bottom {
  margin-top: auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}
.product-price { display: flex; flex-direction: column; gap: 2px; }
.price-current {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  font-family: var(--font-en);
  letter-spacing: -.5px;
}
.price-currency { font-size: 14px; font-weight: 600; color: var(--text-secondary); }
.price-old {
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: line-through;
  font-family: var(--font-en);
}

.product-link {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  background: var(--bg);
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-xs);
  font-size: 12px;
  font-weight: 500;
  transition: all var(--transition);
  white-space: nowrap;
}
.product-link:hover {
  background: var(--primary);
  color: white;
}
.product-link svg { width: 14px; height: 14px; }

/* No Results */
.no-results {
  text-align: center;
  padding: 80px 20px;
}
.no-results .icon {
  width: 80px;
  height: 80px;
  background: var(--border-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 36px;
}
.no-results h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.no-results p { color: var(--text-muted); font-size: 15px; }

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 32px 0;
}
.pagination button {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: white;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font-en);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.pagination button:hover { border-color: var(--primary); color: var(--primary); }
.pagination button.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(79,70,229,.3);
}
.pagination button.nav-btn { width: auto; padding: 0 16px; gap: 4px; }
.pagination button:disabled { opacity: .4; cursor: not-allowed; }

/* ========== FOOTER ========== */
.footer {
  background: #111827;
  color: #9ca3af;
  padding: 28px 0;
  margin-top: auto;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-logo {
  font-size: 16px;
  font-weight: 700;
  color: white;
  text-decoration: none;
}
.footer-brand p { font-size: 13px; }
.footer-links {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
}
.footer-label { opacity: .6; }
.footer-links a { color: #9ca3af; text-decoration: none; transition: color var(--transition); }
.footer-links a:hover { color: white; }
.footer-copy { font-size: 13px; }
.footer-copy a { color: var(--primary-light); text-decoration: none; }

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .hero-text h1 { font-size: 28px; }
  .hero-sub { font-size: 14px; }
  .hero-text { padding: 24px 0 20px; }
  .nav { flex-direction: column; gap: 12px; }
  .nav-stats { flex-wrap: wrap; justify-content: center; gap: 12px; }
  .search-box { border-radius: var(--radius); padding: 4px 4px 4px 14px; }
  .search-box button { border-radius: var(--radius-sm); padding: 12px 20px; }
  .btn-text { display: none; }
  .btn-arrow { width: 20px; height: 20px; }
  .quick-tags { gap: 6px; }
  .filters-bar { flex-direction: column; align-items: stretch; }
  .filters-right { flex-wrap: wrap; }
  .products-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .product-info { padding: 10px 12px 12px; }
  .product-name { font-size: 12px; min-height: 36px; }
  .price-current { font-size: 16px; }
  .section-block { padding: 16px; }
  .fuel-grid { grid-template-columns: 1fr; }
  .comparisons-grid { grid-template-columns: 1fr; }
  .categories-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; }
  .category-card { padding: 12px 8px; }
  .cat-icon { font-size: 20px; }
  .cat-name { font-size: 11px; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-brand { flex-direction: column; }
  .footer-links { flex-wrap: wrap; justify-content: center; }
}

@media (max-width: 480px) {
  .hero-text h1 { font-size: 22px; }
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .store-tag { font-size: 8px; padding: 3px 7px; top: 6px; left: 6px; }
  .store-tag img { height: 18px; }
  .discount-tag { font-size: 9px; padding: 3px 6px; top: 6px; right: 6px; }
  .product-bottom { flex-direction: column; align-items: flex-start; gap: 8px; }
  .product-link { width: 100%; justify-content: center; }
  .categories-grid { grid-template-columns: repeat(3, 1fr); }
}
