/* Scoped Trending Page CSS - No Conflicts with Main CSS */

/* Scope all trending styles to .trending-page container */
.trending-page {
    /* Amazon-inspired color variables scoped to trending page */
    --trending-orange: #ff9900;
    --trending-dark-blue: #232f3e;
    --trending-light-blue: #37475a;
    --trending-accent: #007185;
    --trending-warning-red: #b12704;
    --trending-success-green: #067d62;
    --trending-neutral-gray: #565959;
    --trending-light-gray: #eaeded;
    --trending-white: #ffffff;
}

/* Celebrity Section - Trending Page Specific */
.trending-page .celebrity-section {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 60px 0;
}

.trending-page .celebrity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.trending-page .celebrity-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.trending-page .celebrity-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 50px rgba(0,0,0,0.15);
}

.trending-page .celebrity-image-container {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.trending-page .celebrity-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.trending-page .celebrity-card:hover .celebrity-image {
    transform: scale(1.05);
}

.trending-page .celebrity-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
}

.trending-page .celebrity-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.trending-page .celebrity-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.trending-page .celebrity-card:hover .celebrity-overlay {
    opacity: 1;
}

.trending-page .social-links {
    display: flex;
    gap: 1rem;
}

.trending-page .social-link {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
}

.trending-page .social-link.instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}
.trending-page .social-link.twitter { background: #1da1f2; }
.trending-page .social-link.facebook { background: #3b5998; }
.trending-page .social-link.youtube { background: #ff0000; }
.trending-page .social-link.tiktok { background: #000; }

.trending-page .social-link:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.trending-page .celebrity-info {
    padding: 1.5rem;
}

.trending-page .celebrity-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.trending-page .celebrity-title {
    color: #7f8c8d;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.trending-page .celebrity-products {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.trending-page .mini-product {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    background: #f8fafc;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.trending-page .mini-product:hover {
    background: #e2e8f0;
    transform: translateX(5px);
}

.trending-page .mini-product-image {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 6px;
}

.trending-page .mini-product-info {
    flex: 1;
}

.trending-page .mini-product-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.125rem;
}

.trending-page .mini-product-price {
    font-size: 0.875rem;
    font-weight: 700;
    color: #dc2626;
}

/* Products Section - Trending Page Specific */
.trending-page .products-section {
    background: white;
    padding: 60px 0;
}

.trending-page .section-header {
    margin-bottom: 3rem;
}

.trending-page .section-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    margin: 0 auto 1rem;
    position: relative;
}

.trending-page .section-icon::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0.3;
    transform: scale(1.2);
    animation: pulse 2s infinite;
}

.trending-page .section-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.trending-page .view-toggle {
    display: flex;
    background: #e8ecef;
    border-radius: 8px;
    padding: 2px;
}

.trending-page .view-btn {
    background: none;
    border: none;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    color: #7f8c8d;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.trending-page .view-btn.active,
.trending-page .view-btn:hover {
    background: white;
    color: #2c3e50;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
}

.trending-page .products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.trending-page .product-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.trending-page .product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(0,0,0,0.15);
}

.trending-page .product-image-container {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.trending-page .product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.trending-page .product-card:hover .product-image {
    transform: scale(1.05);
}

.trending-page .product-placeholder {
    width: 100%;
    height: 100%;
    background: #e8ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #7f8c8d;
}

.trending-page .product-badges {
    position: absolute;
    top: 1rem;
    left: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.trending-page .badge-trending {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.trending-page .badge-discount {
    background: #059669;
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.trending-page .product-actions {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.trending-page .product-card:hover .product-actions {
    opacity: 1;
    transform: translateX(0);
}

.trending-page .action-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.9);
    color: #2c3e50;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.trending-page .action-btn:hover {
    background: white;
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.trending-page .wishlist-btn:hover {
    color: #dc2626;
}

.trending-page .product-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(10px);
    padding: 1rem;
    transform: translateY(100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.trending-page .product-card:hover .product-overlay {
    transform: translateY(0);
}

.trending-page .product-info {
    padding: 1.5rem;
}

.trending-page .product-category {
    color: #7f8c8d;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.trending-page .product-title {
    margin-bottom: 0.75rem;
}

.trending-page .product-title a {
    color: #2c3e50;
    text-decoration: none;
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.4;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.trending-page .product-title a:hover {
    color: #667eea;
}

.trending-page .product-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.trending-page .stars {
    display: flex;
    gap: 0.125rem;
}

.trending-page .stars i {
    color: #e5e7eb;
    font-size: 0.875rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.trending-page .stars i.active {
    color: #fbbf24;
}

.trending-page .rating-text {
    font-size: 0.75rem;
    color: #7f8c8d;
}

.trending-page .product-price {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.trending-page .current-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #dc2626;
}

.trending-page .original-price {
    font-size: 0.875rem;
    color: #7f8c8d;
    text-decoration: line-through;
}

.trending-page .product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
}

.trending-page .stock-status {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 600;
}

.trending-page .stock-status.in-stock {
    color: #059669;
}

.trending-page .stock-status.out-of-stock {
    color: #dc2626;
}

.trending-page .sold-count {
    color: #7f8c8d;
}

/* Trending Page Specific Buttons */
.trending-page .btn-modern {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    cursor: pointer;
    font-size: 0.875rem;
    position: relative;
    overflow: hidden;
}

.trending-page .btn-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.trending-page .btn-modern:hover::before {
    left: 100%;
}

.trending-page .btn-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    color: white;
    text-decoration: none;
}

.trending-page .btn-modern.btn-outline {
    background: transparent;
    border: 2px solid #667eea;
    color: #667eea;
}

.trending-page .btn-modern.btn-outline:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.trending-page .btn-modern.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.trending-page .btn-modern:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Dropdown Styles - Trending Page */
.trending-page .dropdown-menu {
    border: none;
    box-shadow: 0 15px 50px rgba(0,0,0,0.15);
    border-radius: 16px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.trending-page .dropdown-item {
    padding: 0.75rem 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.trending-page .dropdown-item:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* Empty State - Trending Page */
.trending-page .empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
}

.trending-page .empty-icon {
    width: 100px;
    height: 100px;
    background: #e8ecef;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #7f8c8d;
    margin: 0 auto 2rem;
}

.trending-page .empty-state h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.trending-page .empty-state p {
    color: #7f8c8d;
}

/* Animations - Trending Page Specific */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.trending-page [data-aos="fade-up"] {
    animation: fadeInUp 0.6s ease-out;
}

/* Loading States - Trending Page */
.trending-page .loading {
    position: relative;
    pointer-events: none;
}

.trending-page .loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: inherit;
}

.trending-page .loading::before {
    content: '';
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Responsive Design - Trending Page */
@media (max-width: 1200px) {
    .trending-page .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }

    .trending-page .celebrity-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .trending-page .section-header {
        text-align: center;
    }

    .trending-page .section-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .trending-page .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }

    .trending-page .celebrity-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .trending-page .product-actions {
        opacity: 1;
        transform: translateX(0);
        position: static;
        flex-direction: row;
        justify-content: center;
        padding: 1rem;
        background: rgba(255,255,255,0.9);
        backdrop-filter: blur(10px);
    }
}

/* View switching styles */
.trending-page .products-grid.list-view {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.trending-page .products-grid.list-view .product-card {
    display: flex !important;
    flex-direction: row !important;
    height: 200px !important;
    max-width: 100%;
}

.trending-page .products-grid.list-view .product-image-container {
    flex: 0 0 200px;
    height: 200px;
}

.trending-page .products-grid.list-view .product-info {
    flex: 1;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.trending-page .products-grid.list-view .product-overlay {
    position: static;
    transform: none;
    background: transparent;
    backdrop-filter: none;
    padding: 0;
    margin-top: auto;
}

.trending-page .products-grid.list-view .product-actions {
    position: static;
    opacity: 1;
    transform: none;
    flex-direction: row;
    gap: 0.5rem;
    margin-top: 1rem;
}

.trending-page .products-grid.list-view .product-badges {
    top: 0.5rem;
    left: 0.5rem;
}

/* Ensure grid view resets properly */
.trending-page .products-grid.grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.trending-page .products-grid.grid-view .product-card {
    display: block !important;
    flex-direction: column !important;
    height: auto !important;
}

.trending-page .products-grid.grid-view .product-image-container {
    flex: none;
    height: 250px;
}

.trending-page .products-grid.grid-view .product-info {
    flex: none;
    padding: 1.5rem;
}

.trending-page .products-grid.grid-view .product-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(10px);
    padding: 1rem;
    transform: translateY(100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.trending-page .products-grid.grid-view .product-card:hover .product-overlay {
    transform: translateY(0);
}

.trending-page .products-grid.grid-view .product-actions {
    position: absolute;
    top: 1rem;
    right: 1rem;
    flex-direction: column;
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.trending-page .products-grid.grid-view .product-card:hover .product-actions {
    opacity: 1;
    transform: translateX(0);
}

/* Mobile responsive for list view */
@media (max-width: 768px) {
    .trending-page .products-grid.list-view .product-card {
        flex-direction: column !important;
        height: auto !important;
    }

    .trending-page .products-grid.list-view .product-image-container {
        flex: none;
        height: 200px;
    }
}

@media (max-width: 480px) {
    .trending-page .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .trending-page .product-image-container {
        height: 180px;
    }

    .trending-page .celebrity-image-container {
        height: 150px;
    }
}