﻿/* ================================================================
   CasaGlow - Wishlist System CSS
   ================================================================ */

/* Wishlist button on product cards */
.bytora-wl-btn, .cg-wl-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: none;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    cursor: pointer;
    transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
    padding: 0;
    color: #9CA3AF;
    flex-shrink: 0;
}
.bytora-wl-btn:hover, .cg-wl-btn:hover {
    transform: scale(1.12);
    box-shadow: 0 4px 14px rgba(0,0,0,0.18);
    color: #ef4444;
}
.bytora-wl-btn.is-active, .cg-wl-btn.is-active {
    color: #ef4444;
    background: #fff0f0;
}
.bytora-wl-btn.is-active, .cg-wl-btn.is-active svg { fill: #ef4444; }
.bytora-wl-btn svg { pointer-events: none; transition: fill 150ms ease; }
.bytora-wl-btn.is-animating, .cg-wl-btn.is-animating { animation: wl-pulse 300ms ease; }
@keyframes wl-pulse {
    0%  { transform: scale(1); }
    50% { transform: scale(1.3); }
    100%{ transform: scale(1); }
}

/* Navbar wishlist counter */
.cg-wishlist-count {
    position: absolute;
    top: -4px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    background: #2E7D32;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    border-radius: 9px;
    font-family: var(--bytora-font-primary);
}
.cg-wishlist-count--empty { display: none; }

/* Wishlist page */
.bytora-wishlist-page { padding: var(--bytora-space-8) 0; }
.bytora-wishlist-page__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--bytora-space-6);
    gap: var(--bytora-space-4);
    flex-wrap: wrap;
}
.bytora-wishlist-page__title {
    font-family: var(--bytora-font-heading);
    font-size: var(--bytora-text-2xl);
    font-weight: var(--bytora-font-bold);
    margin: 0;
    display: flex;
    align-items: center;
    gap: var(--bytora-space-2);
}
.bytora-wishlist-page__count {
    font-size: var(--bytora-text-sm);
    font-weight: var(--bytora-font-normal);
    color: var(--bytora-gray-500);
}

/* Wishlist grid */
.bytora-wishlist-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--bytora-space-6);
}

/* Wishlist card */
.bytora-wishlist-card {
    background: #ffffff;
    border-radius: var(--bytora-radius-lg);
    border: 1px solid var(--bytora-gray-200);
    box-shadow: var(--bytora-shadow-card);
    overflow: hidden;
    transition: box-shadow 200ms ease, transform 200ms ease;
    animation: wl-card-in 300ms ease;
}
.bytora-wishlist-card:hover {
    box-shadow: var(--bytora-shadow-hover);
    transform: translateY(-2px);
}
@keyframes wl-card-in {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
.bytora-wishlist-card__img-wrap {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--bytora-gray-100);
}
.bytora-wishlist-card__img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 300ms ease;
}
.bytora-wishlist-card:hover .bytora-wishlist-card__img { transform: scale(1.05); }
.bytora-wishlist-card__body { padding: var(--bytora-space-4); }
.bytora-wishlist-card__name {
    font-family: var(--bytora-font-heading);
    font-size: var(--bytora-text-sm);
    font-weight: var(--bytora-font-semibold);
    color: var(--bytora-gray-900);
    margin: 0 0 var(--bytora-space-2);
    line-height: 1.4;
}
.bytora-wishlist-card__name a { color: inherit; text-decoration: none; }
.bytora-wishlist-card__name a:hover { color: var(--bytora-primary); }
.bytora-wishlist-card__price {
    font-size: var(--bytora-text-base);
    font-weight: var(--bytora-font-bold);
    color: var(--bytora-primary);
    margin-bottom: var(--bytora-space-2);
}
.bytora-wishlist-card__stock {
    font-size: var(--bytora-text-xs);
    font-weight: var(--bytora-font-medium);
    margin-bottom: var(--bytora-space-4);
}
.bytora-wishlist-card__stock--in    { color: #2E7D32; }
.bytora-wishlist-card__stock--out   { color: #D32F2F; }
.bytora-wishlist-card__stock--low   { color: #e65100; }
.bytora-wishlist-card__actions {
    display: flex; gap: var(--bytora-space-2); flex-direction: column;
}
.bytora-wl-move-btn {
    width: 100%;
    padding: var(--bytora-space-2) var(--bytora-space-4);
    background: var(--bytora-primary);
    color: #fff;
    border: none;
    border-radius: var(--bytora-radius-md);
    font-family: var(--bytora-font-button);
    font-size: var(--bytora-text-sm);
    font-weight: var(--bytora-font-semibold);
    cursor: pointer;
    transition: background 150ms ease;
}
.bytora-wl-move-btn:hover { background: var(--bytora-secondary); }
.bytora-wl-remove-btn {
    width: 100%;
    padding: var(--bytora-space-2) var(--bytora-space-4);
    background: transparent;
    color: var(--bytora-gray-500);
    border: 1px solid var(--bytora-gray-300);
    border-radius: var(--bytora-radius-md);
    font-family: var(--bytora-font-button);
    font-size: var(--bytora-text-xs);
    cursor: pointer;
    transition: all 150ms ease;
}
.bytora-wl-remove-btn:hover { color: #D32F2F; border-color: #D32F2F; }

/* Empty state */
.bytora-wishlist-empty {
    padding: var(--bytora-space-20) var(--bytora-space-8);
    text-align: center;
}
.bytora-wishlist-empty__icon {
    color: var(--bytora-gray-300);
    margin-bottom: var(--bytora-space-6);
}
.bytora-wishlist-empty h3 {
    font-size: var(--bytora-text-2xl);
    font-weight: var(--bytora-font-bold);
    margin-bottom: var(--bytora-space-2);
}
.bytora-wishlist-empty p {
    color: var(--bytora-gray-500);
    margin-bottom: var(--bytora-space-6);
}

/* Spinner */
.bytora-wishlist-loading {
    grid-column: 1/-1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--bytora-space-3);
    padding: var(--bytora-space-12);
    color: var(--bytora-gray-500);
}
.bytora-spinner {
    width: 24px; height: 24px;
    border: 3px solid var(--bytora-gray-200);
    border-top-color: var(--bytora-primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Responsive */
@media (max-width: 1024px) { .bytora-wishlist-grid { grid-template-columns: repeat(3,1fr); } }
@media (max-width: 768px)  { .bytora-wishlist-grid { grid-template-columns: repeat(2,1fr); gap: var(--bytora-space-4); } }
@media (max-width: 480px)  { .bytora-wishlist-grid { grid-template-columns: 1fr; } }

