/* ==========================================================================
   涂料用量计算器
   ========================================================================== */

body{
    background:
        radial-gradient(760px 420px at 92% -8%,rgba(247,148,29,.12),transparent 62%),
        var(--cream);
}

/* 顶部返回按钮 */
.back-product-btn{
    display:inline-flex;
    align-items:center;
    gap:6px;
    padding:8px 18px;
    background:#fff;
    color:var(--wood-dark);
    border:1px solid var(--line);
    text-decoration:none;
    border-radius:var(--r-pill);
    font-size:13.5px;
    font-weight:500;
    margin-bottom:16px;
    box-shadow:var(--shadow-sm);
    transition:.2s var(--ease);
}
.back-product-btn:hover{
    background:var(--brand);
    border-color:var(--brand);
    color:#fff;
}

.container{
    max-width:760px;
    margin:32px auto;
    background:#fff;
    padding:40px 40px 34px;
    border-radius:26px;
    box-shadow:var(--shadow);
    border:1px solid var(--line);
}
.container h1{
    font-size:26px;
    font-weight:700;
    color:var(--ink);
    margin-bottom:8px;
    letter-spacing:.5px;
}
.container > p{
    color:var(--ink-2);
    font-size:14px;
    line-height:1.8;
}

.calc-intro{
    color:var(--ink-2);
    font-size:14px;
    line-height:1.85;
    margin-bottom:26px;
    max-width:560px;
}

/* 第 1 步 · 产品选择 */
.product-pick{
    min-width:0;
    flex:1 1 auto;
}
.pick-hint{
    font-size:13px;
    color:var(--ink-3);
    margin:2px 0 8px;
}
.pick-btn{
    border:1px solid var(--line);
    background:#fff;
    color:var(--wood-dark);
    border-radius:var(--r-pill);
    padding:8px 16px;
    font-size:13.5px;
    font-weight:500;
    cursor:pointer;
    transition:.2s var(--ease);
}
.pick-btn:hover{
    background:var(--brand);
    border-color:var(--brand);
    color:#fff;
}

.step{
    margin-bottom:30px;
}
.step-title{
    display:flex;
    align-items:center;
    gap:11px;
    font-size:17px;
    font-weight:700;
    color:var(--ink);
    margin-bottom:16px;
}
.step-num{
    width:28px;
    height:28px;
    border-radius:50%;
    background:var(--brand);
    color:#fff;
    display:grid;
    place-items:center;
    font-size:14px;
    font-weight:700;
    box-shadow:0 6px 14px rgba(247,148,29,.30);
    flex:0 0 auto;
}
.step > p{
    font-size:14px;
    color:var(--ink-2);
    margin-bottom:10px;
}

/* 已选产品卡 */
.product-card{
    display:flex;
    flex-direction:row;
    gap:16px;
    align-items:center;
    border:1px solid var(--line);
    background:linear-gradient(180deg,#FFFDF9,#FBF5EC);
    padding:18px;
    border-radius:var(--r-md);
    margin-top:12px;
    min-height:92px;
    overflow:visible;
    text-align:left;
}
.product-img{
    width:84px;
    height:84px;
    object-fit:contain;
    border-radius:var(--r-sm);
    background:#fff;
    padding:6px;
    display:none;
    flex:0 0 auto;
}
.product-name{
    font-size:15px;
    font-weight:600;
    color:var(--ink);
    line-height:1.6;
    margin-bottom:4px;
    display:none;
}

/* 单选 */
.radio-group{
    display:flex;
    gap:10px;
    margin:12px 0 16px;
}
.radio-item{
    display:inline-flex;
    align-items:center;
    gap:8px;
    border:1px solid var(--line);
    background:#fff;
    padding:10px 22px;
    border-radius:var(--r-pill);
    cursor:pointer;
    font-size:14.5px;
    color:var(--ink-2);
    transition:.2s var(--ease);
    user-select:none;
}
.radio-item:hover{ border-color:var(--brand); }
.radio-item input{ accent-color:var(--brand); width:16px; height:16px; }

/* 墙面输入 */
.wall-item{
    position:relative;
    border:1px solid var(--line);
    background:#FDFBF7;
    padding:18px;
    border-radius:var(--r-md);
    margin-top:12px;
}
.wall-title{
    font-size:15px;
    font-weight:600;
    color:var(--wood-dark);
    margin-bottom:10px;
}
.input-row{
    display:flex;
    gap:12px;
    flex-wrap:wrap;
}
.input-row > div{
    flex:1 1 130px;
    font-size:13px;
    color:var(--ink-2);
}
.input-row input{
    padding:11px 13px;
    border:1px solid var(--line);
    border-radius:var(--r-sm);
    width:100%;
    margin-top:5px;
    font-size:16px;
    color:var(--ink);
    background:#fff;
    transition:.2s var(--ease);
    -moz-appearance:textfield;
}
.input-row input:focus,
#totalArea:focus,
#doorWindowArea:focus{
    outline:none;
    border-color:var(--brand);
    box-shadow:0 0 0 4px rgba(247,148,29,.12);
}

.del-icon-only{
    position:absolute;
    top:12px;
    right:12px;
    width:20px;
    height:20px;
    cursor:pointer;
    object-fit:contain;
    opacity:.6;
    transition:transform .2s var(--ease), opacity .2s var(--ease);
}
.del-icon-only:hover{ transform:scale(1.15); opacity:1; }

.btn-add{
    color:var(--brand-dark);
    background:var(--brand-soft);
    border:1px dashed #F3CFA0;
    border-radius:var(--r-pill);
    padding:9px 20px;
    margin-top:12px;
    cursor:pointer;
    text-align:center;
    font-size:14px;
    font-weight:500;
    transition:.2s var(--ease);
}
.btn-add:hover{ background:#FFE9CD; border-color:var(--brand); }

#areaInputBox{ display:none; margin-top:12px; }
#doorWindowBox{ margin-top:18px; }
#totalArea,
#doorWindowArea{
    padding:11px 13px;
    border:1px solid var(--line);
    border-radius:var(--r-sm);
    font-size:16px;
    width:100%;
    max-width:280px;
    margin-top:6px;
    background:#fff;
    color:var(--ink);
}
#areaInputBox p,
#doorWindowBox p{
    font-size:13.5px;
    color:var(--ink-2);
}

.btn-calc{
    background:var(--brand);
    color:#fff;
    border:none;
    padding:14px 34px;
    border-radius:var(--r-pill);
    font-size:16px;
    font-weight:600;
    cursor:pointer;
    margin-top:20px;
    box-shadow:0 10px 24px rgba(247,148,29,.28);
    transition:.2s var(--ease);
}
.btn-calc:hover{ background:var(--brand-dark); transform:translateY(-2px); }
.btn-calc:active{ transform:translateY(0) scale(.99); }

#result{
    margin-top:22px;
    padding:22px;
    background:linear-gradient(180deg,#FFF9EF,#FDF1E0);
    border:1px solid #F5D9B4;
    border-radius:var(--r-md);
    display:none;
}
#result h4{
    font-size:16px;
    color:var(--brand-dark);
    margin-bottom:10px;
}
#resultText{
    font-size:14px;
    line-height:2;
    color:var(--ink);
}

.calc-note{
    margin-top:24px;
    padding:16px 18px;
    background:var(--cream);
    border-left:3px solid var(--wood);
    border-radius:var(--r-sm);
    font-size:12.5px;
    color:var(--ink-2);
    line-height:1.95;
}
.calc-note p{ margin:0; }

/* ==========================================================================
   手机端
   ========================================================================== */
@media (max-width:900px){
    .container{
        margin:18px 12px;
        padding:24px 18px 26px;
        border-radius:var(--r-md);
    }
    .container h1{ font-size:21px; }
    .container > p{ font-size:13px; }

    .step{ margin-bottom:24px; }
    .step-title{ font-size:15.5px; margin-bottom:12px; }

    .product-card{ padding:14px; gap:12px; min-height:76px; }
    .product-img{ width:66px; height:66px; }
    .product-name{ font-size:13.5px; line-height:1.55; }

    .radio-group{ gap:8px; }
    .radio-item{
        flex:1 1 0;
        justify-content:center;
        padding:11px 12px;
        font-size:14px;
    }

    .wall-item{ padding:14px; }
    .wall-title{ font-size:14px; margin-bottom:8px; }
    .input-row > div{ flex:1 1 100%; }
    .input-row input{ padding:12px 13px; }

    .btn-add{ width:100%; }

    #totalArea,#doorWindowArea{ max-width:none; padding:12px 13px; }

    .btn-calc{ width:100%; padding:15px 0; font-size:15px; }

    #result{ padding:18px; }
    #resultText{ font-size:13.5px; line-height:1.95; }

    .calc-note{ font-size:12px; padding:14px; }
}
