/* Product Page Styles - Matching Main Page Design */
.product-container {
    background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.18), transparent 45%), 
                radial-gradient(circle at 10% 80%, rgba(99, 102, 241, 0.15), transparent 55%), 
                var(--light-gray);
    min-height: 100vh;
    padding: 120px 0 80px;
    position: relative;
    overflow: hidden;
}

.product-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
               radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
    opacity: 0.6;
    pointer-events: none;
}

/* Page Header */
.product-header {
    margin-bottom: 60px;
    position: relative;
    z-index: 1;
}

.product-header .section-header h1 {
    font-size: 3rem;
    color: var(--text-color);
    margin-bottom: 20px;
    font-weight: 800;
    line-height: 1.2;
}

/* Category Navigation */
.product-navigation {
    margin-bottom: 50px;
    position: relative;
    z-index: 1;
}

.nav-card {
    background: var(--white);
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15), 0 4px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
}

.nav-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient);
}

.nav-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid rgba(37, 99, 235, 0.1);
}

.nav-header h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0;
}

.nav-header i {
    color: var(--primary-color);
    font-size: 1.4rem;
}

.category-tabs {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.category-tab {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    border: 2px solid rgba(37, 99, 235, 0.12);
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.9));
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.06);
}

.category-tab::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.category-tab:hover {
    border-color: rgba(37, 99, 235, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.15);
}

.category-tab:hover::before {
    left: 100%;
}

.category-tab.active {
    border-color: var(--primary-color);
    background: var(--gradient);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

.tab-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tab-text {
    font-weight: 600;
}

/* Products Grid */
.product-content {
    position: relative;
    z-index: 1;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

/* Product Card */
.product-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.8);
    transition: var(--transition);
    position: relative;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.product-link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

/* Product Image */
.product-image {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.8), rgba(255, 255, 255, 0.9));
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.external-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(37, 99, 235, 0.9);
    color: var(--white);
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(37, 99, 235, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.overlay-content {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--white);
    font-weight: 600;
    font-size: 1rem;
}

/* Product Info */
.product-info {
    padding: 24px;
    position: relative;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.stars {
    display: flex;
    gap: 2px;
}

.stars i {
    color: #fbbf24;
    font-size: 0.9rem;
}

.rating-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dark-gray);
}

.product-price {
    margin-bottom: 16px;
}

.original-price {
    font-size: 0.9rem;
    color: var(--dark-gray);
    text-decoration: line-through;
    margin-right: 8px;
}

.sale-price {
    font-size: 1.2rem;
    font-weight: 800;
    color: #ef4444;
}

.current-price {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-color);
}

.product-actions {
    display: flex;
    gap: 8px;
    position: absolute;
    top: 16px;
    right: 16px;
}

.btn-action {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-action:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: scale(1.1);
}

.btn-cart:hover {
    background: #10b981;
}

.btn-heart:hover {
    background: #ef4444;
}

.btn-heart.active {
    background: #ef4444;
    color: var(--white);
}

.btn-heart.active i {
    font-weight: 900;
}

/* Pagination */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 60px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 100px 20px;
    background: var(--white);
    border-radius: 24px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.empty-icon {
    font-size: 5rem;
    color: rgba(37, 99, 235, 0.3);
    margin-bottom: 32px;
}

.empty-state h3 {
    font-size: 1.8rem;
    color: var(--text-color);
    margin-bottom: 16px;
    font-weight: 700;
}

.empty-state p {
    color: var(--dark-gray);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 32px;
}

.empty-state .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: var(--gradient);
    color: var(--white);
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.empty-state .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 24px;
    }
    
    .nav-card {
        padding: 28px;
    }
}

@media (max-width: 768px) {
    .product-container {
        padding: 100px 0 60px;
    }
    
    .product-header .section-header h1 {
        font-size: 2.5rem;
    }
    
    .nav-card {
        padding: 24px;
        border-radius: 20px;
    }
    
    .category-tabs {
        gap: 8px;
    }
    
    .category-tab {
        padding: 12px 16px;
        font-size: 0.9rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 20px;
    }
    
    .product-image {
        height: 180px;
    }
    
    .product-info {
        padding: 20px;
    }
    
    .product-title {
        font-size: 1rem;
    }
    
    .empty-state {
        padding: 60px 20px;
    }
    
    .empty-icon {
        font-size: 4rem;
    }
    
    .empty-state h3 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .product-container {
        padding: 90px 0 50px;
    }
    
    .product-header .section-header h1 {
        font-size: 2.2rem;
    }
    
    .nav-card {
        padding: 20px;
        border-radius: 16px;
    }
    
    .nav-header h3 {
        font-size: 1.1rem;
    }
    
    .category-tabs {
        flex-direction: column;
        gap: 8px;
    }
    
    .category-tab {
        justify-content: center;
        padding: 14px 20px;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .product-card {
        border-radius: 16px;
    }
    
    .product-image {
        height: 200px;
    }
    
    .product-info {
        padding: 16px;
    }
    
    .product-actions {
        top: 12px;
        right: 12px;
    }
    
    .btn-action {
        width: 32px;
        height: 32px;
    }
    
    .empty-state {
        padding: 40px 16px;
        border-radius: 16px;
    }
    
    .empty-icon {
        font-size: 3rem;
    }
    
    .empty-state h3 {
        font-size: 1.3rem;
    }
    
    .empty-state p {
        font-size: 1rem;
    }
}

/* Loading Animation */
.loading-products {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 100px 20px;
    color: var(--dark-gray);
    font-size: 1.1rem;
}

.loading-products::before {
    content: "";
    width: 24px;
    height: 24px;
    border: 3px solid rgba(37, 99, 235, 0.2);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Product Badge */
.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--gradient);
    color: var(--white);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-badge.new {
    background: linear-gradient(135deg, #10b981, #059669);
}

.product-badge.hot {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.product-badge.best {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

/* Wishlist Animation */
@keyframes heartBeat {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.btn-heart.animate {
    animation: heartBeat 0.3s ease;
}

/* Cart Animation */
@keyframes cartShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-2px); }
    75% { transform: translateX(2px); }
}

.btn-cart.animate {
    animation: cartShake 0.3s ease;
}
