@import "common/_feature";
@import "common/_product";
@import "common/_form-wrap";
@import "common/_product-card";
@import "common/_vertical-product-card";

.wrapper {
    position: relative;
    background: $color-white;
}

.overlay {
    position: fixed;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    z-index: 180;
    transition: 150ms ease-in-out;

    &.active {
        opacity: 1;
        visibility: visible;
    }
}

.section-title {
    position: relative;

    &:after {
        content: "";
        position: absolute;
        left: 0;
        bottom: -1px;
        width: 50px;
        border-bottom: 2px solid $color-default;
        border-bottom: 2px solid var(--color-primary);
    }
}

.product-options {
    display: flex;
    flex-wrap: wrap;

    li {
        font-size: 13px;
        margin-right: 5px;
        color: $color-gray;

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

    label {
        margin-bottom: 0;
        color: $color-gray-dark;
    }
}

.tab-products-header {
    border-bottom: 1px solid $border-color-lite;
}

.vertical-products {
    .vertical-products-header {
        margin-bottom: 25px;
        border-bottom: 1px solid $border-color-lite;
    }

    .section-title {
        padding-bottom: 13px;
    }

    .slick-prev,
    .slick-next {
        top: -62px;
        transform: translate(0, 0);

        &:before {
            font-size: 16px;
            font-weight: 900;
        }
    }

    .slick-prev {
        left: auto;
        right: 20px;
    }

    .slick-next {
        right: -5px;
    }
}

.btn-wishlist,
.btn-compare {
    &.added {
        &:hover {
            > i {
                color: $color-default !important;
                color: var(--color-primary) !important;
            }
        }

        > i {
            color: $color-default;
            color: var(--color-primary);
            animation: bounceIn 1.2s both cubic-bezier(0.45, 0.05, 0.55, 0.95);
        }
    }

    > i {
        color: $color-gray;
        transition: $transition-default;
    }
}

.cart-item {
    position: relative;
    display: flex;

    .product-image {
        height: 46px;
        width: 46px;
        min-width: 46px;
        border-radius: $radius-default;
        overflow: hidden;

        .image-placeholder {
            height: 40px;
            width: 40px;
        }
    }

    .product-info {
        flex-grow: 1;
        margin-left: 20px;
        min-width: 0;

        .product-name {
            font-size: 14px;
            font-weight: 400;
            line-height: 18px;
            max-height: 36px;
            display: -webkit-box;
            margin: 0 25px 3px 0;
            color: $color-black;
            text-overflow: ellipsis;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;

            &:hover {
                color: $color-default;
                color: var(--color-primary);
            }
        }

        .product-price {
            font-weight: 500;
            color: $color-default;
            color: var(--color-primary);
        }
    }

    .remove-cart-item {
        position: absolute;
        right: -8px;

        .btn-remove {
            font-size: 14px;
            opacity: 0.6;

            &:hover {
                opacity: 1;
            }
        }
    }
}

.number-picker {
    position: relative;
    width: 75px;
    display: inline-flex;

    .input-quantity {
        height: auto;
        padding: 0;
        text-align: center;
        border: none;
    }

    .btn-number {
        position: absolute;
        font-size: 14px;
        padding: 0;
        top: 50%;
        height: 18px;
        width: 18px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: $color-gray-lite;
        border-radius: 3px;
        transform: translateY(-50%);

        &:hover:not([disabled]) {
            color: $color-white;
            background: $color-default;
            background: var(--color-primary);
        }

        &[disabled] {
            opacity: 0.5;

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

    .btn-minus {
        left: 0;
    }

    .btn-plus {
        right: 0;
    }
}

.empty-cart-message {
    display: flex;
    width: 100%;
    padding: 40px 0;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;

    svg {
        height: 100px;
        width: 100px;
        margin-bottom: 22px;

        g {
            fill: $color-default;
            fill: var(--color-primary);
        }
    }

    h2 {
        margin-bottom: 6px;
    }

    span {
        color: $color-gray;
    }

    .btn-continue-shopping {
        margin-top: 20px;
    }
}

.address-card-wrap {
    .address-card {
        position: relative;
        flex-grow: 1;
        margin-bottom: 30px;
        padding: 15px 20px 12px;
        border: 1px solid $color-gray-lite;
        border-radius: $radius-default;
        cursor: pointer;

        &.active {
            border-color: $color-default;
            border-color: var(--color-primary);
        }

        .badge {
            font-size: 11px;
            position: absolute;
            top: 10px;
            right: 10px;
            min-width: 0;
            padding: 4px 7px;
            color: $color-white;
            background: $color-default;
            background: var(--color-primary);
            border-radius: 6px;
            opacity: 0.8;
        }

        .address-card-data {
            margin-bottom: 3px;

            > span {
                font-weight: 500;
                display: block;

                &:not(:first-child) {
                    font-size: 14px;
                    font-weight: 400;
                    line-height: 22px;
                    color: $color-gray;
                }

                &:nth-child(2) {
                    margin-top: 5px;
                }
            }
        }
    }
}

.arrow-black {
    appearance: none;
    background: transparent url("../images/arrow-black.png") no-repeat right 0px
        center;
    background-size: 10px;
}

.contact-info {
    li {
        display: flex;
        align-items: center;
        color: $color-gray;
        margin-bottom: 14px;
        white-space: nowrap;

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

        i {
            color: $color-default;
            color: var(--color-primary);
        }

        a {
            margin-left: 10px;
            color: $color-gray;

            &:hover {
                color: $color-default;
                color: var(--color-primary);
            }

            span {
                &:first-child {
                    margin-right: -4px;
                }
            }
        }

        > span {
            line-height: 22px;
            display: inline-block;
            margin-left: 10px;
            word-break: break-all;
            white-space: pre-wrap;
        }
    }
}

.social-links {
    li {
        display: inline-flex;
        margin-right: 5px;

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

        a {
            font-size: 22px;
            display: flex;
            height: 35px;
            width: 35px;
            color: $color-gray;
            align-items: center;
            justify-content: center;

            &:hover {
                color: $color-default;
                color: var(--color-primary);
            }
        }
    }
}

.captcha-field {
    > img {
        border-radius: $radius-default;
    }

    > input {
        font-size: 14px;
        height: 45px;
        margin-left: 7px;
        padding: 10px 15px;
        border: 1px solid $color-gray-lite;
        border-radius: $radius-default;
        transition: $transition-default;

        &:focus {
            outline: 0;
            border-color: $color-default;
            border-color: var(--color-primary);
            box-shadow: none;
        }
    }
}

@media screen and (max-width: 510px) {
    .captcha-field {
        > input {
            display: block;
            margin: 10px 0 0 0 !important;
        }
    }
}

@keyframes zoomInOut {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(0.7);
    }

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

@keyframes bounceIn {
    0% {
        transform: scale(0);
    }

    15% {
        transform: scale(1.6);
    }

    32% {
        transform: scale(0.8);
    }

    50% {
        transform: scale(1);
    }

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