* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}


body {
    background-color: #f8f8f8;
    color: #333;
    line-height: 1.6;
    font-family: 'Roboto', Arial, Helvetica, sans-serif
}

h1,
h2,
h3,
h4 {
    font-family: 'Montserrat', Arial, Helvetica, sans-serif;
}

header {
    background-color: #222;
    color: white;
    padding: 1.5rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: #fff;
    text-decoration: none;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 30px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.3s;
    font-weight: 500;
}

nav ul li a:hover {
    color: var(--primary-color);
}

.hero {
    background: url('../../images/photo-1522202176988-66273c2fd55f.avif') no-repeat center center/cover;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 0 20px;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.btn {
    display: inline-block;
    background: var(--primary-color);
    color: #111;
    padding: 12px 35px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.3s;
    border: 2px solid var(--primary-color);
}

.btn:hover {
    background: transparent;
    color: var(--primary-color);
}

section {
    padding: 20px 0;
}



.section-title {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.2rem;
    color: #222;
}

.about {
    background: #f5f5f5;
    /* padding: 60px 0; */
}

.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-text {
    flex: 1;
}

.about-image {
    flex: 1;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
}

.news {
    background: #f5f5f5;
}

.news-container {
    max-width: 1000px;
    margin: 0 auto;
}

.news-item {
    background: white;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.news-date {
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 10px;
    display: block;
}

.news-title {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #222;
}

.more-link {
    display: inline-block;
    margin-top: 40px;
    color: var(--primary-color);
    font-weight: bold;
    text-decoration: none;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 5px;
    transition: all 0.3s;
}

.more-link:hover {
    color: #d8ab3a;
    border-color: #d8ab3a;
}

footer {
    background: #222;
    color: white;
    padding: 50px 0 30px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
}

.footer-column {
    flex: 1;
    padding: 0 15px;
}

.footer-column h3 {
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column ul li a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-column ul li a:hover {
    color: var(--primary-color);
}

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #444;
    color: #aaa;
    font-size: 0.9rem;
}

.portfolio {}

.portfolio-image {
    max-width: 500px;
}

.news-image img {
    width: 100%;
    border-radius: 20px;
}

.catalog-container {
    display: grid;
    gap: 20px;
    /* Отступ между элементами */
    padding: 16px;
    /* Отступы по краям контейнера */
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;

    grid-template-columns: repeat(2, 1fr);
}

.catalog-container a:link,
.catalog-container a:visited {
    color: inherit;
    text-decoration: none;
}

.catalog-item {
    max-width: 320px;
}

.catalog-item img {
    width: 100%;
    height: 170px;
    object-fit: cover;
    border-radius: 20px;
}

.catalog-item-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
}

/* Стили для скрытия лишних товаров */
.catalog-container a:nth-child(n+7) {
    display: none;
}



@media (max-width: 1023px) {
    .catalog-container a:nth-child(n+5) {
        display: none;
    }
}

/* Показываем все товары, когда добавлен класс show-all */
.show-all .catalog-item {
    display: block !important;
}

@media (min-width: 768px) {
    section {
    padding: 40px 0;
    }
      
    .news-item {
        display: flex;
        gap: 30px;
    }

    .news-item .news-image {
        max-width: 360px;
        flex-shrink: 0;
    }

    .catalog-container {
        grid-template-columns: repeat(3, 1fr);
    }
    .catalog-item img {
    height: 200px;
    } 


    
}

@media (min-width: 1024px) {
    section {
    padding: 60px 0;
    }


    .catalog-container {
        grid-template-columns: repeat(4, 1fr);
    }
    .catalog-item img {
    height: 220px;
    }
    
}

@media (max-width: 767px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }

    nav ul {
        margin-top: 20px;
        flex-wrap: wrap;
        justify-content: center;
    }

    nav ul li {
        margin: 10px 15px;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .about-content {
        flex-direction: column;
    }

    .footer-content {
        flex-direction: column;
    }

    .footer-column {
        margin-bottom: 30px;
    }
}