/* =========================================================
   WISHLIST - HEADER
   ========================================================= */

.header-favoritos {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.icone-favoritos {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icone-favoritos img {
    display: block;
    max-width: 100%;
    height: auto;
}

.contador-favoritos {
    position: absolute;
    top: -7px;
    right: -8px;

    min-width: 18px;
    height: 18px;

    padding: 0 4px;

    display: none;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #e30613;
    color: #fff;

    font-family: Arial, sans-serif;
    font-size: 10px;
    font-weight: 700;
    line-height: 18px;

    box-sizing: border-box;
}

.contador-favoritos:not(:empty) {
    display: flex;
}


/* =========================================================
   DROPDOWN
   ========================================================= */

.wishlist-dropdown {
    position: absolute;

    top: calc(100% + 12px);
    right: 0;

    width: 380px;
    max-width: calc(100vw - 30px);

    background: #fff;

    border: 1px solid #e5e5e5;
    border-radius: 4px;

    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.15);

    z-index: 99999;

    display: none;

    overflow: hidden;
}


/* Abre via JS */

.wishlist-dropdown.is-open {
    display: block;
}


/* Pequena seta */

.wishlist-dropdown::before {
    content: "";

    position: absolute;

    top: -7px;
    right: 24px;

    width: 13px;
    height: 13px;

    background: #fff;

    border-left: 1px solid #e5e5e5;
    border-top: 1px solid #e5e5e5;

    transform: rotate(45deg);
}


/* =========================================================
   HEADER DO DROPDOWN
   ========================================================= */

.wishlist-dropdown-header {
    position: relative;

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

    padding: 16px 18px;

    border-bottom: 1px solid #eee;
}

.wishlist-dropdown-header strong {
    color: #222;

    font-size: 16px;
    font-weight: 600;
}

.wishlist-close {
    border: 0;
    background: transparent;

    padding: 0;

    color: #777;

    font-size: 24px;
    line-height: 20px;

    cursor: pointer;
}

.wishlist-close:hover {
    color: #000;
}


/* =========================================================
   LOADING
   ========================================================= */

.wishlist-loading {
    display: none;

    padding: 25px 20px;

    text-align: center;

    color: #777;

    font-size: 13px;
}

.wishlist-loading.is-visible {
    display: block;
}


/* =========================================================
   CONTEÚDO
   ========================================================= */

.wishlist-content {
    max-height: 420px;

    overflow-y: auto;
}


/* =========================================================
   ITEM
   ========================================================= */

.wishlist-item {
    display: flex;
    align-items: center;

    gap: 12px;

    padding: 12px 16px;

    border-bottom: 1px solid #eee;

    transition: background 0.2s ease;
}

.wishlist-item:hover {
    background: #fafafa;
}

.wishlist-item-image {
    width: 65px;
    height: 65px;

    flex: 0 0 65px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #fff;
}

.wishlist-item-image img {
    width: 100%;
    height: 100%;

    object-fit: contain;
}

.wishlist-item-info {
    min-width: 0;
    flex: 1;
}

.wishlist-item-name {
    display: block;

    margin-bottom: 5px;

    color: #222;

    font-size: 13px;
    font-weight: 500;
    line-height: 1.35;

    text-decoration: none;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;

    overflow: hidden;
}

.wishlist-item-name:hover {
    text-decoration: underline;
}

.wishlist-item-price {
    color: #222;

    font-size: 14px;
    font-weight: 700;
}


/* =========================================================
   BOTÃO REMOVER
   ========================================================= */

.wishlist-item-remove {
    width: 30px;
    height: 30px;

    flex: 0 0 30px;

    border: 0;

    background: transparent;

    color: #999;

    font-size: 20px;

    cursor: pointer;
}

.wishlist-item-remove:hover {
    color: #e30613;
}


/* =========================================================
   ESTADO VAZIO
   ========================================================= */

.wishlist-empty {
    display: none;

    padding: 30px 20px;

    text-align: center;
}

.wishlist-empty.is-visible {
    display: flex;

    flex-direction: column;
    align-items: center;
}

.wishlist-empty-icon {
    margin-bottom: 10px;

    color: #999;

    font-size: 38px;
    line-height: 1;
}

.wishlist-empty strong {
    margin-bottom: 6px;

    color: #333;

    font-size: 14px;
}

.wishlist-empty span:last-child {
    max-width: 270px;

    color: #888;

    font-size: 12px;
    line-height: 1.5;
}


/* =========================================================
   FOOTER
   ========================================================= */

.wishlist-footer {
    display: none;

    padding: 14px 16px;

    border-top: 1px solid #eee;

    text-align: center;
}

.wishlist-footer.is-visible {
    display: block;
}

.wishlist-see-all {
    color: #222;

    font-size: 13px;
    font-weight: 600;

    text-decoration: none;
}

.wishlist-see-all:hover {
    text-decoration: underline;
}


/* =========================================================
   CORAÇÃO DOS PRODUTOS
   ========================================================= */

.wishlist-product-trigger {
    position: absolute;
    top: 0;
    right: 0;
    border: none;

    width: 40px;
    height: 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 0;
    padding: 0;

    background: transparent;

    cursor: pointer;
}


.wishlist-product-trigger [data-wishlist-icon] {

    width: 24px;
    height: 24px;

    display: block;

    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78L12 21.23l8.84-8.84a5.5 5.5 0 0 0 0-7.78Z' fill='none' stroke='%23222222' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");

    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;

    transition: transform 0.2s ease;
}


.wishlist-product-trigger:hover [data-wishlist-icon] {
    transform: scale(1.08);
}


/* FAVORITADO */

.wishlist-product-trigger [data-wishlist-icon].is-favorite {

    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78L12 21.23l8.84-8.84a5.5 5.5 0 0 0 0-7.78Z' fill='%23e30613' stroke='%23e30613' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");

}

.wishlist-product-trigger.is-favorite {
    /* Você pode personalizar aqui */
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767px) {

    .wishlist-dropdown {
        position: fixed;

        top: 70px;
        right: 15px;
        left: 15px;

        width: auto;
        max-width: none;
    }

    .wishlist-dropdown::before {
        display: none;
    }

    .wishlist-content {
        max-height: 60vh;
    }

}