/* Favorites and Recently Viewed Styles */

/* Scrollbar styles for horizontal scrolling */
.scrollbar-hide {
    -ms-overflow-style: none;  /* Internet Explorer 10+ */
    scrollbar-width: none;  /* Firefox */
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;  /* Safari and Chrome */
}

/* Product card hover effects */
.product-card {
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-2px);
}

/* Favorite button styles */
.favorite-btn {
    transition: all 0.2s ease;
}

.favorite-btn:hover {
    transform: scale(1.1);
}

.favorite-btn.is-favorite .heart-icon {
    color: #ef4444 !important;
    fill: currentColor;
}

.favorite-btn.is-favorite:hover {
    transform: scale(1.2);
}

/* Recently viewed items */
.recently-viewed-item {
    transition: all 0.3s ease;
}

.recently-viewed-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Line clamp utilities */
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Notification styles */
.notification {
    animation: slideInFromRight 0.3s ease;
}

.notification.slide-out {
    animation: slideOutToRight 0.3s ease;
}

@keyframes slideInFromRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutToRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Loading animation */
.loading-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Badge styles */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 0.375rem;
}

.badge-red {
    background-color: #fee2e2;
    color: #dc2626;
}

.badge-blue {
    background-color: #dbeafe;
    color: #2563eb;
}

.badge-green {
    background-color: #dcfce7;
    color: #16a34a;
}

/* Empty state styles */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem 1rem;
}

.empty-state svg {
    margin-bottom: 1rem;
    opacity: 0.6;
}

.empty-state h3 {
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #374151;
}

.empty-state p {
    color: #6b7280;
    margin-bottom: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .recently-viewed-card {
        width: 160px !important;
    }
    
    .product-card .product-name {
        font-size: 0.875rem;
    }
    
    .favorite-btn {
        padding: 0.5rem;
    }
    
    .favorite-btn svg {
        width: 1rem;
        height: 1rem;
    }
}

@media (max-width: 640px) {
    .recently-viewed-card {
        width: 140px !important;
    }
    
    .recently-viewed-item {
        padding: 0.75rem;
    }
    
    .recently-viewed-item .flex > div:first-child {
        width: 60px;
        height: 60px;
    }
}

/* Grid responsive adjustments for favorites page */
@media (max-width: 640px) {
    .favorites-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
}

@media (min-width: 768px) {
    .favorites-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .favorites-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1280px) {
    .favorites-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}
