_search.scss 4.02 KB
/*
 *Description: 商品列表
 *Author: chenglong.wang@yoho.cn
 *Date: 2015/12/1
 */

.product-search-page {

    //todo

    .goods-container {
        height: auto;
        padding: 25px 0 0 0;
        position: relative;
        width: 1150px + 10px;//每列增加右边距

        //标签
        .tag-container {
            font-size: 12px;
            height: 22px;
            line-height: 22px;

            .good-tag {
                padding: 0 7px;
                display: block;
                float: left;
                margin-right: 3px;

                &:nth-last-of-type(1) {
                    margin-right: 0;
                }

                @each $tag, $tagColor, $tagBackground in (new-tag, #fff, #78dc7d),
                        (renew-tag, #fff, #78dc7e),
                        (new-festival-tag, #fff, #000000),
                        (yep-tag, #fff, #ff565b),
                        (ymp-tag, #fff, #ff565b),
                        (sale-tag, #fff, #ff565b) {
                    &.#{$tag} {
                        color: $tagColor;
                        background: $tagBackground;
                    }
                }
                &.limit-tag {
                    color: #4e4e4e;
                    border: 1px solid #4e4e4e;
                }
            }
        }

        //商品列表
        .good-info {
            height: 400px; //todo
            margin-bottom: 35px;
            width: 222px;
            margin-right: 10px;
            float: left;

            //图片
            .good-detail-img {
                width: 100%;
                height: 300px;
                position: relative;

                .good-thumb, img.lazy {
                    display: block;
                    overflow: hidden;
                    width: 100%;
                    height: 100%;
                }
                .few-tag {
                    width: 100%;
                    position: absolute;
                    left: 0;
                    height: 16px;
                    line-height: 16px;
                    background: #ffac5b;
                    color: #fff;
                    font-size: 12px;
                    text-align: center;
                    bottom: 0;
                }
            }

            //文本
            .good-detail-text {
                color: #222;
                font-size: 12px;
                text-align: center;

                > a {
                    margin-top: 16px;
                    line-height: 1.5;
                    display: block;
                }

                > .price {
                    margin-top: 10px;
                }
            }

            .col-btn {
                position: absolute;
                top: 15px;
                right: 15px;
                color: #ccc;
                font-size: 12px;
                display: none;
            }
        }

        //弹层
        .good-item-wrapper {
            border: 1px solid #dddddd;
            padding-left: 20px;
            padding-top: 18px;
            padding-right: 20px;
            position: absolute;
            background: #fff;
            display: none;

            .good-info-main{
                float: left;

                .col-btn {
                    display: block;

                    &:hover {
                        color: #f95b4f;
                        cursor: pointer;
                    }
                }
            }

            .good-select-color {
                float: left;
                margin-top: 22px;

                ul {
                    display: block;
                    float: left;
                    margin-left: 15px;
                }

                li {
                    width: 50px;
                    margin-bottom: 15px;

                    a, img {
                        display: block;
                        overflow: hidden;
                        width: 100%;
                    }
                }
            }

            .good-info {
                margin-right: 10px;
            }
        }
    }
}