@font-face {
    font-family: 'Oswald';
    src: url('../fonts/Oswald-Regular.ttf') format('truetype');
    font-weight: 400;
    /* Regular */
    font-style: normal;
}

@font-face {
    font-family: 'Oswald';
    src: url('../fonts/Oswald-Bold.ttf') format('truetype');
    font-weight: 700;
    /* Bold */
    font-style: normal;
}

@font-face {
    font-family: 'Open Sans';
    src: url('../fonts/OpenSans-Regular.woff2') format('woff2'),
        url('../fonts/OpenSans-Regular.woff') format('woff'),
        url('../fonts/OpenSans-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Open Sans';
    src: url('../fonts/OpenSans-Bold.woff2') format('woff2'),
        url('../fonts/OpenSans-Bold.woff') format('woff'),
        url('../fonts/OpenSans-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}


/* ОБЩИЕ СТИЛИ */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Open Sans', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.7;
    color: #0f0d0e;
    background-color: #fff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

h1,
h2,
h3,
h4,
p {
    margin: 0;
    font-weight: 400;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    clip: rect(0 0 0 0);
    overflow: hidden;
}

.section-title {
    font-family: 'Oswald', sans-serif;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    /* BOLD */
    text-transform: uppercase;
    margin-bottom: 28px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 66px;
    height: 3px;
    background-color: #e1d9bd;
    margin: 10px auto 0;
}

/* ШАПКА САЙТА */
.header {
    background-color: #000;
    background-image: url('../images/banner-bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding-top: 30px;
    position: relative;
    z-index: 1;
}

.header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: -1;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-image {
    width: 180px;
}


.nav-list {
    display: flex;
}

.nav-item {
    margin-left: 35px;
}

.nav-link {
    color: #ffffff;
    text-transform: uppercase;
    font-size: 13px;
}

.nav-link:hover {
    text-decoration: underline;
}

.menu-burger {
    display: none;
    /* Скрыт по умолчанию */
    width: 24px;
    /* Размер как в дизайне */
    height: 18px;
    /* Размер как в дизайне */
    background-color: transparent;
    border: none;
    cursor: pointer;
    position: relative;
    padding: 0;
    z-index: 3;
}

.menu-burger-line {
    position: absolute;
    left: 0;
    width: 100%;
    height: 3px;
    /* Толщина как в дизайне */
    background-color: #fff;
    transition: all 0.3s ease;
}

.menu-burger-line:nth-child(1) {
    top: 0;
}

.menu-burger-line:nth-child(2) {
    top: 50%;
    transform: translateY(-50%);
}

.menu-burger-line:nth-child(3) {
    bottom: 0;
}


.intro {
    text-align: center;
    padding-top: 85px;
    padding-bottom: 125px;
}

.intro-title {
    font-family: 'Oswald', sans-serif;
    font-size: 45px;
    font-weight: 700;
    /* BOLD */
    color: #ffffff;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.4;
    text-transform: uppercase;
}

/* СЕКЦИЯ "В ТРЕНДЕ" */
.trending {
    width: 100%;
}

.trending .section-title {
    font-size: 20px;
    font-weight: 700;
    /* BOLD */
    margin-bottom: 25px;
    padding-top: 60px;
}

.trending-grid {
    display: flex;
    gap: 4px;
    padding-bottom: 60px;
}

.trending-item {
    flex: 1;
    min-height: 320px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: flex-end;
    z-index: 1;
}

.trending-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: -1;
}

.trending-content {
    border: 3px solid rgba(181, 159, 91, 0.6);
    padding: 30px;
    width: calc(100% - 40px);
    margin: 20px;
}

.trending-title {
    font-family: 'Oswald', sans-serif;
    font-size: 18px;
    font-weight: 700;
    /* BOLD */
    text-transform: uppercase;
    color: #fff;
    line-height: 1.3;
}

.trending-title a:hover {
    color: #b59f5b;
}


/* ОСНОВНОЙ КОНТЕНТ */
.main-content {
    padding-bottom: 60px;
}

.content-wrapper {
    display: flex;
    justify-content: space-between;
}

.articles {
    flex-basis: 780px;
    margin-right: 120px;
}

.article {
    display: flex;
    margin-bottom: 60px;
}

.article:last-child {
    margin-bottom: 0;
}

.article-image-container {
    width: 380px;
    margin-right: 30px;
    flex-shrink: 0;
}

.article-image {
    display: block;
    width: 100%;
}

.article-tags {
    display: flex;
    margin-bottom: 10px;
}

.tag-link {
    margin-right: 15px;
    font-weight: 700;
    text-transform: uppercase;
    color: #b59f5b;
}

.tag-link:hover {
    text-decoration: underline;
}

.article-title {
    font-family: 'Oswald', sans-serif;
    font-size: 20px;
    font-weight: 700;
    /* BOLD */
    margin-bottom: 25px;
    text-transform: uppercase;
    line-height: 1.2;
}

.article-title a:hover {
    color: #b59f5b;
}

.article-meta {
    color: #888;
    margin-bottom: 40px;
    font-size: 12px;
}

.article-date {
    margin-right: 15px;
}

.article-author {
    font-weight: 700;
    /* BOLD */
    font-style: normal;
    color: #0f0d0e;
}

.article-text {
    font-size: 15px;
}

/* САЙДБАР */
.sidebar {
    width: 270px;
    flex-shrink: 0;
}

.widget {
    margin-bottom: 50px;
}

.widget-title {
    font-size: 14px;
}

.post-item {
    display: flex;
    margin-bottom: 20px;
}

.post-image-container {
    width: 70px;
    margin-right: 15px;
    flex-shrink: 0;
}

.post-image {
    width: 100%;
}

.post-date {
    font-size: 12px;
    color: #888;
}

.post-title a {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    /* BOLD */
    text-transform: uppercase;
    line-height: 1.2;
}

.post-title a:hover {
    color: #b59f5b;
}

.search-form {
    display: flex;
}

.search-field {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    background-color: #f4f7f6;
    font-size: 13px;
}

.search-field:focus {
    outline: 1px solid #b59f5b;
}

.search-button {
    width: 48px;
    border: none;
    background-color: #b59f5b;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18'%3E%3Cpath fill='%23FFF' d='M17.8 16.7L13.1 12c.9-1.2 1.4-2.7 1.4-4.2 0-4.1-3.3-7.4-7.4-7.4S-.1 3.7-.1 7.8s3.3 7.4 7.4 7.4c1.5 0 2.9-.5 4.1-1.3l4.7 4.7c.3.3.7.3 1 0l.7-.7c.3-.2.3-.6 0-.9zM7.4 13.2c-3 0-5.4-2.4-5.4-5.4s2.4-5.4 5.4-5.4 5.4 2.4 5.4 5.4-2.4 5.4-5.4 5.4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    cursor: pointer;
}

.search-button:hover {
    background-color: #323232;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
}

.newsletter-field {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    background-color: #f4f7f6;
    margin-bottom: 15px;
    font-size: 13px;
}

.newsletter-field:focus {
    outline: 1px solid #b59f5b;
}

.newsletter-button {
    width: 100%;
    padding: 15px;
    border: none;
    background-color: #b59f5b;
    cursor: pointer;
    color: #fff;
    text-transform: uppercase;
    font-weight: 700;
    font-size: 14px;
}

.newsletter-button:hover {
    background-color: #323232;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
}

.tags-list li {
    margin-right: 5px;
    margin-bottom: 5px;
}

.tag {
    display: block;
    padding: 5px 12px;
    border: 3px solid #eee;
    text-transform: uppercase;
    font-weight: 700;
    font-size: 12px;
}

.tag:hover {
    border-color: #b59f5b;
}

.topics-list li {
    width: 100%;
    border-bottom: 1px solid #eee;
    padding: 12px 0;
}

.topic-link {
    font-weight: 700;
}

.topic-link:hover {
    color: #b59f5b;
}

.topic-count {
    color: #b59f5b;
    margin-left: 5px;
    vertical-align: super;
    font-size: 12px;
    font-weight: 700;
}

/* СЕКЦИЯ "ИЗДЕЛИЯ" */
.products {
    padding-bottom: 60px;
}

.products-grid {
    display: flex;
    gap: 60px;
}

.product-item {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-image-container {
    padding: 0 20px;
}

.product-image {
    width: 100%;
}

.product-content {
    border: 3px solid #b59f5b;
    padding: 40px 20px 20px 20px;
    margin-top: -30px;
    position: relative;
    z-index: 2;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    /* BOLD */
    font-size: 18px;
    text-transform: uppercase;
}

.product-description {
    font-size: 15px;
    margin-top: 10px;
    flex-grow: 1;
}

.product-description a {
    color: #b59f5b;
    text-decoration: none;
}

.product-description a:hover {
    text-decoration: underline;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.product-prices {
    display: flex;
    flex-direction: column;
}

.product-price-old {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    /* BOLD */
    font-size: 16px;
    text-decoration: line-through;
    color: #888;
    line-height: 1;
}

.product-price {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    /* BOLD */
    font-size: 20px;
    line-height: 1;
}

.product-button {
    background-color: #b59f5b;
    color: #fff;
    padding: 10px 25px;
    text-transform: uppercase;
    font-size: 14px;
    font-weight: 700;
    border: none;
    cursor: pointer;
}

.product-button:hover {
    background-color: #323232;
}


/* ПОДВАЛ */
.footer {
    padding-bottom: 40px;
}

.socials {
    background-color: #f4f7f6;
    padding: 25px 0;
    margin-bottom: 40px;
}

.socials-list {
    display: flex;
    justify-content: center;
}

.socials-list li {
    margin: 0 12px;
}

.social-link {
    display: block;
    width: 24px;
    height: 24px;
    background-repeat: no-repeat;
    background-position: center;
}

.social-link[aria-label="Dribbble"] {
    background-image: url("../images/001-dribbble.svg");
}

.social-link[aria-label="Pinterest"] {
    background-image: url("../images/002-pinterest.svg");
}

.social-link[aria-label="Tumblr"] {
    background-image: url("../images/003-tumblr.svg");
}


.copyright {
    text-align: center;
    color: #999999;
    font-size: 12px;
    font-weight: 700;
}

/* POP-UP STYLES */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.popup-content {
    background-color: #fff;
    padding: 40px 30px;
    width: 100%;
    max-width: 390px;
    position: relative;
}

.close-popup-btn {
    position: absolute;
    top: -25px;
    right: -25px;
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 357 357'%3E%3Cpath fill='%23fff' d='M357 35.7L321.3 0 178.5 142.8 35.7 0 0 35.7l142.8 142.8L0 321.3 35.7 357l142.8-142.8L321.3 357l35.7-35.7-142.8-142.8z'/%3E%3C/svg%3E");
    background-color: transparent;
    border: none;
    cursor: pointer;
}

.popup-form .form-group {
    margin-bottom: 25px;
}

.popup-label {
    display: block;
    margin-bottom: 10px;
    font-size: 13px;
}

.popup-select {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    background-color: #f4f7f6;
    font-size: 13px;
    font-family: inherit;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 16'%3E%3Cpath fill='%23b59f5b' d='M5 0L0 6h10L5 0zM5 16l5-6H0l5 6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 10px;
}

.popup-textarea {
    width: 100%;
    min-height: 130px;
    padding: 15px;
    border: 1px solid #ddd;
    background-color: #f4f7f6;
    font-size: 13px;
    font-family: inherit;
    resize: vertical;
}

.radio-group {
    display: flex;
}

.radio-label {
    margin-right: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
}

/* Hide default radio button */
.radio-input {
    appearance: none;
    -webkit-appearance: none;
    margin: 0;
}

/* Custom radio button style */
.radio-input::before {
    content: '';
    display: inline-block;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #ddd;
    margin-right: 10px;
    background-color: #f4f7f6;
    vertical-align: middle;
}

/* Style for when radio is checked */
.radio-input:checked::before {
    border-color: #b59f5b;
    background-image: radial-gradient(#b59f5b 50%, transparent 55%);
}


/* == Tablet & Small Desktop (1200px and down) == */

@media (max-width: 1200px) {
    .header {
        background-image: url('../images/banner-bg-tablet.jpg');
    }

    .intro-title {
        font-size: 40px;
    }

    .nav {
        display: none;
    }

    .menu-burger {
        display: block;
    }

    .content-wrapper {
        flex-direction: column;
    }

    .articles {
        width: 100%;
        margin-right: 0;
    }

    .article {
        padding-bottom: 25px; /* Добавляем отступ снизу внутри блока статьи */
        margin-bottom: 35px; /* Добавляем отступ снаружи, между статьями */
        border-bottom: 1px solid #eee; /* Рисуем тонкую серую линию-границу */
    }
    .article:last-child {
        border-bottom: none; /* Убираем границу у самой последней статьи */
        margin-bottom: 0;
        padding-bottom: 0;
    }

    .sidebar {
        width: 100%;
        margin-top: 40px;
    }

    .products-grid {
        flex-wrap: wrap;
        justify-content: space-between;
    }


    .product-item {
        flex: none; /* Отключаем растягивание, как советовал наставник */
        width: calc(50% - 30px); /* Задаем ширину для двух колонок с учетом gap */
        margin-bottom: 40px; /* Добавляем отступ снизу для рядов */
    }

    .trending-item {
    flex: none;
    }

    .nav--open {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;

        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.95);
        
        z-index: 999;
    }

    .nav--open .nav-link {
        font-size: 20px;
        color: #fff;
    }

    .nav--open .nav-list {
        flex-direction: column;
    }

    .nav--open .nav-item {
        margin: 20px 0;
        margin-left: 0;
    }
}


/* == Tablet Layout (641px - 1200px) == */

@media (min-width: 641px) and (max-width: 1200px) {

    .content-wrapper {
        flex-direction: row;
        justify-content: space-between;
        gap: 40px;
    }

    .articles {
        width: 65%;
        margin-right: 0;
    }

    .sidebar {
        width: 30%;
        margin-top: 0;
    }

    .trending-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .article-image-container {
        width: 100%;
        margin-bottom: 20px;
    }

    .article {
        flex-direction: column;
    }

    .header {
        background-image: url('../images/banner-bg-tablet.jpg');
    }

    .intro-title {
        font-size: 40px;
    }

    .nav {
        display: none;
    }


    .menu-burger {
        display: block;
        position: relative;
        /* Added for z-index */
        z-index: 1000;
    }

    .nav--open {
        display: block;
        position: absolute;
        top: 50px;
        left: 50%;
        transform: translateX(-50%);
        /* Centers the menu */
        width: 150px;
        background-color: #fff;
        padding: 5px 0;
        border: 1px solid #ddd;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        z-index: 999;
    }

    .nav--open .nav-list {
        flex-direction: column;
    }

    .nav--open .nav-item {
        margin: 0;
        width: 100%;
    }

    .nav--open .nav-link {
        display: block;
        font-size: 13px;
        color: #000;
        padding: 10px 15px;
        text-align: center;
    }

    .nav--open .nav-link:hover {
        background-color: #f5f5f5;
    }
}


/* == Mobile Styles (640px and down) == */

@media (max-width: 640px) {

    .header {
        min-height: 100vh;
        background-image: url('../images/banner-mobile.jpg');
        background-position: center center;
        padding-top: 30px;
        display: block;
    }

    .header-container {
        justify-content: flex-end;
        width: 100%;
        padding: 0 15px;
        position: absolute;
        top: 30px;
        left: 0;
        right: 0;
        z-index: 100;
    }

    .logo {
        position: absolute;
        top: 220px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 1;
    }

    .intro {
        margin-top: 280px;
        padding-top: 0;
        padding-bottom: 0;
    }

    .intro-title {
        font-size: 28px;
    }

    .article {
        flex-direction: column;
    }

    .article-image-container {
        width: 100%;
        margin-right: 0;
        margin-bottom: 15px;
    }

    .trending-grid {
        flex-wrap: wrap;
    }

    @media (orientation: landscape) {
        .trending-item {
            width: calc(50% - 2px);
        }
    }

    @media (orientation: portrait) {
        .trending-item {
            width: 100%;
        }
    }

    .product-item {
        width: 100%; 
    }

    .nav {
        display: none;
    }

    .menu-burger {
        display: block;
        position: relative;
        z-index: 1000;
    }

    .nav--open {
        display: block;
        position: absolute;
        top: 50px;
        left: 50%;
        transform: translateX(-50%);
        width: 150px;
        background-color: #fff;
        padding: 5px 0;
        border: 1px solid #ddd;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        z-index: 999;
    }

    .nav--open .nav-list {
        flex-direction: column;
    }

    .nav--open .nav-item {
        margin: 0;
        width: 100%;
    }

    .nav--open .nav-link {
        display: block;
        font-size: 13px;
        color: #000;
        padding: 10px 15px;
        text-align: center;
    }

    .nav--open .nav-link:hover {
        background-color: #f5f5f5;
    }
}
