/**
 * Wishlist - Lista życzeń
 * @package Kadence_LZS
 * @version 1.7.4
 */

/* =======================================================
   PRZYCISK WISHLIST NA PRODUKCIE
   ======================================================= */
.lzs-wishlist-button {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 40px;
    height: 40px;
    background: var(--lzs-bg-white);
    color: var(--lzs-text-dark);
    border: 1px solid var(--lzs-border-color);
    border-radius: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    opacity: 0;
    transition: opacity 0.3s ease, background-color 0.2s ease;
    z-index: 10;
}

.lzs-wishlist-button svg {
    width: 20px;
    height: 20px;
    display: block;
}

/* Pokaż przy hover na produkcie */
.woocommerce ul.products li.product:hover .lzs-wishlist-button {
    opacity: 1;
}

/* Stan aktywny (w wishlist) */
.lzs-wishlist-button.in-wishlist {
    background: #ff4444;
    color: var(--lzs-bg-white);
    border-color: #ff4444;
    opacity: 1;
}

.lzs-wishlist-button:hover {
    background: var(--global-palette4);
    color: var(--lzs-bg-white);
    border-color: var(--global-palette4);
}

.lzs-wishlist-button.in-wishlist:hover {
    background: #cc0000;
    border-color: #cc0000;
}

/* Puste serce (nie w wishlist) */
.lzs-wishlist-button:not(.in-wishlist) svg {
    fill: none;
    stroke: currentColor;
}

/* Pełne serce (w wishlist) */
.lzs-wishlist-button.in-wishlist svg {
    fill: currentColor;
    stroke: currentColor;
}

/* =======================================================
   WISHLIST NA STRONIE PRODUKTU (SINGLE PRODUCT)
   ======================================================= */
.lzs-wishlist-single-product {
    position: static;
    opacity: 1;
    width: auto;
    height: 45px;
    padding: 0 30px;
    margin-top: 15px;
    display: inline-flex;
    gap: 10px;
}

.lzs-wishlist-single-product svg {
    width: 18px;
    height: 18px;
}

.lzs-wishlist-single-product .lzs-wishlist-text {
    font-size: 1rem;
    font-weight: 600;
}

/* =======================================================
   LICZNIK W HEADERZE
   ======================================================= */
.lzs-wishlist-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff4444;
    color: var(--lzs-bg-white);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
}

.lzs-wishlist-count.show {
    display: flex;
}

/* Link Wishlist w menu/headerze */
.lzs-wishlist-header-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    text-decoration: none;
    color: var(--lzs-text-dark);
    transition: color 0.2s ease;
}

.lzs-wishlist-header-link:hover {
    color: var(--global-palette4);
}

.lzs-wishlist-header-link svg {
    width: 20px;
    height: 20px;
}

/* =======================================================
   NOTIFICATION (Toast)
   ======================================================= */
.lzs-wishlist-notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--lzs-text-dark);
    color: var(--lzs-bg-white);
    padding: 15px 25px;
    border-radius: 0;
    font-size: 14px;
    font-weight: 600;
    z-index: 999999;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.lzs-wishlist-notification.show {
    opacity: 1;
    transform: translateY(0);
}

/* =======================================================
   STRONA WISHLIST
   ======================================================= */
.lzs-wishlist-page {
    width: 100%;
}

.lzs-wishlist-page .category-title {
    margin-bottom: 30px;
}

/* Tabela produktów */
.lzs-wishlist-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

.lzs-wishlist-table thead {
    background: var(--lzs-bg-light);
    border: 1px solid var(--lzs-border-color);
}

.lzs-wishlist-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: var(--lzs-text-dark);
    border-bottom: 1px solid var(--lzs-border-color);
}

.lzs-wishlist-table tbody tr {
    border-bottom: 1px solid var(--lzs-border-light);
}

.lzs-wishlist-table tbody tr:hover {
    background: var(--lzs-bg-light);
}

.lzs-wishlist-table td {
    padding: 20px 15px;
    vertical-align: middle;
}

/* Kolumna usuń */
.lzs-wishlist-table .product-remove {
    width: 50px;
    text-align: center;
}

.lzs-wishlist-table .product-remove .lzs-remove-from-wishlist {
    background: transparent;
    border: none;
    color: #c00;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
}

.lzs-wishlist-table .product-remove .lzs-remove-from-wishlist:hover {
    color: #ff0000;
}

/* Kolumna miniatura */
.lzs-wishlist-table .product-thumbnail {
    width: 100px;
}

.lzs-wishlist-table .product-thumbnail img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border: 1px solid var(--lzs-border-light);
}

/* Kolumna nazwa */
.lzs-wishlist-table .product-name a {
    font-weight: 400;
    color: var(--lzs-text-dark);
    text-decoration: none;
}

.lzs-wishlist-table .product-name a:hover {
    color: var(--global-palette4);
}

/* Kolumna cena */
.lzs-wishlist-table .product-price {
    font-weight: 600;
    color: var(--global-palette4);
}

.lzs-wishlist-table .product-price del {
    opacity: 0.6;
    margin-right: 10px;
}

/* Kolumna status */
.lzs-wishlist-table td.product-stock {
    font-size: 14px;
}

.lzs-wishlist-table .product-stock .in-stock {
    color: #0a0;
}

.lzs-wishlist-table .product-stock .out-of-stock {
    color: #c00;
}

/* Kolumna dodaj do koszyka */
.lzs-wishlist-table .product-add-to-cart {
    width: 200px;
}

.lzs-wishlist-table .product-add-to-cart .button {
    width: 100%;
    padding: 10px 20px;
    border-radius: 0;
}

/* Komunikat pustej listy */
.lzs-wishlist-empty {
    text-align: center;
    padding: 60px 20px;
    display: none;
}

.lzs-wishlist-empty svg {
    width: 80px;
    height: 80px;
    opacity: 0.3;
    margin-bottom: 20px;
}

.lzs-wishlist-empty p {
    font-size: 1.2rem;
    color: var(--lzs-text-medium);
    margin-bottom: 20px;
}

.lzs-wishlist-empty .button {
    display: inline-block;
    padding: 12px 30px;
}

/* =======================================================
   RESPONSYWNOŚĆ
   ======================================================= */
@media (max-width: 768px) {
    /* Na mobile przycisk zawsze widoczny */
    .lzs-wishlist-button {
        opacity: 1;
        width: 35px;
        height: 35px;
        font-size: 16px;
    }

    /* Tabela responsywna */
    .lzs-wishlist-table {
        font-size: 14px;
    }

    .lzs-wishlist-table thead {
        display: none;
    }

    .lzs-wishlist-table tbody tr {
        display: block;
        margin-bottom: 20px;
        border: 1px solid var(--lzs-border-color);
    }

    .lzs-wishlist-table td {
        display: block;
        text-align: left;
        padding: 10px;
        border: none;
    }

    .lzs-wishlist-table td::before {
        content: attr(data-label);
        font-weight: 600;
        display: block;
        margin-bottom: 5px;
        color: var(--lzs-text-medium);
    }

    .lzs-wishlist-table .product-remove,
    .lzs-wishlist-table .product-thumbnail,
    .lzs-wishlist-table .product-add-to-cart {
        width: 100%;
    }

    /* Notification na mobile */
    .lzs-wishlist-notification {
        left: 20px;
        right: 20px;
        bottom: 20px;
        text-align: center;
    }
}

