/* ========== productsstyle.css ========== */
.taobao-product-wrap{
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(240px,1fr));
    grid-auto-rows: 1fr;
    gap:24px;
    margin-top:20px;
}

.taobao-card{
    background:#fff;
    border:1px solid #eee;
    border-radius:8px;
    overflow:hidden;
    transition: 0.25s;
    position: relative;
}

.taobao-card:hover{
    transform: translateY(-6px);
    box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}

.card-img-box{
    width:100%;
    height:200px;
    background:#f1f1f1;
    overflow:hidden;
}

.card-body{
    padding:14px;
}

.card-title{
    font-size:16px;
    font-weight:500;
    color:#222;
    margin-bottom:8px;
    display:-webkit-box;
    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;
    overflow:hidden;
}

.card-desc{
    font-size:13px;
    color:#666;
    margin-bottom:10px;
    height:36px;
    overflow:hidden;
}

.card-price{
    color:#e63946;
    font-size:18px;
    font-weight:bold;
    margin-bottom:12px;
}

.card-btn{
    width:100%;
    padding:8px 0;
    background:#F7941D;
    color:white;
    border:none;
    border-radius:4px;
    cursor:pointer;
    font-size:14px;
}

.card-btn:hover{
    background:#E07B0E;
}

/* ===== 产品卡等高 + 详情按钮底部对齐 ===== */
.taobao-card{
    display:flex;
    flex-direction:column;
}
.taobao-card .card-body{
    display:flex;
    flex-direction:column;
    flex:1 1 auto;
    min-height:0;
}
.taobao-card .card-title{
    line-height:1.5;
    min-height:48px;
}
.taobao-card .card-btn{
    margin-top:auto;
}

/* 图片放大查看弹窗 */
.image-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    align-items: center;
    justify-content: center;
}

.image-modal.active {
    display: flex;
}

.modal-img {
    max-width: 90%;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
}

.modal-close:hover {
    color: #ff6600;
}

/* 侧边栏计算器推广卡片 */
.calc-promotion-card {
    background: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 22px 18px;
    margin-top:20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.calc-promotion-card h4 {
    font-size:17px;
    color:#222;
    margin-bottom:10px;
}

.calc-promotion-card p {
    font-size:14px;
    color:#666;
    line-height:1.65;
    margin-bottom:16px;
}

.calc-promotion-btn {
    display:block;
    width:100%;
    padding:10px 0;
    background:#28a769;
    color:#ffffff;
    border-radius:6px;
    text-decoration:none;
    text-align:center;
    font-size:15px;
    font-weight:600;
    transition: background 0.2s ease;
}

.calc-promotion-btn:hover {
    background:#1f8c57;
}

/* 网格内计算器卡片 */
.calc-card-in-grid {
    background: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    overflow: hidden;
    transition: 0.25s;
    position: relative;
    display: flex;
    flex-direction: column;
}

.calc-card-in-grid:hover {
    transform: translateY(-6px);
    box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}

.calc-card-in-grid .card-img-box {
    background: #f0f7ff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calc-card-in-grid .calc-icon {
    font-size: 64px;
    color: #F7941D;
}

.calc-card-in-grid .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.calc-card-in-grid .card-title {
    color: #F7941D;
}

.calc-card-in-grid .calc-btn {
    display: block;
    width: 100%;
    padding: 11px 0;
    background: #28a769;
    color: #ffffff;
    border-radius: 4px;
    text-decoration: none;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    margin-top: 14px;
}

.calc-card-in-grid .calc-btn:hover {
    background: #1f8c57;
}

/* 计算器卡片背景图 */
.calc-bg-promo {
    background: linear-gradient(rgba(0,0,0,0.40), rgba(0,0,0,0.40)), url('../images/calc_bg_vertical.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color:#ffffff;
}

.calc-bg-promo .card-img-box {
    background: transparent;
}

.calc-bg-promo .card-title {
    color:#ffffff;
}

.calc-bg-promo .card-desc {
    color:#ffffff;
    height:auto;
}

body {
    background-image: url('../images/背景.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.wrap {
    background-color: rgba(255,255,255,0.85);
    padding:30px;
    border-radius:12px;
}

.content-wrap::after {
    content: "";
    display: block;
    clear: both;
}

.product-big-box {
    border: 1px solid #dddddd;
    background-color: #ffffff;
    padding: 24px;
    border-radius: 10px;
}

/*===== 计算器卡片加号，保留原样 =====*/
.calc-card-plus {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #F7941D;
    color: #ffffff;
    font-size: 22px;
    font-weight: bold;
    line-height: 40px;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0, 94, 168, 0.35);
    transition: all 0.22s ease;
    z-index: 3;
    display: none;
}

.calc-card-plus.show-plus {
    display: block;
}

.calc-card-plus:hover {
    background: #E07B0E;
    transform: scale(1.08);
}

/* 修复footer全屏，不修改页面html图片 */
footer {
    width: 100%;
    max-width: unset !important;
    background-color: #222222;
    color: #ffffff;
    text-align: center;
    padding: 40px 20px;
    box-sizing: border-box;
    margin-top: 60px;
}

footer p {
    margin: 8px 0;
    font-size: 15px;
}

footer a {
    color:#ffffff;
    text-decoration:none;
}

footer a:hover {
    text-decoration: underline;
}

/* ========== 手机端适配（多乐士官网风格：2 列紧凑卡片） ========== */
@media (max-width: 768px) {
    .content-wrap {
        padding: 0 10px;
    }
    .product-big-box {
        padding: 10px;
        border-radius: 8px;
    }
    .taobao-product-wrap {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
        margin-top: 12px;
    }
    .card-img-box {
        height: auto;
        aspect-ratio: 4 / 5;
    }
    .card-body {
        padding: 10px;
    }
    .card-title {
        font-size: 13px;
        min-height: auto;
        line-height: 1.4;
        margin-bottom: 6px;
    }
    .card-desc {
        font-size: 12px;
        height: auto;
        min-height: 30px;
        margin-bottom: 8px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .card-btn {
        font-size: 13px;
        padding: 7px 0;
    }
    /* 分类导航按钮 */
    .prod-cat-nav {
        gap: 6px;
        margin: 12px 0 2px;
    }
    .cat-btn {
        padding: 7px 14px;
        font-size: 13px;
    }
    /* 计算器推广卡片 */
    .calc-card-in-grid .card-img-box {
        height: auto;
        aspect-ratio: 4 / 5;
    }
    .calc-card-in-grid .calc-icon {
        font-size: 48px;
    }
    .calc-card-in-grid .card-title {
        font-size: 14px;
    }
    .calc-card-in-grid .calc-btn {
        font-size: 14px;
        padding: 10px 0;
        margin-top: 10px;
    }
}
