.catalog-page {
    padding: 30px 0 40px;
}

.category-section {
    margin-bottom: 40px;
}

.category-name h2 {
    margin-top: 30px;
    margin-bottom: 8px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 28px 24px;
    margin: 24px 0 0;
    align-items: stretch;
}

.product-card {
    width: 100%;
    max-width: 100%;
    margin: 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    background: #fff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-height: 100%;
}

.product-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 320px;
}

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

.product-image-container {
    position: relative;
    display: block;
    width: 100%;
    flex-shrink: 0;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #f3f3f3;
}

.concrete-mark {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #ff0000;
    color: #ffffff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-info {
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
    gap: 12px;
    min-height: 110px;
}

.product-title {
    font-size: 17px;
    font-weight: 600;
    color: #333;
    margin: 0;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
    white-space: nowrap;
}

/* Страница товара: футер внизу + отступ перед футером */
body.page-product {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
}

body.page-product .product-page {
    flex: 1 0 auto;
    padding: 40px 0 80px;
    box-sizing: border-box;
}

.product-detail {
    margin-bottom: 48px;
}

.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.product-detail-image img {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.product-detail-info h1 {
    font-size: 32px;
    margin-bottom: 16px;
    color: #333;
}

.product-detail-price {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #2c3e50;
}

.product-detail-description {
    line-height: 1.7;
    margin-bottom: 24px;
    color: #444;
}

.product-detail-cta a {
    color: #c0392b;
    font-weight: bold;
    text-decoration: none;
}

.product-back-link {
    display: inline-block;
    margin-top: 20px;
    color: #333;
    text-decoration: none;
    font-weight: 600;
}

.product-back-link:hover {
    color: #4a90e2;
}

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

    .product-card-link {
        min-height: 300px;
    }
}

@media (max-width: 768px) {
    .product-detail-grid {
        grid-template-columns: 1fr;
    }

    .product-page {
        padding-bottom: 64px;
    }
}

@media (max-width: 576px) {
    .products-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .product-card-link {
        min-height: auto;
    }

    .product-info {
        min-height: auto;
    }
}
