/* reader */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f3f5fc;
    color: #333;
    font-size: 19px;
    font-weight: 400;
    line-height: 1.6;
}
h3 {
    font-weight: 600;
}
h1 {
    font-size: 36px;
}
.container_reader {
    display: flex;
    max-width: 70%;
    height: fit-content;
    margin: 20px auto;
    background: #f3f5fc;
    border-radius: 10px;
    padding: 20px;
    position: relative;
    overflow: visible;
}
.sidebar {
    background-color: white;
    width: 30%;
    height: fit-content;
    padding-inline: 20px;
    position: sticky;
    border-top: 3px solid var(--primary);
    border-bottom: 1px solid var(--border_gray);
    border-left: 1px solid var(--border_gray);
    border-right: 1px solid var(--border_gray);
}
.sidebar h3 {
    font-size: 1.5rem;
}
.sidebar ul {
    list-style: none;
    padding: 0;
}
.sidebar ul li {
    margin: 10px 0;
}
.sidebar ul li a {
    text-decoration: none;
    color: black;
}
.sidebar ul li a:hover {
    color: var(--primary);
}
.recent-picks {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.recent-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;

    padding: 20px 15px;
}
.recent-item:hover {
    color: var(--primary);
}
.recent-item:not(:last-child)::before {
    background-color: #e7e7e7;
    bottom: 0;
    content: "";
    height: 2px;
    left: 16px;
    position: absolute;
    width: calc(100% - 32px);
}
.recent-item::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0%;
    height: 100%;
    border: 2px solid white; /* цвет и толщина рамки */
    box-sizing: border-box; /* чтобы рамка не увеличивала размер блока */
    pointer-events: none; /* чтобы рамка не мешала кликам по контенту */
}
.recent-item:hover::after {
    opacity: 100%;
    border-color: var(--primary); /* цвет рамки при наведении */
}
.recent-item:hover p {
    color: var(--primary);
}
.recent-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 5px;
    margin-right: 10px;
}
.recent-item p {
    display: flex;
    margin-top: 10px;
    text-align: start;
    align-items: start;
    justify-content: start;
}
.content {
    display: flex;
    padding: 10px;
    padding-inline: 20px;
    flex-direction: column;
    width: 70%;
    margin: 25px;
    margin-top: 0px;
    gap: 30px;
    border: 1px solid var(--border_gray);
    background-color: white;
}

.header-img {
    width: 100%;
    height: 520px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 20px;
}
.gift-item {
    display: flex;
    width: 100%;
    flex-direction: column;
    align-items: center;
    background: #f5f5f5;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 20px;
}
.gift-item h2 {
    margin: 15px;
    margin-left: 0px;
}
.gift-item h3 {
    margin-bottom: 15px;
    font-size: 26px;
}
.gift-item img {
    width: 500px;
    height: auto;
    border-radius: 10px;
    margin-right: 20px;
}
.gift_item_text_article {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 25px;
    align-items: start;
    margin-top: 25px;
    padding: 10px;
}
.gift_item_text_article > p {
    font-size: 18px;
    margin-bottom: 10px;
    line-height: 1.6;
    font-family: Arial, sans-serif;
}
.gift_item_text_article > ul {
    list-style-type: none;
    margin-bottom: 10px; /*равно p*/
    padding: 0;
    font-family: "Arial", sans-serif;
    color: black;
}

/* Стили для элементов списка */
.gift_item_text_article ul li {
    padding: 5px 15px;
    margin: 5px 0;
    background-color: white;
    border-left: 4px solid #ccc;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.card {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 10px;
    overflow: hidden;
}

.card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card .overlay {
    position: absolute;
    bottom: 0;
    font-weight: 600;
    left: 0;
    width: 100%;
    background: linear-gradient(
            0deg,
            rgba(0, 0, 0, 1) 10%,
            rgba(0, 0, 0, 0) 100%
        ),
        url(images/item-content-big0.png) center;
    padding: 20px;
    color: white;
}
.card:hover {
    transform: scale(1.01);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
@media screen and (max-width: 480px) {
    .button {
        font-size: 14px;
    }
    .container_reader {
        flex-direction: column;
        max-width: 100%;
        margin: 0;
        border-radius: 0px;
        padding: 0px;
    }
    .sidebar {
        display: none;
    }
    .content {
        width: 100%;
        margin: 0px;
        padding: 0;
        gap: 10px;
    }
    .content h1 {
        margin: 0px;
        padding-top: 10px;
        padding-left: 10px;
    }
    .content p {
        margin: 0px;
        padding: 15px;
    }
    .gift-item p {
        margin: 0px;
        padding: 0px;
    }
    .header-img {
        width: 100%;
        height: 240px;
        object-fit: cover;
        border-radius: 0px;
        margin-bottom: 0px;
    }
    .gift-item {
        padding-inline: 10px;
        padding-block: 0px;
        max-width: 100%;
    }
    .gift-item img {
        text-align: center;
        max-width: 100%;
        height: fit-content;
        border-radius: 10px;
        margin: 0;
    }
}
.relinker {
    font-size: 20px;
}

/* Заголовок h3 — название товара */
h3 {
    font-size: 1.8rem;
    font-weight: 700;
    text-align: center;
    color: #1e1e1e;
    margin: 20px 0 15px;
}
strong {
    font-size: 1.4rem;
    font-weight: 600;
    color: #333;
    margin-top: 28px;
    margin-bottom: 10px;
    padding-left: 10px;
}

/* Подзаголовки разделов */
.gift_item_text_article h2 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #333;
    margin-top: 28px;
    margin-bottom: 10px;
    border-left: 4px solid var(--primary);
    padding-left: 10px;
}

/* Основной текст */
.gift_item_text_article p {
    font-size: 1.2rem;
    color: #2c2c2c;
    margin-bottom: 15px;
    text-align: justify;
}

/* Адаптивность */
@media (max-width: 600px) {
    .gift_item_text_article {
        padding: 15px;
        font-size: 0.95rem;
    }

    h3 {
        font-size: 1.5rem;
    }

    .gift_item_text_article h2 {
        font-size: 1.2rem;
        border-left-width: 3px;
    }

    .gift_item_text_article p {
        font-size: 0.95rem;
        line-height: 1.6;
    }
}
