/* HOFER Concierge — HOFER brand: navy #344384 primary, accents in palette. */
:root {
  --navy: #344384;
  --navy-700: #2a366b;
  --navy-50: #eef0f8;
  --red:  #d90000;
  --blue: #0099dd;
  --orange: #ee6e00;
  --green: #1d8514;
  --yellow: #ffc800;
  --ink: #0e1230;
  --ink-2: #3b3f55;
  --muted: #6b7080;
  --line: #e6e8f0;
  --bg: #f7f8fc;
  --card: #ffffff;
  --shadow: 0 1px 2px rgba(20,24,60,.06), 0 8px 24px rgba(20,24,60,.08);
  --radius: 14px;
  --radius-sm: 10px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
a { color: var(--navy); }

/* ---------- Top bar ---------- */
.topbar {
  background: var(--navy);
  color: #fff;
  padding: 14px 0;
  position: sticky; top: 0; z-index: 20;
  box-shadow: 0 2px 6px rgba(0,0,0,.12);
}
.topbar .wrap {
  max-width: 1120px; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.brand {
  display: flex; align-items: center; gap: 12px;
}
.brand img { height: 36px; width: auto; filter: brightness(0) invert(1); }
.brand .name { font-weight: 800; font-size: 18px; letter-spacing: .5px; }
.brand .tag { font-size: 12px; opacity: .8; }
.topbar .spacer { flex: 1; }
.store-pill {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18);
  color: #fff;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
}
.store-pill.active { background: var(--yellow); color: var(--ink); border-color: var(--yellow); font-weight: 600; }

/* ---------- Hero ---------- */
.hero {
  background:
    linear-gradient(135deg, rgba(52,67,132,.95), rgba(52,67,132,.78)),
    url('assets/img/hero-shopper.jpg') center/cover;
  color: #fff;
  padding: 56px 0 72px;
}
.hero .wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.hero h1 { font-size: 40px; line-height: 1.1; margin: 0 0 14px; font-weight: 800; letter-spacing: -0.5px; }
.hero h1 .accent { color: var(--yellow); }
.hero p.lead { font-size: 17px; opacity: .92; margin: 0 0 22px; max-width: 520px; }
.hero .badges { display: flex; gap: 8px; flex-wrap: wrap; }
.hero .badge { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.2); padding: 6px 12px; border-radius: 999px; font-size: 12px; }

.hero .preview {
  background: #fff; color: var(--ink); border-radius: 18px; padding: 18px; box-shadow: var(--shadow);
  max-width: 380px; margin-left: auto; transform: rotate(-1deg);
}
.hero .preview .row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.hero .preview .row .dot { width: 8px; height: 8px; border-radius: 50%; }
.hero .preview .row .dot.r { background: var(--red); }
.hero .preview .row .dot.y { background: var(--yellow); }
.hero .preview .row .dot.g { background: var(--green); }
.hero .preview .pmsg { background: var(--navy-50); padding: 10px 12px; border-radius: 12px; font-size: 14px; margin: 6px 0; }
.hero .preview .pmsg.bot { background: #fff; border: 1px solid var(--line); }
.hero .preview .pmsg strong { color: var(--navy); }
.hero .preview .strip { display: flex; gap: 6px; margin-top: 10px; }
.hero .preview .strip > div { flex: 1; height: 56px; border-radius: 8px; background-size: cover; background-position: center; }

/* ---------- Layout ---------- */
.section { max-width: 1120px; margin: 0 auto; padding: 56px 20px; }
.section h2 { font-size: 26px; margin: 0 0 8px; }
.section .lede { color: var(--muted); margin: 0 0 28px; max-width: 720px; }
.grid-2 { display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: start; }

/* ---------- Concierge card ---------- */
.concierge {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex; flex-direction: column;
  height: 620px;
}
.concierge-head {
  padding: 14px 18px; background: var(--navy); color: #fff;
  display: flex; align-items: center; gap: 12px;
}
.concierge-head img { width: 32px; height: 32px; filter: brightness(0) invert(1); }
.concierge-head .title { font-weight: 700; }
.concierge-head .sub { font-size: 12px; opacity: .85; }
.concierge-head .live { margin-left: auto; font-size: 12px; display:flex; align-items:center; gap:6px; }
.concierge-head .live::before { content:''; width: 8px; height: 8px; border-radius: 50%; background: #2ecc71; box-shadow: 0 0 0 4px rgba(46,204,113,.25); }

#chat { flex: 1; overflow-y: auto; padding: 18px; background: linear-gradient(180deg, #fafbff 0%, #f4f6fc 100%); }

.msg { display: flex; gap: 10px; margin-bottom: 14px; }
.msg-bot { align-items: flex-start; }
.msg-user { justify-content: flex-end; }
.avatar {
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 700;
  flex-shrink: 0;
}
.avatar-bot { background: #fff; border: 1px solid var(--line); overflow: hidden; }
.avatar-bot img { width: 100%; height: 100%; object-fit: contain; padding: 3px; }
.avatar-user { background: var(--yellow); color: var(--ink); }

.bubble {
  max-width: 78%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 14px;
  font-size: 15px;
  box-shadow: 0 1px 0 rgba(20,24,60,.04);
}
.msg-user .bubble { background: var(--navy); color: #fff; border-color: var(--navy); }
.bubble strong { color: var(--navy); font-weight: 700; }
.msg-user .bubble strong { color: var(--yellow); }
.typing .dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--muted); margin: 0 2px; animation: bob 1.2s infinite;
}
.typing .dot:nth-child(2){ animation-delay: .15s; }
.typing .dot:nth-child(3){ animation-delay: .3s; }
@keyframes bob { 0%,80%,100%{transform:translateY(0);opacity:.5} 40%{transform:translateY(-4px);opacity:1} }

/* ---------- Composer ---------- */
.composer { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: #fff; }
.composer input {
  flex: 1; resize: none; border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 14px; font: inherit; outline: none;
}
.composer input:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(52,67,132,.15); }
.composer button {
  background: var(--navy); color: #fff; border: 0; border-radius: 12px;
  padding: 0 18px; font-weight: 700; cursor: pointer; font-size: 15px;
}
.composer button:hover { background: var(--navy-700); }

.examples { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 12px 10px; background: #fff; }
.example-chip {
  background: var(--navy-50); color: var(--navy);
  border: 1px solid #d8dcec; border-radius: 999px;
  padding: 6px 12px; font-size: 13px; cursor: pointer; font-weight: 500;
}
.example-chip:hover { background: var(--navy); color: #fff; border-color: var(--navy); }

.suggest-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.suggest-row .example-chip { background: var(--yellow); color: var(--ink); border-color: var(--yellow); }

/* ---------- Offer cards in chat ---------- */
.card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.offer-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.offer-img { height: 90px; background-size: cover; background-position: center; background-color: #eef0f8; }
.offer-body { padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.offer-head { display: flex; justify-content: space-between; gap: 8px; align-items: start; }
.offer-head h4 { font-size: 13px; margin: 0; font-weight: 600; line-height: 1.25; }
.price { display: flex; gap: 6px; align-items: baseline; flex-shrink: 0; }
.price .now { color: var(--red); font-weight: 800; font-size: 14px; }
.price .was { color: var(--muted); text-decoration: line-through; font-size: 11px; }
.price .save { background: var(--red); color: #fff; padding: 1px 5px; border-radius: 4px; font-size: 10px; font-weight: 700; }
.offer-blurb { font-size: 11px; color: var(--muted); margin: 0; line-height: 1.4; }
.offer-meta { display: flex; gap: 4px; flex-wrap: wrap; }
.meta-pill { background: var(--navy-50); color: var(--navy); font-size: 10px; padding: 2px 6px; border-radius: 4px; font-weight: 600; }
.meta-pill.meta-aisle { background: #fff7e6; color: #8a5a00; }
.meta-pill.meta-low { background: #fdecec; color: var(--red); }
.offer-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 2px; }
.chips { display: flex; gap: 4px; }
.chip { background: #eaffea; color: var(--green); font-size: 10px; padding: 2px 6px; border-radius: 4px; font-weight: 600; text-transform: lowercase; }
.btn-add { background: var(--navy); color: #fff; border: 0; border-radius: 6px; padding: 4px 10px; font-size: 12px; font-weight: 700; cursor: pointer; }
.btn-add:hover { background: var(--navy-700); }
.more { font-size: 12px; color: var(--muted); margin: 6px 0 0; }

/* ---------- Side panel: store + features ---------- */
.side .card {
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  padding: 18px; box-shadow: var(--shadow); margin-bottom: 16px;
}
.side h3 { margin: 0 0 8px; font-size: 16px; }
.side .sub { color: var(--muted); font-size: 13px; margin: 0 0 12px; }
.feat-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.feat-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.feat-list li .ico {
  width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0;
  display: grid; place-items: center; color: #fff; font-weight: 700;
}
.ico-navy { background: var(--navy); }
.ico-red  { background: var(--red); }
.ico-blue { background: var(--blue); }
.ico-green{ background: var(--green); }
.ico-orange{ background: var(--orange); }
.feat-list li strong { color: var(--ink); display: block; font-size: 14px; }
.feat-list li span { color: var(--muted); font-size: 12.5px; }

/* ---------- Store list / map ---------- */
.store-list { display: flex; flex-direction: column; gap: 8px; }
.store-row {
  display: flex; justify-content: space-between; align-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 12px; cursor: pointer; text-align: left; width: 100%;
  font: inherit;
}
.store-row:hover { border-color: var(--navy); }
.store-row.active { border-color: var(--navy); background: var(--navy-50); }
.store-row-name { font-weight: 600; font-size: 14px; }
.store-row-addr { color: var(--muted); font-size: 12px; }
.store-row-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot-on { background: var(--green); }
.dot-off { background: var(--muted); }
.dist { font-weight: 600; color: var(--ink); }

.map { margin-top: 12px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #f0f3fb; }
.map-canvas { position: relative; height: 160px; background:
  linear-gradient(135deg, #dde3f3 0%, #c9d3ee 100%);
}
.map-canvas::before {
  content:''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(52,67,132,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(52,67,132,.08) 1px, transparent 1px);
  background-size: 24px 24px;
}
.pin {
  position: absolute; transform: translate(-50%, -100%);
  width: 18px; height: 18px; border-radius: 50% 50% 50% 0;
  background: var(--green); border: 2px solid #fff;
  transform-origin: center; box-shadow: 0 2px 4px rgba(0,0,0,.2);
  display: flex; align-items: flex-end; justify-content: center;
}
.pin span {
  position: absolute; top: 100%; margin-top: 4px;
  background: #fff; border: 1px solid var(--line); padding: 1px 5px;
  border-radius: 4px; font-size: 10px; color: var(--ink); white-space: nowrap;
}
.pin-off { background: var(--muted); }
.pin-default { background: var(--red); width: 22px; height: 22px; }
.map-legend { font-size: 11px; color: var(--muted); padding: 6px 10px; background: #fff; border-top: 1px solid var(--line); }

.hours-card { background: var(--navy); color: #fff; border-radius: 12px; padding: 14px; }
.hours-store { font-weight: 700; }
.hours-when { font-size: 13px; opacity: .9; margin: 4px 0; }
.hours-addr { font-size: 12px; opacity: .75; }

/* ---------- Footer ---------- */
.footer {
  background: #0e1230; color: #cfd2e5; padding: 32px 20px; text-align: center;
}
.footer small { color: #8a90ad; }
.footer .credit { display: block; margin-top: 4px; font-size: 13px; color: #cfd2e5; }

/* ---------- Cart modal ---------- */
.modal {
  position: fixed; inset: 0; background: rgba(14,18,48,.55);
  display: none; align-items: center; justify-content: center; z-index: 50;
  padding: 20px;
}
.modal.open { display: flex; }
.modal-card {
  background: #fff; border-radius: 16px; max-width: 480px; width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,.3); overflow: hidden;
  animation: pop .25s ease;
}
@keyframes pop { from{transform:scale(.96);opacity:0} to{transform:scale(1);opacity:1} }
.modal-head { padding: 16px 20px; background: var(--navy); color: #fff; display: flex; justify-content: space-between; align-items: center; }
.modal-head h3 { margin: 0; font-size: 16px; }
.modal-head button { background: transparent; border: 0; color: #fff; font-size: 20px; cursor: pointer; line-height: 1; }
.modal-body { padding: 18px 20px; }
.modal-foot { padding: 14px 20px; background: #f7f8fc; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; }
.cart-row { display: flex; justify-content: space-between; font-size: 14px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.cart-row:last-of-type { border-bottom: 0; }
.cart-total { font-weight: 700; padding-top: 10px; }
.cart-save  { color: var(--green); font-size: 13px; }
.btn-primary { background: var(--navy); color: #fff; border: 0; border-radius: 10px; padding: 10px 16px; font-weight: 700; cursor: pointer; }
.btn-primary:hover { background: var(--navy-700); }
.btn-ghost { background: transparent; color: var(--ink-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 16px; cursor: pointer; }
.btn-cart { width: 100%; margin-top: 10px; padding: 12px; font-size: 15px; }

/* ---------- Brand strip ---------- */
.brand-strip {
  display: flex; gap: 18px; align-items: center; justify-content: center;
  padding: 18px 20px; background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.brand-strip .swatch { width: 24px; height: 24px; border-radius: 6px; }
.brand-strip .swatch-label { font-size: 11px; color: var(--muted); font-weight: 600; }

/* ---------- Responsive ---------- */
@media (max-width: 900px){
  .hero { padding: 36px 0 48px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 24px; }
  .hero h1 { font-size: 30px; }
  .hero .preview { margin: 0; transform: none; max-width: 100%; }
  .grid-2 { grid-template-columns: 1fr; }
  .section { padding: 40px 16px; }
  .concierge { height: 560px; }
  .card-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px){
  .topbar .wrap { gap: 10px; }
  .brand .name { font-size: 15px; }
  .store-pill { font-size: 12px; padding: 5px 10px; }
  .concierge { height: 520px; border-radius: 14px; }
  .bubble { max-width: 86%; font-size: 14px; }
  .hero h1 { font-size: 26px; }
  .section h2 { font-size: 22px; }
}
