/* Основни стилове за каталога */
.catalog-section {
    padding: 50px 0;
    background-color: var(--light-blue);
}

/* Стилове за мрежата от продукти */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: 30px;
}

/* Стилове за продуктовите карти */
.product-card {
    background-color: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 20px;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

.product-number {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: var(--primary-color);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    z-index: 1;
}

.product-image-container {
    margin-bottom: 15px;
    padding-top: 5px;
    height: 200px; /* Фиксирана височина за снимки */
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image {
    max-height: 180px;
    max-width: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.product-image:hover {
    transform: scale(1.05);
}

.product-name {
    font-size: 0.95rem;
    color: var(--primary-color);
    margin-top: auto;
    text-align: center;
    line-height: 1.4;
    height: 3.5em; /* Фиксирана височина за името */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Модален прозорец за увеличаване на снимки */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.modal-content {
    max-width: 90%;
    max-height: 90%;
    text-align: center;
    animation: zoom 0.3s ease;
    position: relative;
}

@keyframes zoom {
    from {transform: scale(0.8); opacity: 0;}
    to {transform: scale(1); opacity: 1;}
}

.modal-content img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
}

#modalCaption {
    color: white;
    margin-top: 15px;
    font-size: 1rem;
    padding: 0 20px;
    text-align: center;
}

.close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2001;
    transition: color 0.3s;
}

.close:hover {
    color: var(--secondary-color);
}

/* Адаптивен дизайн */
@media (max-width: 1200px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

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

@media (max-width: 576px) {
    .product-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .product-card {
        padding: 15px;
    }
    
    .product-image-container {
        height: 180px;
    }
    
    .product-name {
        font-size: 0.9rem;
    }
}