/**
 * WISHLIST - MODERN & PROFESSIONAL (FIXED)
 * Plik: assets/css/wishlist.css
 */

/* ==========================================
   1. KONTENER GŁÓWNY - DESKTOP
   ========================================== */
.wishlist_table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #FFFFFF;
    border: 1px solid #E5E5E5;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    margin: 30px 0;
}

/* ==========================================
   2. NAGŁÓWKI TABELI - DESKTOP
   ========================================== */
.wishlist_table thead {
    background: #F9F9F9;
}

.wishlist_table thead th {
    padding: 18px 20px;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #333333;
    text-align: left;
    border-bottom: 2px solid #E5E5E5;
    text-transform: none;
}

.wishlist_table thead th .nobr {
    display: block;
    line-height: 1.4;
}

.wishlist_table thead th.product-remove,
.wishlist_table thead th.product-add-to-cart {
    text-align: center;
}

/* ==========================================
   3. WIERSZE PRODUKTÓW - DESKTOP
   ========================================== */
.wishlist_table tbody tr {
    border-bottom: 1px solid #F5F5F5;
    transition: background 0.2s ease;
}

.wishlist_table tbody tr:hover {
    background: #FAFAFA;
}

.wishlist_table tbody tr:last-child {
    border-bottom: none;
}

.wishlist_table tbody td {
    padding: 20px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #333333;
    vertical-align: middle;
}

/* ✅ FIX - Product-price ma taką samą wysokość jak inne */
.wishlist_table tbody td.product-price {
    height: auto;
    min-height: 100px; /* Wymusza taką samą wysokość jak thumbnail */
}

/* ==========================================
   4. KOLUMNA X (USUŃ) - DESKTOP
   ========================================== */
.wishlist_table td.product-remove {
    width: 60px;
    text-align: center;
    vertical-align: middle;
}

.wishlist_table td.product-remove div {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.wishlist_table .remove_from_wishlist {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #F5F5F5;
    color: #666666;
    font-size: 20px;
    font-weight: 400;
    text-decoration: none;
    transition: all 0.3s ease;
    line-height: 1;
}

.wishlist_table .remove_from_wishlist:hover {
    background: #FFEBEE;
    color: #E63946;
    transform: rotate(90deg);
}

/* ==========================================
   5. MINIATURKA ZDJĘCIA - DESKTOP
   ========================================== */
.wishlist_table td.product-thumbnail {
    width: 120px;
    padding: 15px;
}

.wishlist_table td.product-thumbnail img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #E5E5E5;
}

/* ==========================================
   6. NAZWA PRODUKTU - DESKTOP
   ========================================== */
.wishlist_table td.product-name {
    min-width: 250px;
}

.wishlist_table td.product-name a {
    color: #333333;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
    line-height: 1.5;
}

.wishlist_table td.product-name a:hover {
    color: #FDA635;
}

/* ==========================================
   7. CENA - DESKTOP
   ========================================== */
.wishlist_table td.product-price {
    min-width: 150px;
    font-weight: 500;
}

.wishlist_table td.product-price .woocommerce-Price-amount {
    color: #FDA635;
    font-size: 16px;
    font-weight: 600;
}

/* ==========================================
   8. STAN MAGAZYNOWY - DESKTOP
   ========================================== */
.wishlist_table td.product-stock-status {
    min-width: 120px;
}

.wishlist_table .wishlist-in-stock {
    display: inline-block;
    padding: 6px 14px;
    background: #E8F5E9;
    color: #4CAF50;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.wishlist_table .wishlist-out-of-stock {
    display: inline-block;
    padding: 6px 14px;
    background: #FFEBEE;
    color: #E63946;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

/* ==========================================
   9. PRZYCISKI - DESKTOP
   ========================================== */
.wishlist_table td.product-add-to-cart {
    min-width: 180px;
    text-align: center;
}

.wishlist_table .add_to_cart_button,
.wishlist_table .button {
    display: inline-block;
    padding: 12px 24px;
    background: #FDA635;
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 400;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wishlist_table .add_to_cart_button:hover,
.wishlist_table .button:hover {
    background: #FF6B35;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(253, 166, 53, 0.3);
}

/* ==========================================
   10. UKRYJ ZBĘDNE ELEMENTY
   ========================================== */
.wishlist_table .screen-reader-text {
    display: none;
}

.wishlist_table td p:empty {
    display: none;
    margin: 0;
}

.wishlist_table td p {
    margin: 0;
}

/* ==========================================
   11. ANIMACJE
   ========================================== */
.wishlist_table tbody tr {
    animation: fadeInUp 0.4s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================
   12. MOBILE - CARD LAYOUT (KOMPLETNA ZMIANA)
   ========================================== */
@media (max-width: 767px) {
    
    /* ✅ UKRYJ NAGŁÓWKI TABELI */
    .wishlist_table thead {
        display: none;
    }
    .product-name h3{
        font-size:16px !important;
    }
    
    /* ✅ ZMIEŃ TABELĘ NA FLEX CONTAINER */
    .wishlist_table,
    .wishlist_table tbody {
        display: flex;
        flex-direction: column;
        gap: 15px;
        border: none;
        background: transparent;
        box-shadow: none;
        border-radius: 0;
    }
    
    /* ✅ KAŻDY WIERSZ = KARTA */
    .wishlist_table tbody tr {
        display: flex;
        flex-direction: row;
        background: #FFFFFF;
        border: 1px solid #E5E5E5;
        border-radius: 12px;
        padding: 15px;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
        position: relative;
    }
    
    .wishlist_table tbody tr:hover {
        background: #FFFFFF;
    }
    
    /* ✅ KAŻDA KOMÓRKA = BLOK */
    .wishlist_table tbody td {
        display: block;
        width: 100%;
        padding: 0;
        border: none;
        text-align: left;
        min-width: auto;
        height: auto;
        min-height: auto;
    }
    
    /* ✅ X (USUŃ) - PRAWY GÓRNY RÓG */
    .wishlist_table td.product-remove {
        position: absolute;
        top: 10px;
        right: 10px;
        width: auto;
        order: -1;
    }
    
    .wishlist_table .remove_from_wishlist {
        width: 28px;
        height: 28px;
        font-size: 18px;
    }
    
    /* ✅ ZDJĘCIE + NAZWA OBOK SIEBIE */
    .wishlist_table td.product-thumbnail {
        width: 80px;
        float: left;
        margin-right: 15px;
        margin-bottom: 10px;
        padding: 0;
    }
    
    .wishlist_table td.product-thumbnail img {
        width: 80px;
        height: 80px;
    }
    
    .wishlist_table td.product-name {
        overflow: hidden;
        margin-bottom: 15px;
        padding-right: 35px; /* Miejsce na X */
    }
    
    .wishlist_table td.product-name a {
        font-size: 14px; /* ✅ MNIEJSZY TYTUŁ */
        font-weight: 500;
        line-height: 1.4;
        display: block;
    }
    
    /* ✅ CLEARFIX PO ZDJĘCIU + NAZWIE */
    .wishlist_table td.product-name::after {
        content: "";
        display: table;
        clear: both;
    }
    
    /* ✅ CENA - USUŃ TŁO, DO LEWEJ */
    .wishlist_table td.product-price {
        margin-bottom: 10px;
        background: transparent !important; /* ✅ BEZ TŁA */
    }
    
    .wishlist_table td.product-price::before {
        content: "Cena: ";
        font-weight: 600;
        color: #333333;
        margin-right: 5px;
    }
    
    .wishlist_table td.product-price .woocommerce-Price-amount {
        font-size: 15px;
    }
    
    /* ✅ STAN - USUŃ TŁO, DO LEWEJ */
    .wishlist_table td.product-stock-status {
        margin-bottom: 15px;
        background: transparent !important; /* ✅ BEZ TŁA */
    }
    
    .wishlist_table td.product-stock-status::before {
        content: "Stan: ";
        font-weight: 600;
        color: #333333;
        margin-right: 5px;
    }
    
    .wishlist_table .wishlist-in-stock {
        padding: 4px 10px;
        font-size: 12px;
    }
    
    /* ✅ PRZYCISK - PEŁNA SZEROKOŚĆ */
    .wishlist_table td.product-add-to-cart {
        text-align: left;
    }
    
    .wishlist_table .add_to_cart_button {
        display: block;
        width: 100%;
        text-align: center;
        padding: 12px;
        font-size: 14px;
    }
}

/* ==========================================
   13. TABLET (opcjonalnie)
   ========================================== */
@media (min-width: 768px) and (max-width: 1024px) {
    .wishlist_table thead th,
    .wishlist_table tbody td {
        padding: 15px;
        font-size: 13px;
    }
    
    .wishlist_table td.product-thumbnail img {
        width: 80px;
        height: 80px;
    }
    
    .wishlist_table td.product-name {
        min-width: 200px;
    }
}

/* ==========================================
   14. SOCIAL SHARE - FIX
   ========================================== */

/* Desktop */
.yith-wcwl-share {
    margin-top: 30px;
    padding: 25px;
    background: #F9F9F9;
    border-radius: 12px;
}

.yith-wcwl-share-title {
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #333333;
    margin-bottom: 15px;
}

.yith-wcwl-share ul {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
}

.yith-wcwl-share .share-button {
    margin: 0;
}

.yith-wcwl-share .share-button a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: #FFFFFF;
    border: 1px solid #E5E5E5;
    border-radius: 8px;
    color: #666666;
    transition: all 0.3s ease;
    text-decoration: none;
}

.yith-wcwl-share .share-button a:hover {
    background: #FDA635;
    border-color: #FDA635;
    color: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(253, 166, 53, 0.3);
}

.yith-wcwl-share .share-button svg {
    width: 18px;
    height: 18px;
}

/* Mobile - większe przyciski */
@media (max-width: 767px) {
    .yith-wcwl-share {
        padding: 20px;
        margin-top: 20px;
    }
    
    .yith-wcwl-share-title {
        font-size: 15px;
        margin-bottom: 12px;
    }
    
    .yith-wcwl-share ul {
        gap: 10px;
        justify-content: flex-start;
    }
    
    .yith-wcwl-share .share-button a {
        width: 52px;  /* ✅ Szersze na mobile */
        height: 52px; /* ✅ Wyższe na mobile */
    }
    
    .yith-wcwl-share .share-button svg {
        width: 20px;
        height: 20px;
    }
}