:root {
  --ink: #10212b;
  --muted: #6d7c83;
  --line: #dce7e6;
  --paper: #f7faf8;
  --card: #ffffff;
  --teal: #0d8b78;
  --teal-dark: #086557;
  --orange: #ee8651;
  --shadow: 0 18px 45px rgba(29, 66, 67, 0.09);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: radial-gradient(circle at 18% 0%, #eff9f5 0, transparent 34rem), var(--paper);
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

button, input { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

.shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }

.topbar { height: 82px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-size: 18px; font-weight: 800; text-decoration: none; letter-spacing: .02em; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; color: white; background: var(--teal); border-radius: 11px 11px 11px 3px; box-shadow: 5px 5px 0 #cbe7df; }
.brand small { margin-left: 3px; color: var(--teal); font-size: 10px; font-weight: 800; letter-spacing: .16em; }
.live-pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 13px; color: var(--teal-dark); background: #e5f5ef; border: 1px solid #c9e9df; border-radius: 99px; font-size: 12px; font-weight: 700; }
.pulse { width: 7px; height: 7px; background: #23b58a; border-radius: 50%; box-shadow: 0 0 0 4px rgba(35, 181, 138, .14); }
#ai-mode-status.ai-active { color: var(--teal); }

.hero { position: relative; padding: 76px 0 58px; }
.hero::after { position: absolute; right: 3%; top: 76px; z-index: -1; width: 260px; height: 260px; content: ""; border: 1px solid #dcebe5; border-radius: 50%; box-shadow: 0 0 0 36px rgba(214, 236, 228, .42), 0 0 0 72px rgba(227, 242, 235, .55); }
.eyebrow, .section-kicker { display: flex; align-items: center; gap: 9px; color: var(--teal); font-size: 11px; font-weight: 800; letter-spacing: .15em; }
.eyebrow span { width: 25px; height: 2px; background: var(--orange); }
h1 { max-width: 760px; margin: 20px 0 17px; font-size: clamp(42px, 6.2vw, 74px); line-height: 1.07; letter-spacing: -.065em; }
h1 em { color: var(--teal); font-style: normal; }
.hero-copy { max-width: 550px; margin: 0 0 32px; color: var(--muted); font-size: 16px; line-height: 1.8; }
.search-form { display: flex; align-items: center; max-width: 770px; padding: 8px 8px 8px 18px; background: var(--card); border: 1px solid #c9deda; border-radius: 15px; box-shadow: var(--shadow); }
.search-icon { margin-right: 12px; color: var(--teal); font-size: 27px; line-height: 1; transform: rotate(-20deg); }
.search-form input { min-width: 0; flex: 1; color: var(--ink); background: transparent; border: 0; outline: 0; font-size: 15px; }
.search-form input::placeholder { color: #9aaba9; }
.search-form button { padding: 13px 18px; color: white; background: var(--teal); border: 0; border-radius: 10px; font-size: 14px; font-weight: 800; transition: background .2s, transform .2s; }
.search-form button:hover { background: var(--teal-dark); transform: translateY(-1px); }
.search-form button span { margin-left: 10px; font-size: 17px; }
.examples { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-top: 20px; }
.examples-label { margin-right: 3px; color: var(--muted); font-size: 12px; }
.example-query { padding: 7px 11px; color: #52726d; background: transparent; border: 1px solid #d1e3de; border-radius: 99px; font-size: 12px; transition: .2s; }
.example-query:hover { color: var(--teal-dark); background: #e5f5ef; border-color: #a6d7c9; }
.hero-footnote { margin-top: 28px; color: #9aaba9; font-size: 11px; }
.hero-footnote span { margin-right: 6px; color: var(--orange); }
.history-row { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-top: 13px; }
.history-list { display: flex; flex-wrap: wrap; gap: 7px; }
.history-empty { color: #a7b5b2; font-size: 12px; }
.history-button { padding: 5px 9px; color: #6e827e; background: #f0f6f3; border: 0; border-radius: 6px; font-size: 11px; }
.history-button:hover { color: var(--teal-dark); background: #e2f2ec; }

.results-section { padding: 42px 0 82px; border-top: 1px solid var(--line); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.section-kicker { margin-bottom: 8px; font-size: 10px; }
h2 { margin: 0; font-size: 27px; letter-spacing: -.04em; }
.search-summary { color: var(--muted); font-size: 13px; }
.conditions { display: flex; flex-wrap: wrap; gap: 8px; min-height: 0; margin-bottom: 20px; }
.condition { padding: 7px 10px; color: var(--teal-dark); background: #e8f6f0; border-radius: 7px; font-size: 12px; font-weight: 700; }
.count-answer { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px 15px; margin: 0 0 18px; padding: 16px 18px; background: linear-gradient(110deg, #173b3d, #0d8b78); border-radius: 12px; color: white; box-shadow: 0 10px 24px rgba(13, 139, 120, .14); }
.count-answer strong { font-size: 20px; letter-spacing: -.03em; }
.count-answer span { color: #cbece3; font-size: 12px; }
.result-tabs { display: inline-flex; gap: 4px; margin-bottom: 16px; padding: 4px; background: #eaf3ef; border-radius: 10px; }
.result-tab { padding: 8px 15px; color: #6d837d; background: transparent; border: 0; border-radius: 7px; font-size: 12px; font-weight: 800; }
.result-tab:hover { color: var(--teal-dark); }
.result-tab.active { color: white; background: var(--teal); box-shadow: 0 4px 10px rgba(13, 139, 120, .18); }
.results-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 20px; padding: 12px 14px; background: #f0f6f3; border: 1px solid #e1ece8; border-radius: 11px; }
.filter-group, .toolbar-right { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.filter-check { display: inline-flex; align-items: center; gap: 6px; color: #4c6b66; font-size: 12px; cursor: pointer; }
.filter-check input { accent-color: var(--teal); }
.budget-control { display: inline-flex; align-items: center; gap: 5px; color: #4c6b66; font-size: 12px; }
.budget-control input { width: 83px; padding: 6px 7px; color: var(--ink); background: white; border: 1px solid #cfe1db; border-radius: 6px; outline: 0; font-size: 12px; }
.budget-control input:focus { border-color: var(--teal); }
#sort-select { padding: 7px 8px; color: #4c6b66; background: white; border: 1px solid #cfe1db; border-radius: 7px; font-size: 12px; }
.outline-button, .compare-button { padding: 8px 11px; color: var(--teal-dark); background: white; border: 1px solid #aad6c8; border-radius: 7px; font-size: 12px; font-weight: 800; }
.outline-button span { display: inline-grid; min-width: 17px; height: 17px; margin-left: 4px; place-items: center; color: white; background: var(--teal); border-radius: 50%; font-size: 10px; }
.compare-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: -7px 0 18px; padding: 11px 13px; background: #173b3d; border-radius: 10px; }
.compare-selected { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: white; font-size: 12px; }
.compare-chip { max-width: 180px; overflow: hidden; padding: 5px 8px; color: #ccebe1; background: rgba(255,255,255,.11); border-radius: 6px; text-overflow: ellipsis; white-space: nowrap; }
.compare-button { color: #173b3d; background: white; border: 0; white-space: nowrap; }
.result-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 17px; }
.all-results, .product-results, .enterprise-results { display: grid; gap: 30px; }
.result-block { display: grid; gap: 13px; }
.result-block-heading { margin: 0; color: var(--ink); font-size: 18px; letter-spacing: -.03em; }
.enterprise-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; }
.enterprise-card { display: flex; min-height: 280px; flex-direction: column; overflow: hidden; background: var(--card); border: 1px solid #e0ebe7; border-radius: 14px; box-shadow: 0 8px 25px rgba(29, 66, 67, .045); transition: transform .2s, box-shadow .2s; }
.enterprise-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.enterprise-logo-wrap { display: grid; place-items: center; height: 115px; padding: 18px; background: #f0f6f3; }
.enterprise-logo { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.enterprise-logo-fallback { display: grid; width: 58px; height: 58px; place-items: center; color: white; background: var(--teal); border-radius: 16px; font-size: 27px; font-weight: 900; }
.enterprise-body { display: flex; flex: 1; flex-direction: column; padding: 16px; }
.enterprise-top, .enterprise-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.enterprise-number { color: var(--orange); font-size: 11px; font-weight: 900; }
.enterprise-category { padding: 5px 7px; color: var(--teal-dark); background: #e8f6f0; border-radius: 5px; font-size: 10px; font-weight: 800; }
.enterprise-name { display: -webkit-box; overflow: hidden; min-height: 44px; margin: 13px 0 8px; color: var(--ink); font-size: 15px; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.enterprise-summary { display: -webkit-box; overflow: hidden; min-height: 42px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.enterprise-meta { margin-top: 12px; color: #78918b; font-size: 11px; }
.enterprise-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 15px; }
.enterprise-actions > * { flex: 1; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 32px; color: var(--muted); font-size: 12px; }
.pagination button { padding: 8px 11px; color: var(--teal-dark); background: white; border: 1px solid #cfe1db; border-radius: 7px; font-size: 12px; }
.pagination button:disabled { cursor: not-allowed; opacity: .42; }
.pagination label { display: inline-flex; align-items: center; gap: 5px; margin-left: 8px; }
.pagination select { padding: 6px; color: var(--teal-dark); background: white; border: 1px solid #cfe1db; border-radius: 6px; }
.product-card { display: flex; min-height: 375px; flex-direction: column; overflow: hidden; background: var(--card); border: 1px solid #e0ebe7; border-radius: 14px; box-shadow: 0 8px 25px rgba(29, 66, 67, .045); transition: transform .2s, box-shadow .2s; }
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.product-image-wrap { position: relative; display: grid; place-items: center; height: 175px; padding: 15px; background: #f0f6f3; }
.product-image { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.card-top { position: absolute; top: 12px; left: 12px; right: 12px; z-index: 1; display: flex; align-items: center; justify-content: space-between; }
.product-number { display: grid; place-items: center; width: 25px; height: 25px; color: white; background: var(--teal); border-radius: 8px; font-size: 11px; font-weight: 800; }
.compare-check { display: inline-flex; align-items: center; gap: 5px; padding: 5px 7px; color: #496a64; background: rgba(255,255,255,.92); border-radius: 6px; font-size: 11px; cursor: pointer; }
.compare-check input { accent-color: var(--teal); }
.product-body { display: flex; flex: 1; flex-direction: column; padding: 16px; }
.product-name { display: -webkit-box; overflow: hidden; min-height: 44px; margin: 0; color: var(--ink); font-size: 14px; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.product-shop { overflow: hidden; margin: 12px 0 0; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.match-reasons { display: flex; flex-wrap: wrap; gap: 5px; min-height: 25px; margin-top: 10px; }
.reason { padding: 4px 6px; color: #628079; background: #f1f7f4; border-radius: 5px; font-size: 10px; }
.product-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 15px; }
.product-price { color: var(--orange); font-size: 18px; font-weight: 900; }
.product-price small { font-size: 11px; }
.stock { padding: 5px 7px; color: var(--teal-dark); background: #e8f6f0; border-radius: 6px; font-size: 11px; font-weight: 700; }
.stock.empty { color: #a36b4f; background: #fff0e9; }
.product-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 16px; }
.detail-link, .inquiry-button { flex: 1; padding: 9px 6px; border-radius: 8px; font-size: 12px; font-weight: 800; text-align: center; text-decoration: none; }
.no-website { flex: 1; padding: 9px 6px; color: #8a9b96; background: #f0f5f2; border-radius: 8px; font-size: 12px; font-weight: 800; text-align: center; }
.detail-link { color: var(--teal-dark); background: #eef8f4; }
.inquiry-button { color: white; background: var(--teal); border: 0; }
.detail-link:hover { background: #dcefe8; }
.inquiry-button:hover { background: var(--teal-dark); }
.empty-state, .loading-state, .error-state { grid-column: 1 / -1; min-height: 250px; display: grid; place-items: center; align-content: center; padding: 40px; color: var(--muted); background: rgba(255,255,255,.6); border: 1px dashed #cbded8; border-radius: 15px; text-align: center; }
.empty-orb { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 14px; color: var(--teal); background: #e4f4ee; border-radius: 50%; font-size: 21px; }
.empty-state h3, .loading-state h3, .error-state h3 { margin: 0 0 7px; color: var(--ink); font-size: 16px; }
.empty-state p, .loading-state p, .error-state p { margin: 0; font-size: 13px; }
.loading-dot { display: inline-block; width: 9px; height: 9px; margin-right: 6px; background: var(--teal); border-radius: 50%; animation: blink 1s infinite alternate; }
@keyframes blink { from { opacity: .3; transform: translateY(2px); } to { opacity: 1; transform: translateY(-2px); } }
.footer { display: flex; justify-content: space-between; padding: 19px 0 25px; color: #9aaba9; border-top: 1px solid var(--line); font-size: 11px; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 3; padding: 13px 16px; color: white; background: #173b3d; border-radius: 10px; box-shadow: var(--shadow); font-size: 13px; opacity: 0; pointer-events: none; transform: translateY(12px); transition: .25s; }
.toast.show { opacity: 1; transform: translateY(0); }
.side-panel { position: fixed; top: 0; right: 0; z-index: 5; width: min(420px, 100%); height: 100vh; padding: 27px; overflow: auto; background: white; box-shadow: -18px 0 45px rgba(29, 66, 67, .14); }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.panel-heading h2 { margin-top: 3px; }
.icon-button { width: 31px; height: 31px; color: var(--muted); background: #f0f6f3; border: 0; border-radius: 50%; font-size: 22px; line-height: 1; }
.panel-note, .panel-empty { color: var(--muted); font-size: 13px; line-height: 1.7; }
.saved-list { display: grid; gap: 9px; margin: 22px 0; }
.saved-item { position: relative; display: grid; gap: 5px; padding: 12px 55px 12px 12px; background: #f3f8f5; border-radius: 9px; }
.saved-item strong { color: var(--ink); font-size: 13px; line-height: 1.4; }
.saved-item span { color: var(--muted); font-size: 11px; }
.remove-button { position: absolute; top: 12px; right: 10px; padding: 4px; color: #ae735a; background: transparent; border: 0; font-size: 11px; }
.primary-wide { width: 100%; padding: 12px; color: white; background: var(--teal); border: 0; border-radius: 8px; font-size: 13px; font-weight: 800; }
.modal { position: fixed; inset: 0; z-index: 6; display: grid; place-items: center; padding: 20px; background: rgba(16, 33, 43, .42); }
.modal-card { width: min(850px, 100%); max-height: calc(100vh - 40px); padding: 25px; overflow: auto; background: white; border-radius: 15px; box-shadow: var(--shadow); }
.compare-table { margin-top: 25px; overflow-x: auto; }
.compare-table table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 12px; }
.compare-table th, .compare-table td { padding: 12px; border-bottom: 1px solid #e4eeeb; text-align: left; vertical-align: top; }
.compare-table th { color: var(--teal-dark); background: #f0f7f3; font-weight: 800; }
.compare-table td { color: var(--muted); }

@media (max-width: 900px) {
  .result-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .enterprise-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero::after { right: -60px; }
}

@media (max-width: 600px) {
  .shell { width: min(100% - 28px, 1180px); }
  .topbar { height: 68px; }
  .brand small, .live-pill { display: none; }
  .hero { padding: 54px 0 44px; }
  .hero::after { top: 25px; right: -150px; width: 220px; height: 220px; }
  h1 { font-size: 45px; }
  .search-form { align-items: stretch; flex-wrap: wrap; padding: 10px; }
  .search-icon { display: none; }
  .search-form input { flex-basis: 100%; padding: 8px 5px 13px; }
  .search-form button { flex: 1; }
  .section-heading { align-items: start; flex-direction: column; }
  .results-toolbar { align-items: stretch; flex-direction: column; }
  .toolbar-right { justify-content: space-between; }
  .result-grid { grid-template-columns: 1fr; }
  .enterprise-grid { grid-template-columns: 1fr; }
  .pagination { flex-wrap: wrap; }
  .product-card { min-height: 0; }
  .footer { gap: 10px; flex-direction: column; }
}
