.product {
    @extend %list-reset;

    .badge {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 24px;
        padding: 0 10px;
        color: #fff;

        i {
            font-style: normal;
            color: #ffffff;
            text-align: center;
            line-height: 1.2em;
            font-size: 1.3rem;
        }

        &--sale {
            background-color: #fe9931;
        }

        &--hot {
            background-color: $color-danger;
        }

        &--out-of-stock {
            background-color: #999;
        }
    }

    .product__badges {
        display: inline-block;
        position: absolute;
        top: 15px;
        right: 20px;
        z-index: 30;
    }

    .product__shopping {
        position: absolute;
        bottom: 10px;
        left: 10px;
        z-index: 30;
        width: calc(100% - 20px);
        padding: 1.5rem 2rem;
        font-size: 1.3rem;
        text-align: center;
        color: $color-text;
        line-height: 2rem;
        background-color: #fff;
        @include hidden;
        @include transform(translateY(100%));
        @include transition(all 0.5s ease);
    }

    .product__actions {
        position: absolute;
        top: 50%;
        left: 50%;
        z-index: 30;
        @include transform(translate(-50%, -100%));
        @include hidden;
        @include transition(all 0.25s ease);
        width: 100%;

        li {
            margin-bottom: 10px;
            text-align: center;

            a {
                display: inline-block;
                padding: 10px 30px;
                line-height: 20px;
                text-align: center;
                color: $color-heading;
                border-radius: 4px;
                background-color: #ffffff;

                &:hover {
                    background-color: $color-heading;
                    color: #ffffff;

                    i {
                        color: $color-1st;
                    }
                }
            }

            &:last-child {
                margin-bottom: 0;
            }
        }
    }

    .product__overlay {
        display: block;
        @include max-area();
        z-index: 10;
    }

    .product__thumbnail {
        position: relative;

        img {
            width: 100%;
            max-width: 100%;
        }

        &:before {
            content: "";
            @include max-area();
            z-index: 1;
            background-color: rgba(#000, 0.15);
            @include transition(all 0.4s ease);
            @include hidden;
        }

        .product__actions {
            z-index: 11;
        }

        .product__favorite {
            position: absolute;
            top: 10px;
            left: 10px;
            z-index: 40;
            color: #ffffff;
            @include hidden;
            @include transition(all 0.4s ease);
            font-size: 16px;

            &.active, &:hover {
                color: $color-1st;
            }
        }

        .product__size {
            display: block;
            position: absolute;
            bottom: 0;
            left: 0;
            text-align: center;
            width: 100%;
            color: #ffffff;
            @include hidden;
            z-index: 12;
            @include transition(all 0.25s ease);
        }

        &:hover {
            &:before {
                @include show;
            }

            .product__favorite {
                @include show;
            }

            .product__shopping {
                @include show;
                @include transform(translateY(0));
            }

            .product__actions {
                @include show;
                @include transform(translate(-50%, -50%));
            }

            .product__size {
                @include show;
            }
        }
    }

    .product__title {
        display: block;
        font-size: 18px;
        font-weight: 600;
        line-height: 1.8em;
        color: $color-heading;

        &:hover {
            color: $color-1st;
        }
    }

    .product__variants {
        display: flex;
        flex-flow: row nowrap;
        justify-content: center;
        align-items: center;

        li {
            margin-right: 6px;

            &:last-child {
                margin-right: 0;
            }
        }
    }

    .product__content {
        padding: 15px 0 0;
        text-align: left;
    }

    .product__price {
        margin-bottom: 5px;
        font-size: 1.4rem;
        font-weight: 400;
        color: #696969;

        del {
            margin-right: 5px;
            color: $color-text;
        }

        &.sale {
            del {
                color: $color-danger;
            }
        }
    }

    .product__color {
        .radio--color {
            margin-right: 0px;

            &:last-child {
                margin-right: 0;
            }
        }
    }

    &.product--inside {
        position: relative;

        .product__thumbnail {
            &:hover {
                > img {
                    display: none;

                    &.product__img {
                        display: block;
                    }
                }
            }
        }

        .product__content {
            position: absolute;
            bottom: 0;
            left: 0;
            width: 100%;
            padding: 2rem 5rem 1rem;
            text-align: center;
        }

        .product__title {
            font-size: 1.6rem;
        }

        .countdown {
            margin-bottom: 1rem;
            display: flex;
            flex-flow: row nowrap;
            justify-content: space-between;

            li {
                background-color: $color-heading;
                text-align: center;
                padding: 10px 10px;
                border-radius: 50px;
                min-width: 60px;

                span {
                    color: #ffffff;
                }

                p {
                    margin-bottom: 0;
                }
            }
        }
    }

    @include media("<sm") {
        max-width: 350px;
        margin: 0 auto 2rem;
    }
}

.product--on-cart {
    display: flex;
    flex-flow: row nowrap;
    justify-content: space-between;
    align-items: center;

    > * {
        flex-basis: 100%;
    }

    .product__thumbnail {
        max-width: 56px;
    }

    .product__content {
        position: relative;
        padding-right: 30px;
        padding-left: 20px;

        .product__remove {
            position: absolute;
            top: 0;
            right: 0;
            font-size: 18px;
            color: $color-text;

            &:hover {
                text-decoration: none;
                color: $color-danger;
            }
        }

        a {
            display: block;
            color: $color-heading;
            font-size: 14px;

            &:hover {
                text-decoration: underline;
            }
        }

        small {
            font-size: 12px;
            color: $color-heading;
            font-weight: 600;

            .cart-price {
                color: $color-1st;
            }
        }
    }
}

.product--cart {
    display: flex;
    flex-flow: row nowrap;
    align-items: center;

    .product__title {
        display: block;
        font-size: 16px;
        font-weight: 600;
        color: $color-heading;

        &:hover {
            color: $color-1st;
        }
    }

    .product__thumbnail {
        flex-basis: 110px;
    }

    .product__content {
        padding-left: 15px;

        small {
            font-size: 14px;
        }
    }
}

.product--detail {
    figure.product__tags,
    figure.product__sharing {
        figcaption {
            font-size: 14px;
            text-transform: uppercase;
            font-weight: 600;
            color: $color-heading;
            margin-bottom: 20px;
        }
    }

    .product__info-header {
        margin-bottom: 20px;
        border-bottom: 1px solid #ddd;
    }

    .product__title {
        font-size: 24px;
        line-height: 1.3em;
        font-weight: 500;
        color: $color-heading;
        text-transform: uppercase;
        display: inline-block;
    }

    .product__variants {
        .item {
            margin-bottom: 10px;
            border: 2px solid transparent;
            cursor: pointer;

            img {
                opacity: 0.5;
                transition: all 0.4s ease;
            }

            &:last-child {
                margin-bottom: 0;
            }

            &.slick-current {
                img {
                    opacity: 1;
                }
            }

            &:hover {
                img {
                    width: 100%;
                    opacity: 1;
                }
            }
        }
    }

    .product__gallery {
        position: relative;

        img {
            width: 100%;
        }

        .slick-arrow {
            @include vertical-align();
            z-index: 100;
            width: 35px;
            height: 35px;
            color: #000;
            font-size: 18px;
            background-color: rgba(#fff, 0.5);
            border-radius: 4px;
            @include hidden;

            i {
                @include center();
            }

            &:first-child {
                left: 20px;
            }

            &:last-child {
                right: 10px;
            }

            &:hover {
                background-color: $color-1st;
                color: #fff;
            }
        }

        &:hover {
            .item {
                &:before {
                    @include show;
                }
            }

            .slick-arrow {
                @include show;
            }
        }
    }

    .product__video {
        a {
            vertical-align: middle;

            &:hover {
                &.btn--black {
                    background-color: $color-1st;
                    border-color: $color-1st;
                }
            }
        }

        i {
            font-size: 20px;
            font-weight: bold;
            vertical-align: middle;
        }
    }

    .product__badge {
        display: inline-block;
        position: absolute;
        top: 10px;
        right: 10px;
        z-index: 30;
        padding: 0 5px;
        background-color: #fe9931;

        i {
            font-style: normal;
            color: #ffffff;
            text-align: center;
            line-height: 1.2em;
            font-size: 1.3rem;
            letter-spacing: 0.2em;
        }
    }

    .product__info {
        text-align: left;
    }

    .product__add-wishlist {
        font-size: 14px;

        span {
            padding-left: 5px;
            text-decoration: underline;
        }
    }

    .product__price {
        display: flex;
        flex-flow: row nowrap;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 10px;
        font-size: 18px;
        font-weight: 400;
        color: $color-heading;

        del {
            font-style: normal;
            color: #bcbcbc;
            font-size: 1.3rem;
        }

        p {
            font-size: 16px;
            font-weight: 600;
            color: $color-heading;

            span {
                font-weight: inherit;
            }
        }

        &.sale {
            color: $color-heading;

            del {
                margin-right: 20px;
                font-size: 22px;
                color: $color-danger;
            }
        }

        &.out-stock {
            span {
                position: relative;
                font-size: 14px;
                color: $color-heading;
                margin-left: 40px;

                &:before {
                    position: relative;
                    top: -2px;
                    display: inline-block;
                    content: "\e935";
                    font-family: Linearicons;
                    vertical-align: middle;
                    margin-right: 6px;
                    color: #ffffff;
                    padding: 4px;
                    width: 16px;
                    height: 16px;
                    border-radius: 50%;
                    font-size: 8px;
                    background-color: #999;
                }
            }
        }
    }

    .product__attribute {
        display: flex;
        flex-flow: row nowrap;
        align-items: center;
        border-bottom: 1px solid #ddd;

        > * {
            flex-basis: 100%;
        }

        label {
            margin-bottom: 0;
            max-width: 60px;
        }

        .form-control {
            border: none;
        }
    }

    .product__color {
        @extend %list-reset;
        padding-bottom: 10px;

        .color-swatch {
            li {
                display: inline-block;
                vertical-align: top;
                margin-right: 5px;

                &:last-child {
                    margin-right: 0;
                }

                span {
                    margin-bottom: 0;
                }
            }
        }
    }

    .product__modal {
        display: flex;
        justify-content: space-between;
        align-items: center;

        a {
            text-decoration: underline;
        }
    }

    .product__desc {
        margin-bottom: 20px;

        p {
            margin-bottom: 0;
            color: #777777;
            font-size: 14px;
        }
    }

    .product__shopping {
        margin-bottom: 36px;

        figure {
            display: flex;
            justify-content: space-between;
            max-width: 470px;
            padding-bottom: 20px;

            > * {
                margin-right: 10px;
            }

            .form-group--number {
                max-width: 150px;

                input {
                    border-radius: 0;
                }
            }

            .btn {
                text-transform: uppercase;
                font-weight: 500;
                min-width: 250px;
                padding: 12px 30px 13px;
                vertical-align: top;
                text-align: center;
                font-size: 14px;

                &.btn--gray {
                    color: #ffffff;
                    background-color: rgba(#222, 0.5);

                    &:hover {
                        background-color: $color-heading;
                    }
                }
            }

            .product__favorite {
                position: relative;
                display: flex;
                justify-content: center;
                align-items: center;
                margin-right: 0;
                min-width: 45px;
                height: 45px;
                vertical-align: top;
                color: #999999;
                border: 2px solid #eaeaea;

                i {
                    padding-top: 2px;
                    color: $color-text;
                    @include center();
                }

                &:hover {
                    border-color: $color-1st;

                    i {
                        color: $color-1st;
                    }
                }
            }
        }

        .btn--black {
            letter-spacing: 0.1em;
        }
    }

    .product__links {
        margin-bottom: 3rem;

        a {
            display: inline-block;
            margin-right: 20px;
            font-weight: 600;
            color: $color-heading;

            &:hover {
                color: $color-1st;
            }
        }
    }

    .product__specification {
        margin-bottom: 2rem;
        padding-top: 20px;
        border-top: 1px solid #eaeaea;

        p {
            color: $color-heading;

            strong {
                margin-right: 5px;
                text-transform: uppercase;
            }

            a {
                color: $color-text;
                font-size: 15px;

                &:after {
                    content: ",";
                    padding-right: 3px;
                }

                &:first-child {
                    padding-left: 5px;
                }

                &:last-child {
                    &:after {
                        display: none;
                    }
                }

                &:hover {
                    color: $color-1st;
                }
            }
        }
    }

    .product__sharing {
        margin-bottom: 0;

        p {
            line-height: 30px;
            color: $color-heading;
            font-weight: 500;
        }

        a {
            display: inline-block;
            width: 30px;
            height: 30px;
            margin-right: 5px;
            vertical-align: top;
            border-radius: 50%;

            i {
                @include center;
                font-size: 20px;
                color: $color-heading;
            }

            &:last-child {
                margin-right: 0;
            }

            &:hover {
                color: #fff;
                background-color: $color-1st;
            }
        }

        p {
            margin-bottom: 0;
        }

        .list--social {
            li {
                margin-right: 5px;
            }

            a {
                width: 40px;
                height: 40px;
            }
        }
    }

    .product__tags {
        a {
            margin-right: 6px;
            margin-bottom: 6px;
            display: inline-block;
            padding: 6px 10px;
            border-radius: 50px;
            font-size: 14px;
            border: 1px solid $color-heading;

            &:hover {
                color: #fff;
                background-color: $color-1st;
                border-color: $color-1st;
            }
        }
    }

    .product__bundle {
        margin-bottom: 2rem;

        h4 {
            font-weight: 600;
            font-size: 2.1rem;
        }

        .form-group {
            margin-bottom: 15px;
        }

        p {
            margin-bottom: 15px;

            strong {
                font-weight: 600;
                color: #696969;
            }
        }

        .checkbox {
            margin-bottom: 10px;
        }

        &-item {
            p {
                margin-bottom: 0;
            }

            img {
                margin-bottom: 10px;
                max-width: 100px;
            }

            span {
                padding: 0 5px;
            }

            @include media("<xs") {
                img {
                    max-width: 50px;
                }
            }
        }
    }

    .product__group {
        img {
            max-width: 80px;
        }

        .form-group--number-2 {
            min-width: 60px;
            max-width: 100px;
            display: inline-block;

            .form-control {
                border-radius: 0;
                border-color: #bbb;
                max-width: 60px;
                height: 36px;
            }
        }

        table {
            thead {
                tr {
                    th {
                        border: none;
                        padding: 15px 20px;
                        background-color: #efefef;

                        &:last-child {
                            text-align: right;
                        }
                    }
                }
            }

            tr {
                td {
                    padding: 10px 20px;
                    border: none;

                    a {
                        display: block;
                        color: $color-heading;

                        &:hover {
                            color: $color-1st;
                        }
                    }

                    span {
                        color: $color-heading;

                        del {
                            color: $color-text;
                            margin-left: 10px;
                        }
                    }

                    &:nth-child(2) {
                        min-width: 230px;
                    }

                    &:last-child {
                        text-align: right;
                    }
                }
            }
        }
    }

    .gallery__item {
        display: block;
    }

    .product__variations {
        margin-bottom: 2rem;
        padding-bottom: 20px;

        figure {
            margin-bottom: 30px;

            figcaption {
                margin-bottom: 10px;
                font-size: 14px;
                color: $color-heading;
            }

            &:last-child {
                margin-bottom: 0;
            }
        }
    }

    .product__rating {
        display: flex;
        width: 100%;

        .br-wrapper {
            margin-right: 10px;
            display: inline-block;

            a {
                font-size: 12px;
            }
        }

        span {
            color: $color-text;
            font-size: 14px;
        }
    }

    .product__sku {
        display: block;
        margin-bottom: 20px;
        font-size: 12px;
        color: #bbbbbb;
    }

    .product__info-header {
    }

    .product__thumbnail {
        display: flex;
        flex-flow: column wrap;
        margin-bottom: 30px;
        width: 100%;

        > * {
            width: 100%;
        }

        figure {
            position: relative;
            display: block;
        }

        .product__variants {
            width: 100%;
            min-width: 80px;
        }

        .product__video {
            position: absolute;
            bottom: 20px;
            right: 20px;
            z-index: 20;
        }

        .wrapper {
            position: relative;
            margin-bottom: 10px;
        }

        &.product__thumbnail[data-vertical="false"] {
            flex-flow: column wrap;

            figure {
                max-width: 100%;
                padding-left: 0;
            }

            .product__variants {
                max-width: 100%;
                text-align: center;
                width: 100%;

                .item {
                    margin-bottom: 0;
                    margin-right: 10px;

                    &.slick-active {
                        &:last-child {
                            margin-right: 0;
                        }
                    }
                }

                .slick-list {
                    margin-right: -10px;
                }

                .slick-arrow {
                    font-size: 20px;
                    line-height: 20px;
                    @include vertical-align();

                    &:first-child {
                        left: -20px;

                        i {
                            &:before {
                                content: "\f104";
                            }
                        }
                    }

                    &:last-child {
                        right: 0px;

                        i {
                            &:before {
                                content: "\f105";
                            }
                        }
                    }

                    &:hover {
                        i {
                            color: #000;
                        }
                    }
                }
            }

            .product__gallery {
                margin-bottom: 10px;

                img {
                    width: 100%;
                }
            }
        }
    }

    .tab-list {
        position: relative;
        display: block;
        margin: 0 0 50px;
        padding: 20px 0;
        text-align: center;

        li {
            display: inline-block;
            margin-right: 30px;

            a {
                position: relative;
                padding: 10px 0;
                display: inline-block;
                line-height: 20px;
                font-weight: 700;
                font-size: 20px;
                border-radius: 50px;
                color: $color-text;
                border: 1px solid transparent;
                text-transform: uppercase;

                &:before {
                    content: "";
                    position: absolute;
                    top: 100%;
                    left: 0;
                    width: 100%;
                    height: 3px;
                    background-color: $color-1st;
                    @include hidden;
                }

                &:hover {
                    color: $color-heading;
                }
            }

            &:last-child {
                margin-right: 0;
            }

            &.active {
                a {
                    color: $color-1st;

                    &:before {
                        @include show;
                    }
                }
            }
        }
    }

    .product__review {
        h4 {
            margin-bottom: 30px;
            font-weight: 400;
            font-size: 18px;
            color: $color-heading;
        }
    }

    .product__content {
        padding-top: 50px;
    }

    &.has-background {
        .product__background {
            padding: 100px 0;
            background-color: #f2f1f0;
            @extend %list-reset;
        }

        .product__nav {
            display: flex;
            flex-flow: row nowrap;
            justify-content: space-between;
            padding-bottom: 50px;
        }

        .product__content {
            .tab-list {
                border-top: none;
            }
        }
    }

    @media (max-width: 480px) {
        .product__shopping {
            figure {
                flex-flow: row wrap;

                .form-group--number {
                    margin-right: 0;
                    max-width: 100%;
                    width: 100%;
                }

                > * {
                    margin-bottom: 10px;
                }

                .btn {
                    flex-grow: 2;
                    text-align: center;
                }
            }
        }
    }

    @media (min-width: 768px) {
        .product__thumbnail {
            max-width: 500px;
        }
    }

    @media (min-width: 992px) {
        .product__title {
            font-size: 30px;
        }

        .product__desc {
            p {
                font-size: 16px;
            }
        }

        .product__price {
            margin-bottom: 10px;
            font-size: 24px;
        }

        .product__sharing {
            padding-top: 20px;
        }

        .product__header {
            display: flex;
            flex-flow: row nowrap;

            > * {
                width: 100%;
                max-width: 50%;
            }

            .product__thumbnail {
                padding-right: 30px;
            }
        }

        .product__review {
            h4 {
                font-size: 24px;
            }
        }

        .product__content {
            padding-top: 100px;
        }
    }

    @media (min-width: 1200px) {
        .product__thumbnail {
            flex-flow: row-reverse nowrap;
            align-content: flex-start;

            figure {
                max-width: calc(100% - 80px);
                padding-left: 10px;
            }
        }

        .product__variants {
            max-width: 80px;
        }

        .product__info {
            padding-left: 30px;
        }
    }
    @media screen and (max-width: 479px) {
        .product__modal {
            padding-bottom: 10px;
        }
    }
}
