/* ═══════════════════════════════════════════════════════════════
   ShopBot — Shop Info  |  style.css
   ═══════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; font-family: 'Inter', sans-serif; color: #1a1a2e; overflow: hidden; background: #fff; }

/* ── App ─────────────────────────────────────────────────────── */
.app { display: flex; flex-direction: column; height: 100vh; }

/* ── Header ─────────────────────────────────────────────────── */
.header {
  height: 64px; background: #7c6fcd; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0; box-shadow: 0 2px 16px rgba(124,111,205,.45); z-index: 20;
}
.header-left  { display: flex; align-items: center; gap: 12px; }
.header-right { display: flex; align-items: center; gap: 12px; }
.bot-logo-icon { width: 44px; height: 44px; background: rgba(255,255,255,.2); border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.header-title { font-size: 18px; font-weight: 700; color: #fff; line-height: 1.1; }
.header-sub   { font-size: 11px; color: rgba(255,255,255,.72); margin-top: 1px; }
.header-badge { display: none !important; }
.header-avatar { display: none !important; }

/* Cart badge button in header */
.cart-badge-btn {
  display: none; align-items: center; gap: 6px;
  background: rgba(255,255,255,.22); color: #fff;
  font-size: 13px; font-weight: 600; padding: 6px 14px;
  border-radius: 20px; border: none; cursor: pointer;
  transition: background .2s;
}
.cart-badge-btn:hover { background: rgba(255,255,255,.35); }
.cart-badge-btn span  { background: #f472b6; border-radius: 10px; padding: 1px 7px; font-size: 11px; }

/* ── Chat wrapper ────────────────────────────────────────────── */
.chat-wrapper { flex: 1; position: relative; overflow: hidden; min-height: 0; }
.bg-illustration { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-52%); pointer-events: none; opacity: .3; z-index: 0; user-select: none; }
.chat-messages { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; padding: 28px 24px 20px; display: flex; flex-direction: column; z-index: 1; scroll-behavior: smooth; }
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-thumb { background: #e0d9f0; border-radius: 2px; }

/* ── Message rows ────────────────────────────────────────────── */
.msg-row { display: flex; flex-direction: row; align-items: flex-end; gap: 10px; width: 100%; margin-bottom: 18px; opacity: 0; transform: translateY(14px); animation: msgIn .38s cubic-bezier(.22,.68,0,1.2) forwards; }
.msg-row.user { flex-direction: row-reverse; }
@keyframes msgIn { to { opacity: 1; transform: translateY(0); } }

.msg-avatar { width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; align-self: flex-end; display: flex; align-items: center; justify-content: center; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,.1); }
.msg-avatar.bot-av  { background: #fff; border: 1.5px solid #e8e0f5; }
.msg-avatar.user-av { background: #ede9fa; color: #7c6fcd; }
.bot-av-svg { width: 26px; height: 26px; }

.msg-content { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; max-width: 72%; }
.msg-row.user .msg-content { align-items: flex-end; }

.msg-bubble { display: inline-block; max-width: 100%; min-width: 44px; padding: 12px 16px; font-size: 14px; line-height: 1.68; white-space: normal; word-break: break-word; overflow-wrap: break-word; text-align: left; transition: box-shadow .2s; }
.bot-bubble  { background: #fff; color: #1a1a2e; border: 1px solid #eae4f8; border-radius: 4px 18px 18px 18px; box-shadow: 0 2px 10px rgba(124,111,205,.1); }
.user-bubble { background: #7c6fcd; color: #fff; border: none; border-radius: 18px 4px 18px 18px; box-shadow: 0 4px 14px rgba(124,111,205,.38); }
.msg-time { font-size: 10px; color: #b8b0d0; margin-top: 5px; padding: 0 3px; align-self: flex-end; }
.msg-row:not(.user) .msg-time { align-self: flex-start; }

/* Markdown */
.bot-bubble strong { font-weight: 600; color: #5b4fcf; }
.bot-bubble em     { font-style: italic; }
.bot-bubble ul     { padding-left: 20px; margin: 6px 0; }
.bot-bubble li     { margin: 0; line-height: 1.55; padding: 3px 0; }
.err-msg           { color: #e74c3c; font-size: 13px; }

/* Typing dots */
.typing-dots { display: flex; gap: 5px; align-items: center; padding: 3px 0; }
.typing-dot  { width: 7px; height: 7px; background: #c4b5f5; border-radius: 50%; animation: dotBounce 1.4s infinite; }
.typing-dot:nth-child(2) { animation-delay: .2s; }
.typing-dot:nth-child(3) { animation-delay: .4s; }
@keyframes dotBounce { 0%,60%,100% { transform: translateY(0); } 30% { transform: translateY(-7px); } }

/* Stream cursor */
.stream-cursor { display: inline-block; width: 2px; height: 1em; background: #7c6fcd; vertical-align: text-bottom; margin-left: 2px; border-radius: 1px; animation: blink .5s steps(1) infinite; }
@keyframes blink { 0%,100% { opacity:1; } 50% { opacity:0; } }

/* ═══════════════════════════════════════════════════════════════
   PRODUCT CAROUSEL  — real images + size selector
   ═══════════════════════════════════════════════════════════════ */
.product-carousel-wrapper {
  display: block;
  background: #fff;
  border: 1px solid #eae4f8;
  border-radius: 18px;
  padding: 14px;
  /* Wide enough to show 4 cards + gaps */
  width: min(900px, calc(100vw - 80px));
  box-shadow: 0 4px 20px rgba(124,111,205,.14);
  margin-top: 10px;
  opacity: 0;
  transform: translateY(10px);
  animation: msgIn .4s cubic-bezier(.22,.68,0,1.2) .05s forwards;
}
.carousel-controls { display: flex; justify-content: flex-end; gap: 8px; margin-bottom: 10px; }
.result-section-title {
  font-size: 12px; font-weight: 800; color: #1a1a2e;
  text-transform: uppercase; letter-spacing: 0;
  margin-bottom: 10px;
}
.carousel-ctrl-btn { width: 30px; height: 30px; border: 1px solid #eae4f8; background: #faf8ff; cursor: pointer; color: #7c6fcd; border-radius: 8px; display: flex; align-items: center; justify-content: center; transition: all .15s; }
.carousel-ctrl-btn:hover { background: #7c6fcd; color: #fff; border-color: #7c6fcd; }
.carousel-count {
  font-size: 11px; color: #a99bcf; margin-bottom: 10px;
  text-align: right; padding-right: 4px;
}
.product-carousel {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-behavior: smooth;
  /* Snap to 4-card groups */
  scroll-snap-type: x mandatory;
}
.product-card { scroll-snap-align: start; }
.product-carousel::-webkit-scrollbar { height: 3px; }
.product-carousel::-webkit-scrollbar-thumb { background: #c4b5f5; border-radius: 2px; }

/* Product card */
.product-card {
  flex-shrink: 0;
  /* Exactly 4 cards visible: (wrapper - padding - 3 gaps) / 4 */
  width: calc((100% - 42px) / 4);
  min-width: 175px;
  max-width: 220px;
  background: #fff;
  border: 1px solid #eae4f8;
  border-radius: 14px;
  overflow: hidden;
  cursor: default;
  opacity: 0;
  transform: translateY(16px) scale(.97);
  animation: cardIn .42s cubic-bezier(.22,.68,0,1.15) forwards;
  transition: transform .22s, box-shadow .22s;
}
.product-card:hover { transform: translateY(-4px) scale(1.01); box-shadow: 0 10px 28px rgba(124,111,205,.22); }
@keyframes cardIn { to { opacity: 1; transform: translateY(0) scale(1); } }

/* Image gallery inside card */
.pc-img-gallery {
  position: relative;
  height: 200px;
  background: #f8f6ff;
  overflow: hidden;
}
/* Real image inside gallery */
.pc-main-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity .18s;
}
/* When image fails to load — show fallback emoji centred */
.pc-img-gallery.load-failed::after {
  content: '👗';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px;
  background: #f0edf8;
}
/* .pc-main-img replaced by background-image on .pc-img-gallery */
.pc-img-fallback {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 60px; background: #f0edf8;
}
.pc-img-prev, .pc-img-next { position: absolute; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; background: rgba(255,255,255,.85); border: none; border-radius: 50%; cursor: pointer; font-size: 15px; display: flex; align-items: center; justify-content: center; color: #7c6fcd; opacity: 0; transition: opacity .2s; z-index: 2; }
.pc-img-gallery:hover .pc-img-prev,
.pc-img-gallery:hover .pc-img-next { opacity: 1; }
.pc-img-prev { left: 6px; }
.pc-img-next { right: 6px; }
.pc-img-dots { position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%); display: flex; gap: 4px; }
.pc-dot { width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,.5); transition: background .2s; }
.pc-dot.active { background: #7c6fcd; }

/* Card info */
.pc-info      { padding: 12px 13px 13px; }
.pc-category  { font-size: 10px; color: #a99bcf; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 4px; }
.pc-name      { font-size: 13px; font-weight: 600; line-height: 1.35; color: #1a1a2e; margin-bottom: 5px; }
.pc-attr      { font-size: 11px; color: #7c6fcd; margin-bottom: 2px; }
.pc-price-row { display: flex; align-items: baseline; gap: 7px; margin: 8px 0 10px; flex-wrap: wrap; }
.pc-price     { font-size: 16px; font-weight: 700; color: #1a1a2e; }
.pc-compare   { font-size: 12px; color: #b8b0d0; text-decoration: line-through; }
.pc-discount-tag { font-size: 10px; font-weight: 700; background: #fce7f3; color: #db2777; padding: 2px 7px; border-radius: 4px; }

/* Size selector */
.pc-sizes     { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.pc-size-btn  { padding: 3px 9px; border: 1px solid #ddd8f0; border-radius: 6px; font-size: 11px; font-weight: 500; cursor: pointer; background: #fff; color: #6b5eb8; font-family: 'Inter',sans-serif; transition: all .15s; }
.pc-size-btn:hover    { border-color: #7c6fcd; background: #f5f0ff; }
.pc-size-btn.selected { background: #7c6fcd; color: #fff; border-color: #7c6fcd; }

.pc-buy-btn   { display: block; width: 100%; padding: 9px; background: #7c6fcd; border: none; border-radius: 9px; color: #fff; font-size: 13px; font-weight: 600; cursor: pointer; font-family: 'Inter',sans-serif; transition: background .15s, transform .15s; text-align: center; }
.pc-buy-btn:hover { background: #6b5eb8; transform: scale(1.02); }

/* ── Cart drawer ─────────────────────────────────────────────── */
.cart-drawer { position: fixed; top: 0; right: -400px; width: 380px; height: 100vh; background: #fff; box-shadow: -4px 0 24px rgba(0,0,0,.15); z-index: 999; transition: right .3s cubic-bezier(.22,.68,0,1.2); display: flex; flex-direction: column; }
.cart-drawer.open { right: 0; }
.cart-drawer-inner { display: flex; flex-direction: column; height: 100%; }
.cart-drawer-head  { padding: 20px 20px 16px; border-bottom: 1px solid #eae4f8; display: flex; justify-content: space-between; align-items: center; font-size: 16px; font-weight: 700; }
.cart-drawer-head button { background: none; border: none; font-size: 18px; cursor: pointer; color: #7c6fcd; }
.cart-items-list { flex: 1; overflow-y: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 14px; }
.cart-empty      { text-align: center; color: #b8b0d0; font-size: 14px; padding: 40px 0; }
.cart-item-row   { display: flex; gap: 12px; align-items: flex-start; }
.cart-item-img   { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; border: 1px solid #eae4f8; flex-shrink: 0; }
.cart-item-img-placeholder { width: 64px; height: 64px; border-radius: 8px; background: #f0edf8; display: flex; align-items: center; justify-content: center; font-size: 24px; flex-shrink: 0; }
.cart-item-info  { flex: 1; min-width: 0; }
.cart-item-name  { font-size: 13px; font-weight: 600; line-height: 1.3; margin-bottom: 3px; }
.cart-item-size  { font-size: 11px; color: #7c6fcd; margin-bottom: 3px; }
.cart-item-price { font-size: 13px; color: #5b4fcf; font-weight: 600; }
.cart-item-remove{ background: none; border: none; color: #b8b0d0; font-size: 14px; cursor: pointer; padding: 2px; transition: color .15s; }
.cart-item-remove:hover { color: #e74c3c; }
.cart-footer     { padding: 16px 20px; border-top: 1px solid #eae4f8; }
.cart-total-row  { display: flex; justify-content: space-between; font-size: 15px; margin-bottom: 14px; }
.cart-total-row strong { font-size: 18px; color: #5b4fcf; }
.cart-checkout-btn { width: 100%; padding: 12px; background: #7c6fcd; color: #fff; border: none; border-radius: 12px; font-size: 14px; font-weight: 700; cursor: pointer; font-family: 'Inter',sans-serif; transition: background .15s, transform .1s; }
.cart-checkout-btn:hover { background: #6b5eb8; transform: scale(1.01); }

/* ── Toast ───────────────────────────────────────────────────── */
.shop-toast { position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%) translateY(14px); padding: 11px 22px; border-radius: 24px; font-size: 13px; font-weight: 500; opacity: 0; pointer-events: none; transition: opacity .28s, transform .28s; z-index: 9999; white-space: nowrap; box-shadow: 0 4px 18px rgba(0,0,0,.18); }
.shop-toast.success { background: #1a1a2e; color: #fff; border-left: 3px solid #7c6fcd; }
.shop-toast.warn    { background: #fff8e1; color: #b45309; border-left: 3px solid #f59e0b; }
.shop-toast.info    { background: #eff6ff; color: #1d4ed8; border-left: 3px solid #3b82f6; }
.shop-toast.show    { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Input bar ───────────────────────────────────────────────── */
.input-bar { flex-shrink: 0; padding: 12px 20px 18px; background: #fff; border-top: 1px solid #f0ecfa; z-index: 10; }
.input-wrap { display: flex; align-items: center; gap: 10px; border: 1.5px solid #ddd8f0; border-radius: 32px; padding: 8px 8px 8px 20px; background: #fff; box-shadow: 0 2px 10px rgba(124,111,205,.1); transition: border-color .2s, box-shadow .2s; }
.input-wrap:focus-within { border-color: #7c6fcd; box-shadow: 0 2px 16px rgba(124,111,205,.24); }
.chat-input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; font-size: 14px; font-family: 'Inter',sans-serif; color: #1a1a2e; resize: none; line-height: 1.5; max-height: 120px; overflow-y: auto; }
.chat-input::placeholder { color: #aaa8c0; }
.send-btn { width: 40px; height: 40px; flex-shrink: 0; background: #7c6fcd; border: none; border-radius: 50%; cursor: pointer; color: #fff; display: flex; align-items: center; justify-content: center; transition: background .15s, transform .2s, box-shadow .2s; box-shadow: 0 2px 10px rgba(124,111,205,.35); }
.send-btn:hover    { background: #6b5eb8; transform: scale(1.1); box-shadow: 0 4px 16px rgba(124,111,205,.5); }
.send-btn:disabled { opacity: .4; cursor: not-allowed; transform: none; box-shadow: none; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 700px) {
  .chat-messages { padding: 18px 12px 14px; }
  .msg-content   { max-width: 85%; }
  .product-card  { width: 185px; }
  .pc-img-gallery { height: 170px; }
  .cart-drawer   { width: 100vw; right: -100vw; }
  .bg-illustration { opacity: .12; }
}

/* ═══════════════════════════════════════════════════════════════
   COMPARE FEATURE
   ═══════════════════════════════════════════════════════════════ */

/* Compare button on product card */
.pc-card-actions { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.compare-btn {
  display: block; width: 100%; padding: 7px;
  background: transparent; border: 1.5px solid #ddd8f0;
  border-radius: 9px; color: #7c6fcd; font-size: 12px; font-weight: 600;
  cursor: pointer; font-family: 'Inter', sans-serif;
  transition: all .15s; text-align: center;
}
.compare-btn:hover    { background: #f5f0ff; border-color: #7c6fcd; }
.compare-btn.comparing{ background: #7c6fcd; color: #fff; border-color: #7c6fcd; }

/* Floating compare bar above input */
.compare-bar {
  display: none; align-items: center; gap: 10px; flex-wrap: wrap;
  background: #fff; border-top: 2px solid #7c6fcd;
  padding: 10px 20px; font-size: 13px;
  box-shadow: 0 -4px 16px rgba(124,111,205,.12);
}
.compare-bar-label { font-weight: 700; color: #5b4fcf; white-space: nowrap; }
.compare-bar-items { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; }
.compare-bar-chip  { background: #f0edf8; color: #5b4fcf; border-radius: 6px; padding: 3px 10px; font-size: 12px; }
.compare-bar-btn   { background: #7c6fcd; color: #fff; border: none; border-radius: 8px; padding: 6px 14px; font-weight: 700; cursor: pointer; font-size: 13px; font-family: 'Inter',sans-serif; transition: background .15s; }
.compare-bar-btn:hover { background: #6b5eb8; }
.compare-bar-hint  { font-size: 12px; color: #a99bcf; }
.compare-bar-clear { background: none; border: none; color: #b8b0d0; font-size: 16px; cursor: pointer; padding: 0 4px; line-height: 1; }
.compare-bar-clear:hover { color: #e74c3c; }

/* Compare table inside chat bubble */
.compare-intro { font-size: 14px; font-weight: 600; color: #5b4fcf; margin-bottom: 12px; }
.compare-note  { font-size: 12px; color: #a99bcf; margin-top: 10px; }
.compare-table-wrap { overflow-x: auto; border-radius: 10px; border: 1px solid #eae4f8; }
.compare-table {
  width: 100%; border-collapse: collapse; font-size: 13px;
  min-width: 420px;
}
.compare-table th, .compare-table td {
  padding: 10px 12px; border-bottom: 1px solid #eae4f8; text-align: left; vertical-align: top;
}
.compare-table thead th { background: #f8f6ff; font-weight: 700; color: #5b4fcf; }
.compare-table tbody tr:hover { background: #faf8ff; }
.compare-table tbody tr:last-child td { border-bottom: none; }
.cmp-label  { color: #6b5eb8; font-weight: 600; white-space: nowrap; }
.cmp-img {
  width: 60px; height: 60px; border-radius: 8px;
  background: #f0edf8 center/cover no-repeat;
  margin-bottom: 6px;
}

/* ═══════════════════════════════════════════════════════════════
   CART IN CHAT
   ═══════════════════════════════════════════════════════════════ */
.cart-chat-header {
  font-size: 15px; font-weight: 700; color: #5b4fcf;
  margin-bottom: 12px; padding-bottom: 10px;
  border-bottom: 1px solid #eae4f8;
}
.cart-chat-items  { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.cart-chat-item   { display: flex; align-items: center; gap: 10px; }
.cci-img {
  width: 52px; height: 52px; border-radius: 8px; flex-shrink: 0;
  background: #f0edf8;
  display: flex; align-items: center; justify-content: center; font-size: 22px;
  border: 1px solid #eae4f8;
  overflow: hidden;
}
.cci-info  { flex: 1; min-width: 0; }
.cci-name  { font-size: 13px; font-weight: 600; line-height: 1.3; margin-bottom: 2px; }
.cci-size  { font-size: 11px; color: #7c6fcd; margin-bottom: 2px; }
.cci-price { font-size: 13px; color: #5b4fcf; font-weight: 700; }
.cci-remove { background: none; border: none; color: #c4b5f5; font-size: 14px; cursor: pointer; padding: 4px; border-radius: 4px; transition: color .15s; }
.cci-remove:hover { color: #e74c3c; }
.cart-chat-total {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-top: 1px solid #eae4f8;
  font-size: 14px; font-weight: 600; color: #1a1a2e; margin-bottom: 12px;
}
.cart-chat-total strong { font-size: 18px; color: #5b4fcf; }
.cart-chat-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.cca-continue {
  flex: 1; padding: 9px 14px; background: #f5f0ff;
  border: 1.5px solid #ddd8f0; border-radius: 10px; color: #5b4fcf;
  font-size: 13px; font-weight: 600; cursor: pointer; font-family: 'Inter',sans-serif;
  transition: all .15s; text-align: center;
}
.cca-continue:hover { background: #ede8fa; }
.cca-checkout {
  flex: 1; padding: 9px 14px; background: #7c6fcd;
  border: none; border-radius: 10px; color: #fff;
  font-size: 13px; font-weight: 700; cursor: pointer; font-family: 'Inter',sans-serif;
  transition: background .15s; text-align: center;
}
.cca-checkout:hover { background: #6b5eb8; }

/* ═══════════════════════════════════════════════════════════════
   SUGGESTION CHIPS after carousel
   ═══════════════════════════════════════════════════════════════ */
.suggestion-chips {
  display: flex; flex-wrap: wrap; gap: 7px;
  margin-top: 10px; padding-top: 10px;
  border-top: 1px solid #eae4f8;
}
.sugg-chip {
  padding: 6px 13px; background: #f5f0ff;
  border: 1px solid #ddd8f0; border-radius: 20px;
  color: #5b4fcf; font-size: 12px; font-weight: 500;
  cursor: pointer; font-family: 'Inter',sans-serif;
  transition: all .15s;
}
.sugg-chip:hover { background: #7c6fcd; color: #fff; border-color: #7c6fcd; }

/* ── Clear cart button ───────────────────────────────────── */
.cca-clear {
  flex: 1; padding: 9px 14px;
  background: #fff0f0; border: 1.5px solid #fecaca;
  border-radius: 10px; color: #dc2626;
  font-size: 13px; font-weight: 600; cursor: pointer;
  font-family: 'Inter', sans-serif; transition: all .15s; text-align: center;
}
.cca-clear:hover { background: #fee2e2; }

/* ═══════════════════════════════════════════════════════════════
   TOP NAV, PANELS, ORDERS, SHIPMENTS, ACCESSORIES
   ═══════════════════════════════════════════════════════════════ */

/* ── Header nav ──────────────────────────────────────────────── */
.header-nav { display: none !important; }  /* hidden - all via chat */
.nav-btn { display: none !important; }

/* ── Panels ──────────────────────────────────────────────────── */
.panel { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-height: 0; }
.panel.hidden { display: none; }

/* ── Panel toolbar ───────────────────────────────────────────── */
.panel-toolbar {
  padding: 14px 20px; background: #fff;
  border-bottom: 1px solid #eae4f8;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-shrink: 0; flex-wrap: wrap;
}
.toolbar-left  { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.toolbar-right { display: flex; align-items: center; gap: 10px; }
.panel-title   { font-size: 17px; font-weight: 700; color: #1a1a2e; white-space: nowrap; }

.filter-select {
  padding: 7px 12px; border: 1.5px solid #ddd8f0; border-radius: 10px;
  font-size: 13px; font-family: 'Inter', sans-serif; color: #1a1a2e;
  background: #fff; cursor: pointer; outline: none;
  transition: border-color .18s;
}
.filter-select:focus { border-color: #7c6fcd; }

/* ── Stats pills ─────────────────────────────────────────────── */
.stat-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.stat-pill {
  padding: 4px 11px; border-radius: 20px; font-size: 11px; font-weight: 600;
  white-space: nowrap;
}
.stat-pill.total     { background: #f0edf8; color: #5b4fcf; }
.stat-pill.delivered { background: #ecfdf5; color: #059669; }
.stat-pill.transit   { background: #eff6ff; color: #1d4ed8; }
.stat-pill.packed    { background: #fff7ed; color: #c2410c; }
.stat-pill.revenue   { background: #fdf4ff; color: #7c3aed; }

/* ── Panel body ──────────────────────────────────────────────── */
.panel-body {
  flex: 1; overflow-y: auto; padding: 20px;
  display: flex; flex-direction: column; gap: 14px;
  background: #f8f6ff;
}
.panel-body::-webkit-scrollbar       { width: 4px; }
.panel-body::-webkit-scrollbar-thumb { background: #ddd8f0; border-radius: 2px; }

/* ── Loading / empty states ──────────────────────────────────── */
.loading-state {
  display: flex; align-items: center; gap: 10px;
  justify-content: center; padding: 60px 20px;
  font-size: 14px; color: #a99bcf;
}
.empty-state {
  text-align: center; padding: 60px 20px; color: #a99bcf;
}
.empty-icon { font-size: 48px; margin-bottom: 10px; }
.empty-state p { font-size: 14px; }
.spinner {
  width: 20px; height: 20px;
  border: 2px solid #ddd8f0; border-top-color: #7c6fcd;
  border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Status badges ───────────────────────────────────────────── */
.order-status-badge {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 700;
}
.status-delivered { background: #ecfdf5; color: #059669; }
.status-transit   { background: #eff6ff; color: #1d4ed8; }
.status-packed    { background: #fff7ed; color: #c2410c; }
.status-default   { background: #f0edf8; color: #5b4fcf; }

/* ── Order card ──────────────────────────────────────────────── */
.order-card {
  background: #fff; border: 1px solid #eae4f8; border-radius: 14px;
  padding: 16px; transition: box-shadow .2s;
}
.order-card:hover { box-shadow: 0 4px 18px rgba(124,111,205,.12); }

.order-card-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 10px; margin-bottom: 10px;
}
.order-id-group  { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.order-meta-right{ display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.order-id     { font-family: 'Inter', sans-serif; font-size: 15px; font-weight: 700; color: #1a1a2e; }
.order-total  { font-size: 15px; font-weight: 700; color: #5b4fcf; }
.order-date   { font-size: 12px; color: #a99bcf; }

.order-customer, .order-carrier {
  font-size: 12px; color: #6b5eb8; margin-bottom: 6px;
}

.order-delete-btn {
  background: none; border: none; cursor: pointer; font-size: 15px;
  color: #c4b5f5; padding: 2px 4px; border-radius: 4px;
  transition: color .15s, background .15s;
}
.order-delete-btn:hover { color: #dc2626; background: #fee2e2; }

/* Order items */
.order-items { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.order-item-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; background: #faf8ff; border-radius: 8px;
  border: 1px solid #eae4f8;
}
.oi-emoji { font-size: 24px; flex-shrink: 0; }
.oi-info  { flex: 1; min-width: 0; }
.oi-name  { font-size: 13px; font-weight: 600; color: #1a1a2e; line-height: 1.3; }
.oi-meta  { font-size: 11px; color: #a99bcf; margin-top: 2px; }
.oi-status { font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 10px; }
.oi-delete-btn {
  background: none; border: none; color: #c4b5f5; cursor: pointer;
  font-size: 13px; padding: 4px; transition: color .15s;
}
.oi-delete-btn:hover { color: #dc2626; }

/* Order timeline */
.order-timeline  { padding-top: 12px; border-top: 1px solid #eae4f8; margin-top: 4px; }
.tl-row          { display: flex; gap: 0; }
.tl-step         { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; position: relative; }
.tl-step::after  { content: ''; position: absolute; top: 8px; left: 50%; width: 100%; height: 2px; background: #eae4f8; z-index: 0; }
.tl-step:last-child::after { display: none; }
.tl-step.done::after { background: #7c6fcd; }
.tl-dot          { width: 16px; height: 16px; border-radius: 50%; background: #eae4f8; z-index: 1; position: relative; border: 2px solid #fff; }
.tl-step.done .tl-dot    { background: #7c6fcd; }
.tl-step.current .tl-dot { background: #f472b6; animation: tpulse 2s infinite; }
@keyframes tpulse { 0%,100%{box-shadow:0 0 0 0 rgba(244,114,182,.4);} 50%{box-shadow:0 0 0 5px rgba(244,114,182,0);} }
.tl-label        { font-size: 9px; color: #a99bcf; text-align: center; line-height: 1.3; }
.tl-label span   { font-size: 8px; }
.tl-step.done .tl-label { color: #7c6fcd; }
.tl-step.current .tl-label { color: #f472b6; }

/* ── Shipment card ───────────────────────────────────────────── */
.shipment-card {
  background: #fff; border: 1px solid #eae4f8; border-radius: 14px;
  padding: 16px; transition: box-shadow .2s;
}
.shipment-card:hover { box-shadow: 0 4px 18px rgba(124,111,205,.12); }
.ship-card-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 10px; margin-bottom: 10px;
}
.ship-id         { font-size: 15px; font-weight: 700; color: #1a1a2e; }
.order-id-ref    { font-size: 12px; color: #a99bcf; }
.ship-head-right { display: flex; align-items: center; gap: 8px; }
.ship-customer, .ship-carrier { font-size: 12px; color: #6b5eb8; margin-bottom: 6px; }
.tracking-no     { font-family: 'Courier New', monospace; font-size: 11px; background: #f0edf8; padding: 1px 6px; border-radius: 4px; }

.delivery-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px; border-radius: 8px; font-size: 12px; font-weight: 600;
  margin: 8px 0; width: 100%;
}
.delivery-badge.delivered { background: #ecfdf5; color: #059669; }
.delivery-badge.transit   { background: #eff6ff; color: #1d4ed8; }

.ship-items { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.ship-item-chip {
  padding: 4px 10px; background: #faf8ff; border: 1px solid #eae4f8;
  border-radius: 20px; font-size: 11px; color: #5b4fcf;
}

/* Checkpoint tracker */
.ship-checkpoints { margin-top: 12px; border-top: 1px solid #eae4f8; padding-top: 12px; }
.cp-label { font-size: 11px; font-weight: 700; color: #a99bcf; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 10px; }
.cp-track { display: flex; flex-direction: column; gap: 0; }
.cp-step  { display: flex; gap: 14px; align-items: flex-start; position: relative; padding-bottom: 14px; }
.cp-step::before {
  content: ''; position: absolute; left: 7px; top: 16px;
  width: 2px; height: calc(100% - 4px); background: #eae4f8; z-index: 0;
}
.cp-step.last::before { display: none; }
.cp-step.done::before { background: #7c6fcd; }
.cp-dot {
  width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0;
  background: #eae4f8; position: relative; z-index: 1; margin-top: 2px;
  border: 2px solid #fff; box-shadow: 0 0 0 1px #eae4f8;
}
.cp-step.done .cp-dot { background: #7c6fcd; box-shadow: 0 0 0 1px #7c6fcd; }
.cp-content   { flex: 1; }
.cp-location  { font-size: 13px; font-weight: 600; color: #1a1a2e; }
.cp-date      { font-size: 11px; color: #a99bcf; margin-top: 2px; }
.cp-status    { font-size: 10px; font-weight: 700; color: #7c6fcd; background: #f0edf8; padding: 2px 7px; border-radius: 4px; }

/* ── Accessory strip (after product carousel) ────────────────── */
.accessory-strip {
  background: linear-gradient(135deg, #fdf4ff 0%, #eff6ff 100%);
  border: 1px solid #e9d5ff; border-radius: 14px;
  padding: 12px 14px; margin-top: 10px;
}
.acc-strip-label {
  font-size: 12px; font-weight: 700; color: #7c3aed;
  margin-bottom: 10px;
}
.acc-strip-items { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.acc-strip-items::-webkit-scrollbar { height: 3px; }
.acc-strip-items::-webkit-scrollbar-thumb { background: #c4b5f5; border-radius: 2px; }

.acc-card {
  flex-shrink: 0; width: 130px;
  background: #fff; border: 1px solid #e9d5ff; border-radius: 10px;
  padding: 10px 10px 8px; position: relative;
  display: flex; flex-direction: column; min-height: 156px;
  transition: transform .18s, box-shadow .18s;
}
.acc-card:hover { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(124,111,205,.2); }
.acc-emoji { font-size: 28px; margin-bottom: 5px; }
.acc-info  { flex: 1; }
.acc-name  { font-size: 11px; font-weight: 600; color: #1a1a2e; line-height: 1.3; margin-bottom: 2px; }
.acc-cat   { font-size: 10px; color: #a99bcf; margin-bottom: 3px; }
.acc-price { font-size: 12px; font-weight: 700; color: #7c3aed; }
.acc-add-btn {
  width: 100%; height: 30px; margin-top: 8px;
  border: none; border-radius: 8px;
  background: #7c6fcd; color: #fff;
  font-size: 11px; font-weight: 700;
  cursor: pointer; font-family: 'Inter', sans-serif;
  transition: background .15s, transform .15s, opacity .15s;
}
.acc-add-btn:hover { background: #6b5eb8; transform: translateY(-1px); }
.acc-add-btn:disabled { opacity: .72; cursor: default; transform: none; }
.acc-tag   {
  position: absolute; top: 6px; right: 6px;
  font-size: 9px; font-weight: 700; padding: 1px 5px; border-radius: 4px;
  background: #fce7f3; color: #db2777;
}

/* ── Mobile responsive for new elements ─────────────────────── */
@media (max-width: 700px) {
  .header-nav .nav-btn { display: none !important; }
  .panel-toolbar       { padding: 10px 14px; }
  .panel-body          { padding: 12px; }
  .order-card, .shipment-card { padding: 12px; }
  .acc-card            { width: 110px; }
  .tl-label            { font-size: 8px; }
}

/* ═══════════════════════════════════════════════════════════════
   ORDER HISTORY IN CHAT
   ═══════════════════════════════════════════════════════════════ */
.oh-header {
  font-size: 15px; font-weight: 700; color: #5b4fcf;
  margin-bottom: 12px; padding-bottom: 10px;
  border-bottom: 1px solid #eae4f8;
}
.oh-cards  { display: flex; flex-direction: column; gap: 12px; }
.oh-footer { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; padding-top: 10px; border-top: 1px solid #eae4f8; }

.oh-order-card {
  background: #faf8ff; border: 1px solid #eae4f8;
  border-radius: 10px; padding: 12px;
}
.oh-order-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 6px;
}
.oh-order-id       { font-size: 13px; font-weight: 700; color: #1a1a2e; }
.oh-order-meta     { font-size: 11px; color: #a99bcf; margin-bottom: 4px; }
.oh-order-tracking { font-size: 11px; color: #6b5eb8; margin-bottom: 6px; }
.oh-order-status   { font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 10px; }
.oh-items  { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }

.oh-item-row {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1px solid #f0edf8;
  border-radius: 8px; padding: 7px 9px;
}
.oh-item-img {
  width: 48px; height: 48px; border-radius: 6px; flex-shrink: 0;
  background: #f0edf8; display: flex; align-items: center;
  justify-content: center; font-size: 20px; overflow: hidden;
}
.oh-item-info  { flex: 1; min-width: 0; }
.oh-item-name  { font-size: 12px; font-weight: 600; line-height: 1.3; color: #1a1a2e; }
.oh-item-meta  { font-size: 11px; color: #a99bcf; margin-top: 2px; }
.oh-item-status {
  display: inline-block; font-size: 9px; font-weight: 700;
  padding: 2px 7px; border-radius: 8px; margin-top: 3px;
}
.status-delivered { background: #ecfdf5; color: #059669; }
.status-transit   { background: #eff6ff; color: #1d4ed8; }
.status-cancelled { background: #fef2f2; color: #dc2626; }

/* Mobile */
@media (max-width: 600px) {
  .oh-item-img { width: 40px; height: 40px; }
  .oh-order-card { padding: 10px; }
}

/* ═══════════════════════════════════════════════════════════════
   FINAL OVERRIDE — hide all header extras, keep only logo + cart
   ═══════════════════════════════════════════════════════════════ */
.header-nav,
.nav-btn,
.header-badge,
.header-avatar,
#panel-orders,
#panel-shipments { display: none !important; }

/* Ensure the chat panel always fills the screen */
#panel-chat { display: flex; flex-direction: column; flex: 1; overflow: hidden; min-height: 0; }
