: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);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  /* 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;
  min-height: 100vh;
}
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: 22px;
  bottom: 22px;
  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; }

.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;
  background: linear-gradient(135deg, var(--ileks-orange), var(--ileks-orange-light));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.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: 28px; height: 28px; border-radius: 50%; font-size: 15px; }

.chat-log {
  flex: 1;
  overflow-y: auto;
  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; white-space: pre-wrap; }
.msg.user { align-self: flex-end; background: var(--ileks-orange); color: #fff; border-bottom-right-radius: 3px; }
.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; }

.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; }
.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; }
.suggestions button {
  background: var(--ileks-orange-pale); color: var(--ileks-orange-dark); border: 1px solid var(--ileks-orange-pale-2);
  border-radius: 20px; padding: 7px 13px; font-size: 13.5px;
}
.suggestions button:hover { background: #ffd9a3; }

.chat-input-row {
  display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--border); background: #fff;
}
/* 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: 40px; height: 40px; 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; overflow-y: auto; }
.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; border-top: 1px solid var(--border); }
.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: 12px; border-radius: 8px; font-weight: 700; }

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

.ileks-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  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);
  white-space: pre-wrap;
}
.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; }
  .search-bar { order: 3; max-width: 100%; }
  .hero { flex-direction: column; align-items: flex-start; }
  .compare-heads { grid-template-columns: 1fr; }
}
