/* =====================================================
   UGGES FAVORITES 1.0.0
   WooCommerce + Shop Mania
   Сайт: ugges.ru
   ===================================================== */

/* Кнопка в каталоге */

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
    position: relative !important;
}

.woocommerce ul.products li.product .ugges-fav-button,
.woocommerce-page ul.products li.product .ugges-fav-button {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    left: auto !important;
    bottom: auto !important;
    z-index: 99 !important;
}

/* Общий вид сердечка */

.ugges-fav-button {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 38px !important;
    height: 38px !important;
    padding: 8px !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.94) !important;
    cursor: pointer !important;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.13) !important;
    transition: transform 0.2s ease, background 0.2s ease !important;
    box-sizing: border-box !important;
}

.ugges-fav-button svg {
    display: block !important;
    width: 22px !important;
    height: 22px !important;
    fill: none !important;
    stroke: #222222 !important;
    stroke-width: 1.7 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
}

.ugges-fav-button.is-active {
    background: #ffffff !important;
}

.ugges-fav-button.is-active svg {
    fill: #e60023 !important;
    stroke: #e60023 !important;
}

.ugges-fav-button:hover {
    transform: scale(1.08) !important;
}

.ugges-fav-button.is-loading {
    opacity: 0.6 !important;
    pointer-events: none !important;
}

/* Сердечко на странице товара */

.single-product div.product,
.single-product .woocommerce-product-gallery {
    position: relative !important;
}

.single-product .woocommerce-product-gallery > .ugges-fav-button {
    position: absolute !important;
    top: 12px !important;
    right: 12px !important;
    left: auto !important;
    bottom: auto !important;
    z-index: 999 !important;
}

/* Сердечко в шапке Shop Mania */

.ugges-header-fav {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 auto !important;
    width: 42px !important;
    height: 42px !important;
    padding: 0 !important;
    margin: 0 7px !important;
    color: #222222 !important;
    background: transparent !important;
    border: none !important;
    text-decoration: none !important;
    cursor: pointer !important;
    z-index: 999 !important;
    box-sizing: border-box !important;
}

.ugges-header-fav svg {
    display: block !important;
    width: 25px !important;
    height: 25px !important;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 1.8 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
}

.ugges-header-fav.is-active svg {
    fill: #e60023 !important;
    stroke: #e60023 !important;
}

.ugges-header-fav-count {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 17px !important;
    height: 17px !important;
    padding: 0 4px !important;
    border-radius: 20px !important;
    background: #e60023 !important;
    color: #ffffff !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    line-height: 17px !important;
    text-align: center !important;
}

.ugges-header-fav:hover {
    opacity: 0.8 !important;
    text-decoration: none !important;
}

/* Страница избранного */

.ugges-favorites-page,
.ugges-favorites-content {
    display: block;
    width: 100%;
}

.ugges-fav-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    width: 100%;
}

.ugges-fav-item {
    position: relative !important;
    min-width: 0;
}

.ugges-fav-product-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.ugges-fav-product-link img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.ugges-fav-product-title {
    display: block;
    margin-top: 10px;
    color: inherit;
}

.ugges-fav-price {
    display: block;
    margin-top: 5px;
}

.ugges-fav-item > .ugges-fav-button {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    z-index: 99 !important;
}

.ugges-fav-empty {
    display: block;
    width: 100%;
    padding: 25px 10px;
    text-align: center;
}

.ugges-fav-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Планшеты */

@media (min-width: 768px) and (max-width: 1024px) {
    .ugges-fav-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px;
    }
}

/* Мобильные устройства */

@media (max-width: 767px) {

    .ugges-fav-button {
        width: 34px !important;
        height: 34px !important;
        padding: 7px !important;
    }

    .ugges-fav-button svg {
        width: 20px !important;
        height: 20px !important;
    }

    .woocommerce ul.products li.product .ugges-fav-button,
    .woocommerce-page ul.products li.product .ugges-fav-button {
        top: 7px !important;
        right: 7px !important;
    }

    .single-product .woocommerce-product-gallery > .ugges-fav-button {
        top: 8px !important;
        right: 8px !important;
    }

    .ugges-header-fav {
        width: 38px !important;
        height: 42px !important;
        margin: 0 5px !important;
    }

    .ugges-header-fav svg {
        width: 24px !important;
        height: 24px !important;
    }

    .ugges-fav-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .ugges-fav-item > .ugges-fav-button {
        top: 7px !important;
        right: 7px !important;
    }
}

/* Убираем стандартную рамку фокуса */

.ugges-header-fav:focus,
.ugges-header-fav:active,
.ugges-fav-button:focus,
.ugges-fav-button:active {
    outline: none !important;
    box-shadow: none !important;
}