:root {
  --bg: #080808;
  --surface: #111111;
  --surface2: #1a1a1a;
  --border: #222222;
  --text: #f0f0f0;
  --muted: #666;
  --muted2: #444;
  --accent: #b5f23d;
  --accent-dim: rgba(181,242,61,0.12);

  --store-lidl: #0050aa;
  --store-ab: #e30613;
  --store-sklavenitis: #e65c00;
  --store-masoutis: #1a7a1a;
  --store-mymarket: #7b2d8b;
  --store-bazaar: #c0392b;
  --store-galaxias: #1e88e5;
  --store-kritikos: #d84315;
  --store-default: #444;

  --nav-height: 56px;
  --nav-height-mobile: 52px;
  --bottom-bar-height: 56px;
  --z-nav: 200;
  --z-drawer: 190;
  --z-category: 90;
  --z-bottom-bar: 180;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: calc(var(--bottom-bar-height) + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 768px) {
  body {
    padding-bottom: 0;
  }
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input, select, textarea {
  font-family: inherit;
  color: inherit;
}

ul, ol {
  list-style: none;
}

.mono {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
}

.accent {
  color: var(--accent);
}

.muted {
  color: var(--muted);
}

.muted2 {
  color: var(--muted2);
}

.surface {
  background: var(--surface);
}

.surface2 {
  background: var(--surface2);
}

.text-upper {
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.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;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 768px) {
  .container {
    padding: 0 24px;
  }
}


.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height-mobile);
  background: rgba(8,8,8,0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: var(--z-nav);
  display: flex;
  align-items: center;
  padding: 0 16px;
}

@media (min-width: 768px) {
  .site-nav {
    height: var(--nav-height);
    padding: 0 24px;
  }
}

.nav-inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.nav-logo .ai {
  color: var(--accent);
}

.nav-links {
  display: none;
  align-items: center;
  gap: 24px;
}

@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }
}

.nav-links a {
  font-size: 13px;
  color: var(--muted);
  transition: color 0.2s;
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-lang-toggle {
  font-size: 12px;
  font-family: 'JetBrains Mono', monospace;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--muted);
  background: transparent;
  transition: border-color 0.2s, color 0.2s;
}

.nav-lang-toggle:hover {
  border-color: var(--muted);
  color: var(--text);
}

.nav-cta {
  font-size: 13px;
  font-weight: 600;
  padding: 6px 16px;
  background: var(--accent);
  color: #000;
  border-radius: 6px;
  transition: opacity 0.2s;
}

.nav-cta:hover {
  opacity: 0.88;
}

.nav-dropdown {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 0;
  min-width: 160px;
  display: none;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.nav-user-menu.show .nav-dropdown {
  display: block;
}

.nav-dropdown a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-size: 13px;
  color: var(--text);
  transition: background 0.15s;
}

.nav-dropdown a:hover {
  background: var(--surface2);
}

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

@media (min-width: 768px) {
  .nav-mobile-actions {
    display: none;
  }
}

.nav-mobile-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--text);
  font-size: 18px;
  transition: background 0.2s;
}

.nav-mobile-btn:hover {
  background: var(--surface);
}

.mobile-drawer {
  position: fixed;
  top: var(--nav-height-mobile);
  left: 0;
  right: 0;
  background: rgba(8,8,8,0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: var(--z-drawer);
  padding: 16px;
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.28s ease, opacity 0.28s ease;
}

.mobile-drawer.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.mobile-drawer a {
  display: block;
  padding: 12px 0;
  font-size: 15px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

.mobile-drawer a:last-child {
  border-bottom: none;
}

.mobile-drawer .drawer-cta {
  display: block;
  text-align: center;
  margin-top: 16px;
  padding: 12px;
  background: var(--accent);
  color: #000;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
}


.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--bottom-bar-height) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: rgba(8,8,8,0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  z-index: var(--z-bottom-bar);
  display: flex;
  align-items: center;
  justify-content: space-around;
}

@media (min-width: 768px) {
  .bottom-nav {
    display: none;
  }
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 10px;
  color: var(--muted);
  padding: 6px 0;
  transition: color 0.2s;
  text-decoration: none;
}

.bottom-nav-item i {
  font-size: 20px;
}

.bottom-nav-item.active {
  color: var(--accent);
}


.ticker-bar {
  margin-top: var(--nav-height-mobile);
  background: var(--accent);
  color: #000;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  overflow: hidden;
  white-space: nowrap;
  height: 32px;
  display: flex;
  align-items: center;
}

@media (min-width: 768px) {
  .ticker-bar {
    margin-top: var(--nav-height);
  }
}

.ticker-track {
  display: inline-flex;
  animation: ticker-scroll 30s linear infinite;
}

.ticker-track span {
  padding: 0 32px;
}

@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}


.stats-bar {
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
}

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

@media (min-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
  }
}

.stat-item {
  text-align: center;
  padding: 12px 0;
}

@media (min-width: 768px) {
  .stat-item {
    border-right: 1px solid var(--border);
  }
  .stat-item:last-child {
    border-right: none;
  }
}

.stat-number {
  font-family: 'JetBrains Mono', monospace;
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.1;
}

.stat-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-top: 4px;
}


.flyers-section {
  padding: 32px 0;
  border-bottom: 1px solid var(--border);
}

.section-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 16px;
}

.flyers-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
  scrollbar-width: none;
}

.flyers-scroll::-webkit-scrollbar {
  display: none;
}

.flyer-card {
  flex: 0 0 160px;
  scroll-snap-align: start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, transform 0.2s;
}

@media (min-width: 768px) {
  .flyer-card:hover {
    border-color: #333;
    transform: translateY(-2px);
  }
}

.flyer-card:active {
  opacity: 0.85;
}

.flyer-card-logo {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: contain;
  background: var(--surface2);
}

.flyer-card-store {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.2;
}

.flyer-card-dates {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text);
  font-weight: 600;
}

.flyer-card-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  background: var(--accent-dim);
  color: var(--accent);
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 600;
}


.category-bar {
  position: sticky;
  top: var(--nav-height-mobile);
  z-index: var(--z-category);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
  overflow: hidden;
}

@media (min-width: 768px) {
  .category-bar {
    top: var(--nav-height);
  }
}

.category-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0 16px;
  -webkit-overflow-scrolling: touch;
}

.category-scroll::-webkit-scrollbar {
  display: none;
}

.category-pill {
  flex-shrink: 0;
  font-size: 12px;
  padding: 6px 14px;
  border-radius: 20px;
  white-space: nowrap;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--border);
  transition: all 0.2s;
  cursor: pointer;
  font-weight: 500;
}

.category-pill:hover {
  color: var(--text);
  border-color: var(--muted2);
}

.category-pill.active {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: transparent;
}


.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 16px 0;
}

@media (min-width: 768px) {
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
  }
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
  position: relative;
  text-decoration: none;
  color: var(--text);
  display: block;
}

@media (min-width: 768px) {
  .product-card:hover {
    border-color: #333;
    transform: translateY(-2px);
  }
}

.product-card:active {
  opacity: 0.85;
}

.product-card-image {
  aspect-ratio: 1 / 1;
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-card-image .emoji-fallback {
  font-size: 40px;
}

.card-img-fallback {
  width: 100%;
  aspect-ratio: 1;
  background: var(--surface2, #1a1a1a);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 8px 8px 0 0;
}
.card-img-fallback .fallback-letter {
  font-family: 'JetBrains Mono', monospace;
  font-size: 56px;
  font-weight: 700;
  color: var(--accent);
  opacity: 0.25;
  line-height: 1;
}
.card-img-fallback .fallback-store {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 0.1em;
  margin-top: 8px;
  text-transform: uppercase;
}

.product-card-body {
  padding: 10px;
}

.product-card-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 6px;
}

.store-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.store-dot.lidl { background: var(--store-lidl); }
.store-dot.ab { background: var(--store-ab); }
.store-dot.sklavenitis { background: var(--store-sklavenitis); }
.store-dot.masoutis { background: var(--store-masoutis); }
.store-dot.mymarket { background: var(--store-mymarket); }
.store-dot.bazaar { background: var(--store-bazaar); }
.store-dot.galaxias { background: var(--store-galaxias); }
.store-dot.kritikos { background: var(--store-kritikos); }

.product-card-store {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.product-card-expiry {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  color: var(--muted2);
  margin-left: auto;
}

.product-card-name {
  font-size: 12px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 6px;
}

@media (min-width: 768px) {
  .product-card-name {
    font-size: 13px;
  }
}

.product-card-price {
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
}

@media (min-width: 768px) {
  .product-card-price {
    font-size: 20px;
  }
}

.product-card-unit {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  color: var(--muted);
  margin-top: 2px;
}

.hot-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 7px;
  border-radius: 4px;
  background: #dc2626;
  color: #fff;
}

.deal-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 7px;
  border-radius: 4px;
  background: #d97706;
  color: #fff;
}


.hero {
  min-height: 520px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 16px 60px;
  position: relative;
  overflow: visible;
}

.hero::before {
  content: '';
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(181,242,61,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
}

.hero-eyebrow::before,
.hero-eyebrow::after {
  content: '';
  width: 32px;
  height: 1px;
  background: var(--accent);
  opacity: 0.4;
}

.hero-title {
  font-size: clamp(44px, 14vw, 96px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

@media (min-width: 768px) {
  .hero-title {
    font-size: clamp(52px, 8vw, 96px);
  }
}

.hero-subtitle {
  font-size: 16px;
  color: var(--muted);
  margin-bottom: 28px;
  max-width: 480px;
  position: relative;
  z-index: 1;
}

@media (min-width: 768px) {
  .hero-subtitle {
    font-size: 18px;
  }
}

.hero-search {
  width: 100%;
  max-width: 560px;
  position: relative;
  z-index: 1;
}

.hero-search-input {
  width: 100%;
  padding: 14px 120px 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
}

.hero-search-input::placeholder {
  color: var(--muted2);
}

.hero-search-input:focus {
  border-color: var(--accent);
}

.hero-search-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background: var(--accent);
  color: #000;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: opacity 0.2s;
}

.hero-search-btn:hover {
  opacity: 0.88;
}

.hero-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  margin-top: 16px;
  position: relative;
  z-index: 1;
}

.scroll-indicator {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--muted2);
  animation: scroll-fade 2s ease-in-out infinite;
}

.scroll-indicator-line {
  width: 1px;
  height: 32px;
  background: linear-gradient(to bottom, var(--muted2), transparent);
}

.scroll-indicator-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

@keyframes scroll-fade {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.8; }
}


.receipt-cta {
  padding: 32px 0;
  border-bottom: 1px solid var(--border);
}

.receipt-cta-inner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (min-width: 768px) {
  .receipt-cta-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 28px 32px;
  }
}

.receipt-cta-text h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
}

.receipt-cta-text p {
  font-size: 13px;
  color: var(--muted);
}

.receipt-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--accent);
  color: #000;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  transition: opacity 0.2s;
  white-space: nowrap;
  text-align: center;
  justify-content: center;
}

.receipt-cta-btn:hover {
  opacity: 0.88;
}


.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 48px 0 0;
  margin-top: 48px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 40px;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
  }
}

.footer-brand {
  grid-column: 1 / -1;
}

@media (min-width: 768px) {
  .footer-brand {
    grid-column: auto;
  }
}

.footer-brand-logo {
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
}

.footer-brand-logo .ai {
  color: var(--accent);
}

.footer-brand p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 280px;
}

.footer-col-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 14px;
}

.footer-col a {
  display: block;
  font-size: 13px;
  color: var(--muted);
  padding: 4px 0;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--text);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  color: var(--muted2);
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.footer-disclaimer {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--muted);
}

.footer-disclaimer i {
  color: var(--accent);
  font-size: 13px;
}


.page-content {
  padding-top: var(--nav-height-mobile);
  min-height: 60vh;
}

@media (min-width: 768px) {
  .page-content {
    padding-top: var(--nav-height);
  }
}

.page-content.has-ticker {
  padding-top: 0;
}


.skeleton {
  background: var(--surface2);
  border-radius: 6px;
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}

@keyframes skeleton-pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 0.8; }
}


.cookie-banner {
  position: fixed;
  bottom: calc(var(--bottom-bar-height) + env(safe-area-inset-bottom, 0px));
  left: 0;
  right: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 12px 16px;
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
}

@media (min-width: 768px) {
  .cookie-banner {
    bottom: 0;
  }
}

.cookie-banner button {
  padding: 6px 14px;
  background: var(--accent);
  color: #000;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}
