.product {
    border: 1px solid var(--stroke-color);
    border-radius: 8px;
    color: var(--color-8);
    transition: 0.15s ease border-color;
    height: 100%;
    min-width: 220px;
    display: flex;
    flex-direction: column;
    /*padding: 16px 16px 8px;*/
    padding: 16px 12px 8px;
}

.product__header {
    display: flex;
    align-items: start;
    margin-bottom: 16px;
}

.product__tags {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.product-tag {
    background-color: var(--color-primary);
    /*font-size: var(--font-size-12);*/
    font-size: 11px;
    font-weight: 700;
    color: var(--color-white);
    padding: 4px 8px;
    width: min-content;
    border-radius: 9px;
    width: fit-content;
}

.product__top-buttons {
    display: flex;
    gap: 16px;
    margin-left: auto;
}

.product__top-button {
    fill: var(--color-6);
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    margin: -8px;
    padding: 8px;
    cursor: pointer;
    user-select: none;
    transition: 0.15s ease fill;
}
.product__top-button:hover svg path{
    color: var(--color-primary);
}

.product__rating {
    display: flex;
    align-items: center;
}

.product__rating-stars {
    display: flex;
    align-items: center;
    margin-right: 10px;
}

.product__rating-star {
    fill: var(--color-3);
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product__rating-star_active {
    fill: var(--color-primary);
}

.product__rating-link {
    color: var(--color-primary);
    text-decoration: underline;
    white-space: nowrap;
    font-size: var(--font-size-14);
}

.product__preview {
    margin-top: 12px;
}

.product__preview-image {
    height: 172px;
    max-width: 100%;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.product__preview-button {
    width: 100%;
    height: 172px;
    display: block;
    padding: 0;
    margin: -172px 0 0;
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    user-select: none;
    opacity: 0;
    transition: 0.15s ease opacity;
    font-family: inherit;
    font-size: inherit;
    z-index: 3;
    pointer-events: none;
}

.product__image-link {
    display: contents;
}

.product__preview-hover-text {
    background: white;
    padding: 8px 14px;
    border-radius: 32px;
	backdrop-filter: blur(2px);
    border: 1px solid var(--stroke-color);
    font-size: var(--font-size-14);
    pointer-events: fill;
    transition: 0.15s ease background-color, 0.15s ease border, 0.15s ease color;
}

.product__preview-hover-text:hover {
    background: var(--color-primary);
    border: 1px solid var(--color-primary);
    transition: 0.15s ease background-color, 0.15s ease border, 0.15s ease color;
    color: white;
}

.product__name {
    font-weight: 700;
    font-size: var(--font-size-20);
    padding: 0;
    margin: 20px 0 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -moz-box;
    -moz-box-orient: vertical;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    line-clamp: 3;
    box-orient: vertical;
    margin-bottom: 11px;
}

.product__prices {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    margin-bottom: auto;
    margin-left: auto;
    margin-right: auto;
}

.product__old_price {
    text-decoration-line: line-through;
    color: var(--color-error);
}

.product__price {
    font-size: var(--font-size-20);
    font-weight: 400;
    display: flex;
    align-items: center;
}

.product__status {
    margin-top: 11px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--color-6);
    justify-content: center;
    margin-left: -5px;
    margin-right: -5px;
}

.product__basket-button {
   /* display: block; */
   justify-content:center;
    display:flex;
    margin: 0 auto;
    padding: 11px 0px;
    border: none;
    border-radius: 4px;
    background-color: var(--color-primary);
    color: var(--color-white);
    font-size: inherit;
    font-family: inherit;
    font-weight: 400;
    cursor: pointer;
    user-select: none;
    width: 100%;
  /*  max-width: 172px; */
    text-align: center;
    white-space: nowrap;
}
.product__basket-button:hover{
    background-color: var(--color-primary);
}

.product__basket-button__added, .product__basket-button.active {
    background-color: var(--done-button);
}

.product__basket-button__disabled {
    background-color: var(--color-3);
}

.product__fast-buy-button {
    display: block;
    margin: 0 auto;
    padding: 8px 16px;
    background: none;
    border: none;
    color: var(--color-primary-light);
    font-size: inherit;
    font-weight: 400;
    cursor: pointer;
    user-select: none;
    font-family: inherit;
}

.product__fast-buy-button:hover{
    color: var(--color-primary);
}

.product__fast-buy-button_min{
    padding: 8px 4px;
}

.product__status:before {
    content: "";
    display: block;
    min-width: 20px;
    height: 20px;
    background-color: var(--done);
    border-radius: 999px;
}

.product__delete {
    display: none;
    min-width: 32px;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    fill: var(--color-primary);
}

.product_option .product__tags {
    display: none;
}

.product_option .product__top-buttons {
    display: none;
}

.product_option .product__delete {
    margin-left: auto;
    display: flex;
    cursor: pointer;
}

.product_option .product__rating {
    display: none;
}

.product_option .product__preview {
    margin-top: 0;
}

.product_option .product__header {
    margin-bottom: 8px;
}

@media screen and (max-width: 700px) {

    .product__preview-hover-text{
        display: none;
    }

    .product__name {
        text-align: center;
    }

    .product__prices {
        margin-top: auto;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        gap: 8px;
        margin-bottom: auto;
    }

    .product__header {
        margin-bottom: 8px;
    }

    .product {
        font-size: var(--font-size-16);
        min-width: 240px;
        padding: 16px;
        display: flex;
        flex-direction: column;
    }

    .product_small-image-in-mobile-version .product {
        text-align: center;
    }

    .product__basket-button {
        margin-top: auto;
    }
}

@media screen and (max-width: 500px) {

    .product__header {
        margin-bottom: 16px;
    }

    .product_small-image-in-mobile-version .product__tags {
        margin-left: -8px;
    }

    .product_small-image-in-mobile-version .product__rating {
        /*display: none;*/
        margin-left: -8px;
        margin-right: -8px;
        margin-top: -8px;
        justify-content: center;
        flex-wrap: wrap;
    }

    .product_small-image-in-mobile-version .product__name {
        text-align: center;
        font-size: var(--font-size-16);
    }

    .product_small-image-in-mobile-version .product__preview {
        height: 145px;
    }

    .product_small-image-in-mobile-version .product__preview-image {
        height: 145px;
    }

    .product_small-image-in-mobile-version .product__preview-button {
        height: 145px;
        margin-top: -145px;
        pointer-events: none;
    }

    .product__name {
        margin-top: 24px;
    }

    .product__status {
        margin-bottom: 8px;
        justify-content: center;
    }

    .product__basket-button {
        margin-top: 0;
    }
}

@media screen and (max-width: 600px) {

    .product_option {
        padding: 8px;
        min-width: 0;
    }

    .product_option .product__tags {
        display: none;
    }

    .product_option .product__top-buttons {
        display: none;
    }

    .product_option .product__delete {
        margin-left: auto;
        display: flex;
    }

    .product_option .product__rating {
        display: none;
    }

    .product_option .product__preview {
        height: 88px;
        margin-top: -8px;
    }

    .product_option .product__preview-image {
        height: 88px;
    }

    .product_option .product__preview-button {
        height: 88px;
        margin-top: -88px;
    }

    .product_option .product__header {
        margin-bottom: 8px;
    }

    .product_option .product__name {
        font-size: 16px;
    }

    .product_option .product__old_price {
        font-size: 16px;
    }

    .product_option .product__price {
        font-size: 20px;
        margin-top: auto;
        margin-bottom: auto;
    }

    .product_option .product__prices {
        flex-direction: column;
        align-items: start;
        justify-content: center;
    }

    .product_option .product__status {
        margin-top: 9px;
        margin-bottom: 16px;
        font-size: 14px;
        justify-content: center;
    }

    .product_option .product__basket-button {
        padding: 10px 7px;
        font-size: 12px;
        margin: 0 auto;
    }

    .product_option .product__fast-buy-button {
        padding: 0;
        padding-top: 8px;
        padding-bottom: 6px;
        font-size: 12px;
    }

}

.product__status_not-actual:before {
    background-color: #F45353;
}


/*Hovers*/

@media screen and (min-width: 1000px) {

    .product__top-button:hover {
        fill: #172FBB;
        transition: 0.15s ease fill;
    }

    .product:hover .product__preview-button, .product__preview-button:focus-visible {
        opacity: 1;
        transition: 0.15s ease opacity;
    }

    .product:hover {
        border-color: var(--color-primary);
        transition: 0.15s ease border-color;
    }
}

@media screen and (max-width: 1000px) {

    .product__preview-button {
        pointer-events: none;
    }

    .product__top-button:active {
        fill: #172FBB;
        transition: 0.15s ease fill;
    }
}