/* Product Favorites Styles */

.custom-webshop-favorite-btn {
    display: inline-block;
    margin: 10px 0;
}

.custom-webshop-favorite-btn .favorite-toggle {
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 8px 15px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #666;
    transition: all 0.3s ease;
    text-decoration: none;
}

.custom-webshop-favorite-btn .favorite-toggle:hover {
    border-color: #e74c3c;
    color: #e74c3c;
    background-color: #fff5f5;
}

.custom-webshop-favorite-btn.is-favorite .favorite-toggle {
    border-color: #e74c3c;
    color: #e74c3c;
    background-color: #fff5f5;
}

.custom-webshop-favorite-btn .favorite-icon {
    font-size: 18px;
    line-height: 1;
    display: inline-block;
    width: 1em;
    height: 1em;
    position: relative;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", Arial, sans-serif;
}

/* Empty heart for non-favorited - outline only */
.custom-webshop-favorite-btn .favorite-icon::before {
    content: '♡';
    display: block;
    font-size: 1em;
    line-height: 1;
    width: 1em;
    height: 1em;
    text-align: center;
    color: #999;
    font-weight: normal;
    font-family: inherit;
}

/* Filled heart when favorited - solid red */
.custom-webshop-favorite-btn.is-favorite .favorite-icon {
    color: #e74c3c;
}

.custom-webshop-favorite-btn.is-favorite .favorite-icon::before {
    content: '♥';
    color: #e74c3c;
    font-size: 1em;
    line-height: 1;
    width: 1em;
    height: 1em;
    font-weight: normal;
    font-family: inherit;
}

.custom-webshop-favorite-btn .favorite-text {
    font-size: 14px;
}

/* Loop context - smaller button */
.products li.product,
.woocommerce ul.products li.product {
    position: relative;
}

.custom-webshop-favorite-btn.favorite-loop {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
}

.custom-webshop-favorite-btn.favorite-loop .favorite-toggle {
    padding: 6px 10px;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.custom-webshop-favorite-btn.favorite-loop .favorite-text {
    display: none;
}

.custom-webshop-favorite-btn.favorite-loop .favorite-icon {
    font-size: 20px;
}

/* Single product context */
.custom-webshop-favorite-btn.favorite-single {
    margin: 15px 0;
}

.custom-webshop-favorite-btn.favorite-single .favorite-toggle {
    padding: 12px 20px;
    font-size: 16px;
}

.custom-webshop-favorite-btn.favorite-single .favorite-icon {
    font-size: 20px;
}

/* Disabled state */
.custom-webshop-favorite-btn .favorite-toggle:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Favorites page */
.woocommerce-favorites ul.products,
.woocommerce-favorites .products {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important;
    gap: 1rem !important;
    row-gap: 1.25rem !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 2.5rem 0 !important;
    clear: none !important;
}

.woocommerce-favorites ul.products li.product,
.woocommerce-favorites .products li.product {
    margin: 0 !important;
    padding: 0 !important;
    width: auto !important;
    float: none !important;
    clear: none !important;
    position: relative;
}

@media (min-width: 768px) {
    .woocommerce-favorites ul.products,
    .woocommerce-favorites .products {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem !important;
        row-gap: 1.25rem !important;
    }
}

@media (min-width: 1024px) {
    .woocommerce-favorites ul.products,
    .woocommerce-favorites .products {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 1rem !important;
        row-gap: 1.25rem !important;
    }
}

@media (min-width: 1400px) {
    .woocommerce-favorites ul.products,
    .woocommerce-favorites .products {
        grid-template-columns: repeat(5, 1fr) !important;
        gap: 1rem !important;
        row-gap: 1.25rem !important;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .custom-webshop-favorite-btn.favorite-loop {
        top: 5px;
        right: 5px;
    }
    
    .custom-webshop-favorite-btn.favorite-loop .favorite-toggle {
        width: 32px;
        height: 32px;
        padding: 0;
    }
}
