/* Стили для страницы популярных товаров */
.popular-products-page {
    padding: 40px 0 60px;
    background: #fff;
    min-height: 70vh;
}

.popular-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

.popular-page-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

/* H1 убрал, он формируется шаблоном */

.popular-page-subtitle {
    color: #7f8c8d;
    font-size: 18px;
    margin: 15px 0 0 0;
    line-height: 1.4;
}

.products-info {
    margin-bottom: 30px;
    color: #7f8c8d;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.page-info {
    font-weight: 600;
    color: #2c3e50;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    width: 100%;
    margin-bottom: 50px;
}

.product-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid #f0f0f0;
}

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

.product-image-container {
    position: relative;
    height: 220px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.product-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.popular-discount-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #e74c3c;
    color: white;
    padding: 6px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    z-index: 2;
}

.popular-hit-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #e74c3c;
    color: #ffffff;
    padding: 6px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    z-index: 2;
}

.product-card__content {
    padding: 20px;
}

.product-title {
    color: #2c3e50;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 15px;
    height: 40px;
    overflow: hidden;
}

.product-prices {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.popular-old-price {
    color: #95a5a6;
    text-decoration: line-through;
    font-size: 14px;
    font-weight: 500;
}

.popular-current-price {
    color: #2c3e50;
    font-size: 18px;
    font-weight: 700;
}

.popular-current-price.has-discount {
    color: #e74c3c;
}

.availability-badge {
    margin-top: 10px;
    padding: 4px 8px;
    background: #27ae60;
    color: white;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

/* Пагинация */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 50px;
    padding: 20px 0;
    border-top: 1px solid #f0f0f0;
}

.pagination-btn {
    padding: 12px 24px;
    background: #e74c3c;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
    transition: all 0.3s ease;
    border: 2px solid #e74c3c;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.pagination-btn:hover {
    background: #c0392b;
    color: white;
    transform: translateY(-2px);
    border-color: #c0392b;
}

.pagination-pages {
    display: flex;
    gap: 8px;
    align-items: center;
}

.pagination-page {
    padding: 10px 16px;
    background: #fff;
    color: #2c3e50;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid #f0f0f0;
    min-width: 44px;
    text-align: center;
    font-size: 14px;
}

.pagination-page:hover {
    background: #e74c3c;
    color: white;
    border-color: #e74c3c;
}

.pagination-current {
    background: #e74c3c;
    color: white;
    border-color: #e74c3c;
    font-weight: 700;
}

.pagination-dots {
    color: #95a5a6;
    padding: 0 8px;
    font-weight: 600;
}

.no-products {
    text-align: center;
    padding: 60px 0;
}

.no-products p {
    font-size: 18px;
    color: #7f8c8d;
    margin-bottom: 20px;
}

.back-to-first {
    color: #3498db;
    text-decoration: none;
    font-weight: 600;
}

.back-to-first:hover {
    color: #2980b9;
}

/* Адаптивность */
@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .popular-products-page {
        padding: 20px 0 40px;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .product-image-container {
        height: 180px;
        padding: 15px;
    }
    
    .pagination {
        flex-direction: column;
        gap: 15px;
    }
    
    .products-info {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .popular-page-subtitle {
        font-size: 16px;
    }
}