/* --- Heart Button & Tooltip --- */
.single-product-wishlist-wrapper {
    margin-top: 15px;
    clear: both;
}

.custom-wishlist-btn-with-text {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    padding: 5px 0;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    transition: color 0.3s;
}

.custom-wishlist-btn-with-text svg {
    transition: fill 0.3s, stroke 0.3s;
}

.custom-wishlist-btn-with-text.active {
    color: #ff0000;
}

.custom-wishlist-btn-with-text.active svg {
    fill: #ff0000;
    stroke: #ff0000;
}

.product .custom-wishlist-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 20;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    opacity: 0;
    transform: translateY(-5px);
}

.product:hover .custom-wishlist-btn,
.product .custom-wishlist-btn.loading {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile: Always show */
@media (max-width: 768px) {
    .product .custom-wishlist-btn {
        opacity: 1;
        transform: translateY(0);
    }
}

.custom-wishlist-btn svg {
    stroke: #333;
    transition: all 0.3s;
}

.custom-wishlist-btn.active svg {
    fill: #ff0000;
    stroke: #ff0000;
}

/* Tooltip Styles */
.custom-wishlist-btn {
    position: relative;
}

.custom-wishlist-btn::before {
    content: attr(data-tooltip);
    position: absolute;
    right: 110%; /* Show to the left of the button */
    top: 50%;
    transform: translateY(-50%);
    background: #333;
    color: #fff;
    font-size: 12px;
    padding: 5px 10px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s;
    pointer-events: none;
}

.custom-wishlist-btn:hover::before {
    opacity: 1;
    visibility: visible;
}

/* --- New Text Button (Single Product) --- */
.custom-wishlist-text-btn {
    display: inline-block;
    margin-top: 15px;
    background: transparent;
    border: 2px solid #ddd;
    padding: 10px 20px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.custom-wishlist-text-btn:hover {
    border-color: #333;
}

.custom-wishlist-text-btn.active {
    border-color: #ff0000;
    color: #ff0000;
}

/* --- Notification --- */
.wishlist-notification {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background-color: #222;
    color: #fff;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 14px;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.wishlist-notification.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* --- Grid Fixes for Wishlist Page --- */
/* Ensure the wishlist page wrapper behaves like a Blocksy grid */
.woocommerce-wishlist-page .products.entries {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

/* Ensure the wishlist wrapper behaves like the shop archive */
.woocommerce-wishlist-page .products.entries {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid; /* Blocksy uses CSS Grid */
}

/* Fix the product title size to match archive exactly */
.woocommerce-wishlist-page .products.entries .woocommerce-loop-product__title {
    font-size: var(--theme-link-size, inherit); /* Inherit from Blocksy variables */
    font-family: inherit;
    font-weight: inherit;
}

/* Remove standard list bullet if theme adds them to ULs by default */
.woocommerce-wishlist-page ul.products li::before {
    display: none;
}

@media (max-width: 1024px) {
    .woocommerce-wishlist-page .products.entries {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 768px) {
    .woocommerce-wishlist-page .products.entries {
        grid-template-columns: repeat(2, 1fr);
    }
}