/* 公共样式 */
*{
    margin:0;
    padding:0;
}
/* 垂直对齐 */
img{
    vertical-align:middle;
}
/* 列表不显示任何项目符号 */
ul,li,dl,dt,dd{
    list-style: none;
}
/* 不显示下划线 */
a{
    text-decoration: none;
}
a:link{
    color: var(--main-text-color);
}
a:visited{
    color: var(--main-text-color);
}
a:hover{
    color: var(--main-text-color);
}
a:active{
    color: var(--main-text-color);
}
/* 整体设定 */
body{
    position: relative;
    font-family: 'MiSans-Regular', serif;

    height: 100%;
    max-height: 100%;
    overflow-y: auto;

    color: var(--main-text-color);
    background-color: var(--main-background);
}
/* 页面超出后隐藏 */
.overflow{
    overflow:hidden;
}
/* 内容区域 */
.main{
    width: 100%;
    margin:0 auto;
}
.left{
    float: left;
}
.right{
    float: right;
}
/* 避免浮动元素带来的父级坍塌 */
.clear::after{
    content:'';
    display: block;
    height:0;
    clear: both;
    visibility: hidden;
}
.main-color {
    color: var(--main-color);
}

/* 头部样式 */
.header_placeholder { /* 占位 */
    height: var(--head-top-height);
}
.header_top {
    /* 布局 */
    position: fixed; /* 固定顶部 */
    top: 0;
    z-index: 999;

    display: flex; /* Flexbox布局 */
    align-items: center; /* 垂直居中 */
    justify-content: space-between; /* 水平主轴分散对齐 */

    /* 盒模型 */
    height: var(--head-top-height);
    width: 100vw;
    padding: 0 var(--main-pageside);
    box-sizing: border-box; /* 内边距和边框包含在元素的总宽度和高度内 */

    /* 文字 */
    font-size: var(--font-size-4);

    /* 背景和其他 */
    background-color: var(--item-background);
}
.header_top .left {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start; /* 水平主轴靠左对齐 */
    overflow: hidden;       /* 确保子元素不超出边界 */
    padding: 0.5vw;
}
.header_top .middle {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}
.header_top .right {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end; /* 水平主轴靠右对齐 */
    overflow: hidden;       /* 确保子元素不超出边界 */
    padding: 0.5vw;
}
.header_top .btn {
    position: relative; /* 为伪元素定位做准备 */
    display: flex; /* 使用 flex 布局 */
    justify-content: center; /* 水平居中 */
    align-items: center; /* 垂直居中 */
    cursor: pointer;
    outline: none;
    padding: 0.7vw;
    width: 4vw;
    height: 4vw;
    line-height: normal;
}
.header_top .btn:not(:first-child){ /* 除了第一个元素 */
    margin-left: 2vw;
}
.header_top .btn:not(:first-child)::before{ /* 除了第一个元素 */
    content: '';
    position: absolute;
    left: -1vw;
    top: 0.25vw;
    bottom: 0.25vw;
    width: 1px;
    background-color: var(--color-9f);
}
.header_top .tel {
    display: flex; /* 使用 flex 布局 */
    justify-content: center; /* 水平居中 */
    align-items: center; /* 垂直居中 */
    padding: 0.7vw;
    height: 2.5vw;
    line-height: 2.5vw;
    font-size: 2.5vw;
}
.header_top .tel a{
    color: var(--color-9f);
}

/* 底部浮层 */
.header_bottom {
    position: fixed;
    bottom: 0;
    z-index: 999;
    width: 100vw;
    height: var(--head-bottom-height);
    box-shadow: 0 0 var(--head-bottom-shadow-height) 0 rgba(249, 249, 249, 0.8);
    background: var(--item-background);
}
.header_bottom .lot_icons{
    display: flex;
    justify-content: space-between; /* 空白部分均分 */
    align-items: center; /* 居中对齐 */
    width: calc(100vw - var(--margin-body) - var(--margin-body));
    height: var(--head-bottom-icon-height);
    margin: 0 var(--margin-body);
}
.header_bottom .lot_icons .icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 var(--margin-inside);
    width: 12vw;
    font-size: var(--font-30);
}
.header_bottom .lot_icons .iconfont {
    font-size: 8vw;
}
.header_bottom .lot_icons .cart_totle_nums {
    display: none;
    position: absolute;
    left: 64vw;
    bottom: var(--cart_totle_nums);
    text-align:center;
    border-radius: 50%;
    width: 5vw;
    height: 5vw;
    line-height: 5vw;
    font-size: 3.5vw;
    font-weight: bold;
    color: #fff;
    background-color: var(--main-color);
}
.header_buy_bottom .con-buy .cart_totle_nums {
    position: absolute;
    display: none;
    width: 5vw;
    height: 5vw;
    border-radius: 50%;
    font-size: var(--font-40);
    font-weight: bold;
    color: #fff;
    background-color: var(--main-color);
    text-align:center;
    left: 32vw;
    bottom: var(--cart_totle_nums);
}
.show_env{
    position: fixed;
    width: var(--show_env);
    height: var(--show_env);
    left: var(--margin-body);
    top: 15vw;
    z-index: 999;
}

/* footer */
.footer{
    position: relative;
    height: var(--head-bottom-height);
}

/* 购物车 */
.footer-cart {
    display: none;
    width: 100vw;
    height: 24vw;
}
.footer-cart .cart-img {
    float: left;
    overflow: hidden;
    margin: var(--item-margin) 0 var(--item-margin) var(--main-pageside);
    border-radius: 1vw;
    width: 24vw;
    height: 24vw;
}
.footer-cart .cart-img img{
    width: 100%;
    height: 100%;
}
.footer-cart .cart-info{
    position: relative;
    float: right;
    margin: var(--item-margin) var(--main-pageside) var(--item-margin) var(--item-margin);
    width: 68vw;
    height: 24vw;
}
.footer-cart .cart-name {
    display: inline-block;
    white-space: normal;
    height: 3.5vw;
    line-height: 4.2vw;
    font-size: 3.5vw;
}
.footer-cart .cart-spec {
    margin-top: 1vw;
    height: 2.5vw;
    line-height: 2.5vw;
    font-size: 2.5vw;
    color: var(--color-9f);
}
.footer-cart .cart-spec .stock{
    margin-left: 3vw;
}
.footer-cart .cart_price {
    position: absolute;
    bottom: 0;
    font-size: 4vw;
    color: var(--main-color);
}

.footer-cart .cart_add {
    position: absolute;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: flex-end;
}
.footer-cart .cart_add input[type="number"] {
    margin-left: 0.5vw;
    width: 7vw;
    height: 6vw;
    border: none;
    font-size: 3vw;
    text-align: center;
    background-color: var(--main-background);
}
.footer-cart .cart_add .quantity-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 6vw;
    height: 6vw;
    background-color: var(--main-background);
}
.footer-cart .cart_add .left-radius {
    border-top-left-radius: 1vw;
    border-bottom-left-radius: 1vw;
    font-size: 2.8vw;
}
.footer-cart .cart_add .right-radius {
    margin-left: 0.5vw;
    border-top-right-radius: 1vw;
    border-bottom-right-radius: 1vw;
    font-size: 2.8vw;
}
.footer-cart .cart_add .add-btn{
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: var(--item-margin);
    border-radius: 1.5vw;
    width: 24vw;
    height: 6vw;
    line-height: 4vw;
    font-size: 4vw;
    color: #fff;
    background-color: var(--color-f60) ;
}

body .my-confirm .layui-layer-btn0{
    color: #fff;
    background-color: var(--color-f60);
    border-color: var(--color-f60);
}

/* 商品能用的优惠券 */
.bg-img .coupon_tag{
    position: absolute;
    bottom:2px;
    left:2px;
    width: 20.5vw;
    z-index: 1;
}
.bg-img .coupon_tag span{
    height: 3vw;
    line-height: 3vw;
    font-size: 2.3vw;
    text-align: center;
    color: #ff4500;
    background-color: rgba(255, 255, 255, 0.4);
    border: 1px solid #ff4500;
    border-radius: 3px;
    margin-right: 2px;
    margin-bottom: 1px;
}
