/**
 * Flavor Wishlist — Base Styles
 * Override these in your theme for custom design
 */

/* ===== Wishlist Toggle Button ===== */
.flavor-wl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
    position: relative;
    z-index: 5;
}

.flavor-wl-btn:hover {
    transform: scale(1.1);
}

.flavor-wl-btn:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
    border-radius: 50%;
}

/* Heart icon — default (empty) */
.flavor-wl-btn .flavor-wl-icon {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    transition: fill 0.25s ease, stroke 0.25s ease;
}

/* Heart icon — active (filled) */
.flavor-wl-btn.flavor-wl-active .flavor-wl-icon {
    fill: #e74c3c;
    stroke: #e74c3c;
}

/* Loading state */
.flavor-wl-btn.flavor-wl-loading {
    opacity: 0.5;
    pointer-events: none;
}

.flavor-wl-btn.flavor-wl-loading .flavor-wl-icon {
    animation: flavor-wl-pulse 0.6s ease-in-out infinite;
}

@keyframes flavor-wl-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(0.8); }
}

/* ===== Header Count Badge ===== */
.flavor-wl-header-link {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.flavor-wl-count {
    display: none;
    position: absolute;
    top: -6px;
    right: -8px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #e74c3c;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    line-height: 18px;
    text-align: center;
    border-radius: 9px;
}

.flavor-wl-count.flavor-wl-has-items {
    display: inline-block;
}

/* ===== Wishlist Page ===== */
.flavor-wl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
    padding: 20px 0;
}

.flavor-wl-item {
    position: relative;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease;
    background: #fff;
}

.flavor-wl-item.flavor-wl-removing {
    opacity: 0.4;
    transform: scale(0.95);
}

.flavor-wl-item-image {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
}

.flavor-wl-item-info {
    padding: 12px 16px;
}

.flavor-wl-item-name {
    font-size: 14px;
    font-weight: 500;
    margin: 0 0 6px;
}

.flavor-wl-item-name a {
    text-decoration: none;
    color: inherit;
}

.flavor-wl-item-name a:hover {
    text-decoration: underline;
}

.flavor-wl-item-price {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 12px;
}

.flavor-wl-item-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.flavor-wl-add-to-cart {
    flex: 1;
}

.flavor-wl-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    color: #999;
    transition: color 0.2s, border-color 0.2s;
}

.flavor-wl-remove:hover {
    color: #e74c3c;
    border-color: #e74c3c;
}

.flavor-wl-empty {
    text-align: center;
    padding: 60px 20px;
    color: #888;
    font-size: 16px;
    grid-column: 1 / -1;
}

/* ===== Out of stock ===== */
.flavor-wl-item.out-of-stock {
    opacity: 0.7;
}

.flavor-wl-out-of-stock {
    color: #e74c3c;
    font-size: 13px;
    font-weight: 500;
}
