/* ============================================================
 * AIOMaker Storefront 功能组件样式
 * （快速查看弹窗 / 最近浏览 / 教程区块 / BOM / 库存提示 / 楼层横幅）
 * ============================================================ */

.aiomaker-block-title {
    font-size: 18px;
    font-weight: bold;
    color: #313131;
    margin: 26px 0 12px;
    padding-left: 10px;
    border-left: 4px solid var(--aiomaker-primary, #e16811);
    line-height: 1.3;
}

/* ---- 楼层广告横幅 ---- */
.floor-banner { display: block; margin: 6px 0 2px; }
.floor-banner img { width: 100%; display: block; border-radius: 3px; }

/* ---- 快速查看按钮（JS 注入到商品卡） ---- */
.shopList .qv-open {
    display: none;
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 5;
    background: rgba(49, 49, 49, .78);
    color: #fff;
    border: none;
    border-radius: 3px;
    font-size: 12px;
    padding: 4px 10px;
    cursor: pointer;
    line-height: 1.5;
}
.shopList:hover .qv-open { display: block; }
.shopList .qv-open:hover { background: var(--aiomaker-primary, #e16811); }

/* ---- 快速查看弹窗 ---- */
.qv-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(35, 34, 33, .55);
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.qv-modal.open { display: flex; }
.qv-box {
    background: #fff;
    width: 860px;
    max-width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 4px;
    position: relative;
    box-shadow: 0 8px 40px rgba(0, 0, 0, .25);
}
.qv-close {
    position: absolute;
    top: 8px;
    right: 10px;
    z-index: 2;
    background: none;
    border: none;
    font-size: 26px;
    line-height: 1;
    color: #959595;
    cursor: pointer;
}
.qv-close:hover { color: #313131; }
.qv-inner { display: flex; gap: 24px; padding: 28px; }
.qv-thumb { flex: 0 0 380px; }
.qv-thumb img, .qv-thumb video { width: 100%; aspect-ratio: 1/1; object-fit: cover; display: block; background: #fff; }
.qv-info { flex: 1; min-width: 0; }
.qv-name { font-size: 20px; color: #313131; margin: 0 0 12px; line-height: 1.4; }
.qv-price { margin-bottom: 10px; }
.qv-price strong { font-size: 26px; color: var(--aiomaker-primary, #e16811); }
.qv-price del { color: #959595; margin-left: 8px; font-size: 15px; }
.qv-stock { font-size: 13px; color: #4caf50; margin-bottom: 10px; }
.qv-stock.low { color: #e53935; font-weight: bold; }
.qv-desc { font-size: 14px; color: #535353; margin-bottom: 18px; line-height: 1.7; }
.qv-actions { display: flex; flex-direction: column; gap: 10px; }
.qv-actions .addCart {
    display: block !important;
    width: auto;
    text-align: center;
    padding: 10px 24px;
    height: auto;
    line-height: 1.5;
    font-size: 16px;
    background: var(--aiomaker-primary, #e16811);
    color: #fff !important;
    border-radius: 3px;
    text-decoration: none;
}
.qv-actions .addCart.added { background: #4caf50; }
.qv-detail { font-size: 14px; color: #636363; text-decoration: none; text-align: center; }
.qv-detail:hover { color: var(--aiomaker-primary, #e16811); }
.qv-loading { padding: 60px; text-align: center; color: #959595; }

/* ---- 最近浏览 ---- */
.aiomaker-recent-wrap .content:empty::after { content: ""; }
.aiomaker-recent-wrap { clear: both; }

/* ---- 配套教程区块 ---- */
.aiomaker-tutorials { clear: both; margin-bottom: 10px; }
.aiomaker-tutorials ul { list-style: none; margin: 0; padding: 0; }
.aiomaker-tutorials li { padding: 9px 0; border-bottom: 1px dashed #e3e3e3; }
.aiomaker-tutorials li a { color: #313131; text-decoration: none; font-size: 15px; }
.aiomaker-tutorials li a:hover { color: var(--aiomaker-primary, #e16811); }
.tut-ext {
    font-size: 12px;
    color: var(--aiomaker-primary, #e16811);
    border: 1px solid var(--aiomaker-primary, #e16811);
    border-radius: 2px;
    padding: 0 5px;
    margin-left: 8px;
}

/* ---- BOM 物料清单 ---- */
.aiomaker-bom { margin: 26px 0; border: 1px solid #e3e3e3; border-radius: 4px; overflow: hidden; }
.bom-list { list-style: none; margin: 0; padding: 0; }
.bom-list li {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 16px; border-bottom: 1px solid #f0f0f0;
}
.bom-thumb img { width: 56px; height: 56px; object-fit: cover; display: block; }
.bom-name { flex: 1; color: #313131; text-decoration: none; font-size: 14px; }
.bom-name:hover { color: var(--aiomaker-primary, #e16811); }
.bom-price { color: var(--aiomaker-primary, #e16811); font-weight: bold; min-width: 90px; text-align: right; }
.bom-add {
    background: #fff; color: var(--aiomaker-primary, #e16811) !important;
    border: 1px solid var(--aiomaker-primary, #e16811); border-radius: 3px;
    padding: 4px 12px; font-size: 13px; text-decoration: none; cursor: pointer;
    white-space: nowrap;
}
.bom-add:hover, .bom-add.added { background: var(--aiomaker-primary, #e16811); color: #fff !important; }
.bom-footer {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 16px; background: #f7f7f7;
}
.bom-total { font-size: 14px; color: #535353; }
.bom-total strong { font-size: 20px; color: var(--aiomaker-primary, #e16811); }
.bom-addall {
    background: var(--aiomaker-primary, #e16811); color: #fff;
    border: none; border-radius: 3px; padding: 9px 22px;
    font-size: 15px; cursor: pointer;
}
.bom-addall:hover { opacity: .9; }
.bom-addall:disabled { background: #ccc; cursor: wait; }

/* ---- 库存提示（商品页） ---- */
.aiomaker-stock-low {
    color: #e53935; font-size: 14px; font-weight: bold;
    margin: 0 0 10px;
}

/* ---- AJAX 全局提示条 ---- */
.aiomaker-toast {
    position: fixed; top: 18px; left: 50%; transform: translateX(-50%);
    background: #313131; color: #fff; padding: 10px 22px;
    border-radius: 3px; font-size: 14px; z-index: 10000;
    box-shadow: 0 4px 16px rgba(0,0,0,.25);
    opacity: 0; transition: opacity .25s ease; pointer-events: none;
}
.aiomaker-toast.show { opacity: 1; }
.aiomaker-toast.ok { background: #2e7d32; }
.aiomaker-toast.err { background: #c62828; }

/* ---- 技术资料标签页 ---- */
.aiomaker-docs .docs-tip { color: #636363; font-size: 14px; margin: 0 0 12px; }
.docs-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.docs-list li a {
    display: flex; align-items: center; gap: 8px;
    border: 1px solid #e3e3e3; border-radius: 3px;
    padding: 10px 16px; font-size: 14px; color: #313131;
    text-decoration: none; background: #fff;
    transition: border-color .15s ease, color .15s ease;
}
.docs-list li a:hover { border-color: var(--aiomaker-primary, #e16811); color: var(--aiomaker-primary, #e16811); }
.docs-icon { font-size: 16px; }
.docs-go { color: #959595; font-size: 12px; margin-left: 4px; }
.docs-list li a:hover .docs-go { color: var(--aiomaker-primary, #e16811); }

/* ---- 缺货预订提示 ---- */
.woocommerce div.product p.stock.backorder {
    color: var(--aiomaker-primary, #e16811);
    font-size: 14px; font-weight: bold; margin: 6px 0 10px;
}

/* ---- 商品对比 ---- */
.shopList .cmp-btn {
    display: none;
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 5;
    background: rgba(255, 255, 255, .92);
    color: #424242;
    border: 1px solid #d2d2d2;
    border-radius: 3px;
    font-size: 12px;
    padding: 3px 10px;
    cursor: pointer;
    line-height: 1.5;
}
.shopList:hover .cmp-btn { display: block; }
.shopList .cmp-btn.active {
    display: block;
    background: var(--aiomaker-primary, #e16811);
    border-color: var(--aiomaker-primary, #e16811);
    color: #fff;
}

.cmp-bar {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9998;
    background: #313131;
    color: #fff;
    border-radius: 6px;
    padding: 10px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .3);
    font-size: 14px;
}
.cmp-bar strong { color: var(--aiomaker-primary, #e16811); font-size: 16px; }
.cmp-bar button {
    border: none;
    border-radius: 3px;
    padding: 6px 16px;
    font-size: 14px;
    cursor: pointer;
}
.cmp-bar .cmp-go { background: var(--aiomaker-primary, #e16811); color: #fff; font-weight: bold; }
.cmp-bar .cmp-go:disabled { background: #666; color: #aaa; cursor: not-allowed; }
.cmp-bar .cmp-clear { background: transparent; color: #c9c9c9; border: 1px solid #666; }

.cmp-title { font-size: 20px; color: #313131; margin: 10px 0 16px; }
.cmp-empty { color: #959595; padding: 20px 0; }
.cmp-scroll { overflow-x: auto; }
.cmp-table { border-collapse: collapse; width: 100%; min-width: 640px; }
.cmp-table th, .cmp-table td {
    border: 1px solid #e3e3e3;
    padding: 12px 14px;
    font-size: 14px;
    text-align: left;
    vertical-align: top;
    background: #fff;
}
.cmp-table th { background: #f7f7f7; color: #313131; white-space: nowrap; width: 110px; }
.cmp-row-img img { width: 140px; height: 140px; object-fit: cover; display: block; }
.cmp-name { color: #313131; text-decoration: none; font-weight: bold; }
.cmp-name:hover { color: var(--aiomaker-primary, #e16811); }
.cmp-price { color: var(--aiomaker-primary, #e16811); font-weight: bold; font-size: 16px; white-space: nowrap; }
.cmp-price del { color: #959595; font-weight: normal; font-size: 13px; }
.cmp-pkg, .cmp-desc { color: #535353; min-width: 160px; }
.cmp-add {
    display: inline-block;
    background: var(--aiomaker-primary, #e16811);
    color: #fff !important;
    border-radius: 3px;
    padding: 7px 16px;
    font-size: 14px;
    text-decoration: none;
    white-space: nowrap;
}
.cmp-add.added { background: #4caf50; }

/* ---- 高级搜索 ---- */
.aiomaker-adv-search { padding-bottom: 30px; }
.as-form {
    background: #f7f7f7;
    border: 1px solid #e3e3e3;
    border-radius: 4px;
    padding: 18px 20px 8px;
    margin-bottom: 20px;
}
.as-row { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 12px; align-items: flex-end; }
.as-row label { font-size: 13px; color: #535353; display: block; }
.as-row input[type="text"], .as-row select, .as-row input[type="number"] {
    display: block;
    margin-top: 4px;
    padding: 8px 10px;
    border: 1px solid #d2d2d2;
    border-radius: 3px;
    font-size: 14px;
    background: #fff;
    min-width: 200px;
    outline: none;
}
.as-row input:focus, .as-row select:focus { border-color: var(--aiomaker-primary, #e16811); }
.as-price { display: flex; align-items: center; gap: 6px; }
.as-price input[type="number"] { min-width: 90px !important; width: 100px; }
.as-submit {
    background: var(--aiomaker-primary, #e16811);
    color: #fff;
    border: none;
    border-radius: 3px;
    padding: 9px 34px;
    font-size: 15px;
    cursor: pointer;
}
.as-submit:hover { opacity: .9; }
.as-reset { font-size: 13px; color: #636363; margin-left: 6px; align-self: center; }
.as-result-meta { color: #535353; font-size: 14px; margin-bottom: 14px; }
.as-result-meta strong { color: var(--aiomaker-primary, #e16811); font-size: 17px; }
.as-empty { color: #959595; padding: 30px 0; text-align: center; }
.as-pager { display: flex; gap: 8px; justify-content: center; margin-top: 22px; }
.as-pager a {
    min-width: 34px; height: 34px; line-height: 32px;
    text-align: center;
    border: 1px solid #e3e3e3; border-radius: 3px;
    color: #424242; text-decoration: none; font-size: 14px;
    padding: 0 6px;
}
.as-pager a.cur, .as-pager a:hover { background: var(--aiomaker-primary, #e16811); border-color: var(--aiomaker-primary, #e16811); color: #fff; }

/* ---- 包装清单 ---- */
.pkg-list { margin: 0; padding-left: 20px; }
.pkg-list li { padding: 5px 0; font-size: 14px; color: #424242; }

/* ---- 一键生成询价单 ---- */
.iq-open {
    display: inline-block;
    background: var(--aiomaker-primary, #e16811);
    color: #fff;
    border: none;
    border-radius: 3px;
    padding: 10px 26px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    margin: 14px 0;
}
.iq-open:hover { opacity: .9; }

.iq-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(35, 34, 33, .55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.iq-box {
    background: #fff;
    width: 480px;
    max-width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 4px;
    padding: 28px;
    position: relative;
    box-shadow: 0 8px 40px rgba(0, 0, 0, .25);
}
.iq-box h3 { margin: 0 0 6px; font-size: 20px; color: #313131; }
.iq-count { color: #636363; font-size: 14px; margin: 0 0 18px; }
.iq-count strong { color: var(--aiomaker-primary, #e16811); font-size: 17px; }
.iq-form label {
    display: block;
    font-size: 14px;
    color: #424242;
    margin-bottom: 12px;
}
.iq-form input[type="text"],
.iq-form input[type="tel"],
.iq-form input[type="email"],
.iq-form textarea {
    display: block;
    width: 100%;
    margin-top: 4px;
    padding: 9px 12px;
    border: 1px solid #d2d2d2;
    border-radius: 3px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
}
.iq-form input:focus, .iq-form textarea:focus { border-color: var(--aiomaker-primary, #e16811); }
.iq-hp { position: absolute !important; left: -9999px !important; opacity: 0; }
.iq-submit {
    width: 100%;
    background: var(--aiomaker-primary, #e16811);
    color: #fff;
    border: none;
    border-radius: 3px;
    padding: 12px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 6px;
}
.iq-submit:hover { opacity: .9; }
.iq-submit:disabled { background: #ccc; cursor: wait; }

/* ---- 响应式 ---- */
@media (max-width: 900px) {
    .qv-inner { flex-direction: column; padding: 20px; }
    .qv-thumb { flex: none; width: 100%; max-width: 340px; margin: 0 auto; }
    .shopList .qv-open { display: block; } /* 触屏常显 */
    .bom-list li { flex-wrap: wrap; }
    .bom-footer { flex-direction: column; gap: 10px; }
}
