/* ═══════════════════════════════════════════════════════════════════════════
   dm Preisvergleich – Stylesheet
   Inspired by dm-drogerie markt brand design
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --dm-red:        #E30613;
  --dm-red-dark:   #B8000F;
  --dm-red-light:  #FDECEA;
  --dm-gold:       #FEC700;
  --dm-blue:       #1F3685;
  --dm-gray-100:   #F5F5F5;
  --dm-gray-200:   #E8E8E8;
  --dm-gray-400:   #AAAAAA;
  --dm-gray-600:   #666666;
  --dm-gray-800:   #333333;
  --dm-green:      #00823C;
  --dm-green-bg:   #E6F4EC;
  --text-primary:  #1A1A1A;
  --text-secondary:#555555;
  --white:         #FFFFFF;
  --shadow-sm:     0 1px 3px rgba(0,0,0,0.08);
  --shadow-md:     0 4px 12px rgba(0,0,0,0.12);
  --shadow-lg:     0 8px 24px rgba(0,0,0,0.16);
  --radius-sm:     4px;
  --radius-md:     8px;
  --radius-lg:     12px;
  --font:          'DM Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* ── Reset & Base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--white);
  min-height: 100vh;
}

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

/* ── Typography ───────────────────────────────────────────────────────────── */
.text-sm  { font-size: 12px; }
.text-md  { font-size: 14px; }
.text-lg  { font-size: 16px; }
.text-xl  { font-size: 20px; }
.text-2xl { font-size: 24px; }
.fw-bold   { font-weight: 700; }
.fw-medium { font-weight: 500; }
.text-muted { color: var(--text-secondary); }
.text-red   { color: var(--dm-red); }

/* ═══════════════════════════════════════════════════════════════════════════
   TOP BAR
   ═══════════════════════════════════════════════════════════════════════════ */
.topbar {
  background: var(--dm-blue);
  color: var(--white);
  font-size: 12px;
  padding: 6px 0;
}
.topbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.topbar-badge {
  background: var(--dm-gold);
  color: var(--dm-blue);
  font-weight: 700;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.topbar a:hover { text-decoration: underline; }

/* ═══════════════════════════════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════════════════════════════ */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--dm-gray-200);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.header-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Logo */
.logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  text-decoration: none;
}
.logo-icon {
  width: 48px;
  height: 48px;
}
.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.logo-text .brand { font-size: 22px; font-weight: 900; color: var(--dm-red); letter-spacing: -0.5px; }
.logo-text .tagline { font-size: 10px; color: var(--dm-gray-600); font-weight: 500; letter-spacing: 0.5px; text-transform: uppercase; }

/* Search bar */
.search-bar {
  flex: 1;
  max-width: 560px;
  display: flex;
  align-items: center;
  border: 2px solid var(--dm-gray-200);
  border-radius: 24px;
  overflow: hidden;
  transition: border-color 0.2s;
  background: var(--white);
}
.search-bar:focus-within { border-color: var(--dm-red); }
.search-bar input {
  flex: 1;
  padding: 10px 16px;
  font-size: 14px;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text-primary);
}
.search-bar input::placeholder { color: var(--dm-gray-400); }
.search-btn {
  padding: 10px 16px;
  background: var(--dm-red);
  color: var(--white);
  border: none;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.search-btn:hover { background: var(--dm-red-dark); }

/* Header actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: auto;
}
.header-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 11px;
  font-weight: 500;
  transition: background 0.15s;
  cursor: pointer;
  border: none;
  background: none;
  font-family: var(--font);
}
.header-btn:hover { background: var(--dm-gray-100); }
.header-btn .icon { font-size: 20px; }
.cart-btn { position: relative; }
.cart-count {
  position: absolute;
  top: 4px;
  right: 8px;
  background: var(--dm-red);
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.cart-count.hidden { display: none; }

/* ═══════════════════════════════════════════════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════════════════════════════════════════════ */
.site-nav {
  background: var(--white);
  border-bottom: 3px solid var(--dm-red);
}
.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-inner::-webkit-scrollbar { display: none; }
.nav-item {
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -3px;
  transition: color 0.15s, border-color 0.15s;
}
.nav-item:hover { color: var(--dm-red); }
.nav-item.active { color: var(--dm-red); border-bottom-color: var(--dm-red); }

/* ═══════════════════════════════════════════════════════════════════════════
   HERO BANNER
   ═══════════════════════════════════════════════════════════════════════════ */
.hero-banner {
  background: linear-gradient(135deg, var(--dm-red) 0%, #9B0010 100%);
  color: var(--white);
  padding: 32px 20px;
}
.hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.hero-content h1 {
  font-size: 28px;
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 8px;
}
.hero-content p {
  font-size: 14px;
  opacity: 0.9;
  max-width: 480px;
  line-height: 1.6;
}
.hero-flags {
  display: flex;
  gap: 16px;
  flex-shrink: 0;
}
.hero-flag {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.15);
  padding: 14px 20px;
  border-radius: var(--radius-lg);
  backdrop-filter: blur(4px);
  min-width: 90px;
}
.hero-flag .flag-emoji { font-size: 32px; }
.hero-flag .flag-label { font-size: 12px; font-weight: 700; letter-spacing: 0.5px; }
.hero-flag .flag-currency { font-size: 11px; opacity: 0.8; }

/* ═══════════════════════════════════════════════════════════════════════════
   MAIN LAYOUT
   ═══════════════════════════════════════════════════════════════════════════ */
.page-layout {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 20px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FILTER / SORT BAR
   ═══════════════════════════════════════════════════════════════════════════ */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px 20px;
  background: var(--white);
  border: 1px solid var(--dm-gray-200);
  border-radius: var(--radius-md);
}
.filter-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-right: 4px;
}
.filter-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1;
}
.filter-tag {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  border: 1.5px solid var(--dm-gray-200);
  color: var(--text-secondary);
  cursor: pointer;
  background: var(--white);
  transition: all 0.15s;
  white-space: nowrap;
}
.filter-tag:hover { border-color: var(--dm-red); color: var(--dm-red); }
.filter-tag.active { background: var(--dm-red); border-color: var(--dm-red); color: var(--white); }

.sort-select {
  margin-left: auto;
  padding: 7px 32px 7px 12px;
  font-size: 13px;
  font-family: var(--font);
  border: 1.5px solid var(--dm-gray-200);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  cursor: pointer;
  appearance: none;
  background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23666'/%3E%3C/svg%3E") no-repeat right 10px center;
  outline: none;
}
.sort-select:focus { border-color: var(--dm-red); }

.results-count {
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PRODUCT GRID
   ═══════════════════════════════════════════════════════════════════════════ */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

/* ── Product Card ─────────────────────────────────────────────────────────── */
.product-card {
  background: var(--white);
  border: 1px solid var(--dm-gray-200);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s, transform 0.2s;
  cursor: pointer;
  position: relative;
}
.product-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-badge-row {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  gap: 4px;
  z-index: 2;
}
.card-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.card-badge.dm    { background: var(--dm-red); color: var(--white); }
.card-badge.new   { background: var(--dm-blue); color: var(--white); }
.card-badge.best  { background: var(--dm-gold); color: var(--dm-blue); }

.card-img-wrap {
  background: var(--dm-gray-100);
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 16px;
}
.card-img-emoji {
  font-size: 72px;
  line-height: 1;
  transition: transform 0.3s;
  user-select: none;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.12));
}
.product-card:hover .card-img-emoji { transform: scale(1.08); }

.card-body {
  padding: 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.card-brand {
  font-size: 11px;
  font-weight: 700;
  color: var(--dm-red);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.card-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  flex: 1;
}
.card-volume {
  font-size: 11px;
  color: var(--text-secondary);
}

/* Stars */
.card-rating {
  display: flex;
  align-items: center;
  gap: 4px;
}
.stars { color: var(--dm-gold); font-size: 12px; letter-spacing: 1px; }
.rating-count { font-size: 11px; color: var(--text-secondary); }

/* Prices */
.card-prices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 4px;
}
.price-box {
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  text-align: center;
}
.price-box.de { background: #EEF3FC; border: 1px solid #C5D4F0; }
.price-box.bg { background: #FFF7E6; border: 1px solid #FCDFA3; }
.price-box .country-flag { font-size: 16px; display: block; margin-bottom: 2px; }
.price-box .country-label { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-secondary); }
.price-box .amount { font-size: 15px; font-weight: 800; color: var(--text-primary); display: block; }
.price-box.de .amount { color: var(--dm-blue); }
.price-box.bg .amount { color: #8B5E00; }
/* Verified / estimate badges */
.verified-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  background: var(--dm-green);
  color: #fff;
  border-radius: 3px;
  padding: 1px 5px;
  margin-top: 2px;
  letter-spacing: 0.2px;
}
.estimate-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  background: #F59E0B;
  color: #fff;
  border-radius: 3px;
  padding: 1px 5px;
  margin-top: 2px;
  letter-spacing: 0.2px;
}
.edit-price-btn {
  display: block;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 11px;
  margin-top: 3px;
  padding: 0;
  opacity: 0.5;
  transition: opacity 0.15s;
  line-height: 1;
}
.price-box.bg:hover .edit-price-btn { opacity: 1; }

/* Savings indicator */
.card-savings {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 5px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
}
.card-savings.cheaper-de { background: var(--dm-green-bg); color: var(--dm-green); }
.card-savings.cheaper-bg { background: #FFF7E6; color: #8B5E00; }
.card-savings.same       { background: var(--dm-gray-100); color: var(--text-secondary); }

/* Add to cart */
.card-footer {
  padding: 10px 12px 12px;
  border-top: 1px solid var(--dm-gray-200);
}
.add-to-cart-btn {
  width: 100%;
  padding: 9px;
  background: var(--dm-red);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.15s;
  font-family: var(--font);
}
.add-to-cart-btn:hover { background: var(--dm-red-dark); }
.add-to-cart-btn:active { transform: scale(0.98); }

/* ═══════════════════════════════════════════════════════════════════════════
   CART DRAWER
   ═══════════════════════════════════════════════════════════════════════════ */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.cart-overlay.open { opacity: 1; pointer-events: all; }

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 440px;
  max-width: 100vw;
  height: 100vh;
  background: var(--white);
  z-index: 201;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
}
.cart-drawer.open { transform: translateX(0); }

.cart-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--dm-gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--dm-red);
  color: var(--white);
}
.cart-header h2 { font-size: 18px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.cart-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  color: var(--white);
  border: none;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.cart-close-btn:hover { background: rgba(255,255,255,0.35); }

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cart-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--dm-gray-400);
  text-align: center;
  padding: 40px 20px;
}
.cart-empty .empty-icon { font-size: 56px; opacity: 0.4; }
.cart-empty p { font-size: 15px; font-weight: 600; }
.cart-empty small { font-size: 13px; }

/* Cart item */
.cart-item {
  border: 1px solid var(--dm-gray-200);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--white);
}
.cart-item-top {
  display: flex;
  gap: 10px;
  padding: 12px;
  align-items: flex-start;
}
.cart-item-img-emoji {
  width: 60px;
  height: 60px;
  background: var(--dm-gray-100);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  user-select: none;
}
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-brand { font-size: 10px; font-weight: 700; color: var(--dm-red); text-transform: uppercase; letter-spacing: 0.5px; }
.cart-item-name { font-size: 13px; font-weight: 600; color: var(--text-primary); line-height: 1.3; margin-top: 2px; }
.cart-item-volume { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }
.cart-item-remove {
  background: none;
  border: none;
  color: var(--dm-gray-400);
  cursor: pointer;
  font-size: 16px;
  padding: 2px;
  transition: color 0.15s;
  flex-shrink: 0;
}
.cart-item-remove:hover { color: var(--dm-red); }

.cart-item-qty-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-top: 1px solid var(--dm-gray-100);
  background: var(--dm-gray-100);
}
.qty-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid var(--dm-gray-400);
  background: var(--white);
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  color: var(--text-primary);
}
.qty-btn:hover { border-color: var(--dm-red); color: var(--dm-red); }
.qty-value { font-size: 14px; font-weight: 700; min-width: 24px; text-align: center; }

.cart-item-price-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--dm-gray-200);
  border-top: 1px solid var(--dm-gray-200);
}
.item-price-cell {
  padding: 8px 12px;
  background: var(--white);
  display: flex;
  align-items: center;
  gap: 6px;
}
.item-price-cell .flag { font-size: 14px; }
.item-price-cell .lbl { font-size: 10px; color: var(--text-secondary); flex: 1; }
.item-price-cell .val { font-size: 13px; font-weight: 800; }
.item-price-cell.de .val { color: var(--dm-blue); }
.item-price-cell.bg .val { color: #8B5E00; }

/* Cart totals */
.cart-footer {
  padding: 16px 20px;
  border-top: 2px solid var(--dm-gray-200);
  background: var(--white);
}
.cart-totals {
  background: var(--dm-gray-100);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid var(--dm-gray-200);
}
.cart-totals-header {
  background: var(--dm-gray-200);
  padding: 10px 16px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
}
.cart-totals-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
}
.total-cell {
  padding: 14px 16px;
  text-align: center;
  border-right: 1px solid var(--dm-gray-200);
}
.total-cell:last-child { border-right: none; }
.total-cell .t-label { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-secondary); margin-bottom: 4px; display: flex; align-items: center; justify-content: center; gap: 4px; }
.total-cell .t-amount { font-size: 20px; font-weight: 900; line-height: 1; }
.total-cell.de .t-amount { color: var(--dm-blue); }
.total-cell.bg .t-amount { color: #8B5E00; }
.total-cell.savings .t-amount { color: var(--dm-green); }
.total-cell.savings .t-label { color: var(--dm-green); }
.total-cell .t-currency { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }

/* savings direction label */
.savings-direction {
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  padding: 8px;
  border-radius: var(--radius-sm);
  margin-top: 8px;
}
.savings-direction.de { background: #EEF3FC; color: var(--dm-blue); }
.savings-direction.bg { background: #FFF7E6; color: #8B5E00; }
.savings-direction.equal { background: var(--dm-gray-100); color: var(--text-secondary); }

.checkout-btn {
  width: 100%;
  padding: 14px;
  background: var(--dm-red);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.15s;
  font-family: var(--font);
  letter-spacing: 0.3px;
}
.checkout-btn:hover { background: var(--dm-red-dark); }

/* ═══════════════════════════════════════════════════════════════════════════
   TOAST NOTIFICATION
   ═══════════════════════════════════════════════════════════════════════════ */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
.toast {
  background: var(--dm-gray-800);
  color: var(--white);
  padding: 12px 20px;
  border-radius: 24px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-md);
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.2s forwards;
  white-space: nowrap;
}
.toast.success { background: var(--dm-green); }
@keyframes toastIn  { from { opacity:0; transform:translateY(16px); } to { opacity:1; transform:translateY(0); } }
@keyframes toastOut { from { opacity:1; } to { opacity:0; transform:translateY(8px); } }

/* ═══════════════════════════════════════════════════════════════════════════
   DATA SOURCE BANNER
   ═══════════════════════════════════════════════════════════════════════════ */
.data-banner {
  background: #FFF8E1;
  border-left: 4px solid #F59E0B;
  border-bottom: 1px solid #FCDFA3;
  padding: 10px 20px;
  font-size: 12px;
  color: #7C5200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.data-banner strong { color: #5C3D00; }
.data-banner a { color: #7C5200; text-decoration: underline; }
.data-banner .verified-pill {
  background: var(--dm-green);
  color: #fff;
  border-radius: 20px;
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}
.data-banner .estimate-pill {
  background: #F59E0B;
  color: #fff;
  border-radius: 20px;
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   EDIT MODAL
   ═══════════════════════════════════════════════════════════════════════════ */
.edit-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.edit-modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.edit-modal-header {
  background: var(--dm-blue);
  color: #fff;
  padding: 14px 18px;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.edit-modal-close {
  background: rgba(255,255,255,0.2);
  border: none;
  color: #fff;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.edit-modal-close:hover { background: rgba(255,255,255,0.35); }
.edit-modal-body { padding: 18px; }
.edit-product-name { font-size: 14px; font-weight: 700; margin-bottom: 10px; }
.edit-hint { font-size: 12px; color: var(--text-secondary); line-height: 1.5; margin-bottom: 14px; }
.edit-hint a { color: var(--dm-red); }
.edit-input-row {
  display: flex;
  align-items: center;
  border: 2px solid var(--dm-gray-200);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color 0.2s;
}
.edit-input-row:focus-within { border-color: var(--dm-blue); }
.edit-currency {
  padding: 10px 12px;
  background: var(--dm-gray-100);
  font-size: 16px;
  font-weight: 700;
  color: var(--dm-blue);
  border-right: 1px solid var(--dm-gray-200);
}
.edit-price-input {
  flex: 1;
  padding: 10px 12px;
  font-size: 18px;
  font-weight: 700;
  border: none;
  outline: none;
  font-family: var(--font);
}
.edit-note { font-size: 11px; color: var(--dm-gray-400); margin-top: 8px; }
.edit-modal-footer {
  padding: 14px 18px;
  border-top: 1px solid var(--dm-gray-200);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.edit-cancel-btn {
  padding: 8px 18px;
  border: 1.5px solid var(--dm-gray-200);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  background: var(--white);
  font-family: var(--font);
}
.edit-save-btn {
  padding: 8px 18px;
  background: var(--dm-blue);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font);
}
.edit-save-btn:hover { background: #162a6a; }

/* Cart estimate warning */
.cart-estimate-warn {
  background: #FFF8E1;
  border: 1px solid #FCDFA3;
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 11px;
  color: #7C5200;
  margin-bottom: 12px;
  line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════════════════ */
.site-footer {
  background: var(--dm-gray-800);
  color: #CCC;
  padding: 40px 20px 20px;
  margin-top: 60px;
}
.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid #444;
}
.footer-brand .brand-name { font-size: 20px; font-weight: 900; color: var(--dm-red); margin-bottom: 8px; }
.footer-brand p { font-size: 13px; line-height: 1.6; color: #999; }
.footer-col h4 { font-size: 13px; font-weight: 700; color: var(--white); margin-bottom: 14px; text-transform: uppercase; letter-spacing: 0.5px; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { font-size: 13px; color: #999; transition: color 0.15s; }
.footer-col a:hover { color: var(--white); }
.footer-bottom {
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #666;
  flex-wrap: wrap;
  gap: 8px;
}
.disclaimer {
  max-width: 1280px;
  margin: 16px auto 0;
  padding: 12px 16px;
  background: rgba(255,255,255,0.05);
  border-radius: var(--radius-sm);
  font-size: 11px;
  color: #888;
  line-height: 1.6;
  border-left: 3px solid var(--dm-red);
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-content h1 { font-size: 22px; }
}

@media (max-width: 640px) {
  .header-main { height: 56px; gap: 12px; }
  .logo-text .brand { font-size: 18px; }
  .logo-text .tagline { display: none; }
  .search-bar { max-width: none; }
  .hero-flags { display: none; }
  .hero-banner { padding: 20px 16px; }
  .hero-content h1 { font-size: 18px; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .cart-drawer { width: 100vw; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .filter-bar { gap: 8px; }
  .results-count { width: 100%; }
}

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

/* ── Scrollbar ────────────────────────────────────────────────────────────── */
.cart-items::-webkit-scrollbar { width: 4px; }
.cart-items::-webkit-scrollbar-track { background: transparent; }
.cart-items::-webkit-scrollbar-thumb { background: var(--dm-gray-200); border-radius: 4px; }

/* ═══════════════════════════════════════════════════════════════════════════
   LANGUAGE SWITCHER
   ═══════════════════════════════════════════════════════════════════════════ */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 2px;
  border: 1.5px solid rgba(255,255,255,0.25);
  border-radius: 20px;
  padding: 2px;
  flex-shrink: 0;
}
.lang-btn {
  padding: 3px 10px;
  border-radius: 16px;
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,0.7);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  transition: all 0.15s;
  letter-spacing: 0.5px;
}
.lang-btn:hover { color: #fff; }
.lang-btn.active { background: rgba(255,255,255,0.25); color: #fff; }

/* ═══════════════════════════════════════════════════════════════════════════
   BARCODE LOOKUP – header input
   ═══════════════════════════════════════════════════════════════════════════ */
.barcode-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--dm-gray-100);
  border-bottom: 1px solid var(--dm-gray-200);
  max-width: 1280px;
  margin: 0 auto;
}
.barcode-row-inner {
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.barcode-wrap {
  background: var(--dm-gray-100);
  border-bottom: 1px solid var(--dm-gray-200);
  padding: 10px 0;
}
.barcode-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  white-space: nowrap;
  flex-shrink: 0;
}
.barcode-label span { font-size: 16px; }
#barcodeInput {
  flex: 1;
  max-width: 320px;
  padding: 8px 14px;
  font-size: 14px;
  font-family: var(--font);
  border: 1.5px solid var(--dm-gray-200);
  border-radius: 20px;
  outline: none;
  transition: border-color 0.2s;
  background: var(--white);
}
#barcodeInput:focus { border-color: var(--dm-blue); }
#barcodeInput::placeholder { color: var(--dm-gray-400); }
#barcodeBtn {
  padding: 8px 20px;
  background: var(--dm-blue);
  color: #fff;
  border: none;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font);
  transition: background 0.15s;
  white-space: nowrap;
}
#barcodeBtn:hover { background: #162a6a; }

/* ═══════════════════════════════════════════════════════════════════════════
   MATCH CONFIDENCE BADGE (on product card)
   ═══════════════════════════════════════════════════════════════════════════ */
.match-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.match-exact    { background: var(--dm-green); color: #fff; }
.match-partial  { background: #3B82F6; color: #fff; }
.match-probable { background: #F59E0B; color: #fff; }
.match-none     { background: var(--dm-gray-400); color: #fff; }

/* ═══════════════════════════════════════════════════════════════════════════
   PRODUCT CARD ADDITIONS
   ═══════════════════════════════════════════════════════════════════════════ */
.card-product-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.card-gtin {
  font-size: 10px;
  color: var(--dm-gray-400);
  letter-spacing: 0.3px;
}
.card-gtin span { font-family: monospace; }
.unit-price {
  font-size: 10px;
  color: var(--dm-gray-400);
}

/* Product links on card */
.card-links {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}
.product-link {
  flex: 1;
  text-align: center;
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.15s, transform 0.1s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.product-link:hover { opacity: 0.8; transform: translateY(-1px); }
.product-link.de { background: #EEF3FC; color: var(--dm-blue); border: 1px solid #C5D4F0; }
.product-link.bg { background: #FFF7E6; color: #8B5E00;         border: 1px solid #FCDFA3; }

/* ═══════════════════════════════════════════════════════════════════════════
   CART ITEM ADDITIONS
   ═══════════════════════════════════════════════════════════════════════════ */
.cart-item-links {
  display: flex;
  gap: 1px;
  border-top: 1px solid var(--dm-gray-200);
  background: var(--dm-gray-200);
}
.cart-product-link {
  flex: 1;
  padding: 7px 10px;
  font-size: 10px;
  font-weight: 600;
  text-align: center;
  background: var(--white);
  color: var(--dm-blue);
  text-decoration: none;
  transition: background 0.15s;
}
.cart-product-link.bg { color: #8B5E00; }
.cart-product-link:hover { background: var(--dm-gray-100); }

/* ═══════════════════════════════════════════════════════════════════════════
   MATCH FILTER ROW
   ═══════════════════════════════════════════════════════════════════════════ */
.match-filter-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 20px 12px;
  background: var(--white);
  border: 1px solid var(--dm-gray-200);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}
.match-filter-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════════════════════
   BARCODE COMPARISON MODAL
   ═══════════════════════════════════════════════════════════════════════════ */
.barcode-modal { max-width: 580px; }
.barcode-modal-header { background: var(--dm-blue); }
.barcode-modal-header code {
  font-family: monospace;
  background: rgba(255,255,255,0.15);
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 13px;
}

.barcode-modal-body {
  padding: 20px;
  max-height: 80vh;
  overflow-y: auto;
}

/* Loading spinner */
.barcode-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 40px 20px;
  color: var(--text-secondary);
}
.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--dm-gray-200);
  border-top-color: var(--dm-blue);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Not found */
.barcode-not-found, .barcode-api-warn {
  text-align: center;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
}
.barcode-not-found { padding: 40px 20px; color: var(--dm-gray-400); }
.barcode-not-found p { font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.barcode-sub { font-size: 12px; font-family: monospace; color: var(--dm-gray-400); }
.barcode-api-warn {
  background: #FFF8E1;
  border: 1px solid #FCDFA3;
  color: #7C5200;
  font-size: 12px;
  margin-bottom: 12px;
}

/* Confidence badge */
.barcode-confidence {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 12px;
}

/* Savings row */
.barcode-savings {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 16px;
}
.barcode-savings.cheaper-bg { background: #FFF7E6; color: #8B5E00; }
.barcode-savings.cheaper-de { background: var(--dm-green-bg); color: var(--dm-green); }
.barcode-savings.same       { background: var(--dm-gray-100); color: var(--text-secondary); }

/* Side-by-side comparison */
.barcode-compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}
.barcode-side {
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: center;
}
.barcode-side.de { background: #EEF3FC; border: 1px solid #C5D4F0; }
.barcode-side.bg { background: #FFF7E6; border: 1px solid #FCDFA3; }
.barcode-side-flag { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.barcode-side.de .barcode-side-flag { color: var(--dm-blue); }
.barcode-side.bg .barcode-side-flag { color: #8B5E00; }

.barcode-img-wrap {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.6);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.barcode-product-img { max-width: 100%; max-height: 100%; object-fit: contain; }
.barcode-emoji { font-size: 48px; }

.barcode-product-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}
.barcode-price {
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
}
.barcode-side.de .barcode-price { color: var(--dm-blue); }
.barcode-side.bg .barcode-price { color: #8B5E00; }
.barcode-diff-line { font-size: 10px; color: var(--text-secondary); }

.barcode-link {
  display: block;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: opacity 0.15s;
}
.barcode-link.de { background: var(--dm-blue); color: #fff; }
.barcode-link.bg { background: #8B5E00; color: #fff; }
.barcode-link:hover { opacity: 0.85; }

.barcode-volume {
  text-align: center;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.barcode-cart-btn {
  width: 100%;
  padding: 11px;
  background: var(--dm-red);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font);
  transition: background 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.barcode-cart-btn:hover { background: var(--dm-red-dark); }

/* ═══════════════════════════════════════════════════════════════════════════
   EMPTY STATE
   ═══════════════════════════════════════════════════════════════════════════ */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--dm-gray-400);
}
.empty-icon  { font-size: 48px; margin-bottom: 12px; }
.empty-title { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.empty-sub   { font-size: 13px; }

/* ═══════════════════════════════════════════════════════════════════════════
   UNVERIFIED / UNAVAILABLE PRODUCT LINK
   ═══════════════════════════════════════════════════════════════════════════ */
.product-link.bg.unverified {
  background: var(--dm-gray-100);
  color: var(--dm-gray-400);
  border: 1px dashed var(--dm-gray-200);
  cursor: default;
  font-style: italic;
  font-size: 10px;
  pointer-events: none;
  opacity: 0.8;
}
.product-link.bg.unverified:hover { opacity: 0.8; transform: none; }

/* ═══════════════════════════════════════════════════════════════════════════
   CARD LAST-CHECKED DATE BADGE
   ═══════════════════════════════════════════════════════════════════════════ */
.card-last-checked {
  font-size: 9px;
  color: var(--dm-gray-400);
  text-align: right;
  margin-top: 4px;
  padding: 0 2px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   DEBUG / ADMIN PANEL  (Ctrl+Shift+D)
   ═══════════════════════════════════════════════════════════════════════════ */
.debug-panel {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(2px);
  padding: 24px;
  overflow-y: auto;
}
.debug-panel.open { display: block; }

.debug-inner {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 1100px;
  margin: 0 auto;
  overflow: hidden;
}

.debug-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: #1A1A2E;
  color: #E8E8E8;
}
.debug-header h2 { font-size: 15px; font-weight: 700; font-family: monospace; }
.debug-close {
  background: none;
  border: none;
  color: #aaa;
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}
.debug-close:hover { color: var(--white); }

.debug-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 20px;
  background: #F7F7FB;
  border-bottom: 1px solid var(--dm-gray-200);
}
.debug-pill {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
}
.debug-pill.ok     { background: var(--dm-green-bg); color: var(--dm-green); }
.debug-pill.warn   { background: #FFF3CD; color: #7A5000; }
.debug-pill.error  { background: var(--dm-red-light); color: var(--dm-red-dark); }
.debug-pill.info   { background: #EEF3FC; color: var(--dm-blue); }

.debug-section { padding: 16px 20px; }
.debug-section h3 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--dm-gray-600);
  margin-bottom: 10px;
}

.debug-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.debug-table th {
  text-align: left;
  padding: 6px 10px;
  background: var(--dm-gray-100);
  font-weight: 600;
  border-bottom: 2px solid var(--dm-gray-200);
  white-space: nowrap;
}
.debug-table td {
  padding: 6px 10px;
  border-bottom: 1px solid var(--dm-gray-100);
  vertical-align: top;
}
.debug-table tr:hover td { background: var(--dm-gray-100); }

.debug-ok    { color: var(--dm-green);    font-weight: 700; }
.debug-warn  { color: #B8860B;            font-weight: 700; }
.debug-error { color: var(--dm-red-dark); font-weight: 700; }
.debug-na    { color: var(--dm-gray-400); font-size: 10px; }

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE ADDITIONS
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .barcode-compare-grid { grid-template-columns: 1fr; }
  #barcodeInput { max-width: 100%; }
  .card-links { flex-direction: column; }
  .lang-switcher { border-color: rgba(255,255,255,0.3); }
  .debug-panel { padding: 12px; }
  .debug-table th, .debug-table td { padding: 4px 6px; }
}
