/* =========================
   WISHLIST COUNTER / ICON
========================= */

.icon-with-counter {
    position: relative;
    display: inline-block;
}

.icon-with-counter img {
    display: block;
    width: auto;
    height: 22px;
}

.icon-with-counter .counter {
    position: absolute;
    top: -6px;
    right: -8px;
    min-width: 14px;
    height: 14px;
    padding: 0 4px;
    border-radius: 30px;
    background: #ff5c57;
    color: #fff;
    font-size: 9px;
    line-height: 14px;
    font-weight: 700;
    align-items: center;
}

/* =========================
   WISHLIST ICON BUTTON
========================= */

button.wishlist-button {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.96);
    background-image: url('/wp-content/uploads/whislist.svg');
    background-position: center;
    background-repeat: no-repeat;
    background-size: 16px;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

button.wishlist-button.in-wishlist {
    background-image: url('/wp-content/uploads/whislist-on.svg');
}

button.wishlist-button:hover {
    transform: translateY(-2px) scale(1.03);
    border-color: #fddfdf;
    background-color: #fff;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22);
}

/* =========================
   WISHLIST POPUP
========================= */

.wishlist-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 15, 25, 0.65);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 999;
    display: none;
}

.wishlist-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    width: min(420px, calc(100vw - 24px));
    padding: 24px;
    border-radius: 24px;
    background: linear-gradient(
        180deg,
        rgba(38, 50, 79, 0.98) 0%,
        rgba(23, 33, 57, 0.98) 100%
    );
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transform: translate(-50%, -50%);
    z-index: 1000;
    display: none;
}

.wishlist-popup-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
    color: #fff;
}

.wishlist-popup-content img {
    width: 200px;
    height: 200px;
    object-fit: contain;
    filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.2));
}

.wishlist-popup-content span.wishstar {
    min-width: 44px;
    min-height: 44px;
    border-radius: 16px;
    background-color: #fddfdf;
    background-image: url('/wp-content/uploads/whislist-on.svg');
    background-size: 24px;
    background-position: center;
    background-repeat: no-repeat;
    box-shadow: 0 12px 26px rgba(253, 223, 223, 0.2);
}

button.close-popup {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    cursor: pointer;
    transition: all 0.25s ease;
}

button.close-popup:hover {
    background: #fddfdf;
    border-color: #fddfdf;
    color: #111;
    transform: rotate(90deg);
}

button.view-wishlist {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 10px 18px;
    border: 0;
    border-radius: 14px;
    background: #fddfdf;
    color: #111;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 14px 30px rgba(253, 223, 223, 0.18);
}

button.view-wishlist:hover {
    background: #ffcaca;
    transform: translateY(-2px);
}

/* =========================
   WISHLIST EMPTY STATE
========================= */

.wishlist-empty-state {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 32px;
    align-items: center;
    padding: 34px;
    margin-top: 18px;
    border-radius: 24px;
    background: linear-gradient(
        180deg,
        rgba(38, 50, 79, 0.94) 0%,
        rgba(23, 33, 57, 0.94) 100%
    );
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.wishlist-empty-state__media {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
}

.wishlist-empty-state__image {
    width: 180px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 16px 28px rgba(0, 0, 0, 0.25));
}

.wishlist-empty-state__content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.wishlist-empty-state__badge {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 6px 12px;
    margin-bottom: 14px;
    border-radius: 999px;
    background: rgba(253, 223, 223, 0.1);
    border: 1px solid rgba(253, 223, 223, 0.2);
    color: #fddfdf;
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
}

.wishlist-empty-state__title {
    margin: 0 0 12px;
    color: #fff;
    font-size: 30px;
    line-height: 1.2;
    font-weight: 950;
}

.wishlist-empty-state__text {
    max-width: 620px;
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 16px;
    line-height: 1.7;
}

.wishlist-empty-state__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
    align-items: center;
}

.wishlist-empty-state__actions > * {
    flex: 0 0 auto;
}

.wishlist-empty-state__btn,
.wishlist-empty-state__actions .closecom {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    min-width: 190px;
    padding: 12px 18px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 900;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.25s ease;
    box-sizing: border-box;
    width: auto;
}

.wishlist-empty-state__btn--primary {
    border: 0;
    background: #fddfdf;
    color: #111;
    box-shadow: 0 14px 30px rgba(253, 223, 223, 0.18);
}

.wishlist-empty-state__btn--primary:hover {
    background: #ffcaca;
    color: #111;
    transform: translateY(-2px);
}

.wishlist-empty-state__btn--secondary,
.wishlist-empty-state__actions .closecom {
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.wishlist-empty-state__btn--secondary:hover,
.wishlist-empty-state__actions .closecom:hover {
    background: rgba(255, 255, 255, 0.09);
    color: #fff;
    transform: translateY(-2px);
}

/* =========================
   WISHLIST ITEMS
========================= */

.wishlist-items .wishlist-item:only-child {
    max-width: 350px;
}

.wishlist-items {
    justify-items: stretch;
}

.wishlist-items:has(.wishlist-item:only-child) {
    justify-items: start;
}

.wishlist-item .remove-button {
    width: 100%;
    min-height: 42px;
    margin-top: 10px;
    border: 1px solid rgba(253, 223, 223, 0.22);
    border-radius: 14px;
    background: rgba(253, 223, 223, 0.1);
    color: #fddfdf;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.25s ease;
}

.wishlist-item .remove-button:hover {
    background: #fddfdf;
    color: #111;
    transform: translateY(-1px);
}

/* =========================
   WISHLIST ACTIONS / PAGINATION
========================= */

.btfxfx {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 24px;
    padding: 18px;
    border-radius: 22px;
    background: linear-gradient(
        180deg,
        rgba(38, 50, 79, 0.94) 0%,
        rgba(23, 33, 57, 0.94) 100%
    );
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        0 18px 44px rgba(0, 0, 0, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.btfxfx > button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0 24px;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 900;
    line-height: 1.2;
    cursor: pointer;
    transition: all 0.25s ease;
    box-sizing: border-box;
}

button.add-all-to-cart-button {
    border: 0;
    background: #fddfdf;
    color: #111;
    box-shadow: 0 14px 30px rgba(253, 223, 223, 0.18);
}

button.add-all-to-cart-button:hover {
    background: #ffcaca;
    transform: translateY(-2px);
}

button.clear-all-button {
    flex: 0 0 auto;
    min-width: 220px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

button.clear-all-button:hover {
    background: rgba(255, 255, 255, 0.09);
    color: #fff;
    transform: translateY(-2px);
}

.wishlist-items + .pagination {
    margin-top: 24px;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 24px;
}

.pagination .page-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.82);
    font-weight: 900;
    cursor: pointer;
    transition: all 0.25s ease;
}

.pagination .page-num:hover {
    border-color: rgba(253, 223, 223, 0.35);
    background: rgba(253, 223, 223, 0.1);
    color: #fff;
}

.pagination .page-num.active {
    border-color: #fddfdf;
    background: #fddfdf;
    color: #111;
    box-shadow: 0 12px 24px rgba(253, 223, 223, 0.18);
}

/* =========================
   WISHLIST LOADER
========================= */

#loading.loader {
    display: none;
    width: 32px;
    height: 32px;
    margin: 0 0 20px;
}

/* =========================
   MOBILE
========================= */

@media (max-width: 991px) {
    .wishlist-items {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }

    .wishlist-empty-state {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 24px;
        gap: 20px;
    }

    .wishlist-empty-state__content {
        align-items: center;
    }

    .wishlist-empty-state__title {
        font-size: 24px;
    }

    .wishlist-empty-state__text {
        font-size: 15px;
    }

    .btfxfx {
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
    }

    .btfxfx > button,
    button.add-all-to-cart-button,
    button.clear-all-button {
        width: 100%;
        min-width: 100%;
    }

    .wishlist-empty-state__actions {
        width: 100%;
        flex-direction: column;
    }

    .wishlist-empty-state__btn,
    .wishlist-empty-state__actions .closecom {
        width: 100%;
        min-width: 100%;
    }
}

@media (max-width: 575px) {
    .wishlist-items {
        grid-template-columns: 1fr;
    }

    .wishlist-popup {
        padding: 20px;
        border-radius: 20px;
    }

    .wishlist-popup-content img {
        width: 160px;
        height: 160px;
    }
}