
#main {
    display: flex;
    flex-wrap: wrap;
    gap: 20px; /* 图之间间距 */
    justify-content: flex-start;
    margin-top: 40px;
  }
  
#main .desc {
    width: 100%;
    margin-top: 40px;
    margin-bottom: 40px;
    text-align: left; /* 新增：对齐主内容 */
  }
  
#main .desc p {
    font-size: 14px;
    margin-bottom: 20px;
    text-align: center;  
    max-width: 720px;  /* 可选：限制文字宽度，与图片宽度差不多 */
  }

#main .shop-item > div{
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

#main .shop-item > div > div {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

#main .shop-item div img{
    width: 240px;
    height: 240px;
    object-fit: cover;
    cursor: pointer;
}

.mask {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;

    z-index: 10;

    background-color: #000;
    opacity: 0.8;
}

.alert-box {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;

    z-index: 11;

    display: flex;
    justify-content: center;
    align-items: center;
}

@keyframes arise {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.alert-content {
    width: 700px;
    height: 600px;
    background-color: #FFF;
    border-radius: 10px;

    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;

    position: relative;

    animation: arise .6s;

    overflow: auto;
}

.exit-svg {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
}


.small-img {
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 20px;

}

.small-img .small-img-item {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
}


.footer-desc .title {
    font-weight: bold;
}

.footer-desc .price {
    margin-bottom: 20px;
}

.footer-desc p:nth-child(n+3) {
    font-size: 14px;
    margin-bottom: 10px;
}

.footer-cart .counter {
    display: flex;
}

.footer-cart .counter span{
    /*设置边框*/
    border: 1px solid #d3dbe2;
    /*设置padding*/
    padding: 10px 20px;
}

.footer-cart .counter span:nth-child(2){
    /*因为3个盒子有两个边框有重叠，所以会导致中间的线条变为2px，这里是取第二个盒子，去掉其左右边框，让边框宽度看起来一致*/
    border-left: none;
    border-right: none;
}

.footer-cart .counter span:first-child,
.footer-cart .counter span:last-child {
    cursor: pointer;
    transition: 0.6s;
}

.footer-cart .counter span:first-child:hover,
.footer-cart .counter span:last-child:hover {
    background-color: #977bc9;
}

.footer-cart .cart {
    padding: 10px 30px;
    background-color: #2c2a2a;
    color: #f0efea;
    font-weight: bold;
    display: inline-block;
    margin-top: 10px;
    cursor: pointer;
}

.shop-cart {
    position: fixed;
    z-index: 10;
    right: 0;
    top: 50%;
    background-color: black;
    color: #FFF;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;

    padding: 10px 20px;
    opacity: 0.8;
    cursor: pointer;
}

@keyframes right-to-left {
    0% {
        width: 0;
    }

    100% {
        width: 300px;
    }
}

.shop-cart-detail {
    position: fixed;
    z-index: 11;
    top: 0;
    bottom: 0;
    right: 0;
    width: 300px;
    background-color: #FFF;
    box-shadow: 0 0 6px 0 rgba(0, 0, 0, 0.1);
    display: none;
    animation: right-to-left 0.3s;

    padding: 20px;
}

.shop-cart-detail .cart-detail-exit {
    position: absolute;
    top: 20px;
    right: 20px;
    cursor: pointer;
}

.shop-cart-detail .title {
    font-size: 50px;
}

.shop-cart-detail .detail-item {
    margin-top: 20px;
    display: flex;
    gap: 20px;
}

.shop-cart-detail .detail-item img {
    width: 100px;
    height: 100px;
    object-fit: cover;
}

/*选中.shop-cart-detail .detail-item下面的直接子节点div*/
.shop-cart-detail .detail-item > div {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.shop-cart-detail .detail-item > div > div:nth-child(2){
    font-size: 14px;
}

.shop-cart-detail .detail-item .logic {
    display: flex;
    gap: 30px;
    justify-content: space-between;
    align-items: center;
}

.shop-cart-detail .detail-item .logic .content span{
    display: inline-block;
    padding: 5px 10px;
    border: 1px solid #eceff2;
}

.shop-cart-detail .detail-item .logic .content span:nth-child(1),
.shop-cart-detail .detail-item .logic .content span:nth-child(3) {
    cursor: pointer;
}

.shop-cart-detail .detail-item .logic .content span:nth-child(1):hover,
.shop-cart-detail .detail-item .logic .content span:nth-child(3):hover {
    background-color: #977bc9;
}

.shop-cart-detail .detail-item .logic .price {
    font-weight: bold;
}

.shop-cart-detail .submit {
    /*绝对定位*/
    position: absolute;
    /*距离底部20px*/
    bottom: 20px;

    /*居中*/
    right: 50%;
    transform: translateX(50%);
    font-weight: bold;
    cursor: pointer;
    background-color: #000;
    color: #FFF;
    padding: 10px 20px;
    transition: 0.3s;
}

.shop-cart-detail .submit:hover {
    background-color: #9785cb;
}


