/* ── SmartShop Suite: Wishlist ───────────────────────────────────────────── */
/* All styles scoped under .sss-* — zero bleed to other plugins              */

:root {
    --sss-wishlist-icon:    var(--sss-icon-color, #e74c3c);
    --sss-wishlist-bg:      var(--sss-bg-color, #ffffff);
    --sss-btn-bg:           var(--sss-btn-bg-color, #e74c3c);
    --sss-btn-text:         var(--sss-btn-text-color, #ffffff);
    --sss-radius:           var(--sss-border-radius, 8px);
}

/* Button */
.sss-wishlist-wrap { display: inline-block; position: relative; }

.sss-wishlist-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--sss-wishlist-bg);
    border: 1.5px solid var(--sss-wishlist-icon);
    color: var(--sss-wishlist-icon);
    border-radius: var(--sss-radius);
    padding: 7px 14px;
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
    transition: all .2s ease;
    line-height: 1;
}
.sss-wishlist-btn:hover,
.sss-wishlist-btn.sss-wished {
    background: var(--sss-wishlist-icon);
    color: #fff;
}
.sss-wishlist-btn.sss-wished .sss-heart-icon { fill: #fff; stroke: #fff; }
.sss-wishlist-btn:hover .sss-heart-icon { fill: #fff; stroke: #fff; }

.sss-heart-icon {
    width: 18px;
    height: 18px;
    transition: fill .2s, stroke .2s;
    flex-shrink: 0;
}

/* Style: icon only */
.sss-wishlist-btn.sss-style-icon { padding: 8px; }

/* Wishlist page */
#sss-wishlist-page { max-width: 1200px; margin: 40px auto; padding: 0 20px; }

.sss-wishlist-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
}
.sss-wishlist-header h1 { margin: 0; font-size: 28px; }
.sss-wl-count {
    background: var(--sss-btn-bg);
    color: var(--sss-btn-text);
    border-radius: 50px;
    padding: 2px 10px;
    font-size: 13px;
    font-weight: 600;
}

.sss-wishlist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
}

/* Card */
.sss-wl-card {
    background: var(--sss-wishlist-bg, #fff);
    border: 1px solid #ebebeb;
    border-radius: var(--sss-radius);
    overflow: hidden;
    position: relative;
    transition: box-shadow .2s;
}
.sss-wl-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,.1); }

.sss-wl-remove {
    position: absolute;
    top: 10px; right: 10px;
    background: rgba(255,255,255,.9);
    border: none;
    width: 28px; height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    display: flex; align-items: center; justify-content: center;
    z-index: 2;
    color: #666;
    transition: background .2s, color .2s;
}
.sss-wl-remove:hover { background: #e74c3c; color: #fff; }

.sss-wl-img-wrap { display: block; position: relative; }
.sss-wl-img-wrap img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }

.sss-stock-badge {
    position: absolute;
    bottom: 8px; left: 8px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    background: #27ae60;
    color: #fff;
}
.sss-stock-badge.out-of-stock { background: #e74c3c; }

.sss-wl-info { padding: 12px 14px 0; }
.sss-wl-info h3 { margin: 0 0 6px; font-size: 15px; }
.sss-wl-info h3 a { color: inherit; text-decoration: none; }
.sss-wl-info h3 a:hover { color: var(--sss-wishlist-icon); }
.sss-wl-price { font-size: 15px; font-weight: 600; color: var(--sss-wishlist-icon); }

.sss-wl-actions { padding: 12px 14px 16px; }

/* Buttons */
.sss-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: var(--sss-radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    border: none;
    transition: filter .2s, transform .1s;
    width: 100%;
    font-family: inherit;
}
.sss-btn:active { transform: scale(.98); }
.sss-btn-primary { background: var(--sss-btn-bg); color: var(--sss-btn-text); }
.sss-btn-primary:hover { filter: brightness(1.08); color: var(--sss-btn-text); }

/* Empty state */
.sss-wl-empty {
    text-align: center;
    padding: 80px 20px;
    color: #888;
}
.sss-wl-empty-icon { font-size: 60px; margin-bottom: 16px; }
.sss-wl-empty h3 { font-size: 22px; margin: 0 0 8px; color: #444; }
.sss-wl-empty p { margin: 0 0 24px; }

/* Loading */
.sss-wl-loading { text-align: center; padding: 60px; color: #999; grid-column: 1/-1; }
.sss-spinner {
    width: 36px; height: 36px;
    border: 3px solid #eee;
    border-top-color: var(--sss-wishlist-icon);
    border-radius: 50%;
    animation: sss-spin .7s linear infinite;
    margin: 0 auto 16px;
}
@keyframes sss-spin { to { transform: rotate(360deg); } }

/* Header counter badge */
.sss-header-count {
    position: absolute;
    top: -6px; right: -6px;
    background: var(--sss-btn-bg);
    color: var(--sss-btn-text);
    width: 18px; height: 18px;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}

@media (max-width: 600px) {
    .sss-wishlist-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .sss-wishlist-header h1 { font-size: 22px; }
}
