.product {
    padding-top: 165px;
}
.product__wrapper {
    margin-top: 40px;
    display: grid;
    grid-template-areas: "image chars price" "image chars buy" "descr descr buy" "descr descr .";
    width: 100%;
    grid-template-columns: 253px 1fr 338px;
    grid-template-rows: 187px 100px 1fr 100px;
    column-gap: 20px;
    row-gap: 30px;
}
.product__image {
    grid-area: image;
    width: 100%;
    height: 100%;
}
.product__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.product__chars {
    grid-area: chars;
}
.product__chars-title {
    color: #013543;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
}
.product__chars-item {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    margin-top: 10px;
    color: #013543;
    padding-right: 30px;
    font-size: 16px;
}
.product__description {
    grid-area: descr;
}
.product__description p {
    color: #013543;
    font-size: 18px;
    margin-bottom: 10px;
}
.product__description .links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(4, 30px);
    gap: 15px;
    margin-top: 20px;
}
.product__description .links a {
    color: #013543;
    font-size: 18px;
    font-weight: 500;
    display: flex;
    gap: 10px;
    align-items: center;
}
.product__description .links a:hover {
    opacity: 0.8;
}
.product__tabs {
    display: flex;
}
.product__tabs button {
    background-color: rgba(0, 0, 0, 0);
    border: none;
    cursor: pointer;
    padding: 10px 22px;
    color: #021549;
    font-weight: 700;
    border-bottom: 2px solid #dfe4f3;
    transition: all 0.3s ease;
}
.product__tabs button.active {
    border-bottom: 2px solid #850003;
}
.product .cat_menu__content {
    margin-top: 13px;
    max-width: 100%;
    padding: 0;
}
.product__price {
    grid-area: price;
    width: 100%;
    padding: 40px 20px;
    background-color: #eff3ff;
    border-radius: 10px;
}
.product__price div {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
}
.product__price div span:last-child {
    font-weight: 700;
}
.product__price button {
    background: linear-gradient(to right, #850003 0%, #850003 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease-in;
    width: 100%;
    margin-top: 40px;
    background: linear-gradient(to right, #021549 0%, #021549 100%);
    padding-top: 12px;
    padding-bottom: 12px;
}
.product__price button:hover {
    background: linear-gradient(to right, #850003 0%, #a80f12 100%);
    box-shadow: 0 0 6px 2px rgba(14, 14, 15, 0.25);
}
.product__buy {
    grid-area: buy;
    width: 100%;
    padding: 40px 20px;
    background-color: #eff3ff;
    border-radius: 10px;
    height: fit-content;
}
.product__buy-title {
    font-size: 18px;
    font-weight: 700;
    text-align: center;
}
.product__buy p {
    margin-top: 14px;
    text-align: center;
}
.product__buy #product__buy-tel {
    width: 100%;
    margin-top: 14px;
    border-radius: 5px;
    padding: 10px;
    border: none;
    font-size: 16px;
}
.product__buy #product__buy-tel::placeholder {
    color: #8b8b91;
}
.product__buy .form__submit {
    width: 100%;
    margin-top: 14px;
    margin-bottom: 14px;
}
.product__similar {
    margin-top: 80px;
}
.product__similar-title {
    font-weight: 700;
    font-size: 32px;
    color: #013543;
}
.product__similar-wrapper {
    margin-top: 40px;
    display: flex;
    gap: 16px;
}
.product__similar-card {
    display: flex;
    flex-direction: column;
    border-radius: 10px;
    overflow: hidden;
    max-width: 338px;
}
.product__similar-card:hover {
    box-shadow: 0 0 6px 2px rgba(14, 14, 15, 0.25);
}
.product__similar-card-image {
    position: relative;
    width: 100%;
    height: 254px;
    border-radius: 10px;
    overflow: hidden;
    z-index: 2;
}
.product__similar-card-image img {
    position: absolute;
    inset: 0;
    object-fit: cover;
    width: 100%;
    height: 100%;
}
.product__similar-card-title {
    padding: 10px;
    margin-top: 10px;
    font-size: 16px;
}
.product__similar-card-overlay {
    position: absolute;
    inset: 0;
    background-color: #013543;
    opacity: 0.3;
    z-index: 9;
    pointer-events: none;
}
.product__similar-card-bottom {
    display: flex;
    justify-content: space-between;
    padding: 10px;
}
.product__similar-card-bottom .product__similar-card-price {
    color: #8b8b91;
    font-size: 16px;
}
.product__similar-card-bottom .product__similar-card-price .price {
    color: #021549;
    font-weight: 700;
}
.product__similar-card .addtocart {
    grid-area: btn;
    width: 44px;
    height: 44px;
    border: none;
    outline: none;
    background-color: #021549;
    padding: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    position: relative;
    cursor: pointer;
}
.product__similar-card .addtocart::after {
    content: "";
    position: absolute;
    right: -4px;
    top: -5px;
    width: 20px;
    height: 20px;
    background-color: #fff;
    border-radius: 50%;
    z-index: 2;
    display: none;
}
.product__similar-card .addtocart::before {
    content: "";
    position: absolute;
    right: 2px;
    top: -1px;
    width: 7px;
    height: 10px;
    border-bottom: 2px solid #850003;
    border-right: 2px solid #850003;
    z-index: 3;
    transform: rotate(45deg);
    display: none;
}
.product__similar-card.purchased {
    background-color: #eff3ff;
}
.product__similar-card.purchased .addtocart {
    background-color: #850003;
}
.product__similar-card.purchased .addtocart::after {
    display: block;
}
.product__similar-card.purchased .addtocart::before {
    display: block;
}
@media screen and (max-width: 992px) {
    .product__wrapper {
        grid-template-areas: "image price" "image buy" "chars buy" "chars ." "descr descr";
        grid-template-columns: 57% 40%;
        grid-template-rows: 183px 130px 283px 120px auto;
        row-gap: 16px;
        column-gap: 16px;
        width: 100%;
    }
    .product__similar {
        margin-top: 60px;
    }
    .product__similar-title {
        font-size: 28px;
    }
    .product__similar-wrapper {
        display: flex;
        gap: 16px;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        padding: 20px;
        scroll-snap-type: x proximity;
        margin-top: 0px;
        scrollbar-color: #850003 rgba(0, 0, 0, 0);
        scrollbar-width: thin;
    }
    .product__similar-wrapper::-webkit-scrollbar-track {
        background: rgba(0, 0, 0, 0);
    }
    .product__similar-wrapper::-webkit-scrollbar-thumb {
        background-color: #850003;
        border-radius: 4px;
    }
    .product__similar-card {
        flex: 0 0 280px;
        scroll-snap-align: start;
    }
    .product__description .links {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto;
        font-size: 16px;
    }
}
@media screen and (max-width: 692px) {
    h1 {
        font-size: 24px;
    }
    .product__wrapper {
        grid-template-areas: "image" "chars" "descr" "price" "buy";
        grid-template-columns: 100%;
        grid-template-rows: auto;
    }
    .product__tabs {
        flex-wrap: nowrap;
        overflow: scroll;
        padding-top: 10px;
        padding-bottom: 10px;
    }
    .product__tabs button {
        flex-shrink: 0;
    }
    .product__description p {
        font-size: 16px;
    }
    .product__chars-item {
        padding-right: 0;
    }
    .product__description .links {
        grid-template-columns: 100%;
        grid-template-rows: auto;
        font-size: 16px;
    }
    .product__similar {
        margin-top: 40px;
    }
    .product__similar-title {
        font-size: 20px;
    }
}
