.product-title,
.catalog-h1-title,
.catalog-h1-title h1 {
    text-align: center !important;
    font-size: 1.2rem;
    font-weight: bold;
    color: white;
    margin: 0 auto 2.5rem; 
    position: relative;
    display: block;
    padding-bottom: 6px;
    letter-spacing: 1px;
    width: 100%;
}

.catalog-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.catalog-section {
    text-align: center;
    padding: 4rem 2rem;
}

.catalog-h1-title {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--orange);
    text-transform: uppercase;
}

.catalog-h1-title h1 {
    display: inline-block;
    position: relative;
    color: var(--white);
    font-size: 2.5rem;
    padding-bottom: 6px;
    letter-spacing: 1px;
}

.catalog-h1-title h1::after {
    content: "";
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    max-width: 100px;
    height: 3px;
    background: var(--orange);
}

.catalog-item {
    width: 180px;
    overflow: hidden;
    text-decoration: none;
    color: var(--white);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #111;
}

.catalog-item img { 
    transition: all 0.3s ease-in-out;
}

.catalog-item:hover img {
    transform: scale(1.1);
    opacity: 0.5;
}

.catalog-item img {
    width: 100%;
    display: block;
}

.catalog-item:hover {
    box-shadow: 0 6px 15px rgba(0,0,0,0.4);
}

.catalog-title {
    padding: 10px;
    font-size: 1rem;
    font-weight: bold;
    text-transform: uppercase;
    color: var(--white);
}

.catalog-title:hover { 
    color: var(--orange);
    transition: all 0.3s ease-in-out;
}

.modal-content {
    max-width: 90%;
    max-height: 90%;
    box-shadow: 0 0 20px rgba(255,255,255,0.3);
    animation: zoomIn 0.3s ease;
}

#imageModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.85);
    display: none; 
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

#modalImage {
    width: 90%;
    max-width: 600px;
    height: auto;
    aspect-ratio: auto;
}

#imageModal .close {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 50px;
    color: var(--white);
    cursor: pointer;
    z-index: 10000;
    transition: color 0.3s ease;
    aspect-ratio: 1 / 1; 
    object-fit: contain; 
}

#imageModal .close:hover {
    color: var(--orange);
}

@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

@media screen and (max-width: 768px) {
    .product-title,
    .catalog-h1-title h1 {
        font-size: 1.3rem;
    }

    .product-title::after,
    .catalog-h1-title h1::after {
        width: 40%;
        max-width: 60px;
        height: 2px;
    }
    
    .catalog-container {
        grid-template-columns: 1fr; 
        gap: 15px;
        padding: 0 10px;
    }
    
    .catalog-title {
        font-size: 14px;
        padding: 8px 4px;
    }
}

@media (max-width: 500px) {
    .catalog-container {
        display: grid;
        grid-template-columns: repeat(3, 1fr); 
        gap: 10px;
    }

    .catalog-item {
        width: 100%;
    }
}
