.popular-section {
    padding: 40px 0;
    background: #ffffff;
    width: 100%;
}

.popular-header {
    max-width: 1400px;
    margin: 0 auto 30px;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
}

.popular-header-content {
    width: 100%;
}

.popular-title {
    color: #2c3e50;
    font-size: 28px;
    font-weight: 900;
    margin: 0 0 10px 0;
    line-height: 1.2;
}

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

.popular-all-link-container {
    margin-top: 15px;
}

.popular-all-link {
    display: inline-block;
    background: #e74c3c;
    color: #ffffff;
    padding: 10px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    transition: all 0.3s ease;
    border: 2px solid #e74c3c;
}

.popular-all-link:hover {
    background: #c0392b;
    color: #ffffff;
    transform: translateY(-2px);
    text-decoration: none;
    border-color: #c0392b;
}

.popular-grid-container {
    width: 100%;
    background: #ffffff;
}

.popular-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    width: 100%;
    padding: 0 20px;
    box-sizing: border-box;
}

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

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

.popular-discount-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #e74c3c;
    color: white;
    padding: 4px 8px;
    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: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    z-index: 2;
}

.popular-hit-badge.super-hit {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    animation: pulse 2s infinite;
}

.popular-hit-badge.marked-hit {
    background: linear-gradient(45deg, #3498db, #2980b9);
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7); }
    70% { box-shadow: 0 0 0 6px rgba(231, 76, 60, 0); }
    100% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0); }
}

.popular-product-card a {
    display: block;
    text-decoration: none;
    color: inherit;
}

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

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

.popular-no-photo {
    width: 100%;
    height: 100%;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999999;
    font-size: 14px;
}

.popular-product-content {
    padding: 20px;
}

.popular-product-title {
    color: #000000;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 10px;
    height: 40px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

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

.popular-current-price {
    color: #000000;
    font-size: 18px;
    font-weight: 800;
}

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

/* Анимация для новых хитов */
@keyframes newHit {
    0% { transform: scale(0.95); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

.popular-product-card:first-child {
    animation: newHit 0.5s ease-out;
}

@media (max-width: 1200px) {
    .popular-products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .popular-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .popular-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .popular-title {
        font-size: 24px;
    }
    
    .popular-subtitle {
        font-size: 14px;
    }
    
    .popular-product-image-container {
        height: 160px;
    }
    
    .popular-product-content {
        padding: 15px;
    }
}

@media (max-width: 576px) {
    .popular-products-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .popular-all-link {
        padding: 8px 20px;
        font-size: 14px;
    }
}