/**
 * pd_wishlist – Front-end styles
 * @author presta.design
 */

/* =============================================
   Wishlist button
   ============================================= */
.pd-wl-btn-wrap {
    display: inline-block;
    margin: 6px 0;
}

.pd-wl-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    border: 1px solid #ccc;
    background: #fff;
    color: #555;
    padding: 8px 14px;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.pd-wl-btn:hover,
.pd-wl-btn:focus {
    border-color: #e74c3c;
    color: #e74c3c;
    text-decoration: none;
}

.pd-wl-btn.pd-wl-active {
    background: #e74c3c;
    border-color: #e74c3c;
    color: #fff;
}

.pd-wl-btn.pd-wl-active:hover {
    background: #c0392b;
    border-color: #c0392b;
}

.pd-wl-heart-icon {
    flex-shrink: 0;
}

.pd-wl-heart-path {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    transition: fill 0.2s;
}

.pd-wl-btn.pd-wl-active .pd-wl-heart-path,
.pd-wl-btn:hover .pd-wl-heart-path {
    fill: currentColor;
}

/* =============================================
   Listing compact button (icon only)
   ============================================= */
.pd-wl-btn-list {
    display: flex;
    width: fit-content;
    padding: 7px 9px;
    border-radius: 50%;
    min-width: 0;
    gap: 0;
    background: #fff;
    border: 1px solid #ddd;
    color: #888;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.pd-wl-btn-list:hover,
.pd-wl-btn-list:focus {
    border-color: #e74c3c;
    color: #e74c3c;
    box-shadow: 0 2px 8px rgba(231,76,60,0.2);
}

.pd-wl-btn-list.pd-wl-active {
    background: #e74c3c;
    border-color: #e74c3c;
    color: #fff;
}

/* Pozycja identyczna jak w oficjalnym blockwishlist:
   .products article .wishlist-button-add{position:absolute;top:.635rem;right:.635rem;z-index:10}
   Przycisk jest tu przenoszony do .product-miniature__image-container przez JS. */
.js-product-miniature .pd-wl-btn-list {
    position: absolute;
    top: 0.635rem;
    right: 0.635rem;
    z-index: 10;
    margin: 0;
}

/* =============================================
   Nav counter widget
   ============================================= */
.pd-wl-nav-wrap {
    display: inline-block;
    vertical-align: middle;
    margin: 0 8px;
}

.pd-wl-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: inherit;
    text-decoration: none;
    position: relative;
}

.pd-wl-nav-link:hover {
    color: #e74c3c;
    text-decoration: none;
}

.pd-wl-nav-icon {
    fill: currentColor;
    transition: fill 0.2s;
}

.pd-wl-nav-link:hover .pd-wl-nav-icon {
    fill: #e74c3c;
}

.pd-wl-nav-label {
    font-size: 0.85rem;
}

.pd-wl-nav-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background: #e74c3c;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    border-radius: 50%;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    padding: 0 4px;
}

/* =============================================
   My wishlist page
   ============================================= */
.pd-wl-mylist-page {
    padding: 20px 0;
}

.pd-wl-page-title {
    font-size: 1.8rem;
    margin-bottom: 24px;
}

/* Empty state */
.pd-wl-empty {
    text-align: center;
    padding: 40px 20px;
}

.pd-wl-empty-icon {
    margin-bottom: 16px;
    color: #ccc;
}

.pd-wl-empty-msg {
    font-size: 1.1rem;
    color: #777;
    margin-bottom: 20px;
}

/* Product grid (built by JS) */
.pd-wl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

.pd-wl-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #fff;
    transition: box-shadow 0.2s;
}

.pd-wl-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.pd-wl-card-img-wrap {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: #f5f5f5;
}

.pd-wl-card-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.pd-wl-card-body {
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.pd-wl-card-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #222;
    text-decoration: none;
    margin-bottom: 6px;
    display: block;
    flex: 1;
}

.pd-wl-card-name:hover {
    color: #e74c3c;
}

.pd-wl-card-price {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 10px;
}

.pd-wl-card-actions {
    display: flex;
    gap: 6px;
}

.pd-wl-card-view {
    flex: 1;
    font-size: 0.82rem;
    padding: 6px 8px;
}

.pd-wl-card-remove {
    font-size: 0.82rem;
    padding: 6px 10px;
    color: #e74c3c;
    border-color: #e74c3c;
    background: none;
}

.pd-wl-card-remove:hover {
    background: #e74c3c;
    color: #fff;
}

/* =============================================
   Share section
   ============================================= */
.pd-wl-share-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.pd-wl-share-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.pd-wl-share-input {
    flex: 1;
    min-width: 200px;
    font-size: 0.85rem;
    color: #555;
}

.pd-wl-copy-msg {
    color: #27ae60;
    font-size: 0.9rem;
    margin-top: 6px;
}

/* =============================================
   Share page
   ============================================= */
.pd-wl-share-page {
    padding: 20px 0;
}

.pd-wl-table {
    font-size: 0.9rem;
}

.pd-wl-share-img-cell {
    width: 80px;
}

.pd-wl-share-img {
    width: 70px;
    height: 70px;
    object-fit: contain;
}

.pd-wl-share-product-name {
    color: #222;
    text-decoration: none;
    font-weight: 500;
}

.pd-wl-share-product-name:hover {
    color: #e74c3c;
}

.pd-wl-share-price {
    font-weight: 600;
    color: #333;
}

/* =============================================
   Responsive
   ============================================= */
@media (max-width: 600px) {
    .pd-wl-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .pd-wl-card-img-wrap {
        height: 130px;
    }

    .pd-wl-share-row {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 400px) {
    .pd-wl-grid {
        grid-template-columns: 1fr;
    }
}
