:root {
  --ink: #131921;
  --ink-soft: #37475a;
  --accent: #ff9900;
  --accent-dark: #e37b00;
  /* iLEKS brand orange -- the AI assistant's own accent (bubble, panel
     headers, chat, compare view). One consistent orange throughout the
     storefront instead of a separate purple for the assistant chrome. */
  --ileks-orange: #ff7a1a;
  --ileks-orange-dark: #d4600a;
  --ileks-orange-light: #ffb347;
  --ileks-orange-pale: #fff1e0;
  --ileks-orange-pale-2: #ffe3bd;
  --bg: #f4f5f7;
  --card-bg: #ffffff;
  --border: #e2e5eb;
  --text: #17181c;
  --text-soft: #565c66;
  --success: #0f9d58;
  --danger: #d0393e;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(20, 20, 30, 0.08), 0 1px 2px rgba(20, 20, 30, 0.06);
  --shadow-lg: 0 12px 32px rgba(20, 20, 30, 0.18);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --keyboard-inset: 0px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html {
  height: 100%;
}
body {
  background: var(--bg);
  color: var(--text);
  min-height: 100%;
  min-height: 100dvh;
  /* Inter first: it was drawn for screen UI and has an unusually tall
     x-height, so it reads a size larger than it is -- which is half the
     answer to "the chat text is too small". Its Turkish coverage is
     complete, including the pair that breaks lesser fonts: dotless i (i)
     against dotted I. Open Sans and Roboto follow as fully Turkish-capable
     webfonts, then the platform faces, so a blocked CDN or an offline demo
     degrades to something correct rather than to a serif default. */
  font-family: "Inter", "Open Sans", Roboto, "Segoe UI", -apple-system, BlinkMacSystemFont, Arial, sans-serif;
}
html.panel-open,
html.panel-open body {
  overflow: hidden;
  overscroll-behavior: none;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ---------- Header ---------- */
.topbar {
  background: var(--ileks-orange);
  color: #fff;
  font-size: 12.5px;
  text-align: center;
  padding: 5px 12px;
}

header.site-header {
  background: var(--ink);
  color: #fff;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 18px;
  position: sticky;
  top: 0;
  z-index: 40;
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.5px;
  flex-shrink: 0;
}
.brand .dot { color: var(--accent); }
.brand small {
  font-weight: 500;
  font-size: 11px;
  color: #b6c2d0;
  letter-spacing: 0.3px;
}

.search-bar {
  flex: 1;
  display: flex;
  max-width: 720px;
  border-radius: 6px;
  overflow: hidden;
}
.search-bar input {
  flex: 1;
  border: none;
  padding: 10px 14px;
  font-size: 14px;
  outline: none;
}
.search-bar button {
  background: var(--accent);
  border: none;
  padding: 0 16px;
  font-size: 16px;
  color: var(--ink);
}
.search-bar button:hover { background: var(--accent-dark); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}
.lang-toggle {
  display: flex;
  background: rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 2px;
}
.lang-toggle button {
  background: none;
  border: none;
  color: #cfd7e0;
  padding: 5px 12px;
  border-radius: 18px;
  font-size: 12.5px;
  font-weight: 600;
}
.lang-toggle button.active { background: #fff; color: var(--ink); }

.cart-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: #fff;
  font-size: 13px;
  position: relative;
}
.cart-badge {
  background: var(--accent);
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
  border-radius: 50%;
  min-width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

nav.category-nav {
  background: var(--ink-soft);
  color: #eef1f5;
  padding: 8px 20px;
  display: flex;
  gap: 20px;
  overflow-x: auto;
  font-size: 13px;
  white-space: nowrap;
}
nav.category-nav a { opacity: 0.92; padding: 2px 0; }
nav.category-nav a:hover { opacity: 1; text-decoration: underline; }

/* ---------- Hero ---------- */
.hero {
  margin: 18px 20px 8px;
  border-radius: 14px;
  background: linear-gradient(120deg, var(--ileks-orange) 0%, var(--ileks-orange-light) 55%, #ffd699 100%);
  color: #fff;
  padding: 34px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  box-shadow: var(--shadow-lg);
}
.hero-copy h1 { margin: 0 0 8px; font-size: 26px; letter-spacing: -0.5px; }
.hero-copy p { margin: 0 0 16px; opacity: 0.92; font-size: 14.5px; max-width: 480px; }
.hero-cta {
  background: #fff;
  color: var(--ileks-orange-dark);
  border: none;
  padding: 11px 20px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}
.hero-cta:hover { background: var(--ileks-orange-pale); }
.hero-badge {
  background: rgba(255,255,255,0.85);
  color: var(--ileks-orange-dark);
  padding: 22px 26px;
  border-radius: 12px;
  text-align: center;
  min-width: 160px;
  font-weight: 700;
}
.hero-badge .big { font-size: 30px; display:block; margin-bottom: 4px;}

/* ---------- Sections / grid ---------- */
main { max-width: 1280px; margin: 0 auto; padding: 8px 20px 60px; }
.section-title {
  font-size: 18px;
  font-weight: 700;
  margin: 26px 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title .chip {
  font-size: 11px;
  font-weight: 700;
  background: var(--ileks-orange-pale-2);
  color: var(--ileks-orange-dark);
  padding: 3px 9px;
  border-radius: 20px;
}

.category-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.category-chips button {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 7px 14px;
  font-size: 12.5px;
  color: var(--text-soft);
}
.category-chips button:hover, .category-chips button.active {
  border-color: var(--ileks-orange);
  color: var(--ileks-orange-dark);
  background: var(--ileks-orange-pale);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .15s ease, transform .15s ease;
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.card-link { display: flex; flex-direction: column; flex: 1; color: inherit; text-decoration: none; min-width: 0; }
.card .thumb {
  aspect-ratio: 1 / 1;
  background: #fafafa;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.card .thumb img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.card .thumb .noimg { color: #c6c9cf; font-size: 12px; }
.card .body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.card .brand { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-soft); font-weight: 700; }
.card .name {
  font-size: 13px;
  line-height: 1.35;
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 34px;
}
.card .rating { font-size: 11.5px; color: var(--text-soft); }
.card .rating .stars { color: var(--accent-dark); }
.card .price-row { margin-top: auto; display: flex; align-items: baseline; gap: 6px; }
.card .price { font-size: 16px; font-weight: 800; color: var(--ink); }
.card .strike { font-size: 11.5px; color: #9aa0a8; text-decoration: line-through; }
.card .add-btn {
  flex: 1;
  background: var(--ink);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px;
  font-size: 12.5px;
  font-weight: 600;
}
.card .add-btn:hover { background: #000; }
.card .add-btn.added { background: var(--success); }
.card-actions {
  display: flex;
  gap: 6px;
  padding: 0 12px 12px;
}
.card .compare-btn {
  flex: 1;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px;
  font-size: 12.5px;
  font-weight: 600;
}
.card .compare-btn:hover { border-color: var(--ileks-orange); color: var(--ileks-orange-dark); }

footer.site-footer {
  background: var(--ink);
  color: #b6c2d0;
  text-align: center;
  padding: 26px 20px;
  font-size: 12.5px;
  margin-top: 40px;
}

/* ---------- AI assistant bubble + panel ---------- */
.ai-bubble {
  position: fixed;
  right: max(16px, var(--safe-right));
  bottom: max(16px, calc(12px + var(--safe-bottom)));
  z-index: 60;
  background: linear-gradient(135deg, var(--ileks-orange), var(--ileks-orange-light));
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 14px 20px 14px 16px;
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 14px;
  box-shadow: var(--shadow-lg);
}
.ai-bubble:hover { transform: translateY(-2px); }
.ai-bubble .sparkle { font-size: 17px; }
html.panel-open .ai-bubble,
html.keyboard-open .ai-bubble {
  visibility: hidden;
  pointer-events: none;
}

.panel-overlay {
  position: fixed; inset: 0; background: rgba(15,15,20,0.35);
  z-index: 70; opacity: 0; pointer-events: none; transition: opacity .18s ease;
}
.panel-overlay.open { opacity: 1; pointer-events: auto; }

.side-panel {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(420px, 100vw);
  background: #fff;
  z-index: 80;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 30px rgba(0,0,0,0.2);
  transform: translateX(100%);
  transition: transform .22s ease;
}
.side-panel.open { transform: translateX(0); }

.panel-header {
  padding: 16px 18px;
  padding-top: calc(16px + var(--safe-top));
  background: linear-gradient(135deg, var(--ileks-orange), var(--ileks-orange-light));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.panel-header .title { font-weight: 800; font-size: 17px; display: flex; align-items: center; gap: 8px; }
.panel-header .sub { font-size: 12.5px; opacity: 0.85; margin-top: 3px; }
.panel-header .close-btn {
  background: rgba(255,255,255,0.2); border: none; color: #fff;
  width: 44px; height: 44px; border-radius: 50%; font-size: 18px; flex-shrink: 0;
}

.chat-log {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #fffaf5;
}
/* 15.5px, not 13.5px. This is continuous prose a shopper reads for real --
   the assistant's answers run to several sentences -- so it follows body-text
   rules, not label rules. Line-height goes up with it: at 1.5 the longer
   Turkish words ran together, and leading matters as much as size for
   comfort. */
.msg { max-width: 88%; padding: 11px 14px; border-radius: 12px; font-size: 15.5px; line-height: 1.65; }
.msg.user { align-self: flex-end; background: var(--ileks-orange); color: #fff; border-bottom-right-radius: 3px; white-space: pre-wrap; }
.msg.assistant { align-self: flex-start; background: #fff; border: 1px solid var(--border); border-bottom-left-radius: 3px; }
.msg.system-note { align-self: center; font-size: 13px; color: var(--text-soft); background: none; white-space: pre-wrap; }

/* Assistant replies are rendered from markdown (see renderMarkdown in app.js),
   so spacing comes from these block elements rather than from preserved
   whitespace -- unlike the plain-text user/system bubbles above. */
.msg.assistant p { margin: 0 0 8px; }
.msg.assistant p:last-child { margin-bottom: 0; }
.msg.assistant ul, .msg.assistant ol { margin: 0 0 8px; padding-left: 1.3em; }
.msg.assistant ul:last-child, .msg.assistant ol:last-child { margin-bottom: 0; }
.msg.assistant li { margin: 2px 0; }
.msg.assistant code { background: var(--bg-soft, #f2f2f2); border-radius: 4px; padding: 1px 5px; font-size: 0.92em; }
.msg.assistant a { color: var(--ileks-orange); text-decoration: underline; }
.msg.assistant .md-table-wrap { overflow-x: auto; margin-bottom: 8px; }
.msg.assistant .md-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.msg.assistant .md-table th, .msg.assistant .md-table td { text-align: left; padding: 6px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.msg.assistant .md-table th { font-weight: 700; }

.chat-products { display: flex; flex-direction: column; gap: 8px; align-self: stretch; }
.chat-product {
  display: flex; gap: 10px; background: #fff; border: 1px solid var(--border);
  border-radius: 10px; padding: 8px; align-items: center;
}
/* Grown with the text beside it -- name + price now stack taller than the
   old 52px thumb, which left the card looking top-heavy. */
.chat-product .thumb { width: 58px; height: 58px; flex-shrink: 0; background: #fafafa; border-radius: 6px; display:flex; align-items:center; justify-content:center; overflow:hidden;}
.chat-product .thumb img { width: 100%; height: 100%; object-fit: contain; }
.chat-product .info { flex: 1; min-width: 0; }
.chat-product .info .name { font-size: 14.5px; font-weight: 600; line-height: 1.35; }
/* The #102# a reply cites, on the card it means and inline in the text. */
.ref-tag {
  display: inline-block; margin-right: 6px; padding: 0 6px; border-radius: 6px;
  background: var(--ileks-orange-pale); color: var(--ileks-orange-dark);
  font-size: 12px; font-weight: 700; line-height: 18px; vertical-align: 1px;
  font-variant-numeric: tabular-nums;
}
.chat-product .info .price { font-size: 15px; font-weight: 800; color: var(--ileks-orange-dark); margin-top: 3px; }
/* 11px was below the floor where a tap target reads as a button at arm's
   length; the padding grows with the text so the hit area grows too. */
.chat-product .add-mini {
  background: var(--ink); color: #fff; border: none; border-radius: 6px; font-size: 12.5px; padding: 7px 11px; flex-shrink: 0;
}
.chat-product .compare-mini {
  background: #fff; color: var(--ink); border: 1px solid var(--border); border-radius: 6px; font-size: 12.5px; padding: 7px 11px; flex-shrink: 0;
}
.chat-product .chat-actions { display: flex; flex-direction: column; gap: 4px; flex-shrink: 0; }
.chat-products .compare-these {
  align-self: stretch;
  background: var(--ileks-orange-pale); color: var(--ileks-orange-dark); border: 1px solid var(--ileks-orange-pale-2);
  border-radius: 8px; padding: 9px; font-size: 13.5px; font-weight: 700;
}

/* A comparison reply: exactly the two items being compared, picture-first --
   no add/compare buttons here, since the side-by-side module (which carries
   the same explanation text) already opened on its own. */
.chat-products-compare { flex-direction: row; gap: 8px; flex-wrap: wrap; }
.chat-products-compare .compare-pic { flex-direction: column; align-items: stretch; flex: 1; min-width: 110px; text-align: center; }
.chat-products-compare .compare-pic .thumb { width: 100%; height: 84px; }
.chat-products-compare .compare-pic .info .name {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.chat-products-compare .compare-these { flex-basis: 100%; }

.suggestions { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 12px; flex-shrink: 0; }
.suggestions button {
  background: var(--ileks-orange-pale); color: var(--ileks-orange-dark); border: 1px solid var(--ileks-orange-pale-2);
  border-radius: 20px; padding: 10px 14px; font-size: 13.5px; min-height: 44px;
}
.suggestions button:hover { background: #ffd9a3; }
html.keyboard-open .suggestions { display: none; }

.chat-input-row {
  display: flex; gap: 8px; align-items: center;
  padding: 12px 14px;
  padding-bottom: calc(12px + var(--safe-bottom));
  border-top: 1px solid var(--border); background: #fff;
  flex-shrink: 0;
}
html.keyboard-open .chat-input-row {
  padding-bottom: 12px;
}
html.keyboard-open .panel-header {
  padding-top: 16px;
}
/* 16px is not a taste call here: iOS Safari force-zooms the whole page when
   a focused input's text is under 16px, and then does not zoom back out. On
   a phone the old 13.5px meant every attempt to type jolted the layout. This
   is the one size in the file that must not be lowered. */
.chat-input-row input {
  flex: 1; border: 1px solid var(--border); border-radius: 20px; padding: 11px 16px; font-size: 16px; outline: none;
}
.chat-input-row input:focus { border-color: var(--ileks-orange); }
.chat-input-row button {
  background: var(--ileks-orange); color: #fff; border: none; border-radius: 50%;
  width: 44px; height: 44px; font-size: 16px; flex-shrink: 0;
}
.chat-input-row button:disabled { opacity: 0.5; }

.typing-indicator { display: flex; align-items: center; gap: 8px; }
.typing-text { font-size: 13.5px; color: var(--text-soft); }
.typing-dots { display: inline-flex; gap: 3px; align-items: center; padding: 2px 4px;}
.typing-dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--ileks-orange); opacity: 0.4; animation: bounce 1.2s infinite; }
.typing-dots span:nth-child(2) { animation-delay: .15s; }
.typing-dots span:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%, 60%, 100% { opacity: .35; transform: translateY(0);} 30% { opacity: 1; transform: translateY(-3px);} }

/* Cart panel reuses .side-panel */
.cart-items { padding: 10px 14px; display: flex; flex-direction: column; gap: 10px; flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.cart-item { display: flex; gap: 10px; align-items: center; border-bottom: 1px solid var(--border); padding-bottom: 10px; }
.cart-item .thumb { width: 56px; height: 56px; background: #fafafa; border-radius: 6px; overflow: hidden; display:flex; align-items:center; justify-content:center;}
.cart-item .thumb img { width: 100%; height: 100%; object-fit: contain; }
.cart-item .info { flex: 1; }
.cart-item .info .name { font-size: 14px; font-weight: 600; line-height: 1.35; }
.cart-item .info .meta { font-size: 12.5px; color: var(--text-soft); margin-top: 3px; }
.cart-item .remove-btn { background: none; border: none; color: var(--danger); font-size: 13px; }
.cart-empty { padding: 40px 20px; text-align: center; color: var(--text-soft); font-size: 14.5px; }
.cart-footer {
  padding: 14px 16px;
  padding-bottom: calc(14px + var(--safe-bottom));
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
html.keyboard-open .cart-footer { padding-bottom: 14px; }
.cart-footer .total-row { display: flex; justify-content: space-between; font-weight: 700; margin-bottom: 10px; }
.cart-footer button { width: 100%; background: var(--ink); color: #fff; border: none; padding: 14px; border-radius: 8px; font-weight: 700; min-height: 44px; }

.empty-state { text-align: center; padding: 40px; color: var(--text-soft); font-size: 13px; }

.ileks-toast {
  position: fixed;
  left: 50%;
  bottom: calc(28px + var(--safe-bottom) + var(--keyboard-inset));
  transform: translateX(-50%) translateY(16px);
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  z-index: 120;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  box-shadow: var(--shadow-lg);
}
.ileks-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.compare-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(15,15,20,0.45);
  display: none;
  place-items: center;
  padding: 18px;
  pointer-events: auto;
}
.compare-modal.is-open { display: grid; }
.compare-sheet {
  width: min(920px, 100%);
  max-height: min(88vh, 900px);
  overflow: auto;
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  padding: 16px 18px 22px;
}
.compare-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 2;
  padding-bottom: 8px;
}
.compare-top h2 { margin: 0; font-size: 18px; }
.compare-top .close-btn {
  background: #f3f4f6;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 16px;
}
/* The same reasoning text the chat reply just showed, repeated here so the
   module isn't a bare spec table with no "why" attached to it. */
.compare-explain {
  background: var(--ileks-orange-pale);
  border: 1px solid var(--ileks-orange-pale-2);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 14px;
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--text);
}
/* Rendered from markdown (see renderMarkdown in app.js), same as chat
   replies -- the model's comparison answer often includes its own spec
   table, distinct from the .compare-table built from live product data
   below it, so it gets its own scroll container rather than overflowing
   the sheet on narrow screens. */
.compare-explain p { margin: 0 0 8px; }
.compare-explain p:last-child { margin-bottom: 0; }
.compare-explain ul, .compare-explain ol { margin: 0 0 8px; padding-left: 1.3em; }
.compare-explain ul:last-child, .compare-explain ol:last-child { margin-bottom: 0; }
.compare-explain li { margin: 2px 0; }
.compare-explain code { background: rgba(0, 0, 0, 0.06); border-radius: 4px; padding: 1px 5px; font-size: 0.92em; }
.compare-explain a { color: var(--ink); text-decoration: underline; }
.compare-explain .md-table-wrap { overflow-x: auto; margin-bottom: 8px; }
.compare-explain .md-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.compare-explain .md-table th, .compare-explain .md-table td {
  text-align: left; padding: 6px 10px; border-bottom: 1px solid var(--ileks-orange-pale-2); white-space: nowrap;
}
.compare-explain .md-table th { font-weight: 700; }
.compare-heads {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}
.compare-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.compare-card img { height: 120px; object-fit: contain; }
.compare-card .cname { font-size: 14.5px; font-weight: 700; line-height: 1.35; }
.compare-card .cprice { font-size: 17px; font-weight: 800; }
.compare-card .add-btn {
  background: var(--ink); color: #fff; border: none; border-radius: 6px;
  padding: 9px; font-size: 13.5px; font-weight: 600;
}
.compare-card .add-btn.added { background: var(--success); }
/* Spec tables are scanned row by row for small differences, so this one
   carries tabular figures -- prices and capacities line up in columns
   instead of drifting by digit width. */
.compare-table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.compare-table th, .compare-table td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.compare-table th { color: var(--text-soft); font-weight: 600; width: 22%; }
.compare-table tr.diff td { background: #fff6ea; }

@media (max-width: 720px) {
  header.site-header {
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 12px;
    padding-top: calc(10px + var(--safe-top));
  }
  .brand { font-size: 18px; }
  .brand small { display: none; }
  .search-bar { order: 3; max-width: 100%; flex-basis: 100%; }
  .search-bar input { font-size: 16px; min-height: 44px; }
  .search-bar button { min-width: 44px; min-height: 44px; }
  .header-actions { gap: 10px; margin-left: auto; }
  .lang-toggle button { min-height: 36px; padding: 6px 12px; }
  .cart-btn { min-height: 44px; padding: 6px 4px; }

  nav.category-nav {
    padding: 6px 12px;
    gap: 4px;
    -webkit-overflow-scrolling: touch;
  }
  nav.category-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 6px 10px;
  }

  .hero {
    flex-direction: column;
    align-items: flex-start;
    margin: 12px 12px 8px;
    padding: 20px 16px;
  }
  .hero-copy h1 { font-size: 22px; }
  .hero-cta { min-height: 44px; width: 100%; }
  .hero-badge { min-width: 0; width: 100%; padding: 14px 16px; }

  main { padding: 8px 12px calc(80px + var(--safe-bottom)); }
  .section-title { margin: 18px 0 10px; }

  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .card .add-btn, .card .compare-btn { min-height: 40px; }

  .side-panel {
    width: 100%;
    max-width: 100%;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    height: 100dvh;
    height: 100svh;
    transform: translateY(110%);
    box-shadow: none;
  }
  .side-panel.open { transform: translateY(0); }

  .chat-product {
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .chat-product .chat-actions {
    flex-direction: row;
    width: 100%;
  }
  .chat-product .add-mini,
  .chat-product .compare-mini {
    flex: 1;
    min-height: 44px;
  }

  .suggestions {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0 12px 8px;
  }
  .suggestions button { white-space: nowrap; }

  .compare-modal { padding: 0; align-items: stretch; }
  .compare-sheet {
    width: 100%;
    max-height: 100dvh;
    height: 100dvh;
    border-radius: 0;
    padding-bottom: calc(22px + var(--safe-bottom));
  }
  .compare-heads { grid-template-columns: 1fr; }
  .compare-top .close-btn { width: 44px; height: 44px; }
}

/* Previous chats: the shopper's own transcripts, reopened and continued. */
.panel-tools { display: flex; align-items: center; gap: 6px; }
.panel-tools .tool-btn { background: rgba(255,255,255,.12); color: #fff; border: 0; border-radius: 8px; height: 32px; min-width: 32px; padding: 0 8px; font-size: 14px; cursor: pointer; }
.panel-tools .tool-btn:hover { background: rgba(255,255,255,.22); }
.panel-tools .chat-cart-btn { display: inline-flex; align-items: center; gap: 5px; }
.chat-cart-count {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: #fff; color: var(--ileks-orange-dark); font-size: 11.5px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
}
.chat-cart-count[hidden] { display: none; }
.chat-history { border-bottom: 1px solid var(--border); background: var(--surface-2, #f6f7f9); max-height: 40%; overflow: auto; }
.chat-history .h-title { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); padding: 10px 14px 4px; }
.chat-history .h-item { display: flex; justify-content: space-between; gap: 10px; width: 100%; text-align: left; background: none; border: 0; border-top: 1px solid var(--border); padding: 9px 14px; cursor: pointer; font: inherit; color: inherit; }
.chat-history .h-item:hover { background: rgba(0,0,0,.04); }
.chat-history .h-item .q { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-history .h-item .d { color: var(--muted); font-size: 12px; white-space: nowrap; }
.chat-history .h-empty { padding: 12px 14px; color: var(--muted); font-size: 13px; }

/* Was this reply useful? One tap, under every finished reply. */
.fb-bar { display: flex; gap: 4px; align-self: flex-start; margin: -2px 0 4px 4px; }
.fb-bar button {
  border: 1px solid var(--border); background: #fff; border-radius: 8px;
  height: 28px; min-width: 34px; font-size: 14px; cursor: pointer; opacity: .75;
}
.fb-bar button:hover { opacity: 1; border-color: var(--ileks-orange); }
.fb-bar.fb-done { font-size: 12.5px; color: var(--ileks-orange-dark); }

/* Price alerts: a triggered alert, until added or dismissed */
.alert-banner {
  position: fixed; left: 50%; top: 12px; transform: translateX(-50%);
  z-index: 1200; width: min(640px, calc(100vw - 32px));
  display: flex; flex-direction: column; gap: 8px;
}
.alert-row {
  display: flex; align-items: center; gap: 10px;
  background: #fff; color: #1d1d1f; border: 1px solid #ffd2b0; border-left: 4px solid #ff7a1a;
  border-radius: 12px; padding: 10px 12px; box-shadow: 0 8px 24px rgba(0,0,0,.12);
  font-size: 14px; line-height: 1.35;
}
.alert-row .alert-icon { font-size: 18px; }
.alert-row .alert-text { flex: 1; min-width: 0; }
.alert-row .alert-text a { color: inherit; font-weight: 600; }
.alert-row .alert-target { color: #6b6b70; white-space: nowrap; }
.alert-row .add-btn {
  flex: none; width: auto; padding: 8px 12px; border: 0; border-radius: 8px;
  background: #ff7a1a; color: #fff; font: inherit; font-weight: 600; cursor: pointer;
}
.alert-row .alert-close {
  flex: none; border: 0; background: transparent; font-size: 20px; line-height: 1;
  color: #6b6b70; cursor: pointer; padding: 4px 6px;
}
@media (max-width: 720px) {
  .alert-row { flex-wrap: wrap; }
  .alert-row .alert-text { flex-basis: calc(100% - 60px); }
}
.push-offer {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin: 0 12px 8px; padding: 10px 12px; border-radius: 10px;
  background: #fff4ec; border: 1px solid #ffd2b0; font-size: 13px;
}
.push-offer span { flex: 1 1 100%; }
.push-offer button { border-radius: 8px; padding: 6px 10px; cursor: pointer; font: inherit; }
.push-offer .push-allow { background: #ff7a1a; color: #fff; border: 0; font-weight: 600; }
.push-offer .push-later { background: transparent; border: 1px solid #d8d8dc; color: #1d1d1f; }

/* Voice: a WhatsApp-style composer. Empty box: the round button is a
   microphone; text in the box: it sends. Recording replaces the box with a
   bar (bin, red dot, timer, "slide to cancel"). */
.chat-input-row.voice-on { position: relative; }
.chat-input-row .send-btn, .chat-input-row .mic-btn {
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
.chat-input-row .mic-btn {
  background: var(--ileks-orange); color: #fff; border: none; border-radius: 50%;
  width: 44px; height: 44px; flex-shrink: 0; transition: transform .12s;
}
.chat-input-row.voice-on .send-btn { display: none; }
.chat-input-row.voice-on.has-text .send-btn { display: inline-flex; }
.chat-input-row.voice-on.has-text .mic-btn { display: none; }
.chat-input-row.recording .mic-btn { transform: scale(1.25); background: #e5484d; }
.chat-input-row.rec-locked .mic-btn { display: none; }
.chat-input-row.rec-locked .send-btn { display: inline-flex; }
.chat-input-row.rec-working .mic-btn { opacity: .6; }
.chat-input-row.recording input, .chat-input-row.rec-working input { visibility: hidden; }
.chat-input-row .rec-bar {
  position: absolute; left: 14px; right: 66px; top: 12px; height: 44px;
  display: flex; align-items: center; gap: 10px; padding: 0 12px;
  background: #fff; border: 1px solid var(--border); border-radius: 22px; overflow: hidden; z-index: 2;
}
.chat-input-row .rec-bar[hidden] { display: none; }
.rec-bar .rec-bin { background: none; border: 0; color: #8a8a8f; padding: 0; width: 28px; height: 28px; display: none; }
.chat-input-row.rec-locked .rec-bin { display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.rec-bar .rec-dot { width: 10px; height: 10px; border-radius: 50%; background: #e5484d; animation: rec-blink 1s steps(2, start) infinite; flex: none; }
.rec-bar .rec-time { font-variant-numeric: tabular-nums; font-size: 15px; color: var(--text); min-width: 36px; }
.rec-bar .rec-hint { flex: 1; text-align: center; color: #8a8a8f; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: opacity .1s; }
.chat-input-row.rec-working .rec-dot { display: none; }
.chat-input-row .rec-lock {
  position: absolute; right: 14px; bottom: calc(100% + 6px); width: 44px; padding: 10px 0 6px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: #fff; border: 1px solid var(--border); border-radius: 22px; color: #8a8a8f;
  box-shadow: 0 4px 14px rgba(0,0,0,.08); animation: rec-lock-up .2s ease-out;
}
.chat-input-row .rec-lock[hidden] { display: none; }
.rec-lock-arrow { font-size: 14px; line-height: 1; animation: rec-nudge 1.2s ease-in-out infinite; }
@keyframes rec-blink { to { visibility: hidden; } }
@keyframes rec-lock-up { from { transform: translateY(8px); opacity: 0; } }
@keyframes rec-nudge { 50% { transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) {
  .rec-bar .rec-dot, .rec-lock-arrow, .chat-input-row .rec-lock { animation: none; }
}
.fb-bar .speak-btn { margin-right: 4px; }
.fb-bar .speak-btn.playing { color: var(--ileks-orange); }
