/* Anhe Core — 前端样式（补充主题之外的组件样式） */

/* ---------- 询盘表单 ---------- */
.anhe-inquiry { position: relative; }

.anhe-inquiry__context {
  background: var(--accent-soft, #eaf1f3);
  border-left: 3px solid var(--accent, #1f4e5f);
  color: var(--accent-ink, #0f3440);
  padding: 0.85rem 1.1rem;
  border-radius: 0 6px 6px 0;
  font-size: 0.9rem;
  margin-bottom: 1.4rem;
  font-weight: 500;
}

.anhe-inquiry__success {
  display: none;
  background: #e8f4ec;
  border-left: 3px solid #2e7d4f;
  color: #1d5233;
  padding: 1rem 1.2rem;
  border-radius: 0 6px 6px 0;
  font-size: 0.92rem;
  margin-bottom: 1.4rem;
}
.anhe-inquiry__success.is-visible { display: block; animation: anheFadeUp .35s ease; }

@keyframes anheFadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* 蜜罐字段：视觉隐藏但对机器人可见 */
.anhe-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  overflow: hidden;
}

.anhe-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.1rem;
}

.anhe-field { display: flex; flex-direction: column; gap: 0.4rem; }
.anhe-field--full { grid-column: 1 / -1; }

.anhe-field label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-3, #33383f);
}
.anhe-field label em { color: #c0392b; font-style: normal; }

.anhe-field input[type="text"],
.anhe-field input[type="email"],
.anhe-field input[type="tel"],
.anhe-field input[type="date"],
.anhe-field select,
.anhe-field textarea {
  border: 1px solid var(--line, #e4e6e9);
  border-radius: 4px;
  padding: 0.72rem 0.85rem;
  font-family: inherit;
  font-size: 0.93rem;
  color: var(--ink, #14161a);
  background: #fff;
  width: 100%;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.anhe-field textarea { resize: vertical; min-height: 118px; }
.anhe-field input:focus,
.anhe-field select:focus,
.anhe-field textarea:focus {
  outline: none;
  border-color: var(--accent-2, #2c6e84);
  box-shadow: 0 0 0 3px rgba(44,110,132,.12);
}
.anhe-field input.is-error,
.anhe-field select.is-error,
.anhe-field textarea.is-error {
  border-color: #c0392b;
  box-shadow: 0 0 0 3px rgba(192,57,43,.1);
}
.anhe-field .anhe-error {
  font-size: 0.78rem;
  color: #c0392b;
  display: none;
}
.anhe-field .anhe-error.is-visible { display: block; }

.anhe-field select {
  appearance: none;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='7' viewBox='0 0 11 7'%3E%3Cpath d='M1 1l4.5 4.5L10 1' stroke='%238a9099' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 0.85rem center;
  padding-right: 2.4em;
}

.anhe-check-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem 1rem;
}
.anhe-field--checks { gap: 0.6rem; }

.anhe-check {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.89rem;
  cursor: pointer;
  text-transform: none !important;
  letter-spacing: 0 !important;
  font-weight: 400 !important;
  color: var(--body, #5b6068) !important;
}
.anhe-check input { width: auto; margin-top: 3px; accent-color: var(--accent, #1f4e5f); }

.anhe-form-foot {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.anhe-form-note { font-size: 0.78rem; color: var(--muted, #8a9099); }

.anhe-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.92em 1.7em;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .25s ease, color .25s ease, transform .25s ease, box-shadow .25s ease;
}
.anhe-btn--primary { background: var(--accent, #1f4e5f); color: #fff; }
.anhe-btn--primary:hover { background: var(--accent-ink, #0f3440); transform: translateY(-2px); box-shadow: 0 8px 22px rgba(20,22,26,.14); }
.anhe-btn[disabled] { opacity: .6; cursor: not-allowed; transform: none; }

.anhe-loading {
  display: inline-block;
  width: 15px; height: 15px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: anheSpin .7s linear infinite;
}
@keyframes anheSpin { to { transform: rotate(360deg); } }

/* ---------- FAQ 手风琴 ---------- */
.anhe-faq { border-top: 1px solid var(--line, #e4e6e9); }
.anhe-faq__item { border-bottom: 1px solid var(--line, #e4e6e9); }

.anhe-faq__q {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.2rem;
  padding: 1.3rem 0;
  background: none;
  border: none;
  text-align: left;
  font-family: var(--font-head, inherit);
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--ink, #14161a);
  line-height: 1.45;
  cursor: pointer;
  transition: color .22s ease;
}
.anhe-faq__q:hover { color: var(--accent, #1f4e5f); }

.anhe-faq__pm {
  flex: none;
  width: 22px; height: 22px;
  position: relative;
  margin-top: 2px;
}
.anhe-faq__pm::before,
.anhe-faq__pm::after {
  content: "";
  position: absolute;
  background: var(--accent, #1f4e5f);
  transition: transform .28s ease, opacity .28s ease;
}
.anhe-faq__pm::before { top: 10px; left: 3px; width: 16px; height: 2px; }
.anhe-faq__pm::after { left: 10px; top: 3px; width: 2px; height: 16px; }

.anhe-faq__item.is-open .anhe-faq__pm::after { transform: rotate(90deg); opacity: 0; }
.anhe-faq__item.is-open .anhe-faq__q { color: var(--accent, #1f4e5f); }

.anhe-faq__a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .32s ease;
}
.anhe-faq__item.is-open .anhe-faq__a { grid-template-rows: 1fr; }
.anhe-faq__a > div { overflow: hidden; }
.anhe-faq__a p { padding-bottom: 1.4rem; font-size: 0.95rem; margin: 0; max-width: 76ch; }

/* ---------- AJAX 产品筛选 ---------- */
.anhe-filter-form .anhe-check { padding: 0.15rem 0; }
.anhe-empty {
  grid-column: 1 / -1;
  padding: 2.4rem 1.4rem;
  text-align: center;
  color: var(--muted, #8a9099);
  background: var(--bg-soft, #f7f8f9);
  border-radius: 8px;
}
.anhe-results.is-loading { opacity: .45; pointer-events: none; transition: opacity .2s ease; }

/* ---------- 响应式 ---------- */
@media (max-width: 620px) {
  .anhe-form-grid { grid-template-columns: 1fr; }
  .anhe-check-grid { grid-template-columns: 1fr; }
  .anhe-form-foot { flex-direction: column; align-items: flex-start; }
  .anhe-btn { width: 100%; justify-content: center; }
}
