/* Roux AI arama widget'ı — mobil öncelikli, high-tech, hairline. */
:root {
  --roux-ink: #0f1720;
  --roux-muted: #8a94a0;
  --roux-line: rgba(15, 23, 32, .08);
  --roux-line-2: rgba(15, 23, 32, .04);
  --roux-bg: #ffffff;
  --roux-soft: #f7f9fa;
  --roux-accent: #1a9e5f;
  --roux-g1: #1a9e5f;
  --roux-g2: #12b3a6;
  --roux-g3: #2bd4c4;
  --roux-radius: 14px;
  --roux-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ── sayfadaki tetikleyici (fake input) ── */
.roux-trigger {
  display: flex; align-items: center; gap: 10px;
  width: 100%; max-width: 560px; box-sizing: border-box;
  padding: 12px 16px; cursor: text;
  font-family: var(--roux-font); font-size: 15px; color: var(--roux-muted);
  background: var(--roux-bg);
  border: 1px solid var(--roux-line);
  border-radius: 14px;
  transition: border-color .2s, box-shadow .2s;
}
.roux-trigger:hover { border-color: rgba(26, 158, 95, .4); }
.roux-trigger svg { width: 18px; height: 18px; flex: none; stroke: var(--roux-accent); }
.roux-trigger .roux-kbd {
  margin-left: auto; font-size: 11px; color: var(--roux-muted);
  border: 1px solid var(--roux-line); border-radius: 6px; padding: 2px 6px; flex: none;
}
.roux-trigger .roux-tw {
  color: var(--roux-muted); white-space: nowrap; overflow: hidden; min-width: 0;
  border-right: 1.5px solid var(--roux-accent); padding-right: 3px;
  animation: rouxcaret 1.05s step-end infinite;
}
@keyframes rouxcaret { 50% { border-color: transparent; } }

/* ── modal ── */
.roux-modal {
  position: fixed; inset: 0; z-index: 999999;
  display: flex; justify-content: center;
  font-family: var(--roux-font); color: var(--roux-ink);
  opacity: 0; pointer-events: none; transition: opacity .18s ease;
}
.roux-modal.open { opacity: 1; pointer-events: auto; }
.roux-backdrop {
  position: absolute; inset: 0;
  background: rgba(10, 16, 22, .38);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.roux-panel {
  position: relative; z-index: 1;
  display: flex; flex-direction: column;
  width: 100%; height: 100%;
  background: var(--roux-bg);
  overflow: hidden;
  transform: translateY(8px); transition: transform .22s cubic-bezier(.2,.7,.2,1);
}
.roux-modal.open .roux-panel { transform: translateY(0); }

/* ── header (input) ── */
.roux-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-bottom: 1px solid var(--roux-line);
}
.roux-head svg.roux-ic { width: 20px; height: 20px; stroke: var(--roux-accent); flex: none; }
.roux-input {
  flex: 1; border: none; outline: none; background: transparent;
  font-family: var(--roux-font); font-size: 17px; color: var(--roux-ink);
  min-width: 0;
}
.roux-input::placeholder { color: var(--roux-muted); }
.roux-close {
  border: 1px solid var(--roux-line); background: var(--roux-bg);
  border-radius: 10px; width: 34px; height: 34px; padding: 0; flex: none;
  display: flex; align-items: center; justify-content: center;
  color: var(--roux-muted); cursor: pointer;
}
.roux-close:hover { color: var(--roux-ink); border-color: var(--roux-muted); }

/* ── body ── */
.roux-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.roux-sec { padding: 16px; border-bottom: 1px solid var(--roux-line-2); }
.roux-label {
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--roux-muted); margin: 0 0 12px; display: flex; align-items: center; gap: 8px;
}
.roux-label::before {
  content: ""; width: 14px; height: 1px; background: var(--roux-accent);
}

/* chips (son/popüler aramalar) */
.roux-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.roux-chip {
  border: 1px solid var(--roux-line); background: var(--roux-bg);
  border-radius: 999px; padding: 7px 13px; font-size: 13px; color: var(--roux-ink);
  cursor: pointer; transition: border-color .15s, background .15s; white-space: nowrap;
}
.roux-chip:hover { border-color: var(--roux-accent); background: rgba(26,158,95,.05); }
.roux-chip .x { color: var(--roux-muted); margin-left: 6px; }

/* satır/kart ürün */
.roux-row {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 8px; margin: 0 -8px; border-radius: 12px;
  text-decoration: none; color: var(--roux-ink);
}
.roux-row:hover { background: var(--roux-soft); }
.roux-thumb {
  width: 44px; height: 44px; object-fit: contain; flex: none;
  border-radius: 10px; background: var(--roux-soft); border: 1px solid var(--roux-line-2);
}
.roux-info { min-width: 0; display: flex; flex-direction: column; }
.roux-name { font-size: 14px; line-height: 1.35; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.roux-meta { font-size: 12px; color: var(--roux-muted); margin-top: 2px; }
.roux-price { color: var(--roux-accent); font-weight: 600; }
.roux-oos { color: #d1495b; }

/* basit liste (kategori/marka/diğer) */
.roux-list a {
  display: flex; align-items: center; gap: 8px;
  padding: 8px; margin: 0 -8px; border-radius: 10px;
  text-decoration: none; color: var(--roux-ink); font-size: 14px;
}
.roux-list a:hover { background: var(--roux-soft); }
.roux-list a::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%;
  background: var(--roux-accent); flex: none; opacity: .6;
}
.roux-count { margin-left: auto; font-size: 11px; color: var(--roux-muted); }

/* öne çıkan kampanya kartları */
.roux-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.roux-card {
  position: relative; border-radius: 14px; overflow: hidden; text-decoration: none;
  border: 1px solid var(--roux-line); aspect-ratio: 16/9; display: block;
  background: linear-gradient(135deg, var(--roux-g1), var(--roux-g2), var(--roux-g3));
}
.roux-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.roux-card .cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 12px;
  color: #fff; font-size: 13px; font-weight: 600;
  background: linear-gradient(transparent, rgba(0,0,0,.55));
}

/* ── sonuç düzeni (yazarken) ── */
.roux-cols { display: grid; grid-template-columns: 1fr; }
.roux-col { padding: 16px; }
.roux-col--side { border-top: 1px solid var(--roux-line-2); }
.roux-subsec + .roux-subsec { margin-top: 18px; }

/* sponsorlu row (iki kolonun altında tek row) */
.roux-sponsored {
  border-top: 1px solid var(--roux-line);
  background: linear-gradient(180deg, rgba(26,158,95,.04), transparent);
  padding: 14px 16px;
}
.roux-spon-scroll { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.roux-spon-card {
  flex: 0 0 190px; display: flex; gap: 10px; align-items: center;
  border: 1px solid var(--roux-line); border-radius: 12px; padding: 8px;
  text-decoration: none; color: var(--roux-ink); background: var(--roux-bg);
}
.roux-spon-card .roux-thumb { width: 40px; height: 40px; }
.roux-badge {
  font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--roux-accent);
}

/* durum metinleri */
.roux-empty-msg { padding: 40px 16px; text-align: center; color: var(--roux-muted); font-size: 14px; }
.roux-loading { padding: 24px 16px; }
.roux-skel { height: 44px; border-radius: 12px; margin-bottom: 8px;
  background: linear-gradient(90deg, var(--roux-soft), #eef2f3, var(--roux-soft));
  background-size: 200% 100%; animation: rouxskel 1.1s linear infinite; }
@keyframes rouxskel { to { background-position: -200% 0; } }

/* ── footer + hareketli gradient ── */
.roux-foot {
  position: relative;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; border-top: 1px solid var(--roux-line);
  font-size: 11px; color: var(--roux-muted);
}
.roux-foot .brand { display: flex; align-items: center; gap: 6px; font-weight: 600; color: var(--roux-ink); }
.roux-foot .brand .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: linear-gradient(135deg, var(--roux-g1), var(--roux-g3));
  box-shadow: 0 0 8px rgba(43,212,196,.7);
}
/* modal geneline yayılan hareketli AI parıltısı (üst dahil) */
.roux-panel::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(60% 55% at 6% -10%, rgba(26,158,95,.55), transparent 66%),
    radial-gradient(55% 55% at 96% 0%, rgba(43,212,196,.50), transparent 68%),
    radial-gradient(80% 62% at 50% 116%, rgba(18,179,166,.55), transparent 66%);
  background-size: 240% 240%;
  animation: rouxbg 7s ease-in-out infinite alternate;
}
@keyframes rouxbg { 0% { background-position: 0% 0%; } 100% { background-position: 100% 100%; } }
.roux-head, .roux-body, .roux-foot { position: relative; z-index: 1; }
/* imleç ile hafif opaklık dalgalanması */
.roux-cursorglow {
  position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(320px 320px at var(--mx, 50%) var(--my, 30%),
    rgba(43,212,196,.95), rgba(26,158,95,.45) 40%, transparent 68%);
  will-change: opacity;
}

/* ── desktop ── */
@media (min-width: 780px) {
  .roux-modal { align-items: flex-start; padding-top: 8vh; }
  .roux-panel {
    width: 760px; height: auto; max-height: 82vh;
    border-radius: var(--roux-radius);
    border: 1px solid var(--roux-line);
    box-shadow: 0 30px 80px rgba(10,16,22,.28);
  }
  .roux-cols { grid-template-columns: 1.45fr 1fr; }
  .roux-col--side { border-top: none; border-left: 1px solid var(--roux-line-2); }
  .roux-cards { grid-template-columns: repeat(3, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .roux-panel::before, .roux-skel { animation: none; }
  .roux-cursorglow { display: none; }
}
