/**
 * FAVORİLER CSS
 * Favori buton ve toast stilleri
 */

/* Favori Buton */
.favorite-btn,
.kat-wishlist,
.wishlist-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.favorite-btn i,
.kat-wishlist i,
.wishlist-btn i {
    font-size: 18px;
    color: #666;
    transition: all 0.3s ease;
}

.favorite-btn:hover,
.kat-wishlist:hover,
.wishlist-btn:hover {
    transform: scale(1.1);
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.favorite-btn:hover i,
.kat-wishlist:hover i,
.wishlist-btn:hover i {
    color: #ff4757;
}

/* Favoride olan buton */
.favorite-btn.favorited i,
.kat-wishlist.favorited i,
.wishlist-btn.favorited i {
    color: #ff4757;
}

.favorite-btn.favorited,
.kat-wishlist.favorited,
.wishlist-btn.favorited {
    background: rgba(255, 71, 87, 0.1);
}

.favorite-btn.favorited:hover,
.kat-wishlist.favorited:hover,
.wishlist-btn.favorited:hover {
    background: rgba(255, 71, 87, 0.2);
}

/* Disabled state */
.favorite-btn:disabled,
.kat-wishlist:disabled,
.wishlist-btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.favorite-btn:disabled:hover,
.kat-wishlist:disabled:hover,
.wishlist-btn:disabled:hover {
    transform: none;
}

/* Favori Badge (Header için) */
.favorite-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4757;
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* Toast Notification */
.toast-notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 9999;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 400px;
}

.toast-notification.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-notification i {
    font-size: 20px;
}

.toast-notification span {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

/* Toast Types */
.toast-success {
    border-left: 4px solid #2ecc71;
}

.toast-success i {
    color: #2ecc71;
}

.toast-error {
    border-left: 4px solid #ff4757;
}

.toast-error i {
    color: #ff4757;
}

.toast-info {
    border-left: 4px solid #3498db;
}

.toast-info i {
    color: #3498db;
}

/* Ürün kartları için favori butonu konumu */
.product-card,
.kat-card {
    position: relative;
}

.product-card .favorite-btn,
.product-card .kat-wishlist,
.product-card .wishlist-btn,
.kat-card .favorite-btn,
.kat-card .kat-wishlist,
.kat-card .wishlist-btn {
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.product-card:hover .favorite-btn,
.product-card:hover .kat-wishlist,
.product-card:hover .wishlist-btn,
.kat-card:hover .favorite-btn,
.kat-card:hover .kat-wishlist,
.kat-card:hover .wishlist-btn {
    opacity: 1;
}

/* Mobile için favori butonunu her zaman göster */
@media (max-width: 768px) {
    .favorite-btn,
    .kat-wishlist,
    .wishlist-btn {
        opacity: 1 !important;
        width: 35px;
        height: 35px;
        top: 10px;
        right: 10px;
    }

    .favorite-btn i,
    .kat-wishlist i,
    .wishlist-btn i {
        font-size: 16px;
    }

    .toast-notification {
        bottom: 20px;
        right: 20px;
        left: 20px;
        max-width: none;
    }
}

/* Animasyonlar */
@keyframes heartBeat {
    0%, 100% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.3);
    }
    50% {
        transform: scale(1.1);
    }
}

.favorite-btn.favorited i,
.kat-wishlist.favorited i,
.wishlist-btn.favorited i {
    animation: heartBeat 0.5s ease;
}

/* Header Favoriler Linki */
.header-favorites {
    position: relative;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 15px;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.header-favorites:hover {
    background: rgba(255, 255, 255, 0.1);
}

.header-favorites i {
    font-size: 20px;
}

.header-favorites span {
    font-size: 14px;
}

/* Dark mode için */
@media (prefers-color-scheme: dark) {
    .favorite-btn {
        background: rgba(0, 0, 0, 0.7);
    }

    .favorite-btn i {
        color: #fff;
    }

    .toast-notification {
        background: #2c3e50;
        color: white;
    }

    .toast-notification span {
        color: white;
    }
}

/* Favori listesi için özel stiller */
.favorites-grid .favorite-btn {
    position: static;
    width: 100%;
    height: auto;
    border-radius: 5px;
    padding: 10px;
    background: #f5f5f5;
    margin-top: 10px;
}

.favorites-grid .favorite-btn:hover {
    background: #ff4757;
}

.favorites-grid .favorite-btn:hover i {
    color: white;
}
