/* ============================================
   Wishlist System Styles
   ============================================ */

/* ----------------------------------------
   Wishlist Button (Product Card)
   ---------------------------------------- */
.mypod-wishlist-btn {
    position: absolute;
    top: var(--mypod-space-sm);
    right: var(--mypod-space-sm);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--mypod-color-surface);
    color: var(--mypod-color-textSecondary);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--mypod-shadow-md);
    border: none;
    cursor: pointer;
    z-index: 3;
    transition: opacity 0.2s, transform 0.2s, background 0.15s, color 0.15s;
    opacity: 0;
    transform: translateY(-4px);
}

.mypod-wishlist-btn .mypod-icon {
    width: 18px;
    height: 18px;
    transition: transform 0.2s ease;
}

.mypod-wishlist-btn:hover {
    background: var(--mypod-color-bgTertiary);
    color: var(--mypod-color-accent);
}

.mypod-wishlist-btn:hover .mypod-icon {
    transform: scale(1.15);
}

.mypod-wishlist-btn.is-active {
    color: var(--mypod-color-accent);
    opacity: 1;
    transform: translateY(0);
}

.mypod-wishlist-btn.is-active .mypod-icon {
    fill: currentColor;
}

/* Show on hover for desktop */
@media (hover: hover) {
    .mypod-product-card:hover .mypod-wishlist-btn {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Single product page wishlist button — larger, always visible */
.mypod-sp__wishlist-wrap {
    position: absolute;
    top: var(--mypod-space-md);
    right: var(--mypod-space-md);
    z-index: 4;
}

.mypod-sp__wishlist-wrap .mypod-wishlist-btn {
    position: static;
    width: 44px;
    height: 44px;
    opacity: 1;
    transform: none;
}

.mypod-sp__wishlist-wrap .mypod-wishlist-btn .mypod-icon {
    width: 22px;
    height: 22px;
}

/* Always visible on touch devices */
@media (hover: none) {
    .mypod-wishlist-btn {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading state */
.mypod-wishlist-btn.is-loading {
    pointer-events: none;
    opacity: 0.7;
}

.mypod-wishlist-btn.is-loading .mypod-icon {
    animation: mypod-wishlist-pulse 1s ease-in-out infinite;
}

@keyframes mypod-wishlist-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(0.85); }
}

/* ----------------------------------------
   Toast Notifications
   ---------------------------------------- */
.mypod-wishlist-toast {
    position: fixed;
    bottom: var(--mypod-space-lg);
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--mypod-color-surface);
    color: var(--mypod-color-text);
    padding: var(--mypod-space-sm) var(--mypod-space-md);
    border-radius: var(--mypod-radius-lg);
    box-shadow: var(--mypod-shadow-lg);
    display: flex;
    align-items: center;
    gap: var(--mypod-space-sm);
    z-index: 9999;
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid var(--mypod-color-border);
}

.mypod-wishlist-toast.is-visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.mypod-wishlist-toast__icon {
    color: var(--mypod-color-accent);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mypod-wishlist-toast__icon .mypod-icon {
    width: 20px;
    height: 20px;
}

/* ----------------------------------------
   Wishlist Page
   ---------------------------------------- */
.mypod-wishlist-page {
    padding: var(--mypod-space-xl) 0;
    min-height: 60vh;
}

.mypod-wishlist-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--mypod-space-xl);
    padding-bottom: var(--mypod-space-md);
    border-bottom: 1px solid var(--mypod-color-border);
}

.mypod-wishlist-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--mypod-color-text);
    margin: 0;
    display: flex;
    align-items: center;
    gap: var(--mypod-space-sm);
}

.mypod-wishlist-count {
    font-size: 1rem;
    font-weight: 400;
    color: var(--mypod-color-textSecondary);
}

.mypod-wishlist-clear-btn {
    display: flex;
    align-items: center;
    gap: var(--mypod-space-xs);
    padding: var(--mypod-space-xs) var(--mypod-space-sm);
    background: transparent;
    border: 1px solid var(--mypod-color-border);
    border-radius: var(--mypod-radius-md);
    color: var(--mypod-color-textSecondary);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.mypod-wishlist-clear-btn:hover {
    border-color: var(--mypod-color-accent);
    color: var(--mypod-color-accent);
    background: rgba(255, 68, 68, 0.08);
}

.mypod-wishlist-clear-btn .mypod-icon {
    width: 16px;
    height: 16px;
}

/* ----------------------------------------
   Wishlist Grid
   ---------------------------------------- */
.mypod-wishlist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--mypod-space-lg);
}

@media (max-width: 640px) {
    .mypod-wishlist-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--mypod-space-md);
    }
}

@media (max-width: 480px) {
    .mypod-wishlist-grid {
        grid-template-columns: 1fr;
    }
}

/* ----------------------------------------
   Wishlist Item
   ---------------------------------------- */
.mypod-wishlist-item {
    background: var(--mypod-color-surface);
    border-radius: var(--mypod-radius-lg);
    overflow: hidden;
    border: 1px solid var(--mypod-color-border);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mypod-wishlist-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--mypod-shadow-md);
}

.mypod-wishlist-item.is-removing {
    animation: mypod-wishlist-fade-out 0.3s ease forwards;
}

@keyframes mypod-wishlist-fade-out {
    to {
        opacity: 0;
        transform: scale(0.95);
    }
}

.mypod-wishlist-item__thumb {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--mypod-color-bgTertiary);
}

.mypod-wishlist-item__thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.mypod-wishlist-item:hover .mypod-wishlist-item__thumb img {
    transform: scale(1.03);
}

.mypod-wishlist-item__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--mypod-color-textSecondary);
}

.mypod-wishlist-item__placeholder .mypod-icon {
    width: 48px;
    height: 48px;
    opacity: 0.4;
}

.mypod-wishlist-item__remove {
    position: absolute;
    top: var(--mypod-space-sm);
    right: var(--mypod-space-sm);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--mypod-color-surface);
    color: var(--mypod-color-textSecondary);
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.2s ease;
    box-shadow: var(--mypod-shadow-sm);
}

.mypod-wishlist-item:hover .mypod-wishlist-item__remove {
    opacity: 1;
    transform: scale(1);
}

.mypod-wishlist-item__remove:hover {
    background: var(--mypod-color-accent);
    color: #fff;
}

.mypod-wishlist-item__remove .mypod-icon {
    width: 16px;
    height: 16px;
}

.mypod-wishlist-item__info {
    padding: var(--mypod-space-md);
    text-align: center;
}

.mypod-wishlist-item__title {
    font-size: 0.9375rem;
    font-weight: 600;
    margin: 0 0 6px;
    line-height: 1.35;
}

.mypod-wishlist-item__title a {
    color: var(--mypod-color-text);
    text-decoration: none;
}

.mypod-wishlist-item__title a:hover {
    color: var(--mypod-color-accent);
}

.mypod-wishlist-item__price {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--mypod-color-text);
    letter-spacing: 0.01em;
    margin-bottom: var(--mypod-space-md);
}

.mypod-wishlist-item__price del {
    color: var(--mypod-color-textSecondary);
    font-weight: 400;
    margin-right: var(--mypod-space-xs);
}

.mypod-wishlist-item__price ins {
    text-decoration: none;
    color: var(--mypod-color-accent);
}

.mypod-wishlist-item__actions {
    display: flex;
    justify-content: center;
    gap: var(--mypod-space-sm);
}

.mypod-wishlist-item__out-of-stock {
    color: var(--mypod-color-textSecondary);
    font-size: 0.875rem;
    font-style: italic;
}

/* ----------------------------------------
   Empty State
   ---------------------------------------- */
.mypod-wishlist-empty {
    text-align: center;
    padding: var(--mypod-space-xxl) var(--mypod-space-md);
    max-width: 400px;
    margin: 0 auto;
}

.mypod-wishlist-empty__icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--mypod-space-lg);
    background: var(--mypod-color-bgTertiary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--mypod-color-textSecondary);
}

.mypod-wishlist-empty__icon .mypod-icon {
    width: 40px;
    height: 40px;
    opacity: 0.5;
}

.mypod-wishlist-empty__title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--mypod-color-text);
    margin: 0 0 var(--mypod-space-sm);
}

.mypod-wishlist-empty__text {
    font-size: 0.9375rem;
    color: var(--mypod-color-textSecondary);
    margin: 0 0 var(--mypod-space-xl);
    line-height: 1.5;
}

/* ----------------------------------------
   Button Styles
   ---------------------------------------- */
.mypod-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--mypod-space-xs);
    padding: var(--mypod-space-sm) var(--mypod-space-md);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--mypod-radius-md);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s ease;
    border: none;
}

.mypod-btn--primary {
    background: var(--mypod-color-accent);
    color: #fff;
}

.mypod-btn--primary:hover {
    filter: brightness(1.1);
}

.mypod-btn--lg {
    padding: var(--mypod-space-md) var(--mypod-space-xl);
    font-size: 1rem;
}

/* ----------------------------------------
   Responsive Adjustments
   ---------------------------------------- */
@media (max-width: 768px) {
    .mypod-wishlist-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--mypod-space-md);
    }

    .mypod-wishlist-title {
        font-size: 1.5rem;
    }

    .mypod-wishlist-page {
        padding: var(--mypod-space-lg) 0;
    }
}
