/* 智能选品导购助手样式（深海星图顶栏 + 清爽白昼推荐卡，桌面与 390/360 手机自适应） */
.guide-trigger-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(251, 207, 116, 0.78);
  background: linear-gradient(135deg, rgba(245, 185, 66, 0.28), rgba(217, 119, 6, 0.36));
  color: #fff2c6;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.22);
  transition: filter 0.16s ease, transform 0.16s ease;
}

.guide-trigger-chip:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.guide-fab-wrap {
  position: fixed;
  right: 18px;
  bottom: 24px;
  z-index: 44;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1.5px solid rgba(246, 205, 120, 0.85);
  background: linear-gradient(135deg, #0c213b 0%, #17385e 100%);
  box-shadow: 0 10px 26px rgba(8, 20, 38, 0.34);
  touch-action: none;
  user-select: none;
  transition: box-shadow 0.18s ease, opacity 0.18s ease, border-radius 0.18s ease;
}

.guide-fab-wrap:hover {
  box-shadow: 0 14px 30px rgba(8, 20, 38, 0.44);
}

.guide-fab-wrap.is-dragging {
  cursor: grabbing;
  opacity: 0.94;
  box-shadow: 0 18px 36px rgba(8, 20, 38, 0.5);
  transition: none;
}

.guide-fab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 11px 0 11px;
  border: 0;
  border-radius: 999px 0 0 999px;
  background: transparent;
  color: #fde69e;
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: grab;
  white-space: nowrap;
}

.guide-fab-wrap.is-dragging .guide-fab {
  cursor: grabbing;
}

.guide-fab-grip {
  font-size: 11px;
  letter-spacing: -2px;
  line-height: 1;
  color: rgba(253, 230, 158, 0.56);
  margin-right: 1px;
}

.guide-fab svg {
  color: #fbbf24;
  flex: 0 0 auto;
}

.guide-fab-dock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 40px;
  padding: 0 4px 0 2px;
  border: 0;
  border-left: 1px solid rgba(253, 230, 158, 0.22);
  border-radius: 0 999px 999px 0;
  background: transparent;
  color: rgba(253, 230, 158, 0.78);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.guide-fab-dock:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff6d6;
}

.guide-fab-wrap.is-docked {
  opacity: 0.88;
}

.guide-fab-wrap.is-docked:hover {
  opacity: 1;
}

.guide-fab-wrap.is-docked[data-side="right"] {
  border-radius: 999px 0 0 999px;
  border-right: 0;
}

.guide-fab-wrap.is-docked[data-side="left"] {
  border-radius: 0 999px 999px 0;
  border-left: 0;
}

.guide-fab-wrap.is-docked .guide-fab-grip,
.guide-fab-wrap.is-docked .guide-fab-text,
.guide-fab-wrap.is-docked .guide-fab-dock {
  display: none;
}

.guide-fab-wrap.is-docked .guide-fab {
  height: 36px;
  padding: 0 10px;
  border-radius: inherit;
}

.guide-dialog {
  position: fixed;
  inset: 0;
  width: min(660px, calc(100% - 32px));
  height: min(88vh, 780px);
  height: min(88dvh, 780px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid #d8e1eb;
  border-radius: 18px;
  background: #f8fafd;
  color: #17263a;
  box-shadow: 0 24px 60px rgba(8, 19, 35, 0.28);
}

.guide-dialog[open] {
  display: flex;
  flex-direction: column;
}

.guide-dialog::backdrop {
  background: rgba(8, 19, 35, 0.58);
}

.guide-head {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  background: #122c49;
  color: #fff;
}

.guide-head h2 {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  font-size: 18px;
  font-weight: 750;
  color: inherit;
}

.guide-head h2:focus {
  outline: none;
}

.guide-close-btn {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 9px;
  border: 1px solid #52657c;
  background: transparent;
  color: inherit;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.guide-close-btn:hover {
  background: #294563;
}

.guide-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px 20px;
  display: grid;
  gap: 12px;
}

.guide-question {
  display: block;
  margin-bottom: 7px;
  font-size: 17px;
  font-weight: 750;
}

.guide-query-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.guide-query-row input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid #bfcfe0;
  border-radius: 9px;
  background: #fff;
  color: #17263a;
  font: inherit;
  font-size: 16px;
}

.guide-ask-btn,
.guide-buy-btn,
.guide-detail-btn,
.guide-more-btn {
  min-height: 42px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #c3d1df;
  border-radius: 9px;
  background: #fff;
  color: #203a58;
  font: inherit;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.guide-ask-btn,
.guide-buy-btn {
  border-color: #183c63;
  background: #183c63;
  color: #fff;
}

.guide-ask-btn:hover,
.guide-buy-btn:hover {
  background: #244e78;
}

.guide-prompt-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.guide-prompt-row button {
  min-height: 34px;
  padding: 0 9px;
  border: 1px solid #d8e1eb;
  border-radius: 999px;
  background: #fff;
  color: #304861;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.guide-prompt-row button:hover,
.guide-detail-btn:hover,
.guide-more-btn:hover {
  background: #eef4fa;
}

.guide-summary {
  margin: 0;
  font-weight: 700;
}

.guide-results {
  display: grid;
  gap: 9px;
}

.guide-results:empty {
  display: none;
}

.guide-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #d8e1eb;
  border-radius: 11px;
  background: #fff;
}

.guide-card-title {
  margin: 3px 0 4px;
  font-size: 14px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.guide-card-shop,
.guide-card-spec,
.guide-source {
  margin: 0;
  color: #536981;
  font-size: 12px;
}

.guide-card-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.guide-card-price {
  display: block;
  color: #1a466e;
  font-size: 19px;
  font-weight: 760;
  font-variant-numeric: tabular-nums;
}

.guide-card-actions {
  display: flex;
  gap: 6px;
}

.guide-more-btn {
  justify-self: center;
}

.guide-more-btn:disabled {
  opacity: 0.55;
  cursor: wait;
}

.guide-dialog [hidden] {
  display: none;
}

@media (max-width: 1280px) {
  .guide-fab-wrap {
    display: none;
  }
}

/* ---------- 两层视图：提问 + 热门精选 / 推荐结果 + 筛选 ---------- */
.guide-view {
  display: grid;
  gap: 14px;
  align-content: start;
}

.guide-view[hidden] {
  display: none;
}

.guide-back-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 36px;
  padding: 0 10px 0 6px;
  border: 1px solid #52657c;
  border-radius: 9px;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
}

.guide-back-btn:hover {
  background: #294563;
}

.guide-link-btn {
  padding: 4px 0;
  border: 0;
  background: none;
  color: #2b5f93;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
}

.guide-link-btn:hover {
  text-decoration: underline;
}

.guide-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.guide-chip-row button,
.guide-empty .guide-prompt-row button {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid #d3dde8;
  border-radius: 999px;
  background: #fff;
  color: #304861;
  font: inherit;
  font-size: 12.5px;
  white-space: nowrap;
  cursor: pointer;
}

.guide-chip-row button:hover {
  background: #eef4fa;
}

.guide-chip-row button[aria-pressed="true"],
.guide-chip-row button[aria-selected="true"] {
  border-color: #183c63;
  background: #183c63;
  color: #fff;
  font-weight: 650;
}

/* 热门精选 */
.guide-hot {
  display: grid;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px dashed #d3dde8;
}

.guide-hot[hidden] {
  display: none;
}

.guide-hot-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.guide-hot-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 750;
}

.guide-hot-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
}

.guide-hot-sold {
  flex: 0 0 auto;
  color: #b45309;
  font-size: 11.5px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.guide-hot-tabs {
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}

.guide-hot-tabs::-webkit-scrollbar {
  display: none;
}

.guide-hot-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.guide-hot-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 9px;
  padding: 10px;
  border: 1px solid #d8e1eb;
  border-radius: 11px;
  background: #fff;
}

.guide-hot-rank {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: #e8eef5;
  color: #44607e;
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.guide-hot-rank.is-top {
  background: linear-gradient(135deg, #f8c55a, #e5951a);
  color: #fff;
}

.guide-hot-text {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.guide-hot-text .guide-card-shop {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guide-hot-title {
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.45;
}

.guide-hot-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 2px;
}

.guide-hot-price {
  color: #1a466e;
  font-size: 16px;
  font-weight: 760;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.guide-hot-price small {
  color: #536981;
  font-size: 11px;
  font-weight: 500;
}

.guide-hot-card .guide-detail-btn,
.guide-hot-card .guide-buy-btn {
  min-height: 32px;
  padding: 0 9px;
  font-size: 12.5px;
}

/* 推荐结果 */
.guide-ask-echo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 11px;
  background: #e9f0f8;
}

.guide-ask-echo-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.guide-ask-echo-text span {
  color: #536981;
  font-size: 12px;
}

.guide-ask-echo-text strong {
  overflow-wrap: anywhere;
  font-size: 15px;
}

.guide-filters {
  display: grid;
  gap: 8px;
}

.guide-filters[hidden] {
  display: none;
}

.guide-filter-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
}

.guide-filter-label {
  padding-top: 7px;
  color: #536981;
  font-size: 12.5px;
  font-weight: 650;
}

.guide-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 4px;
  border-top: 1px solid #e1e8f0;
}

.guide-summary-row .guide-summary {
  padding-top: 8px;
}

.guide-summary-row .guide-link-btn {
  padding-top: 8px;
}

.guide-results-loading,
#guideResultsView.is-loading .guide-results {
  opacity: 0.5;
}

.guide-empty {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px dashed #c9d6e3;
  border-radius: 11px;
  background: #fff;
}

.guide-empty[hidden] {
  display: none;
}

.guide-empty p {
  margin: 0;
  color: #536981;
  font-size: 13px;
}

.guide-empty .guide-prompt-row {
  margin-top: 0;
}

.guide-empty .guide-prompt-row button.is-primary {
  border-color: #183c63;
  background: #183c63;
  color: #fff;
  font-weight: 650;
}

/* 详情弹窗顶部的「返回导购」 */
.modal-head {
  gap: 8px;
}

.modal-head .modal-store-badge {
  min-width: 0;
  margin-right: auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modal-return-btn {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid #183c63;
  border-radius: 8px;
  background: #183c63;
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
}

.modal-return-btn:hover {
  background: #244e78;
}

@media (max-width: 580px) {
  .guide-dialog {
    width: calc(100% - 16px);
    height: calc(100dvh - 24px);
    margin: auto auto 8px;
    border-radius: 16px;
  }

  .guide-head {
    padding: 10px 13px;
  }

  .guide-body {
    padding: 13px;
  }

  .guide-back-btn {
    height: 34px;
  }

  .guide-close-btn {
    width: 34px;
    height: 34px;
  }

  .guide-hot-tabs {
    margin: 0 -13px;
    padding: 0 13px 2px;
  }

  .guide-hot-list {
    grid-template-columns: 1fr;
  }

  .guide-filter-row {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 6px;
  }

  .guide-filter-row .guide-chip-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin: 0 -13px 0 0;
    padding: 0 13px 2px 0;
    scrollbar-width: none;
  }

  .guide-filter-row .guide-chip-row::-webkit-scrollbar {
    display: none;
  }
}
