/**
 * NOTICE OF LICENSE
 *
 * This file is licenced under the Software License Agreement.
 * With the purchase or the installation of the software in your application
 * you accept the licence agreement.
 *
 * You must not modify, adapt or create derivative works of this source code
 *
 *  @author    PrestaHeroes <info@prestaheroes.com>
 *  @copyright 2016 Heroic Business Solutions LLC
 *  @license   LICENSE.txt
*/


/*.flex-container {*/
/*    display: flex;*/
/*    flex-direction: row;*/
/*}*/

/*!* Responsive layout - makes a one column layout instead of a two-column layout *!*/
/*@media (max-width: 800px) {*/
/*    .flex-container {*/
/*        flex-direction: column;*/
/*    }*/
/*}*/


.ph-viewedproduct-block .dropdown-content {
    z-index: 9999;
}

.ph-viewedproduct-block.is-active .dropdown-menu,
.ph-viewedproduct-block.is-active .dropdown-menu.dropdown-menu-custom,
.ph-viewedproduct-block.is-active :not(.dropdown-menu-custom).dropdown-menu {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    -webkit-transform: scale(1, 1) !important;
    transform: scale(1, 1) !important;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}

/* Перевизначаємо стилі для dropdown-menu-custom, щоб воно відображалося правильно */
.ph-viewedproduct-block .dropdown-menu.dropdown-menu-custom {
    display: block;
    border: none !important;
    padding: 0;
    float: none;
    position: absolute;
    min-width: 300px;
    max-width: 100%;
    height: auto;
    width: auto;
    margin: 0;
    background: #fff !important;
    visibility: hidden;
    opacity: 0;
    -webkit-transform: scale(1, 0);
    transform: scale(1, 0);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    box-sizing: border-box;
    right: 0;
    left: auto;
}

.ph-viewedproduct-block.is-active .dropdown-menu.dropdown-menu-custom {
    visibility: visible !important;
    opacity: 1 !important;
    -webkit-transform: scale(1, 1) !important;
    transform: scale(1, 1) !important;
}

/*For test purpose only*/
/*.ph-viewedproduct-block .dropdown-menu {
    display: block !important;
}*/

a.button {
    /*margin: 20px;*/
    /*position: relative;*/
    /*display: block;*/
}


.ph-viewedproduct-block .dropdown-trigger {
    /* display: block; */
    /*margin: 3px;*/
}

.ph-viewedproduct-block .dropdown-trigger a .fa-eye {
    width: 1.285714em;
    text-align: center;
    font-size: 15px;
}

.ph-viewedproduct-block.dropdown {
    /* float: right; */
    right: 0;
    /* position: relative; */
    display: flex;
    justify-content: right;
}

/* Перевизначаємо для мобільних пристроїв */
@media (max-width: 991px) {
    .ph-viewedproduct-block.dropdown.col-mobile-btn,
    #ph-viewedproduct-button.col-mobile-btn.ph-viewedproduct-block.dropdown {
        display: block !important;
        justify-content: unset !important;
        right: auto !important;
    }
}

.ph-viewedproduct-block .dropdown-menu {
    text-align: left;
    right: 0;
    left: auto;
    font-size: 14px;
    width: auto;
    max-width: 100%;
    min-width: 300px;
    box-sizing: border-box;
    /* position: absolute; */
}


/*Dropdown content style*/
.ph-viewedproduct-block .products {
    display: flex !important;
    flex-wrap: wrap;
    width: 100%;
}

/*.ph_viewedproduct_block .dropdown-content article {
    width: 100%
}*/

.ph-viewedproduct-block .dropdown-content {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    max-height: 480px;
    overflow: auto;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Стилі для видимості скролбара в dropdown-content */
/* Для WebKit браузерів (Chrome, Safari, Edge) */
.ph-viewedproduct-block .dropdown-content::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.ph-viewedproduct-block .dropdown-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.ph-viewedproduct-block .dropdown-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
    cursor: pointer;
}

.ph-viewedproduct-block .dropdown-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Для Firefox */
.ph-viewedproduct-block .dropdown-content {
    scrollbar-width: thin;
    scrollbar-color: #888 #f1f1f1;
}

.ph-viewedproduct-block .dropdown-content article {
    /*flex: 50%; !* or - flex: 0 50% - or - flex-basis: 50% - *!*/
    /*demo*/
    /*box-shadow: 0 0 0 1px black;*/
    /*margin-bottom: 5px;*/
    /*width: 20%;*/
    display: flex;
}

#ph-viewedproduct-button.ph-hover:hover {
    cursor: pointer;
}


@media (max-width: 767px) {
    .flex-container {
        flex-direction: column;
    }

    .ph-viewedproduct-block .dropdown-content article {
        width: 100%;
        display: flex;
        justify-content: center;
    }
}

.ph-viewedproduct-block .dropdown-content .js-product-miniature-wrapper {
    margin-top: 10px;
}

@media (min-width: 768px) and (max-width: 991px) {
    .flex-container {
        flex-direction: column;
    }

    .ph-viewedproduct-block .dropdown-content article {
        width: 33%;
        display: flex;
    }
}

/*@media (min-width: 446px) and (max-width: 991px) {
    .header-top #ph_header_logo {
        padding: 25px 10px 25px 0;
        line-height: 20px;
        float: left;
        display: inline-block !important;
    }
}*/

@media (max-width: 446px) {
    #header_logo {
        padding: 10px 0 0 !important;
    }
}

.ph-viewedproduct-block .product-miniature .thumbnail-container {
    border: 0px solid #22222224 !important;
}

.ph-viewedproduct-block img.img-fluid {
    width: 60% !important;
}

.ph-viewed-product-icon {
    width: 30px;
}

/*End dropdown style*/

.header-top .inner > #ph-viewedproduct-button {
    display: none !important;
}

/*Header Navigation Style*/
#header .ph-viewedproduct-block.dropdown {
    /* float: right; */
    right: 0;
    /* position: relative; */
    display: flex;
    justify-content: right;
    position: static;
    /*position: inherit !important;*/
    /*padding: 20px 5px;*/
    /*padding: 20px 4px 20px 20px;*/
    padding: 0.5rem 0px 0px 0px;
}

/*#header .ph-viewedproduct-block .dropdown-menu {
    text-align: left;
    !* right: 0; *!
    !* left: calc(-50vw + 50%); *!
    font-size: 14px;
    width: 100%;
    position: absolute;
    z-index: 9999;
}*/
/*END Header Navigation Style*/


/*
#header .ph-viewedproduct-block .dropdown-menu {
    text-align: left;
    right: 50%;
    left: 50%;
    font-size: 14px;
    width: 100vw;
    position: absolute;
    z-index: 9999;
   !* margin-left: -76vw;
    margin-right: -50vw;*!
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    top: 50px;
}
*/

#header .ph-viewedproduct-block .dropdown-menu {
    text-align: left;
    right: 0;
    left: auto;
    font-size: 14px;
    width: auto;
    max-width: calc(100vw - 40px);
    min-width: 300px;
    position: absolute;
    z-index: 9999;
    margin-left: 0;
    padding: 10px 20px;
    box-sizing: border-box;
}

/* Перевизначаємо для desktop-header-container, щоб меню мало ширину як .row.align-items-center */
#desktop-header-container #header .ph-viewedproduct-block .dropdown-menu,
#desktop-header-container #header .ph-viewedproduct-block .dropdown-menu.dropdown-menu-custom {
    max-width: 100% !important;
    min-width: auto !important;
    right: 0 !important;
    left: auto !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    /* Ширина встановлюється через JavaScript */
}

/* Обмежуємо ширину всередині desktop-header-container - робимо таку ж ширину як .row.align-items-center */
#desktop-header-container .ph-viewedproduct-block .dropdown-menu,
#desktop-header-container .ph-viewedproduct-block .dropdown-menu.dropdown-menu-custom {
    min-width: auto !important;
    right: 0 !important;
    left: auto !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
    /* Ширина встановлюється через JavaScript */
}

/* Для контейнера з обмеженою шириною */
#desktop-header-container {
    position: relative;
    overflow: visible;
}

#desktop-header-container .ph-viewedproduct-block {
    position: relative;
}


@media (max-width: 767px) {
    #header .ph-viewedproduct-block .dropdown-menu {
        text-align: left;
        right: 0;
        left: auto;
        font-size: 14px;
        width: auto;
        max-width: calc(100vw - 40px);
        min-width: 300px;
        position: absolute;
        z-index: 9999;
        margin-left: 0;
        padding: 10px 20px;
        box-sizing: border-box;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    #header .ph-viewedproduct-block .dropdown-menu {
        text-align: left;
        right: 0;
        left: auto;
        font-size: 14px;
        width: auto;
        max-width: calc(100vw - 40px);
        min-width: 300px;
        position: absolute;
        z-index: 9999;
        margin-left: 0;
        padding: 10px 20px;
        box-sizing: border-box;
    }
}

@media (min-width: 992px) and (max-width: 1133px) {
    #header .ph-viewedproduct-block .dropdown-menu {
        text-align: left;
        right: 0;
        left: auto;
        font-size: 14px;
        width: auto;
        max-width: calc(100vw - 40px);
        min-width: 300px;
        position: absolute;
        z-index: 9999;
        margin-left: 0;
        padding: 10px 20px;
        box-sizing: border-box;
    }
}

@media (min-width: 1134px) and (max-width: 1793px) {
    #header .ph-viewedproduct-block .dropdown-menu {
        text-align: left;
        right: 0;
        left: auto;
        font-size: 14px;
        width: auto;
        max-width: calc(100vw - 40px);
        min-width: 300px;
        position: absolute;
        z-index: 9999;
        margin-left: 0;
        padding: 10px 20px;
        box-sizing: border-box;
    }
}

@media (min-width: 1794px) and (max-width: 2284px) {
    #header .ph-viewedproduct-block .dropdown-menu {
        text-align: left;
        right: 0;
        left: auto;
        font-size: 14px;
        width: auto;
        max-width: calc(100vw - 40px);
        min-width: 300px;
        position: absolute;
        z-index: 9999;
        margin-left: 0;
        padding: 10px 20px;
        box-sizing: border-box;
    }
}


@media (min-width: 2285px) and (max-width: 3120px) {
    #header .ph-viewedproduct-block .dropdown-menu {
        text-align: left;
        right: 0;
        left: auto;
        font-size: 14px;
        width: auto;
        max-width: calc(100vw - 40px);
        min-width: 300px;
        position: absolute;
        z-index: 9999;
        margin-left: 0;
        padding: 10px 20px;
        box-sizing: border-box;
    }
}

@media (min-width: 1134px) and (max-width: 1560px) {
    #header .ph-viewedproduct-block .dropdown-menu {
        text-align: left;
        right: 0;
        left: auto;
        font-size: 14px;
        width: auto;
        max-width: calc(100vw - 40px);
        min-width: 300px;
        position: absolute;
        z-index: 9999;
        margin-left: 0;
        padding: 10px 20px;
        box-sizing: border-box;
    }
}

@media (max-width: 446px) {
    #header .ph-viewedproduct-block .dropdown-menu {
        text-align: left;
        right: 0;
        left: auto;
        font-size: 14px;
        width: auto;
        max-width: calc(100vw - 40px);
        min-width: 300px;
        position: absolute;
        z-index: 9999;
        margin-left: 0;
        padding: 10px 20px;
        box-sizing: border-box;
    }
}


.ph-viewedproduct-block .thumbnail-container .product-meta {
    text-align: center !important;
}

.ph-viewedproduct-block .wishlist {
    justify-content: center;
    display: none !important;
}

.ph-viewedproduct-block .product-image {
    padding: 10px 10px 0 10px;
}

.ph-viewedproduct-block .ph-add-to-cart {
    padding: 10px 20px;
}

@media (max-width: 991px) {
    /* Посилання всередині як m-nav-btn */
    #ph-viewedproduct-button.col-mobile-btn .dropdown-trigger,
    #ph-viewedproduct-button.col-mobile-btn.ph-viewedproduct-block .dropdown-trigger,
    .ph-viewedproduct-block.dropdown.col-mobile-btn#ph-viewedproduct-button .dropdown-trigger {
        display: block !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* Приховуємо зображення, якщо воно є */
    #ph-viewedproduct-button.col-mobile-btn .ph-viewed-product-icon {
        display: none !important;
    }
    
    #header .col-mobile-btn.ph-viewedproduct-block .dropdown-menu {
        top: 160px ;
        width: 100%;
        max-width: 100%;
    }

    #header .ph-viewedproduct-block.dropdown {
        padding: 0px;
    }
}

#header .ph-viewedproduct-block .dropdown-menu {
    top: 70px;
}

