
.products-page {
    padding: 120px 0 6rem 0;
    background: #f8f9fa;
    min-height: 100vh;
}

.products-page-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}


.search-container {
    margin-bottom: 2rem;
}

.search-box {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-input {
    width: 100%;
    padding: 1rem 3.5rem 1rem 1.5rem;
    border: 2px solid #e5e5e5;
    border-radius: 50px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fff;
    outline: none;
}

.search-input:focus {
    border-color: #6366F1;
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.1);
}

.search-input::placeholder {
    color: #999;
}

.search-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: none;
    background: #6366F1;
    color: white;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-btn:hover {
 
    background: #4F46E5;
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

.search-btn i {
    font-size: 0.9rem;
}


.tags-container {
    margin-bottom: 2rem;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    min-height: 40px;
    align-items: flex-start;
    justify-content: center;
}

.tags-loading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #999;
    font-size: 0.9rem;
}

.tag-item {
    background: #fff;
    border: 2px solid #e9ecef;
    color: #495057;
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.tag-item:hover {
    background: #f8f9fa;
    border-color: #dee2e6;
    transform: translateY(-1px);
}

.tag-item.active {
    background: #2ECC71;
    border-color: #2ECC71;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.25);
}


.tag-item.special {
    background: #fff;
    border-color: #6366F1;
    color: #6366F1;
}

.tag-item.special:hover {
    background: #F0F1FF;
    border-color: #4F46E5;
    color: #4F46E5;
}

.tag-item.special.active {
    background: #6366F1;
    border-color: #6366F1;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.25);
}


.tag-close-icon {
    margin-left: 0.3rem;
    font-size: 0.8rem;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.tag-item.active:hover .tag-close-icon {
    opacity: 1;
}


.products-display-section {
    position: relative;
}


.loading-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 4rem 0;
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: #4A90E2;
}

.loading-spinner i {
    font-size: 2rem;
}

.loading-spinner span {
    font-size: 1rem;
    color: #666;
}


.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0;
}


.product-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #e5e5e5;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 400px;
}

.product-card:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.product-image {
    height: 160px;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.placeholder-image {
    width: 100%;
    height: 100%;
    position: relative;
}

.product-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.4s ease;
}

.product-card:hover .product-card-img {
    transform: scale(1.05);
}

.placeholder-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.3) 100%);
    z-index: 1;
}

.product-badge {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 3;
    transition: all 0.3s ease;
}

.product-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

.language-tags {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    z-index: 3;
}

.language-tag {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    color: #333;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

.language-tag:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.product-content {
    padding: 1.2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-header {
    margin-bottom: 1rem;
}

.product-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.product-subtitle {
    color: #666;
    font-size: 0.85rem;
    line-height: 1.4;
    margin: 0;
}

.product-info {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 12px;
    border-left: 3px solid #007AFF;
    flex-shrink: 0;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
}

.info-item:last-child {
    margin-bottom: 0;
}

.info-label {
    font-size: 0.85rem;
    color: #666;
    font-weight: 500;
}

.info-value {
    font-size: 0.85rem;
    color: #333;
    font-weight: 600;
}

.difficulty-stars {
    display: flex;
    gap: 2px;
}

.star {
    color: #ddd;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.star.active {
    color: #ffd700;
}

.product-link {
    color: #007AFF;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    width: fit-content;
    padding: 0;
    border: none;
    background: transparent;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    margin-top: auto;
}

.product-link::after {
    content: '→';
    font-size: 0.9rem;
    transition: all 0.3s ease;
    opacity: 0.7;
}

.product-link:hover {
    color: #0056b3;
}

.product-link:hover::after {
    transform: translateX(3px);
    opacity: 1;
}


.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-icon {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 1.5rem;
}

.empty-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
}

.empty-description {
    font-size: 1rem;
    color: #666;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.reset-search-btn {
    background: #4A90E2;
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.reset-search-btn:hover {

    background: #357ABD;
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.3);
}


@media (max-width: 768px) {
    .products-page {
        padding: 100px 0 4rem 0;
    }

    .products-page-container {
        padding: 0 1rem;
    }

    .search-container {
        margin-bottom: 1.5rem;
    }

    .tags-container {
        margin-bottom: 1.5rem;
    }

    .tags-list {
        justify-content: flex-start;
    }

    .products-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }

    .product-image {
        height: 140px;
    }

    .product-content {
        padding: 1rem;
    }

    .product-title {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .search-input {
        padding: 0.8rem 3rem 0.8rem 1rem;
        font-size: 0.9rem;
    }

    .search-btn {
        width: 35px;
        height: 35px;
        right: 5px;
    }

    .tag-item {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .products-grid {
        gap: 1rem;
    }

    .product-card {
        height: 350px;
    }

    .product-image {
        height: 120px;
    }

    .product-content {
        padding: 0.8rem;
    }

    .product-title {
        font-size: 1rem;
    }

    .empty-icon {
        font-size: 3rem;
    }

    .empty-title {
        font-size: 1.3rem;
    }
}