.catalog {
    padding: 40px 20px;
    margin: 0px auto;
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 15px;
    margin-top: 40px;
    align-items: stretch; /* 👈 Гарантирует, что все карточки в ряду будут одинаковой высоты */
}

.product-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
    position: relative;
    display: flex; /* 👈 Делает карточку flex-контейнером */
    flex-direction: column; /* 👈 Выстраивает содержимое вертикально */
    height: 100%; /* 👈 Растягивает карточку на всю высоту ячейки grid */
}

/* Изображение товара */
.product-image {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0; /* 👈 Запрещает картинке сжиматься, если текста много */
}

.product-image img {
    height: auto;
    width: 100%; /* 👈 Корректное масштабирование изображения */
    display: block; /* 👈 Убирает лишний отступ снизу у inline-картинок */
}

/* Контент карточки */
.product-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    height: 100%;
    flex: 1; /* 👈 Заставляет блок контента занять всё свободное пространство карточки */
}

.product-content-top {
    /* Стили не требуются */
}

.product-content-bottom {
    margin-top: auto; /* 👈 Прижимает нижний блок к низу карточки */
}

.product-title {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 15px 0;
    line-height: 1.3;
}

.product-title a {
    color: inherit;
    text-decoration: none;
}

.product-title a:hover {
    color: #007bff;
}

.product-description {     
    margin: 0 0 20px 0;
}

/* Цена */
.product-price {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.price-text {
    font-size: 20px;
    font-weight: 700;
    color: #007bff;
    display: flex;
    align-items: center;
    gap: 5px;
    width: 100%; 
    text-align: left; 
    justify-content: center;
}

.price-from {
    font-size: 14px;
    font-weight: 400;
    color: #999;
}

/* Бейдж "новинка" или "хит" */
.product-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 3;
}

.product-badge.hit {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
}

.product-badge.new {
    background: linear-gradient(135deg, #00d2d3, #54a0ff);
}

/* Кнопка действия */
.product-action {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-details {
    flex: 1;
    padding: 12px 20px;
    background: transparent;
    border: 2px solid #007bff;
    color: #007bff;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
    display: inline-block;
}

.btn-details:hover {
    background: #007bff;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.3);
}

.btn-order {
    flex: 2;
    padding: 12px 20px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    border: none;
    color: white;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
    display: inline-block;
}

.btn-order:hover {
    background: linear-gradient(135deg, #0056b3, #004085);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.4);
}

.product-action button { 
    margin: 0 auto;  
}

.product-action .callback-content-button {
    flex: 1;
}

.catalog-all-action,
.price-all-action {
    margin-top: 30px;
    text-align: center;
}

.catalog-home .product-card-extra {
    display: none;
}

.catalog-home.catalog-expanded .product-card-extra {
    display: flex;
}

.section-all-link {
    display: inline-block;
    padding: 13px 26px;
    border: 2px solid #007bff;
    border-radius: 50px;
    color: #007bff;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

button.section-all-link {
    background: transparent;
    font: inherit;
    cursor: pointer;
}

.section-all-link:hover {
    background: #007bff;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.3);
}

.catalog-show-more[hidden] {
    display: none;
}

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

@media (max-width: 768px) {
    .catalog-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .catalog-grid {
        grid-template-columns: 1fr;
    }
}
       
@media (max-width: 992px) { 
    .catalog h2 { 
        text-align: left; 
    }
}
