/* HVB Wishlist — Frontend */

/* Heart Button — Product Page */
.hvb-wl-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 12px;
    font-size: 22px;
    line-height: 1;
    color: #999;
    transition: color 0.2s, transform 0.2s;
    vertical-align: middle;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.hvb-wl-btn:hover { color: #e53935; }
.hvb-wl-btn.hvb-wl-active { color: #e53935; }
.hvb-wl-btn.hvb-wl-active .hvb-wl-heart { display: inline-block; animation: hvb-wl-pop 0.3s ease; }

/* Text label next to heart */
.hvb-wl-label {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.02em;
}

/* Product page button — full width row below add-to-cart area */
.hvb-wl-btn-product {
    margin: 10px 0 0;
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    width: 100%;
    justify-content: center;
    font-size: 18px;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.hvb-wl-btn-product:hover {
    border-color: #e53935;
    background: #fef2f2;
}
.hvb-wl-btn-product.hvb-wl-active {
    border-color: #e53935;
    background: #fef2f2;
}

/* Shop loop button — overlay on product image */
.hvb-wl-btn-loop {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255,255,255,0.92);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    font-size: 18px;
    z-index: 5;
}
.hvb-wl-btn-loop .hvb-wl-label { display: none; }

@keyframes hvb-wl-pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* Count Badge */
.hvb-wl-count-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #e53935;
    font-size: 14px;
}
.hvb-wl-heart-icon { font-size: 16px; }

/* ===== My Account Wishlist Page ===== */
.hvb-wl-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5em;
    flex-wrap: wrap;
    gap: 0.5em;
}
.hvb-wl-page-header h2 { margin: 0; }
.hvb-wl-actions { display: flex; gap: 0.5em; }

.hvb-wl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.2em;
}
.hvb-wl-item {
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    position: relative;
    transition: box-shadow 0.2s;
}
.hvb-wl-item:hover { box-shadow: 0 2px 12px rgba(0,0,0,0.06); }

/* X remove button on wishlist cards — fixed */
.hvb-wl-item-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 30px;
    height: 30px;
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif;
}
.hvb-wl-item-remove:hover {
    background: rgba(200,0,0,0.8);
}

.hvb-wl-item-img img { width: 100%; height: auto; display: block; }
.hvb-wl-item-info { padding: 0.8em; }
.hvb-wl-item-name {
    display: block;
    font-weight: 600;
    font-size: 0.9em;
    color: #333;
    text-decoration: none;
    margin-bottom: 0.3em;
}
.hvb-wl-item-name:hover { color: #2e7d32; }
.hvb-wl-item-price { font-size: 0.9em; color: #666; margin-bottom: 0.3em; }
.hvb-wl-item-stock { font-size: 0.8em; margin-bottom: 0.5em; }
.hvb-wl-in-stock { color: #2e7d32; }
.hvb-wl-out-of-stock { color: #c00; }
.hvb-wl-add-to-cart { font-size: 0.8em !important; }

/* Empty State */
.hvb-wl-empty {
    text-align: center;
    padding: 3em 1em;
    color: #666;
}
.hvb-wl-empty p { font-size: 1.1em; margin-bottom: 1em; }

/* Share Popup */
.hvb-wl-share-popup {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hvb-wl-share-popup-inner {
    background: #fff;
    border-radius: 12px;
    padding: 2em;
    max-width: 450px;
    width: 90%;
    position: relative;
    text-align: center;
}
.hvb-wl-share-popup-inner h3 { margin: 0 0 1em; }
.hvb-wl-share-url {
    width: 100%;
    padding: 0.5em;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-bottom: 0.8em;
    font-size: 0.85em;
}
.hvb-wl-share-close {
    position: absolute;
    top: 10px;
    right: 14px;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #999;
}
.hvb-wl-preferences {
    margin-top: 2em;
    padding-top: 1em;
    border-top: 1px solid #eee;
    font-size: 0.85em;
    color: #666;
}

/* Shared Wishlist Page */
.hvb-wl-shared-page {
    max-width: 1200px;
    margin: 2em auto;
    padding: 0 1em;
}
.hvb-wl-shared-page h1 { margin-bottom: 1em; }

/* Toast Notification */
.hvb-wl-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999;
    background: #333;
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    max-width: 90vw;
}
.hvb-wl-toast-text {
    white-space: nowrap;
}
.hvb-wl-toast-link {
    color: #81c784;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}
.hvb-wl-toast-link:hover {
    color: #a5d6a7;
    text-decoration: underline;
}

/* Removing animation */
.hvb-wl-item.removing {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.3s, transform 0.3s;
}

@media (max-width: 600px) {
    .hvb-wl-grid { grid-template-columns: repeat(2, 1fr); gap: 0.8em; }
    .hvb-wl-page-header { flex-direction: column; align-items: flex-start; }
    .hvb-wl-btn-product .hvb-wl-label { font-size: 12px; }
}
