/* Agency Core — 前台样式 */
:root { --agc-wa: #25d366; --agc-accent: var(--global-palette1, #2f5d50); }

/* Demo 横幅 */
.agc-demo-banner {
  background: #1f1f1f; color: #fff; text-align: center;
  font-size: 13px; line-height: 1.4; padding: 8px 16px; position: relative; z-index: 100;
}

/* 浮动 WhatsApp 按钮 */
.agc-wa-float {
  position: fixed; bottom: 20px; z-index: 999;
  width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--agc-wa); color: #fff; box-shadow: 0 4px 14px rgba(0,0,0,.2);
  transition: transform .15s ease;
}
.agc-wa-float:hover, .agc-wa-float:focus { transform: scale(1.06); color: #fff; }
.agc-wa-float svg { width: 30px; height: 30px; }
.agc-wa-right { right: 20px; }
.agc-wa-left { left: 20px; }
@media (max-width: 767px) {
  .agc-wa-float { bottom: 16px; width: 52px; height: 52px; }
  .agc-wa-right { right: 16px; }
  .agc-wa-left { left: 16px; }
  .agc-wa-float.agc-wa-hide-mobile { display: none; }
}

/* 产品页 / 行动呼吁 WhatsApp 按钮 */
.agc-wa-product-wrap { margin: 12px 0 0; }
.agc-wa-product, .agc-wa-cta-button {
  display: inline-flex !important; align-items: center; gap: 8px;
  background: var(--agc-wa) !important; color: #fff !important; border: 0 !important;
}
.agc-wa-product svg, .agc-wa-cta svg { width: 20px; height: 20px; flex: none; }
.agc-wa-cta:not(.button) svg { vertical-align: -4px; margin-right: 4px; }

/* Demo 结账 */
.agc-demo-checkout-notice { background: #fff4e5; border-left: 4px solid #f0a020; padding: 10px 12px; font-size: 14px; }
.agc-demo-order { opacity: .7; cursor: not-allowed; white-space: normal; }

/* 页脚公司资料 */
.agc-business p { margin: 0 0 .5em; }
.agc-social { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.agc-concept-label { display: inline-block; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; border: 1px solid currentColor; border-radius: 3px; padding: 1px 6px; }

/* 询价表单 [agc_lead_form] */
.agc-lead-form { max-width: 560px; }
.agc-lead-form .agc-field label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 4px; }
.agc-lead-form input[type=text], .agc-lead-form input[type=url], .agc-lead-form input[type=tel], .agc-lead-form select, .agc-lead-form textarea { width: 100%; }
.agc-lead-form .agc-consent { font-size: .88rem; }
.agc-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.agc-lead-ok { background: #e9f7ef; border-left: 4px solid #1e8e4e; padding: 14px 16px; }
.agc-lead-error { background: #fdecea; border-left: 4px solid #c0392b; padding: 10px 14px; margin-bottom: 12px; }

/* Shopee 费用计算器 [agc_fee_calculator] */
.agc-calc { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .agc-calc { grid-template-columns: 1.1fr .9fr; } .agc-calc-note { grid-column: 1 / -1; } }
.agc-calc fieldset { border: 1px solid var(--global-palette7, #e5e5e5); border-radius: 12px; padding: 14px 16px; margin: 0 0 16px; }
.agc-calc legend { font-weight: 700; padding: 0 6px; }
.agc-calc legend small { font-weight: 400; opacity: .7; }
.agc-calc-field { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 8px 0; }
.agc-calc-field label { font-size: .9rem; flex: 1; }
.agc-calc-input { display: flex; align-items: center; gap: 4px; }
.agc-calc-input input { width: 110px; text-align: right; }
.agc-calc-result { position: sticky; top: 20px; align-self: start; background: var(--global-palette8, #f7f7f7); border-radius: 12px; padding: 18px; }
.agc-calc-result table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.agc-calc-result th, .agc-calc-result td { padding: 8px 6px; border-bottom: 1px solid var(--global-palette7, #e5e5e5); text-align: right; }
.agc-calc-result tbody th { text-align: left; font-weight: 500; }
.agc-calc-big { font-size: 1.05rem; margin-top: 14px; }
.agc-calc-big strong { color: var(--global-palette1); font-size: 1.2em; }
.agc-calc-note { font-size: .82rem; opacity: .8; }

/* 公告栏 */
.agc-announcement { background: var(--agc-accent, var(--global-palette1)); color: #fff; text-align: center; font-size: 13px; letter-spacing: .02em; padding: 9px 16px; }
.agc-announcement a { color: inherit; text-decoration: none; }

/* 信任标志 */
.agc-icon { flex: none; }
.agc-trust-bar { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.agc-trust-bar li { display: flex; gap: 12px; align-items: center; }
.agc-trust-bar li .agc-icon { width: 30px; height: 30px; color: var(--global-palette1); }
.agc-trust-bar strong { display: block; font-size: .95rem; line-height: 1.3; }
.agc-trust-bar small { display: block; font-size: .82rem; opacity: .7; }
@media (max-width: 900px) { .agc-trust-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.agc-product-trust { list-style: none; margin: 18px 0 0; padding: 14px 0 0; border-top: 1px solid var(--global-palette7, #eee); display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; font-size: .88rem; }
.agc-product-trust li { display: flex; gap: 8px; align-items: center; }
.agc-product-trust .agc-icon { width: 20px; height: 20px; color: var(--global-palette1); }

/* 免运进度条 */
.agc-fs-bar { background: var(--global-palette8, #f6f6f6); border-radius: 10px; padding: 12px 14px; margin: 0 0 16px; font-size: .9rem; }
.agc-fs-bar.agc-fs-empty { display: none; }
.agc-fs-bar p { margin: 0 0 8px; }
.agc-fs-track { height: 6px; background: rgba(0,0,0,.08); border-radius: 99px; overflow: hidden; }
.agc-fs-track span { display: block; height: 100%; background: var(--global-palette1); border-radius: 99px; transition: width .4s; }
.agc-fs-done .agc-fs-track span { background: #1e8e4e; }
.agc-fs-row td { padding: 0 !important; border: 0 !important; }

/* 手机版固定加入购物车 */
.agc-sticky-atc { position: fixed; left: 0; right: 0; bottom: 0; z-index: 998; display: none; align-items: center; gap: 12px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: #fff; box-shadow: 0 -4px 18px rgba(0,0,0,.1); transform: translateY(110%); transition: transform .25s ease; }
.agc-sticky-atc.is-visible { transform: translateY(0); }
.agc-sticky-atc-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.agc-sticky-atc-title { font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agc-sticky-atc-price { font-weight: 700; font-size: .95rem; }
.agc-sticky-atc .button { white-space: nowrap; }
@media (max-width: 767px) { .agc-sticky-atc { display: flex; } body.single-product .agc-wa-float { bottom: 84px; } }

/* AI 客服聊天视窗（左下角，不挡 WhatsApp 按钮） */
.agc-ai-chat { position: fixed; left: 20px; bottom: 20px; z-index: 999; font-size: 15px; }
.agc-ai-toggle { display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 999px; padding: 12px 18px; background: var(--global-palette3, #1f1f1f); color: #fff; box-shadow: 0 6px 20px rgba(0,0,0,.18); cursor: pointer; font-weight: 600; }
.agc-ai-chat.is-open .agc-ai-toggle { display: none; }
.agc-ai-panel { width: min(370px, calc(100vw - 32px)); height: min(540px, calc(100vh - 120px)); background: #fff; border-radius: 16px; box-shadow: 0 12px 40px rgba(0,0,0,.22); display: flex; flex-direction: column; overflow: hidden; }
.agc-ai-panel[hidden] { display: none; }
.agc-ai-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; background: var(--global-palette3, #1f1f1f); color: #fff; }
.agc-ai-close { background: none; border: 0; color: #fff; font-size: 24px; line-height: 1; cursor: pointer; padding: 0 4px; }
.agc-ai-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; background: var(--global-palette8, #f6f6f6); }
.agc-ai-msg { max-width: 85%; padding: 9px 12px; border-radius: 14px; line-height: 1.45; white-space: pre-wrap; word-wrap: break-word; }
.agc-ai-assistant { background: #fff; align-self: flex-start; border-bottom-left-radius: 4px; }
.agc-ai-user { background: var(--global-palette1, #2f5d50); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.agc-ai-typing { opacity: .6; }
.agc-ai-wa { align-self: flex-start; font-weight: 600; font-size: .9rem; }
.agc-ai-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid #eee; }
.agc-ai-form textarea { flex: 1; resize: none; border-radius: 10px; padding: 9px 10px; font: inherit; min-height: 40px; max-height: 120px; }
.agc-ai-send { border: 0; border-radius: 10px; width: 44px; background: var(--global-palette1, #2f5d50); color: #fff; cursor: pointer; }
.agc-ai-note { margin: 0; padding: 0 12px 10px; font-size: 11px; opacity: .6; }
@media (max-width: 767px) { .agc-ai-chat { left: 16px; bottom: 16px; } .agc-ai-toggle span { display: none; } .agc-ai-toggle { padding: 14px; } .agc-ai-chat.is-open { left: 8px; right: 8px; bottom: 8px; } .agc-ai-panel { width: 100%; height: min(75vh, 560px); } }
