:root{
    --skyblue-pink-color:linear-gradient(to right, #83cbff, #df56ec) 1;
}

html{
    min-width: 300px;
    max-width: 100%;
}
body{
    margin: 0;
    font-family: "微软雅黑",Nunito;
    color: black; 
    background-color: white;
}

/* --------------------------- */
/* 首页栏 */
.header{
    width: 100%;
    gap: 30px; 
    background-color: white;
    z-index: 1;
    border-bottom: 3px solid;  
    box-sizing: border-box;
    border-image: linear-gradient(to right, #83cbff, #df56ec) 10;
    display:flex;   
    position: fixed; 
    top: 0;  
    align-items: center;
    padding: 0 10px;
}

.apple-idbox{
    transition: 0.6s;
    cursor: pointer;
}
.apple-idbox:hover{
    transform: scale(1.05);
}
/* 苹果id图片 */
.apple-img{
    width: 90px;
    height: auto;
}

/* ==================== */
/* 响应式通用布局 */
/* ==================== */
.web-content{
    margin-top: 60px;
    padding: 5px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}
.header{
    height: 50px;
    overflow: hidden;
    display: flex;
}
.head-logo{
    height: 50px;
    width: auto;
}
.home-button{
    font-size: 12px;
    width: 100px; 
    height: 30px; 
    color: black;
    background-color: white;
    border: 2px solid; 
    border-image: linear-gradient(to right, #83cbff, #df56ec) 10;
    border-radius: 8px;
    cursor: pointer;
    flex-shrink: 0;
}
.home-button:hover{
    transition: 0.6s;
    transform: scale(1.1);
}

/* 苹果id板块：自适应列数 */
.apple{
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    justify-content: center;
}
/* 苹果id盒子：宽度随网格自适应，高度随内容 */
.apple-idbox{
    width: 100%;
    min-height: 200px;
    box-sizing: border-box;
    padding: 10px;
    border: 3px solid rgb(99, 110, 112);  
    border-radius: 8px; 
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
/* 商品名称：最多显示2行，超出省略号 */
.apple-font{
    width: 100%;
    font-size: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}
/* 商品价格+库存行 */
.apple-meta{
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    font-size: 13px;
}
.price-text{
    color: rgb(255, 77, 0);
    font-weight: bold;
}
.stock-text i,
.price-text i{
    margin-right: 3px;
}
.sold-out-text{
    color: #e74c3c;
    font-weight: bold;
}
/* 售完状态：整体置灰 */
.apple-idbox.sold-out{
    filter: grayscale(1);
    opacity: 0.65;
    cursor: not-allowed;
}

/* ==================== */
/* 手机端（<=600px） */
/* ==================== */
@media(max-width: 600px){
    .header{
        gap: 10px;
    }
    .home-button{
        width: 80px;
        font-size: 11px;
    }
    .apple{
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 8px;
    }
    .apple-img{
        width: 70px;
    }
    .apple-idbox{
        min-height: 180px;
        padding: 8px;
    }
    .apple-font{
        font-size: 11px;
    }
}

/* ==================== */
/* 超小屏（<=360px） */
/* ==================== */
@media(max-width: 360px){
    .apple{
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 6px;
    }
    .home-button{
        width: 70px;
        font-size: 10px;
    }
    .apple-font{
        font-size: 10px;
    }
    .apple-meta{
        font-size: 12px;
    }
}
