.catalog-item-container {
    /* локально замедляем скорость анимации обводки для карточек каталога */
    --border-anim-speed: 1.2s;
    max-width: 400px;
    width: calc(33% - 20px);
    height: 457px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-radius: 20px;
    background-color: var(--card-bg);
    box-shadow: var(--shadow-main);
    overflow: hidden;
    position: relative;
    transition: box-shadow var(--transition-base);
    box-sizing: border-box;
}

.catalog-item-container:hover {
    box-shadow: var(--shadow-hover);
}

.catalog-item-container:hover .nc-image-wrapper img.main-img {
    transform: scale(1.1);
}

.catalog-item-container:hover .nc-badges span {
    color: var(--accent-red);
}

/* CARD */
.new-card-item {
    background: var(--white);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: var(--transition-base);
}

/* IMAGE */
.nc-image-wrapper {
    height: 296px;
    padding: 20px;
    background-color: var(--gray-100);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 12px 12px 0 0;
    cursor: pointer;
    position: relative;
}

.nc-image-wrapper img.main-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: var(--transition-img);
    mix-blend-mode: multiply;
}

.nc-image-wrapper:hover img.main-img {
    transform: scale(1.08);
}

/* BADGES */
.nc-badges {
    position: absolute;
    left: 16px;
    top: 8px;
    z-index: 1;
}

.nc-badges span {
    font-weight: 500;
    font-size: 12px;
    color: var(--text-main);
    transition: color var(--transition-base);
}

/* CONTENT */
.nc-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.nc-title {
    /*font-family: 'Poppins';*/
    font-weight: 700;
    font-size: 20px;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* PRICE */
.nc-price-row {
    /*font-family: 'Poppins';*/
    font-size: 20px;
    font-weight: 500;
    display: flex;
    gap: 20px;
    color: var(--text-main);
}

.nc-price-old {
    text-decoration: line-through;
    color: var(--gray-600);
    text-decoration-color: var(--gray-600);
}

.nc-credit-price {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    display: none;
}

/* ACTIONS */
.nc-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.nc-icons {
    display: flex;
    gap: 16px;
}

.nc-icon-btn,
.product-compare_label {
    cursor: pointer;
    width: 48px;
    height: 48px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}
.basket-cnt{
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    right: 0;
    top: 0;
    height: 18px;
    width: 18px;
    border-radius: 50%;
    background: var(--accent-red);
    color: #fff;
    font-size: 12px;
}
.nc-icon-btn input {
    display: none;
}

.nc-icon-svg {
    fill: var(--accent-red);
    transition: transform 0.3s ease, fill 0.3s ease;
}

/* BUTTON */
.nc-btn-oval {
    position: relative;
    width: 134px;
    height: 46px;
    border-radius: 23px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--accent-red);
    cursor: pointer;
    border: 2px solid var(--accent-red);
    /* сначала плавно скрываем обычный бордер */
    transition: border-color 0.4s ease;
}

.nc-btn-text {
    position: relative;
    z-index: 2;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nc-border-svg {
    position: absolute;
    inset: -2px;
    pointer-events: none;
}

.nc-border-svg path {
    fill: none;
    stroke: var(--accent-red);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-dasharray: var(--dash-array);
    stroke-dashoffset: var(--dash-array);
    opacity: 0;
    /* анимация обводки начинается чуть позже, чтобы было видно последовательность:
       1) исчезает бордер
       2) плавно проявляется бегущая линия */
    transition: opacity 0.6s ease,
    stroke-dashoffset var(--border-anim-speed) ease-out 0.3s;
}

.nc-btn-oval:hover .nc-border-svg path {
    stroke-dashoffset: 0;
    opacity: 1;
}

/* При наведении бордер плавно исчезает, остаётся только svg-анимация */
.nc-btn-oval:hover {
    border-color: transparent;
}

/* Состояние "товар в корзине" для иконки */
.nc-icon-btn--cart .nc-icon-svg {
    fill: var(--accent-red);
}

.nc-icon-btn--cart.in-basket .nc-icon-svg {
    fill: var(--accent-red);
}

/* Базовое состояние иконки сравнения в карточке — серая */
.nc-icons .nc-icon-btn:not(.nc-icon-btn--cart) .nc-icon-svg {
    fill: var(--accent-red);
}

/* Состояние "в сравнении" для иконки сравнения */
.nc-icons .nc-icon-btn.in-compare .nc-icon-svg {
    fill: var(--accent-red);
    transform: scale(1.15);
}

/* RESPONSIVE */
@media (max-width: 1600px) {
    .catalog-item-container {
        max-width: 413px;
        width: calc(50% - 10px);
    }
}

@media (max-width: 1279px) {
    .catalog-item-container {
        max-width: 100%;
        width: calc(33% - 13px);
    }

    .nc-border-svg path {
        stroke-dasharray: none;
        stroke-dashoffset: 0;
        transition: none;
    }
}

@media (max-width: 1023px) {
    .catalog-item-container {
        max-width: calc(50% - 8px);
        width: calc(50% - 8px);
        border-radius: 12px;
    }

}

@media (max-width: 767px) {
    .catalog-item-container {
        max-width: calc(50% - 4px);
        width: calc(50% - 4px);
        height: auto;
        min-height: 266px;
        max-height: 282px;
    }

    .new-card-item {
        border-radius: 12px;
    }

    .nc-image-wrapper {
        height: 142px;
        padding: 10px;
    }

    .nc-badges {
        left: 10px;
        top: 2px;
    }

    .nc-badges span {
        font-size: 10px;
    }

    .nc-content {
        padding: 8px 4px 16px;
        gap: 8px;
    }

    .nc-title {
        font-size: 14px;
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        min-height: 42px;
    }

    .nc-price-row {
        font-size: 13px;
        gap: 6px;
    }

    .nc-btn-oval {
        width: 70px;
        height: 32px;
        border-radius: 32px;
    }

    .nc-btn-text {
        font-size: 12px;
        letter-spacing: 0;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .nc-actions {
        gap: 8px;
        flex-direction: row-reverse;
    }

    .nc-icon-btn,
    .product-compare_label {
        cursor: pointer;
        width: 44px;
        height: 44px;
    }

    .nc-icons {
        gap: 0;
    }

    .nc-icon-svg {
        width: 20px;
        height: 20px;
    }
    .basket-cnt{
        right: 0;
        top: 4px;
        height: 14px;
        width: 14px;
        font-size: 10px;
    }
}

@media (max-width: 374px) {
    .nc-content {
        padding: 8px 4px;
        gap: 8px;
    }
    .nc-icon-btn,
    .product-compare_label {
        cursor: pointer;
        width: 24px;
        height: 24px;
    }
    .nc-icons {
        gap: 16px;
    }
    .catalog-item-container {
        height: 256px;
    }

    .nc-btn-oval {
        width: 56px;
    }
}