/* =============================================
   RECENTLY VIEWED - Produits récemment consultés
   ============================================= */

.recently-viewed-section {
    background: #252525;
    border-radius: 15px;
    padding: 25px;
    margin: 40px 0;
}

.recently-viewed-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.recently-viewed-header h3 {
    font-size: 1.2rem;
    color: #f5f5f5;
    margin: 0;
    flex: 1;
}

.recently-viewed-header h3 i {
    color: #e07a5f;
    margin-right: 10px;
}

.rv-scroll-btn {
    background: #333;
    border: none;
    color: #aaa;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rv-scroll-btn:hover {
    background: #e07a5f;
    color: white;
}

.recently-viewed-list {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding-bottom: 10px;
    scrollbar-width: thin;
    scrollbar-color: #e07a5f #1a1a2e;
}

.recently-viewed-list::-webkit-scrollbar {
    height: 6px;
}

.recently-viewed-list::-webkit-scrollbar-track {
    background: #1a1a2e;
    border-radius: 3px;
}

.recently-viewed-list::-webkit-scrollbar-thumb {
    background: #e07a5f;
    border-radius: 3px;
}

.rv-item {
    flex: 0 0 150px;
    background: #1a1a2e;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    transition: all 0.3s;
    display: block;
}

.rv-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(224, 122, 95, 0.2);
}

.rv-image {
    width: 100%;
    height: 100px;
    background: #2d2d2d;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.rv-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rv-image i {
    font-size: 2rem;
    color: #555;
}

.rv-info {
    padding: 12px;
}

.rv-name {
    display: block;
    color: #f5f5f5;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 5px;
}

.rv-price {
    color: #c9a87c;
    font-size: 0.9rem;
    font-weight: 600;
}


/* =============================================
   WISHLIST - Liste de favoris
   ============================================= */

.wishlist-btn {
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: #888;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
}

/* Title row with wishlist button */
.product-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 5px;
}

.product-title-row h4 {
    margin: 0;
    flex: 1;
}

.wishlist-btn-title {
    background: transparent;
    border: none;
    color: #888;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
}

.wishlist-btn-title:hover {
    color: #e07a5f;
    transform: scale(1.15);
}

.wishlist-btn-title.active {
    color: #e07a5f;
}

.wishlist-btn-title.active i {
    animation: heartBeat 0.5s ease;
}

.wishlist-btn:hover {
    background: rgba(224, 122, 95, 0.2);
    color: #e07a5f;
    transform: scale(1.1);
}

.wishlist-btn.active {
    background: #e07a5f;
    color: white;
}

.wishlist-btn.active:hover {
    background: #d06a4f;
}

/* Animation du coeur */
.wishlist-btn.active i {
    animation: heartBeat 0.5s ease;
}

/* Wishlist button inline (next to title) */
.wishlist-btn-inline {
    background: transparent;
    border: 2px solid #e07a5f;
    color: #e07a5f;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    margin-left: 15px;
    font-size: 1.2rem;
}

.wishlist-btn-inline:hover {
    background: rgba(224, 122, 95, 0.1);
    transform: scale(1.1);
}

.wishlist-btn-inline.active {
    background: #e07a5f;
    color: white;
}

.wishlist-btn-inline.active i {
    animation: heartBeat 0.5s ease;
}

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.3); }
    50% { transform: scale(1); }
    75% { transform: scale(1.2); }
}

/* Badge wishlist dans le header */
.wishlist-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #e07a5f;
    color: white;
    font-size: 0.7rem;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* Toast notification wishlist */
.wishlist-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: linear-gradient(135deg, #e07a5f, #c9a87c);
    color: white;
    padding: 15px 25px;
    border-radius: 30px;
    font-weight: 500;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

/* Page/Section Wishlist */
.wishlist-empty {
    text-align: center;
    padding: 60px 20px;
    color: #888;
}

.wishlist-empty i {
    font-size: 4rem;
    color: #444;
    margin-bottom: 20px;
}

.wishlist-empty h3 {
    color: #f5f5f5;
    margin-bottom: 10px;
}

.wishlist-empty .btn-primary {
    margin-top: 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #e07a5f, #c9a87c);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.wishlist-empty .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(224, 122, 95, 0.4);
}

.wishlist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.wishlist-header h2 {
    color: #f5f5f5;
    font-size: 1.5rem;
}

.wishlist-header h2 i {
    color: #e07a5f;
    margin-right: 10px;
}

.btn-clear-wishlist {
    background: transparent;
    border: 1px solid #e74c3c;
    color: #e74c3c;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s;
}

.btn-clear-wishlist:hover {
    background: #e74c3c;
    color: white;
}

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

.wishlist-item {
    background: #252525;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    transition: all 0.3s;
}

.wishlist-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.wishlist-remove {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    color: #fff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s;
}

.wishlist-remove:hover {
    background: #e74c3c;
}

.wishlist-link {
    text-decoration: none;
    display: block;
}

.wishlist-image {
    height: 150px;
    background: #1a1a2e;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.wishlist-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.wishlist-item:hover .wishlist-image img {
    transform: scale(1.05);
}

.wishlist-image i {
    font-size: 3rem;
    color: #555;
}

.wishlist-info {
    padding: 15px;
}

.wishlist-info h4 {
    color: #f5f5f5;
    margin: 0 0 8px 0;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wishlist-price {
    color: #c9a87c;
    font-weight: 600;
}

.btn-add-cart {
    width: 100%;
    background: linear-gradient(135deg, #e07a5f, #c9a87c);
    border: none;
    color: white;
    padding: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-add-cart:hover {
    filter: brightness(1.1);
}


/* =============================================
   BADGES - Gamification
   ============================================= */

.badges-section {
    background: #252525;
    border-radius: 15px;
    padding: 25px;
    margin: 20px 0;
}

.badges-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.badges-header h3 {
    color: #f5f5f5;
    margin: 0;
    font-size: 1.2rem;
}

.badges-header h3 i {
    color: #c9a87c;
    margin-right: 10px;
}

.badges-count {
    background: #1a1a2e;
    color: #c9a87c;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badges-progress {
    background: #1a1a2e;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 25px;
}

.badges-progress-bar {
    height: 100%;
    background: linear-gradient(135deg, #e07a5f, #c9a87c);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.badge-item {
    background: #1a1a2e;
    border-radius: 12px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.badge-item.unlocked {
    border-color: var(--badge-color, #e07a5f);
}

.badge-item.locked {
    opacity: 0.5;
}

.badge-item:hover {
    transform: translateY(-3px);
}

.badge-icon {
    width: 50px;
    height: 50px;
    background: #252525;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.badge-item.unlocked .badge-icon {
    background: var(--badge-color, #e07a5f);
    box-shadow: 0 5px 20px rgba(224, 122, 95, 0.3);
}

.badge-info {
    flex: 1;
}

.badge-name {
    display: block;
    color: #f5f5f5;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 3px;
}

.badge-unlocked {
    color: #27ae60;
    font-size: 0.8rem;
}

.badge-unlocked i {
    margin-right: 5px;
}

.badge-hint {
    color: #888;
    font-size: 0.8rem;
}

/* Notification nouveau badge */
.badge-notification {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 10000;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.badge-notification.show {
    transform: translateX(0);
    opacity: 1;
}

.badge-notification-content {
    background: linear-gradient(135deg, #1a1a2e, #252525);
    border: 2px solid var(--badge-color, #e07a5f);
    border-radius: 15px;
    padding: 20px 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    animation: badgeGlow 2s ease-in-out infinite;
}

@keyframes badgeGlow {
    0%, 100% { box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4); }
    50% { box-shadow: 0 15px 40px rgba(224, 122, 95, 0.4); }
}

.badge-notification-icon {
    font-size: 2.5rem;
    animation: badgeBounce 0.5s ease;
}

@keyframes badgeBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.badge-notification-title {
    display: block;
    color: #c9a87c;
    font-size: 0.85rem;
    margin-bottom: 3px;
}

.badge-notification-name {
    display: block;
    color: #f5f5f5;
    font-size: 1.1rem;
    font-weight: 600;
}

.badges-loading {
    text-align: center;
    padding: 40px;
    color: #888;
}


/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 768px) {
    .rv-item {
        flex: 0 0 130px;
    }
    
    .rv-image {
        height: 80px;
    }
    
    .badges-grid {
        grid-template-columns: 1fr;
    }
    
    .wishlist-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .wishlist-image {
        height: 120px;
    }
    
    .badge-notification {
        right: 10px;
        left: 10px;
    }
    
    .badge-notification-content {
        width: 100%;
    }
}
