:root {
  --accent: #087F8C;
  --accent-hover: #086B75;
  --accent-soft: #DDF5F1;
  --accent-ink: #075E66;
  --ink: #20243A;
  --ink-2: #4B5268;
  --muted: #737B91;
  --line: #E5E5EF;
  --line-strong: #D1D1E1;
  --ground: #F6F5FB;
  --surface: #FFFFFF;
  --surface-2: #F0F6F7;
  --media: #F1F0FA;
  --star: #E28B16;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: radial-gradient(ellipse at 78% 8%, rgba(255, 222, 204, .42), transparent 32%), var(--ground);
  color: var(--ink);
  font: 15px/1.5 Inter, system-ui, -apple-system, sans-serif;
}
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
button { font: inherit; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.layout { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar {
  flex: 0 0 260px; padding: 20px 16px; background: var(--surface);
  border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 20px;
  background: linear-gradient(180deg, #fff 0%, #FBFAFF 62%, #F3FAF9 100%);
  position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 6px; text-decoration: none; color: var(--ink); }
.brand span { font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 20px; letter-spacing: -0.02em; }
.eyebrow { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
nav .eyebrow { padding: 0 10px 6px; }
.recents { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.recents button {
  width: 100%; text-align: left; padding: 9px 10px; border: 0; border-radius: 8px; background: none;
  color: var(--ink-2); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer;
}
.recents button:hover { background: var(--surface-2); }
.recents button[aria-current="true"] { background: linear-gradient(100deg, #DDF5F1, #EDEBFF); color: var(--accent-ink); font-weight: 600; }
.disclosure { margin: auto 10px 0; font-size: 12px; color: var(--muted); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px;
  padding: 0 14px; border-radius: 10px; font-weight: 600; font-size: 14px; text-decoration: none; cursor: pointer;
}
.btn-outline { border: 1px solid #D5DAE0; background: linear-gradient(110deg, #fff, #F6F5FF); color: var(--ink); box-shadow: 0 4px 12px rgba(41, 50, 86, .05); }
.btn-outline:hover { background: #EEF9F7; border-color: #9DD8D2; }
.btn-primary { border: 0; background: linear-gradient(110deg, #087F8C, #13A69B 58%, #42BBA2); color: #fff; box-shadow: 0 7px 16px rgba(8, 127, 140, .2); }
.btn-primary:hover { background: linear-gradient(110deg, #086B75, #0C938A 58%, #2BA68F); color: #fff; transform: translateY(-1px); }

/* Main column */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.topbar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 32px; background: rgba(255,255,255,.92); border-bottom: 1px solid var(--line); box-shadow: 0 4px 18px rgba(41,50,86,.035); backdrop-filter: blur(14px);
}
.topbar h1 { margin: 0; font: 600 18px "Space Grotesk", sans-serif; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 70%; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  background: linear-gradient(110deg, #E4F6F2, #F2EFFF); font-size: 13px; font-weight: 600; color: #46556A;
}

.thread {
  flex: 1; width: 100%; max-width: 920px; margin: 0 auto; padding: 32px;
  display: flex; flex-direction: column; gap: 28px;
}

.welcome { margin: 8vh auto 0; max-width: 680px; text-align: center; display: flex; flex-direction: column; gap: 14px; align-items: center; padding: 34px 30px 30px; border: 1px solid rgba(255,255,255,.8); border-radius: 30px; background: linear-gradient(140deg, rgba(255,255,255,.91), rgba(251,247,255,.88) 56%, rgba(240,252,249,.9)); box-shadow: 0 24px 70px rgba(57, 59, 108, .09); }
.welcome h2 { margin: 0; font: 700 36px/1.15 "Space Grotesk", sans-serif; letter-spacing: -0.035em; background: linear-gradient(100deg, #27365B, #087F8C 55%, #7D58BD); color: transparent; background-clip: text; }
.welcome p { margin: 0 0 8px; color: var(--ink-2); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.welcome .chips { justify-content: center; }
.chip {
  min-height: 42px; padding: 0 15px; border-radius: 999px; border: 1px solid #E4E1F1;
  background: linear-gradient(110deg, #fff, #F8F6FF); color: #38415B; font-size: 14px; font-weight: 600; cursor: pointer; box-shadow: 0 5px 14px rgba(57,59,108,.045); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.chip:hover { border-color: #76C8BF; color: var(--accent-ink); transform: translateY(-2px); box-shadow: 0 9px 20px rgba(8,127,140,.11); }

.msg-user {
  align-self: flex-end; max-width: min(560px, 85%); background: linear-gradient(120deg, #42518C, #6753A8 58%, #8057A8); color: #fff;
  padding: 14px 18px; border-radius: 18px 18px 4px 18px; white-space: pre-wrap; overflow-wrap: anywhere;
}
.msg-ai { display: flex; gap: 14px; align-items: flex-start; }
.avatar {
  flex: none; width: 32px; height: 32px; border-radius: 10px; background: linear-gradient(140deg, #087F8C, #4DB9A7);
  display: flex; align-items: center; justify-content: center;
}
.msg-ai-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.msg-ai-body p { margin: 0; }
.msg-error { color: #9A1B1B; }

.typing { display: inline-flex; gap: 5px; padding: 8px 0; }
.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite ease-in-out; }
.typing span:nth-child(2) { animation-delay: 0.15s; }
.typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes blink { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }

/* Product cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.card {
  background: linear-gradient(155deg, #fff 0%, #fff 70%, #FBFAFF 100%); border: 1px solid rgba(218,219,235,.9); border-radius: 20px; padding: 16px;
  display: flex; flex-direction: column; gap: 12px; box-shadow: 0 10px 28px rgba(47,52,93,.065); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-3px); border-color: #B8DCD8; box-shadow: 0 18px 36px rgba(47,52,93,.11); }
.card-media {
  position: relative; height: 170px; border-radius: 14px; background: radial-gradient(circle at 82% 18%, #FFF0D9, transparent 32%), linear-gradient(135deg, #F0F3FF, #E6F7F3 60%, #FFF6F1);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.card-media img { max-width: 85%; max-height: 85%; object-fit: contain; mix-blend-mode: multiply; }
.card-media .no-image { color: var(--muted); font-size: 12px; }
.badge {
  position: absolute; top: 10px; left: 10px; padding: 4px 9px; border-radius: 6px;
  background: linear-gradient(110deg, #6553A5, #8A5DB2); color: #fff; font-size: 12px; font-weight: 700; box-shadow: 0 5px 12px rgba(61,44,111,.2);
}
.card-title {
  margin: 0; font-size: 15px; font-weight: 600; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.rating { font-size: 13px; color: var(--ink-2); }
.rating .stars { color: var(--star); margin-right: 4px; }
.price-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price { font: 700 22px "Space Grotesk", sans-serif; }
.price.check { font: 600 14px Inter, sans-serif; color: var(--ink-2); }
.was { font-size: 13px; color: var(--muted); text-decoration: line-through; }
.why { background: linear-gradient(120deg, #F0F8F7, #F5F2FF); border: 1px solid #E9E8F2; border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.reasons { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.reasons li { position: relative; padding-left: 22px; font-size: 13px; line-height: 1.45; }
.reasons li::before {
  content: ""; position: absolute; left: 2px; top: 4px; width: 9px; height: 5px;
  border-left: 2.4px solid var(--accent); border-bottom: 2.4px solid var(--accent); transform: rotate(-45deg);
}
.card .btn-primary { margin-top: auto; }

/* Composer */
.composer-wrap { position: sticky; bottom: 0; padding: 16px 32px 20px; background: linear-gradient(180deg, rgba(246,245,251,.82), #F6F5FB 32%); backdrop-filter: blur(12px); }
.composer {
  max-width: 856px; margin: 0 auto; display: flex; align-items: flex-end; gap: 8px;
  background: rgba(255,255,255,.96); border: 1px solid #D7D5E5; border-radius: 19px;
  padding: 8px 8px 8px 16px; box-shadow: 0 12px 32px rgba(43,48,90,.1);
}
.composer:focus-within { border-color: var(--accent); }
.composer textarea {
  flex: 1; min-height: 28px; max-height: 180px; padding: 10px 0; border: 0; outline: none; resize: none;
  font: 15px/1.4 Inter, sans-serif; color: var(--ink); background: transparent;
}
.send {
  flex: none; width: 44px; height: 44px; border-radius: 14px; border: 0; background: linear-gradient(135deg, #087F8C, #18AA9B 62%, #46B99C);
  color: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 6px 14px rgba(8,127,140,.24); transition: transform .18s ease, filter .18s ease;
}
.send:hover:not(:disabled) { transform: translateY(-1px); filter: saturate(1.15); }
.send:disabled { opacity: 0.5; cursor: default; }
.fineprint { max-width: 856px; margin: 8px auto 0; text-align: center; font-size: 12px; color: var(--muted); }

/* Phones and small tablets */
@media (max-width: 860px) {
  .sidebar { display: none; }
  .topbar { padding: 12px 16px; }
  .topbar h1 { max-width: 100%; }
  .pill { display: none; }
  .thread { padding: 16px; gap: 20px; }
  .welcome { margin-top: 4vh; padding: 26px 18px 22px; border-radius: 24px; }
  .welcome h2 { font-size: 28px; }
  .msg-ai { gap: 10px; }
  .avatar { display: none; }
  .cards { display: flex; overflow-x: auto; gap: 12px; margin: 0 -16px; padding: 0 16px 4px; scroll-snap-type: x mandatory; }
  .card { flex: 0 0 240px; scroll-snap-align: start; }
  .card-media { height: 130px; }
  .composer-wrap { padding: 10px 12px 14px; border-top: 1px solid var(--line); }
  .composer { padding-left: 14px; }
  .fineprint { font-size: 11px; }
}

/* Information page links in the shopping assistant header */
.page-links{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:10px 14px;font-size:13px;font-weight:600}
.page-links a{text-decoration:none;white-space:nowrap}
.fineprint a{white-space:nowrap}
@media(max-width:860px){.page-links{flex:1 0 100%;order:3}}

.brand-mark{display:block;flex:none;width:34px;height:34px}
