/**
 * 詢價籃（询价购物车）样式
 * 品牌色：深蓝 #10355C / 主蓝 #1E5C96 / 金 #F5C542
 * 悬浮入口在左下角，避让右侧工具栏与右下 WhatsApp 悬浮按钮
 */

/* ===== 悬浮入口 ===== */
.cart-float {
    position: fixed; left: 20px; bottom: 20px; z-index: 1200;
    width: 56px; height: 56px; border-radius: 50%;
    background: linear-gradient(165deg, #1E5C96 0%, #10355C 100%);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 6px 16px rgba(16, 53, 92, .3);
    transition: transform .25s, box-shadow .25s;
}
.cart-float:hover { transform: translateY(-3px); box-shadow: 0 10px 22px rgba(16, 53, 92, .4); }
.cart-float svg { width: 26px; height: 26px; fill: #fff; }
.cart-badge {
    position: absolute; top: -4px; right: -4px;
    min-width: 20px; height: 20px; padding: 0 5px;
    border-radius: 10px; background: #F5C542; color: #10355C;
    font-size: 12px; font-weight: 700; line-height: 20px; text-align: center;
    display: none;
}

/* ===== 遮罩与抽屉 ===== */
.cart-mask {
    position: fixed; inset: 0; z-index: 1300;
    background: rgba(11, 30, 50, .5);
    opacity: 0; visibility: hidden; transition: all .3s;
}
.cart-mask.on { opacity: 1; visibility: visible; }
.cart-drawer {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 1301;
    width: 380px; max-width: 100%;
    background: #fff;
    transform: translateX(100%); transition: transform .3s;
    display: flex; flex-direction: column;
    box-shadow: -8px 0 30px rgba(11, 30, 50, .18);
}
.cart-drawer.on { transform: translateX(0); }

.cart-head {
    flex: 0 0 auto;
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px;
    background: #10355C; color: #fff;
}
.cart-head b { font-size: 17px; font-weight: 700; }
.cart-head b i { font-style: normal; font-weight: 400; margin-left: 4px; color: #F5C542; }
.cart-head .cart-close {
    width: 30px; height: 30px; line-height: 28px; text-align: center;
    border-radius: 50%; color: #fff; font-size: 22px;
    border: 1px solid rgba(255, 255, 255, .4);
    transition: all .2s;
}
.cart-head .cart-close:hover { background: rgba(255, 255, 255, .15); }

/* ===== 产品清单 ===== */
.cart-list {
    flex: 1 1 auto; overflow-y: auto;
    padding: 12px 20px;
    border-bottom: 1px solid #eef2f6;
}
.cart-empty { text-align: center; color: #93a5b5; padding: 40px 0; font-size: 14px; }
.cart-item {
    padding: 12px 0;
    border-bottom: 1px dashed #e6ecf2;
}
.cart-item:last-child { border-bottom: 0; }
.ci-name { font-size: 14px; color: #10355C; font-weight: 600; line-height: 1.5; margin-bottom: 8px; }
.ci-ops { display: flex; align-items: center; gap: 8px; }
.ci-step {
    width: 26px; height: 26px; border: 1px solid #d5dee6; background: #f7f9fb;
    border-radius: 4px; font-size: 16px; color: #10355C; cursor: pointer; line-height: 1;
    transition: all .2s;
}
.ci-step:hover { background: #1E5C96; color: #fff; border-color: #1E5C96; }
.ci-qty {
    width: 56px; height: 26px; text-align: center;
    border: 1px solid #d5dee6; border-radius: 4px;
    font-size: 14px; color: #10355C;
}
.ci-del { margin-left: auto; font-size: 12px; color: #b04a4a; }
.ci-del:hover { color: #d33; }

/* ===== 询盘表单 ===== */
.cart-form { flex: 0 0 auto; padding: 14px 20px 20px; background: #f7f9fb; }
.cart-form h4 { font-size: 14px; color: #10355C; font-weight: 700; margin: 0 0 10px; }
.cart-form input[type=text], .cart-form textarea {
    width: 100%; box-sizing: border-box;
    border: 1px solid #d5dee6; border-radius: 6px;
    padding: 9px 12px; font-size: 13px; color: #10355C;
    margin-bottom: 8px; background: #fff;
    font-family: inherit; line-height: 1.6;
}
.cart-form input:focus, .cart-form textarea:focus { outline: 0; border-color: #1E5C96; }
.cart-captcha { display: flex; gap: 8px; margin: 0 0 8px; }
.cart-captcha input { flex: 1; margin-bottom: 0; }
.cart-captcha img { height: 38px; border-radius: 6px; cursor: pointer; border: 1px solid #d5dee6; }
.cart-form button[type=submit] {
    width: 100%; border: 0; cursor: pointer;
    background: linear-gradient(165deg, #1E5C96 0%, #10355C 100%);
    color: #fff; font-size: 15px; font-weight: 700;
    padding: 12px 0; border-radius: 8px;
    box-shadow: 0 6px 14px rgba(16, 53, 92, .28);
    transition: all .25s;
}
.cart-form button[type=submit]:hover { transform: translateY(-1px); box-shadow: 0 10px 18px rgba(16, 53, 92, .35); }
.cart-form button[type=submit]:disabled { opacity: .6; cursor: default; transform: none; }
.cart-msg { display: none; margin: 10px 0 0; font-size: 13px; color: #b04a4a; text-align: center; }
.cart-msg.ok { color: #1d9e57; }

/* ===== 产品卡片「加入詢價」按钮 ===== */
.js-cart-add {
    border: 0; cursor: pointer;
    background: #1E5C96; color: #fff;
    font-size: 12px; font-weight: 600; line-height: 1;
    padding: 8px 12px; border-radius: 20px;
    box-shadow: 0 4px 10px rgba(16, 53, 92, .3);
    transition: all .22s;
    font-family: inherit;
}
.js-cart-add:hover { background: #10355C; transform: translateY(-2px); }
.js-cart-add.added { background: #1d9e57; }
/* 总览页卡片：悬浮在卡片右下角 */
.Piclist .list li { position: relative; }
.Piclist .list li .js-cart-add { position: absolute; right: 10px; bottom: 10px; z-index: 3; }
/* 详情页按钮行：与其他按钮同规格 */
.action-btns .js-cart-add {
    display: inline-block; padding: 12px 30px; border-radius: 4px;
    font-size: 15px; font-weight: 600; margin: 0;
}
.action-btns .js-cart-add.added { background: #1d9e57; }

/* ===== 移动端 ===== */
@media screen and (max-width: 768px) {
    .cart-float { left: 14px; bottom: 70px; width: 48px; height: 48px; }
    .cart-float svg { width: 22px; height: 22px; }
    .cart-drawer { width: 100%; }
    .cart-form { padding: 12px 14px 16px; }
    .cart-list { padding: 10px 14px; }
}
@media screen and (max-width: 480px) {
    .cart-captcha img { height: 34px; }
}
