/* ============================================================
   Vaimi Shop — 电商页专用样式（复用主站品牌变量）
   加载顺序：style.css 之后
   ============================================================ */

/* ------- 店铺顶栏 ------- */
.shop-topbar { background: var(--chimee-primary); color: #fff; font-size: 12px; padding: 8px 0; text-align: center; letter-spacing: .3px; }
.shop-topbar span { opacity: .85; }

/* ------- Hero ------- */
.shop-hero { position: relative; overflow: hidden; background: linear-gradient(135deg, #001060 0%, #0a1f8f 55%, #14299e 100%); color: #fff; padding: 96px 0 84px; }
.shop-hero::after { content: ''; position: absolute; right: -120px; top: -120px; width: 460px; height: 460px; border-radius: 50%; background: radial-gradient(circle, rgba(224,96,16,.28), transparent 70%); pointer-events: none; }
.shop-hero-inner { max-width: 1160px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }
.shop-hero .eyebrow { color: #ffb27a; font-size: 12px; font-weight: 700; letter-spacing: 2.5px; text-transform: uppercase; }
.shop-hero h1 { color: #fff; font-size: clamp(34px, 5vw, 58px); line-height: 1.08; letter-spacing: -1.6px; margin: 14px 0 18px; max-width: 720px; }
.shop-hero p { font-size: 17px; line-height: 1.7; color: rgba(255,255,255,.86); max-width: 620px; margin: 0 0 28px; }
.shop-hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.shop-hero-cta .btn-primary { background: var(--chimee-accent); }
.shop-hero-cta .btn-outline { display: inline-flex; align-items: center; padding: 12px 24px; border: 1px solid rgba(255,255,255,.5); border-radius: 6px; color: #fff; font-weight: 600; font-size: 14px; }
.shop-hero-cta .btn-outline:hover { background: rgba(255,255,255,.12); }
.shop-trust { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 38px; font-size: 13px; color: rgba(255,255,255,.8); }
.shop-trust div { display: flex; align-items: center; gap: 8px; }

/* ------- 产品网格 ------- */
.shop-section { max-width: 1160px; margin: 0 auto; padding: 72px 24px; }
.shop-section-head { margin-bottom: 36px; }
.shop-section-head h2 { font-size: 32px; letter-spacing: -.8px; margin: 0 0 8px; }
.shop-section-head p { color: #667; font-size: 15px; margin: 0; }
.product-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.filter-btn { border: 1px solid var(--border, #e6e8ee); background: #fff; color: #445; font-size: 13px; font-weight: 600; padding: 8px 15px; border-radius: 999px; cursor: pointer; transition: all .15s; }
.filter-btn:hover { border-color: var(--chimee-accent); color: var(--chimee-accent); }
.filter-btn.active { background: var(--chimee-primary); border-color: var(--chimee-primary); color: #fff; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(258px, 1fr)); gap: 24px; }
.product-card { border: 1px solid var(--border, #e6e8ee); border-radius: 12px; overflow: hidden; background: #fff; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.product-card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(0,16,96,.1); }
.product-media { aspect-ratio: 4/3; background: #f4f5f8; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.product-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.product-card:hover .product-media img { transform: scale(1.04); }
.product-body { padding: 18px 18px 20px; display: flex; flex-direction: column; flex: 1; }
.product-tag { align-self: flex-start; font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--chimee-accent); background: rgba(224,96,16,.09); padding: 4px 9px; border-radius: 4px; margin-bottom: 10px; }
.product-name { font-size: 17px; font-weight: 700; color: var(--chimee-primary); margin: 0 0 6px; }
.product-spec { font-size: 13px; color: #667; line-height: 1.55; margin: 0 0 14px; }
.product-price { font-size: 24px; font-weight: 700; color: var(--chimee-primary); margin: auto 0 14px; letter-spacing: -.5px; }
.product-price small { font-size: 12px; font-weight: 500; color: #889; display: block; letter-spacing: 0; }
.product-card .btn { width: 100%; }

/* ------- 结账信任条 ------- */
.checkout-strip { background: #f7f8fb; border-top: 1px solid var(--border, #e6e8ee); border-bottom: 1px solid var(--border, #e6e8ee); }
.checkout-strip-inner { max-width: 1160px; margin: 0 auto; padding: 48px 24px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 30px; }
.checkout-item h4 { font-size: 15px; margin: 0 0 6px; color: var(--chimee-primary); }
.checkout-item p { font-size: 13px; color: #667; line-height: 1.6; margin: 0; }

/* ------- 政策页 ------- */
.policy-wrap { max-width: 820px; margin: 0 auto; padding: 64px 24px 96px; }
.policy-wrap h1 { font-size: 34px; letter-spacing: -1px; margin: 0 0 8px; }
.policy-updated { color: #889; font-size: 13px; margin: 0 0 40px; }
.policy-wrap h2 { font-size: 20px; margin: 34px 0 10px; color: var(--chimee-primary); }
.policy-wrap p, .policy-wrap li { font-size: 15px; line-height: 1.75; color: #445; }
.policy-wrap ul { padding-left: 20px; }
.policy-back { display: inline-block; margin-top: 40px; color: var(--chimee-accent); font-weight: 600; font-size: 14px; }

/* ------- 购物车：徽标 / 加购按钮 ------- */
.cart-link { color: var(--chimee-primary); font-weight: 700; font-size: 14px; text-decoration: none; }
.cart-badge { background: var(--chimee-accent); color: #fff; font-size: 11px; min-width: 18px; height: 18px; line-height: 18px; border-radius: 9px; padding: 0 5px; margin-left: 4px; text-align: center; }
.btn-add { background: #fff !important; color: var(--chimee-primary) !important; border: 1px solid var(--chimee-primary) !important; }
.btn-add:hover { background: rgba(0,16,96,.06) !important; }
.product-actions { display: flex; gap: 9px; margin-top: auto; }
.product-actions .btn { flex: 1; padding-left: 8px; padding-right: 8px; font-size: 13px; }

/* ------- 购物车页 ------- */
.cart-page { max-width: 1100px; margin: 0 auto; padding: 64px 24px 96px; min-height: 60vh; }
.cart-page h1 { font-size: 34px; letter-spacing: -1px; margin: 0 0 32px; }
.cart-empty { background: #f7f8fb; border: 1px solid var(--border, #e6e8ee); border-radius: 12px; padding: 64px 24px; text-align: center; }
.cart-empty p { color: #667; margin: 0 0 20px; }
.cart-row { display: grid; grid-template-columns: 92px 1fr 120px 110px 130px; gap: 16px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--border, #e6e8ee); }
.cart-row-media { width: 92px; height: 68px; background: #f4f5f8; border-radius: 6px; overflow: hidden; }
.cart-row-media img { width: 100%; height: 100%; object-fit: cover; }
.cart-row-info h3 { font-size: 15px; margin: 0 0 4px; color: var(--chimee-primary); }
.cart-unit { font-size: 13px; color: #667; margin: 0; }
.cart-qty { display: inline-flex; align-items: center; border: 1px solid var(--border, #e6e8ee); border-radius: 6px; overflow: hidden; }
.cart-qty button { width: 30px; height: 30px; border: 0; background: #f7f8fb; cursor: pointer; font-size: 16px; }
.cart-qty span { width: 32px; text-align: center; font-size: 14px; }
.cart-line-total { font-weight: 700; font-size: 15px; }
.cart-row-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.cart-mini-buy, .cart-mini-remove { background: none; border: 0; cursor: pointer; font-size: 12px; padding: 0; }
.cart-mini-buy { color: var(--chimee-accent); font-weight: 700; }
.cart-mini-remove { color: #99a; text-decoration: underline; }
.cart-summary { max-width: 380px; margin: 40px 0 0 auto; background: #f7f8fb; border-radius: 12px; padding: 26px; }
.cart-summary-line { display: flex; justify-content: space-between; font-size: 14px; color: #556; padding: 8px 0; }
.cart-summary-line.cart-total { border-top: 1px solid var(--border, #e6e8ee); margin-top: 8px; padding-top: 16px; font-size: 18px; color: var(--chimee-primary); }
.cart-summary .btn { width: 100%; margin-top: 18px; }
.cart-note { font-size: 12px; color: #889; line-height: 1.6; margin: 12px 0 0; }
.cart-continue { display: inline-block; margin-top: 16px; font-size: 13px; color: var(--chimee-accent); text-decoration: none; }

/* 询盘兜底面板：邮件没弹出来 / 用网页版邮箱的买家，从这里把订单发出去 */
.quote-fallback { margin-top: 18px; padding: 16px; background: #fff; border: 1px solid var(--border, #e6e8ee); border-radius: 10px; }
.quote-fallback-lead { margin: 0 0 12px; font-size: 13px; color: #445; line-height: 1.6; }
.quote-fallback-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.quote-fallback-mail { font-size: 13px; font-weight: 600; color: var(--chimee-accent); text-decoration: none; word-break: break-all; }
.quote-fallback-mail:hover { text-decoration: underline; }
/* 询盘表单：买家填姓名邮箱后 POST 到 Web3Forms，不依赖本机邮件客户端 */
.quote-form { margin-top: 4px; }
.quote-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.quote-form-row { display: flex; flex-wrap: wrap; gap: 12px; }
.quote-field { display: block; flex: 1 1 180px; margin-bottom: 12px; font-size: 12px; font-weight: 600; color: #445; }
.quote-optional { font-weight: 400; color: #889; }
.quote-field input, .quote-field textarea { display: block; width: 100%; box-sizing: border-box; margin-top: 5px; padding: 9px 11px; border: 1px solid var(--border, #e6e8ee); border-radius: 8px; background: #fff; color: #223; font: inherit; font-size: 13px; }
.quote-field input:focus, .quote-field textarea:focus { outline: none; border-color: var(--chimee-accent); }
.quote-field textarea { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11px; line-height: 1.6; resize: vertical; }
.quote-submit { width: 100%; margin-top: 4px; }
.quote-submit:disabled { opacity: .6; cursor: not-allowed; }
.quote-status { margin: 10px 0 0; font-size: 12px; line-height: 1.6; padding: 9px 12px; border-radius: 8px; }
.quote-status-ok { background: #eaf7ee; color: #146c34; }
.quote-status-warn { background: #fff6e5; color: #845c00; }
.quote-status-err { background: #fdecec; color: #a4262c; }
.quote-fallback-alt { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; font-size: 12px; color: #889; }
.quote-fallback-alt strong { color: var(--chimee-primary); }
.quote-fallback-copy { border: 1px solid var(--chimee-accent); background: #fff; color: var(--chimee-accent); border-radius: 8px; padding: 8px 14px; font-size: 12px; font-weight: 600; cursor: pointer; }
.quote-fallback-copy:hover { background: rgba(0,16,96,.05); }
.quote-fallback-ref { margin: 12px 0 8px; font-size: 12px; color: #889; line-height: 1.6; }
.quote-fallback-ref strong { color: var(--chimee-primary); font-weight: 600; letter-spacing: .3px; }
.quote-fallback-body { width: 100%; box-sizing: border-box; padding: 12px; border: 1px solid var(--border, #e6e8ee); border-radius: 8px; background: #f7f8fb; color: #556; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11px; line-height: 1.6; resize: vertical; }
.quote-fallback-body:focus { outline: none; border-color: var(--chimee-accent); }
.cart-toast { position: fixed; right: 24px; bottom: 24px; z-index: 9999; background: var(--chimee-primary); color: #fff; padding: 14px 20px; border-radius: 8px; font-size: 14px; box-shadow: 0 12px 32px rgba(0,0,0,.2); }

@media (max-width: 640px) {
  .shop-hero { padding: 64px 0 56px; }
  .shop-trust { gap: 14px; }
  .shop-section { padding: 48px 20px; }
  .cart-page { padding: 40px 16px 72px; }
  .cart-row { grid-template-columns: 72px 1fr; gap: 10px; }
  .cart-row-media { width: 72px; height: 56px; }
  .cart-qty, .cart-line-total, .cart-row-actions { grid-column: 2; }
  .cart-summary { max-width: none; }
}

/* ===== 产品详情弹窗 ===== */
.product-media { display: block; }
.product-name a { color: inherit; text-decoration: none; }
.product-name a:hover { color: var(--chimee-accent, #0a58ff); }
.product-detail-link { display: inline-block; margin-top: 10px; font-size: 13px; font-weight: 600; color: var(--chimee-accent, #0a58ff); text-decoration: none; }
.product-detail-link:hover { text-decoration: underline; }
.v-modal { position: fixed; inset: 0; z-index: 10000; display: none; align-items: center; justify-content: center; padding: 20px; }
.v-modal.open { display: flex; }
.v-modal-backdrop { position: absolute; inset: 0; background: rgba(8, 14, 40, .65); backdrop-filter: blur(3px); }
.v-modal-panel { position: relative; z-index: 1; width: 100%; max-width: 940px; max-height: 90vh; overflow: auto; background: #fff; border-radius: 16px; box-shadow: 0 30px 90px rgba(0, 0, 0, .3); }
.v-modal-close { position: absolute; top: 12px; right: 16px; z-index: 2; width: 38px; height: 38px; border: 0; border-radius: 50%; background: #f0f2f7; color: #334; font-size: 24px; line-height: 1; cursor: pointer; }
.v-modal-close:hover { background: #e2e6f0; }
.v-modal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.v-modal-media { display: flex; align-items: center; justify-content: center; background: #fff; padding: 30px; border-right: 1px solid var(--border, #e6e8ee); }
.v-modal-media img { width: 100%; max-height: 460px; object-fit: contain; }
.v-modal-body { padding: 52px 36px 36px; display: flex; flex-direction: column; }
.v-modal-body h2 { font-size: 26px; margin: 12px 0 16px; line-height: 1.25; }
.v-modal-spec { font-size: 15px; color: #556; line-height: 1.7; margin: 0 0 20px; }
.v-modal-price { font-size: 28px; font-weight: 700; color: var(--chimee-primary, #001060); margin-bottom: 10px; }
.v-modal-meta { font-size: 12px; color: #889; margin-bottom: 24px; }
.v-modal-body .product-actions .btn { padding: 12px 10px; font-size: 14px; }
@media (max-width: 720px) {
  .v-modal-grid { grid-template-columns: 1fr; }
  .v-modal-media { border-right: 0; border-bottom: 1px solid var(--border, #e6e8ee); padding: 20px; }
  .v-modal-body { padding: 28px 22px; }
  .v-modal-body h2 { font-size: 22px; }
}

/* ===== 产品详情：多角度图库 + 规格表 ===== */
.v-modal-media { flex-direction: column; position: relative; gap: 12px; }
.v-modal-media > img#v-modal-img { width: 100%; max-height: 380px; object-fit: contain; }
.v-gallery-nav { display: flex; align-items: center; justify-content: center; gap: 14px; }
.v-gallery-arrow { width: 34px; height: 34px; border: 1px solid var(--border, #dfe2ea); background: #fff; color: #334; border-radius: 50%; font-size: 22px; line-height: 1; cursor: pointer; }
.v-gallery-arrow:hover { background: #f0f2f7; }
.v-gallery-count { font-size: 12px; color: #889; min-width: 40px; text-align: center; }
.v-gallery-thumbs { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.v-gallery-thumb { width: 58px; height: 58px; padding: 2px; border: 2px solid transparent; border-radius: 8px; background: #fafafa; cursor: pointer; }
.v-gallery-thumb img { width: 100%; height: 100%; object-fit: contain; }
.v-gallery-thumb.active { border-color: var(--chimee-accent, #0a58ff); }
.v-gallery-thumb:hover { border-color: #99a; }

.v-spec-block { margin-top: 28px; border-top: 1px solid var(--border, #e6e8ee); padding-top: 20px; }
.v-spec-title { font-size: 16px; font-weight: 700; margin: 0 0 12px; color: var(--chimee-primary, #001060); }
.v-spec-title span { font-size: 12px; font-weight: 500; color: #889; margin-left: 8px; }
.v-spec-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.v-spec-table tr { border-bottom: 1px solid #eef0f4; }
.v-spec-table tr:last-child { border-bottom: 0; }
.v-spec-table th { text-align: left; font-weight: 600; color: #445; padding: 8px 6px; width: 44%; vertical-align: top; }
.v-spec-table th span { display: block; font-size: 10px; font-weight: 400; color: #99a; }
.v-spec-table td { padding: 8px 6px; color: #223; line-height: 1.45; }
.v-spec-note { font-size: 11px; color: #99a; margin: 12px 0 0; line-height: 1.5; }
@media (max-width: 720px) {
  .v-modal-media > img#v-modal-img { max-height: 280px; }
  .v-gallery-thumb { width: 46px; height: 46px; }
  .v-spec-table { font-size: 12px; }
}

/* ===== 物流费模块：目的地选择 / 费率表 ===== */
.ship-dest { background: #fff; border: 1px solid var(--border, #e6e8ee); border-radius: 10px; padding: 14px 16px; margin-bottom: 14px; }
.ship-dest-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.ship-dest-label { font-size: 14px; font-weight: 700; color: var(--chimee-primary); }
.ship-dest-hint { font-size: 11px; color: #99a; }
.ship-dest-fields { display: flex; gap: 8px; }
.ship-select, .ship-zip {
  font-family: inherit; font-size: 13px; color: #334; background: #f7f8fb;
  border: 1px solid var(--border, #e6e8ee); border-radius: 6px; padding: 9px 10px; outline: none;
}
.ship-select { flex: 1; min-width: 0; cursor: pointer; }
.ship-zip { width: 118px; }
.ship-select:focus, .ship-zip:focus { border-color: var(--chimee-accent); background: #fff; }
.ship-note { font-size: 12px; color: #889; line-height: 1.6; margin: 10px 0 0; }

.ship-rate-table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 18px 0 14px; }
.ship-rate-table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: #889; font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--border, #e6e8ee); }
.ship-rate-table td { padding: 14px 12px; border-bottom: 1px solid #eef0f4; color: #445; vertical-align: top; line-height: 1.5; }
.ship-rate-table td strong { display: block; color: var(--chimee-primary); font-size: 14px; margin-bottom: 3px; }
.ship-rate-table td span { display: block; font-size: 12px; color: #889; margin-top: 4px; }
.ship-rate-note { font-size: 13px; color: #667; line-height: 1.65; margin: 10px 0 0; }
@media (max-width: 640px) {
  .ship-dest-fields { flex-direction: column; }
  .ship-zip { width: 100%; }
  .ship-rate-table { font-size: 13px; }
  .ship-rate-table th, .ship-rate-table td { padding: 10px 6px; }
}

/* ---------- 库存状态 / Availability (js/inventory.js) ---------- */
.stock-badge { display: inline-block; font-size: 11px; font-weight: 600; line-height: 1; padding: 5px 9px; border-radius: 999px; letter-spacing: .2px; white-space: nowrap; }
.stock-badge--ok { color: #1a7f4b; background: #eaf7ef; }
.stock-badge--low { color: #a35b00; background: #fff3e0; }
.stock-badge--out { color: #707681; background: #f0f1f4; }
.stock-badge--pre { color: #2a5ea8; background: #eaf1fc; }
.stock-badge--made { color: #5b4a9e; background: #f1eefb; }
.product-stock, .v-modal-stock { margin: 2px 0 12px; min-height: 0; }
.cart-limit { display: block; font-size: 11px; color: #a35b00; margin-top: 4px; line-height: 1.4; }
.cart-qty button:disabled { opacity: .35; cursor: not-allowed; }
