// DIRECTIONAL
// ---------------------------------------------------------------
$rtl: 0 !default;
$dir: ltr !default;

@import "../theme/theme-imports";

/* misc.scss */
#header .header-top,
.welcome-msg {
    font-weight: 600;
}

/* add-links.scss */
li.product-outimage_aq_onimage .add-links .quickview {
    background-color: var( --porto-primary-color );
    color: var( --porto-primary-color-inverse, $color-light );
}

/* Category.scss */
ul {
    &.pwidth-lg-8 {
        .product-image { font-size: .8em; }
        .add-links { font-size: .85em; }
    }
    &.pwidth-lg-7 {
        .product-image { font-size: .8em; }
        .add-links { font-size: .9em; }
    }
    &.pwidth-lg-6 {
        .product-image { font-size: .9em; }
        .add-links { font-size: 1em; }
    }
    &.pwidth-lg-5 {
        .product-image { font-size: 1em; }
        .add-links { font-size: 1em; }
    }
    &.pwidth-lg-4 {
        .product-image { font-size: 1em; }
        .add-links { font-size: 1em; }
    }
    &.pwidth-lg-3 {
        .product-image { font-size: 1.2em; }
        .add-links { font-size: 1em; }
    }
    &.pwidth-lg-2 {
        .product-image { font-size: 1.5em; }
        .add-links { font-size: 1em; }
    }
}

@media (min-width: 992px) {
    .column2 ul {
        &.pwidth-lg-6 {
            .product-image { font-size: .75em; }
            .add-links { font-size: .8em; }
        }

        &.pwidth-lg-5 {
            .product-image { font-size: .8em; }
            .add-links { font-size: .9em; }
        }

        &.pwidth-lg-4 {
            .product-image { font-size: .9em; }
            .add-links { font-size: .95em; }
        }

        &.pwidth-lg-3 {
            .product-image { font-size: 1em; }
            .add-links { font-size: 1em; }
        }

        &.pwidth-lg-2 {
            .product-image { font-size: 1.2em; }
        }
    }
}

li.product-wq_onimage {
    text-align: center;
    .rating-wrap {
        margin-left: auto;
        margin-right: auto;
    }
    .filter-item-list {
        justify-content: center;
    }
}


li.product-onimage2,
li.product-onimage3,
li.product-outimage_aq_onimage {
    .product-image .inner:after {
        content: "";
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(27, 27, 23, .3);
        transition: .25s;
    }
}

li.product-outimage_aq_onimage {
    text-align: $left;
    .add-links {
        .button {
            position: absolute;
            z-index: 3;
            #{$right}: 15px;
            top: 15px;
            width: 36px;
            padding: 0;
            border-radius: 18px;
            opacity: 0;
            text-indent: -9999px;
            &:before {
                text-indent: 0;
                width: 100%;
            }
        }
        .yith-compare {
            top: 60px;
        }
        .quickview {
            bottom: 0;
            top: auto;
            left: 0;
            width: 100%;
            text-indent: 0;
            padding: .1rem 0;
            height: auto;
            border: none;
            &:before {
                content: none;
            }
        }
        .yith-wcwl-add-to-wishlist {
            display: none;
        }
    }
    .links-on-image {
        .add-links-wrap {
            display: block;
        }
    }
    .product-image .inner:after {
        background: rgba(0,0,0,0.1);
        opacity: 0;
        transition: opacity .2s;
    }
    &:hover {
        .button {
            opacity: 1;
        }
        .add-links .quickview {
            padding: .45rem 0;
        }
        .sale-product-daily-deal {
            display: none;
        }
        .product-image .inner:after {
            opacity: 1
        }
    }
    &.with-padding {
        &, .product-image {
            margin-bottom: 0;
        }
        .product-content {
            padding: 15px 15px 1px;
        }
    }
}

li.product-outimage_aq_onimage {
    .yith-wcwl-add-to-wishlist {
        float: $right;
        position: relative;
        z-index: 2;
        margin-#{$left}: 10px;
        span:not(.yith-wcwl-tooltip), a {
            opacity: .7;
            border: none;
            background: none;
            color: var(--porto-shop-add-links-color, #333);
            height: auto;
            width: 1.4em;
            line-height: 1.2;
        }
        .add_to_wishlist:hover {
            opacity: 1;
        }
    }
}


// For 'Remove from list' option of Wishlist Plugin
li.product-outimage_aq_onimage {
    .yith-wcwl-add-to-wishlist span.separator {
        text-indent: 0;
    }
}
ul.grid {
    &.divider-line {
        li.product-outimage_aq_onimage.with-padding {
            .quickview {
                left: 15px;
                right: 15px;
                width: auto;
            }
        }
    }
}


li.product-awq_onimage {
    .links-on-image .add-links {
        position: absolute;
        z-index: 2;
    }
    .add-links {
        @include display-flex;
        #{$right}: 15px;
        bottom: 0;
        > *:not(:last-child) {
            margin-#{$right}: 3px;
        }
        .button {
            text-indent: -9999px;
            padding: 0 8px;
            &:before {
                text-indent: 0;
                margin: 0;
                width: 18px;
            }
        }
        .yith-wcwl-add-button .button:before {
            width: 100%;
        }
        .quickview,
        .yith-wcwl-add-to-wishlist > div,
        .yith-compare {
            position: relative;
            opacity: 1 !important;
        }
        .button,
        .quickview,
        .yith-wcwl-add-to-wishlist a,
        .yith-wcwl-add-to-wishlist span {
            border-radius: 18px;
            overflow: hidden
        }
        .yith-compare {
            top: auto;
            #{$right}: auto;
        }
    }
}

li.product-outimage {
    .add-links {
        @include display-flex;
        > *:not(:last-child) {
            margin-#{$right}: 6px;
        }
        .quickview,
        .yith-wcwl-add-to-wishlist > div {
            position: relative;
        }
        .button,
        .quickview,
        .yith-wcwl-add-to-wishlist a,
        .yith-wcwl-add-to-wishlist span:not(.yith-wcwl-tooltip) {
            border: none;
            line-height: 36px;
        }
        .button {
            padding-left: 1rem;
            padding-right: 1rem;
            @media #{$screen-medium} {
                padding-left: .6rem;
                padding-right: .6rem;
                &:before {
                    display: none;
                }
            }
        }
        .button,
        .quickview,
        .yith-wcwl-add-to-wishlist a,
        .yith-wcwl-add-to-wishlist span:not(.yith-wcwl-tooltip) {
            background: #f4f4f4;
        }

        .quickview:hover,
        .yith-wcwl-add-to-wishlist a:hover,
        .button:hover,
        .button:focus {
            background: var(--porto-primary-color);
        }
    }
    &:hover {
        .add-links {
            .yith-wcwl-add-to-wishlist > div,
            .quickview {
                opacity: 1;
            }
        }
    }
}
@media #{$screen-small} {
    .ccols-2 li.product-outimage .add-links .button {
        padding: 0 .4rem;
        width: 36px;
        text-indent: -9999px;
        &:before {
            display: block;
            text-indent: 0;
            width: 100%
        }
    }
}
@media (min-width: 576px) {
    li.product-outimage {
        &:not(.product-type-simple) .add-links .button:before {
            display: none;
        }
    }
}


li.product-onimage {
    overflow: hidden;
    .product-inner {
        position: relative;
    }
    .product-image {
        margin-bottom: 0;
    }
    .links-on-image {
        .button,
        .quickview {
            display: none !important;
        }
        .yith-wcwl-add-to-wishlist {
            > div {
                position: absolute;
                top: 10px;
                #{$right}: 10px;
                #{$left}: auto;
            }
            span, a, .blockUI {
                border-radius: 20px;
            }
        }
    }
    .product-content {
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        z-index: 2;
        padding: 15px 20px 0;
        opacity: 0;
        transition: transform .4s, opacity .2s;
        transform: translateZ(0) translateY(5px);
        background: var(--porto-normal-bg);
        border-top: 1px solid var(--porto-input-bc);
        .yith-wcwl-add-to-wishlist {
            display: none;
        }

        .add-links {
            border-top: 1px solid var(--porto-input-bc);
        }
    }
    .add-links {
        position: static;
        @include display-flex;
        flex-direction: row-reverse;
        margin: 0 -20px;
        > * {
            @include flex(1);
            min-width: 50%;
        }
        .button:not(:hover):not(:focus) {
            background: #f4f4f4;
        }
        .button, .quickview {
            height: 45px;
            line-height: 44px;
            border: none;
        }
        .button:before {
            display: none;
        }
        .yith-wcwl-add-button .button {
            display: block !important;
            height: 36px;
            line-height: 34px;
            border: 1px solid var(--porto-shop-add-links-border-color, transparent);
            &:before {
                display: block;
            }
        } 
        .quickview {
            position: static;
            background: var(--porto-primary-color);
            color: var(--porto-primary-color-inverse, $color-light);
            text-indent: 0;
            opacity: .85;
            visibility: visible;
            &:before {
                display: none;
            }
        }
    }
    &:hover {
        .product-content {
            opacity: 1;
            transform: translateZ(0) translateY(0);
        }
    }

    &:not(.product-type-simple) .add-links .button:before {
        display: none;
    }
}

li.product-onimage,
li.product-onimage2,
li.product-onimage3 {
    .description {
        display: none;
    }
}

li.product-onimage2,
li.product-onimage3 {
    .product-inner {
        position: relative;
        overflow: hidden;
    }
    span,
    .price,
    h3 {
        color: $color-light;
    }
    .star-rating {
        &:before {
            color: rgba(255, 255, 255, .6);
        }
        span:before {
            color: inherit;
        }
    }
    .price {
        margin-bottom: 0;
    }
}

li.product-onimage2 .add-links .button,
li.product-onimage2 .add-links .yith-wcwl-add-to-wishlist a,
li.product-onimage2 .add-links .yith-wcwl-add-to-wishlist span,
li.product-onimage3 .add-links .yith-wcwl-add-to-wishlist a,
li.product-onimage3 .add-links .yith-wcwl-add-to-wishlist span:not(.yith-wcwl-tooltip),
li.product-onimage3 .add-links .quickview,
li.product-onimage3 .add-links .button {
    border-color: #fff;
    border-width: 2px;
    color: #fff;
    background-color: #4d4d4a;
    border-radius: 2rem;
    overflow: hidden;
}

li.product-onimage2 {
    .product-image {
        margin-bottom: 0;
        position: static;
        .inner:after {
            opacity: 0;
        }
    }
    .links-on-image .add-links {
        position: absolute;
    }
    .add-links {
        top: 15px;
        #{$right}: 12px;
        @include display-flex;
        justify-content: center;
        z-index: 3;
        > * {
            margin: 0 3px;
            opacity: .85 !important;
            &:hover {
                opacity: 1 !important
            }
        }
        .button {
            line-height: 32px;
            text-indent: -9999px;
            padding: 0 7px;
            &:before {
                text-indent: 0;
                margin: 0;
                width: 18px;
                line-height: inherit
            }
        }
        .yith-wcwl-add-button .button:before {
            width: 100%;
        }
        .yith-wcwl-add-to-wishlist {
            > div {
                position: relative;
            }
            span, a {
                line-height: 32px;
            }
        }
    }
    .quickview {
        position: absolute;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        border: none;
        color: var(--porto-primary-color-inverse, #fff);
        background: var(--porto-primary-color);
        padding: .45rem 0;
        text-transform: uppercase;
        line-height: 32px;
        opacity: .85;

        &:hover {
            opacity: 1
        }
    }
    .yith-compare {
        position: static;
    }
    .product-content {
        position: absolute;
        left: 0;
        right: 0;
        top: 50%;
        transform: scale(0.9) translateZ(0) translateY(-50%);
        text-align: center;
        z-index: 2;
        opacity: 0;
        transition: opacity .5s, transform .3s;
    }
    .rating-wrap {
        margin-left: auto;
        margin-right: auto;
    }
    &:hover {
        .product-content {
            transform: scale(1) translateZ(0) translateY(-50%);
            opacity: 1;
        }
        .product-image .inner:after {
            opacity: 1;
        }
    }
}

li.product-onimage3 {
    .product-image {
        margin-bottom: 0;
    }
    .product-content {
        position: absolute;
        bottom: -5px;
        left: 0;
        right: 0;
        padding: 0 20px 20px;
        z-index: 2;
        opacity: 0;
        transition: .3s;
    }
    .add-links {
        .button,
        .yith-wcwl-add-to-wishlist a,
        .yith-wcwl-add-to-wishlist span:not(.yith-wcwl-tooltip) {
            line-height: 32px;
        }
        > * {
            opacity: .85 !important;
            transition: opacity .2s;
            &:hover {
                opacity: 1 !important
            }
        }
        .button {
            text-indent: -9999px;
            position: absolute;
            #{$right}: 15px;
            top: 15px;
            padding: 0 7px;
            &:before {
                text-indent: 0;
                margin: 0;
                width: 18px;
                line-height: inherit;
            }
        }
        .yith-wcwl-add-button .button {
            position: relative;
            top: 0;
            right: 0;
            &:before {
                width: 100%;
            }
        }
        .yith-compare {
            #{$right}: 105px;
        }
        .yith-wcwl-add-to-wishlist > div {
            top: 15px;
            #{$right}: 60px;
            #{$left}: auto;
        }
        .quickview {
            text-indent: 0;
            padding: .1rem 1.5rem;
            width: auto;
            height: auto;
            top: 50%;
            #{$right}: 50%;
            transform: translateZ(0) translateX(50%);
            margin-top: -20px;
            white-space: nowrap;
            &:before {
                display: none;
            }
        }
    }

    .product-loop-title:hover {
        color: $color-light;
    }

    &:hover {
        .product-image .inner:after {
            background-color: rgba(27, 27, 23, .7);
        }
        .product-content {
            opacity: 1;
            bottom: 0;
        }
    }
}

li.product-wq_onimage {
    .add-links {
        .yith-wcwl-add-to-wishlist,
        .quickview,
        .yith-compare {
            display: none;
        }
    }
    .links-on-image {
        .button,
        .quantity {
            display: none;
        }
        .quickview {
            display: block;
            bottom: 0;
            top: auto;
            left: 0;
            width: 100%;
            text-indent: 0;
            padding: .4rem 0;
            height: auto;
            border: none;
            background: var(--porto-primary-color);
            color: var(--porto-primary-color-inverse, $color-light);
            z-index: 1;
            &:before {
                content: none;
            }
        }
        .yith-wcwl-add-to-wishlist {
            display: block;
            > div {
                top: 15px;
                left: auto;
                #{$right}: 15px;
            }
            a, .blockUI {
                border-radius: 18px;
            }
        }
        .yith-compare {
            display: block;
        }
    }
    &:hover {
        .sale-product-daily-deal {
            display: none;
        }
    }
}

.product-onimage .product-image > .yith-compare {
    top: 50px;
    right: 10px;
}