/* ==========================================================================
   商品下单页 · 暖阳充电站主题精修层（v3.88 · 方向 A）
   挂载于 goods.php 主样式之后；只做视觉，零功能侵入。
   暗色沿用页面既有 html[data-theme="dark"] / html.dark-mode 钩子。
   ========================================================================== */

/* ---- 亮色精修 ---- */
body { background: #F7F6F2 !important; }
::selection { background: rgba(245, 166, 35, .35); }

.main-card {
    border: 1px solid #ECE9E2 !important;
    border-radius: 20px !important;
    box-shadow: 0 8px 24px rgba(14, 42, 71, .08) !important;
    animation: gz2-fade-up .35s ease both;
}
@keyframes gz2-fade-up {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) { .main-card { animation: none !important; } }

.goods-title { color: #0E2A47 !important; letter-spacing: -.01em; }

/* 价格：喵黄深（方向 A 定稿） */
.pay-amount .dynamic-price { color: #D98E0B !important; }

/* 支付按钮：电光蓝 CTA + 微浮起 */
.pay-btn {
    background: linear-gradient(135deg, #2E8FFF 0%, #0D9488 100%) !important;
    box-shadow: 0 6px 16px rgba(0, 113, 227, .28) !important;
    transition: filter .18s ease, transform .18s ease, box-shadow .18s ease;
}
.pay-btn:hover {
    background: linear-gradient(135deg, #1E84F2 0%, #005BB8 100%) !important;
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(0, 113, 227, .34) !important;
}
.pay-btn:active { transform: translateY(0); }

/* 支付方式卡：选中描边统一品牌蓝 */
.payment-item { border-radius: 12px; }
.payment-item.active { box-shadow: 0 0 0 3px rgba(0, 113, 227, .12) !important; }

/* 库存强调 */
.stock-row .stock-value { color: #0D9488 !important; }

/* 焦点环（键盘可达） */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 2px solid #0D9488 !important;
    outline-offset: 2px !important;
}

/* ---- 暗色和谐化（沿用页面暗色骨架，仅调品牌强调） ---- */
html[data-theme="dark"] .pay-amount .dynamic-price, html.dark-mode .pay-amount .dynamic-price { color: #F5B83D !important; }
html[data-theme="dark"] .main-card, html.dark-mode .main-card {
    border-color: #2A3340 !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .38) !important;
}
html[data-theme="dark"] .goods-title, html.dark-mode .goods-title { color: #E8EAED !important; }
html[data-theme="dark"] .pay-btn, html.dark-mode .pay-btn {
    background: linear-gradient(135deg, #1E84F2 0%, #0060C0 100%) !important;
}

/* ==========================================================================
   M3 布局级精修（v3.89 · 严格对照设计方案 M3 mockup）
   ========================================================================== */

/* ---- 标题与价格层级 ---- */
.goods-title { font-size: 21px !important; font-weight: 800 !important; }
.section-label { font-size: 15.5px !important; font-weight: 700 !important; color: #0E2A47 !important; }
.price-quantity-row .section-value { font-size: 26px !important; font-weight: 800 !important; }
.market-price { color: #B9BEC7 !important; }

/* ---- 输入框升级（方案A·白底描边款）：实边框可辨 + 聚焦电光蓝环 ---- */
.input-field-input {
    height: 46px !important;
    border-radius: 12px !important;
    border: 1.5px solid #D9DEE7 !important;
    background: #fff !important;
    color: #1F2A3A !important;
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease !important;
}
.input-field-input::placeholder { color: #9AA3B2 !important; opacity: 1 !important; }
.input-field-input:hover { border-color: #C2CAD6 !important; }
.input-field-input:focus {
    background: #fff !important;
    border-color: #0D9488 !important;
    box-shadow: 0 0 0 3px rgba(0, 113, 227, .12) !important;
}
select.input-field-input { height: 46px !important; }

/* 优惠码 / 数量步进器：同款语言 */
.coupon-input {
    border: 1.5px solid #D9DEE7 !important;
    background: #fff !important;
    border-radius: 10px !important;
    color: #1F2A3A !important;
}
.coupon-input::placeholder { color: #9AA3B2 !important; opacity: 1 !important; }
.coupon-input:focus { border-color: #0D9488 !important; box-shadow: 0 0 0 3px rgba(0, 113, 227, .12) !important; }
.quantity-selector {
    border-radius: 10px !important;
    border: 1.5px solid #D9DEE7 !important;
    background: #fff !important;
}
.quantity-input { width: 44px !important; height: 32px !important; color: #1F2A3A !important; }
.coupon-toggle-row { border-radius: 12px !important; border-color: #ECE9E2 !important; }

/* ---- 付款方式：卡片化 ---- */
.payment-item {
    border-radius: 14px !important;
    border: 1.5px solid #ECE9E2 !important;
    background: #fff !important;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease !important;
}
.payment-item:hover { transform: translateY(-1px); }
.payment-item.active {
    border-color: #0D9488 !important;
    background: rgba(0, 113, 227, .04) !important;
    box-shadow: 0 4px 14px rgba(0, 113, 227, .12) !important;
}
.payment-name { font-weight: 700 !important; }

/* ---- 支付区：费用行 + 全宽喵黄 CTA（M3 定稿） ---- */
.drawer-footer .pay-bar {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
}
.pay-amount {
    display: flex !important;
    align-items: baseline !important;
    justify-content: space-between !important;
    font-size: 14px !important;
    color: #6B7280 !important;
    padding: 2px 4px;
}
.pay-amount .dynamic-price { font-size: 26px !important; font-weight: 800 !important; letter-spacing: -.01em; }
.pay-btn {
    width: 100% !important;
    height: 52px !important;
    padding: 0 !important;
    font-size: 17px !important;
    font-weight: 800 !important;
    letter-spacing: 2px !important;
    border-radius: 14px !important;
    background: linear-gradient(135deg, #FFC24D 0%, #F5A623 60%, #F09A0A 100%) !important;
    box-shadow: 0 8px 20px rgba(245, 166, 35, .40) !important;
}
.pay-btn:hover {
    background: linear-gradient(135deg, #FFB733 0%, #EF9E10 60%, #E08F05 100%) !important;
    box-shadow: 0 10px 26px rgba(245, 166, 35, .50) !important;
    transform: translateY(-1px);
}
/* 电电喵贴纸（v3.92）：放大悬浮在按钮左侧、伸手指向「确认付款」 */
.goods-mascot {
    left: 8px !important;
    right: auto !important;
    bottom: 6px !important;
    width: 76px !important;
    z-index: 3 !important;
    filter: drop-shadow(0 8px 16px rgba(245, 166, 35, .35)) !important;
}
@media (max-width: 720px) {
    .goods-mascot { width: 56px !important; left: 6px !important; bottom: 5px !important; }
    /* 手机端底部固定支付条不遮挡表单内容（支付方式等） */
    .buy-form-section { padding-bottom: 148px !important; }
}

/* ---- 暗色（M3 段） ---- */
html[data-theme="dark"] .section-label, html.dark-mode .section-label { color: #E8EAED !important; }
html[data-theme="dark"] .input-field-input, html.dark-mode .input-field-input { background: #232B36 !important; border-color: #3A4452 !important; color: #E8EAED !important; }
html[data-theme="dark"] .input-field-input::placeholder, html.dark-mode .input-field-input::placeholder { color: #7C8698 !important; opacity: 1 !important; }
html[data-theme="dark"] .input-field-input:focus, html.dark-mode .input-field-input:focus { background: #1C232C !important; border-color: #2E8FFF !important; }
html[data-theme="dark"] .payment-item, html.dark-mode .payment-item { background: #232B36 !important; border-color: #2A3340 !important; }
html[data-theme="dark"] .payment-item.active, html.dark-mode .payment-item.active {
    border-color: #2E8FFF !important;
    background: rgba(46, 143, 255, .08) !important;
}
html[data-theme="dark"] .pay-btn, html.dark-mode .pay-btn {
    background: linear-gradient(135deg, #F5B83D 0%, #E89B0C 100%) !important;
    color: #10233B !important;
}
