/**
 * Styles for the New Arrivals (Новинки) page
 * Replicating styles from brands-grid.css with robust fixes
 */

.novinki-page {
    background-color: #fff;
    padding-bottom: 80px;
    width: 100%;
    overflow-x: hidden; /* Prevent accidental horizontal scroll */
}

.novinki-page-container {
    max-width: 1300px !important;
    margin: 0 auto;
    padding: 0 15px;
    box-sizing: border-box;
}

.novinki-page h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 36px;
    font-weight: 600;
    line-height: 1.2;
    text-align: left;
    margin-top: 40px;
    margin-bottom: 40px;
    color: #242424;
}

/* Grid Layout */
.novinki-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px 20px;
    width: 100%;
    box-sizing: border-box;
}

/* Item Structure */
.novinki-item {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

/* Image Box */
.novinki-image-box {
    width: 100%;
    aspect-ratio: 1 / 1;
    background-color: #f6f6f6;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    margin-bottom: 12px;
    box-sizing: border-box;
}

.novinki-image-box img {
    max-width: 100%;
    max-height: 100%;
    width: auto; /* Changed to auto for better containment */
    height: auto;
    object-fit: contain;
    transition: transform 0.4s ease;
}

/* Hover Effects */
.novinki-item:hover .novinki-image-box {
    background-color: #f0f0f0;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.novinki-item:hover .novinki-image-box img {
    transform: scale(1.08);
}

/* Name */
.novinki-name {
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin: 0;
    text-align: center;
    line-height: 1.3;
}

/* Responsive */
@media (max-width: 1200px) {
    .novinki-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .novinki-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

@media (max-width: 575px) {
    .novinki-page h1 {
        font-size: 28px;
        margin-top: 30px;
        margin-bottom: 25px;
    }
    
    .novinki-name {
        font-size: 14px;
    }
}

@media (max-width: 400px) {
    .novinki-grid {
        grid-template-columns: 1fr;
    }
}
