.p-card {
    display: flex;
    user-select: none;
    position: relative;
    text-decoration: none;
    flex-direction: column;
}

.swiper-wrapper .p-card {
    height: 100%;
}

.p-card * {
    user-select: none;
}

.p-card__labels {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 3;
    display: flex;
    gap: 4px;
    align-items: flex-start;
    flex-direction: column;
}

.p-card__lottie-wrapper {
    --d-width: 80px;
    --d-height: 80px;
    --m-width: 80px;
    --m-height: 80px;
    position: absolute;
    z-index: 3;
    left: 0;
    top: 0;
    pointer-events: none;
    width: var(--m-width);
    height: var(--m-height);
}

.p-card__lottie-wrapper[data-ypos="start"] {
    top: 0;
}

.p-card__lottie-wrapper[data-ypos="end"] {
    top: calc(180px - var(--m-height));
}

.product-info__lottie {
    position: absolute;
    left: 0;
    pointer-events: none;
    top: 0;
    width: calc(100% + 32px);
    z-index: 5;
    height: 320px;
    margin: 0 -16px;
}

.product-info__lottie .p-card__lottie-wrapper[data-ypos="end"] {
    top: calc(320px - var(--m-height));
}

.p-card__lottie-wrapper[data-xpos="start"] {
    left: 0;
}

.p-card__lottie-wrapper[data-xpos="end"] {
    left: auto;
    right: 0;
}

.p-card__lottie {
    --m-right: 0px;
    --m-bottom: 0px;
    --d-right: 0px;
    --d-bottom: 0px;

    position: absolute;
    top: calc(var(--m-bottom) * -1);
    right: var(--m-right);
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.p-card__images {
    width: 100%;
    height: 180px;
    position: relative;
    background-color: #f9f9f9;
    overflow: hidden;
    border-radius: 8px;
    flex-shrink: 0;
    flex-grow: 0;
}

.p-card__images-container {
    display: flex;
    height: 100%;
}

.p-card__image {
    flex: 0 0 100%;
    height: 100%;
    width: 100%;
    object-fit: cover;
}

.p-card__image[data-active="true"] {
    opacity: 1;
}

.p-card__images-labels {
    position: absolute;
    bottom: 6px;
    pointer-events: none;
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    flex-direction: column;
    left: 6px;
}

.p-card__images-labels > .p-label {
    margin-top: 4px;
    padding: 4px;
    font-size: 9px;
    line-height: 9px;
}

.p-card__images-nav {
    bottom: 10px;
    left: 0;
    gap: 4px;
    right: 0;
    display: flex;
    justify-content: center;
    position: absolute;
    pointer-events: none;
}

.p-card__images-nav div {
    width: 2px;
    height: 2px;
    transition: 0.1s;
    border-radius: 1px;
    background-color: #9ca3aa;
}

.p-card__images-nav div[data-active="true"] {
    width: 12px;
    background-color: #112233;
}

.p-card__images-color-index {
    pointer-events: none;
    position: absolute;
    z-index: 3;
    bottom: 6px;
    right: 6px;
    font-size: 14px;
    line-height: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #112233!important;
}

.p-card__subtitle {
    font-size: 12px;
    margin-top: 20px;
    line-height: 16px;
    letter-spacing: 1px;
    text-decoration: none;
    text-transform: uppercase;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    flex-shrink: 0;
    flex-grow: 0;
}

.p-card__title {
    display: block;
    font-size: 16px;
    line-height: 20px;
    overflow: hidden;
    text-decoration: none;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-top: 4px;
    flex-shrink: 0;
    flex-grow: 0;
}

.p-card__volumes {
    min-height: 18px;
    display: flex;
    margin-top: 12px;
    font-size: 12px;
    line-height: 14px;
    letter-spacing: 0.4px;
    align-items: center;
    text-transform: uppercase;
}

.p-card__volumes > * {
    margin-right: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.p-card__volumes-count {
    background-color: #f9f9f9;
    border-radius: 4px;
    padding: 3px;
}

.p-card__color {
    display: flex;
    gap: 8px;
    align-items: center;
}

.p-card__color svg {
    margin-left: -4px;
}

.p-card__color-icon {
    height: 14px;
    width: 14px;
    border-radius: 4px;
}

.p-card__color-icon--white {
    border: 1px solid #e5e5e5;
}

.p-card__color-icon--striped {
    border: 1px solid #e5e5e5;
    background: linear-gradient(
        45deg,
        rgba(255, 255, 255, 1) 25%,
        rgba(0, 0, 0, 1) 26%,
        rgba(0, 0, 0, 1) 33%,
        rgba(0, 0, 0, 1) 39%,
        rgba(255, 255, 255, 1) 40%,
        rgba(255, 255, 255, 1) 59%,
        rgba(0, 0, 0, 1) 60%,
        rgba(0, 0, 0, 1) 66%,
        rgba(0, 0, 0, 1) 72%,
        rgba(255, 255, 255, 1) 73%
    ) !important;
}

.p-card__footer {
    display: flex;
    position: relative;
    margin-top: 16px;
    min-height: 44px;
    justify-content: space-between;
    height: 100%;
    align-items: flex-end;
    justify-content: space-between;
}

.p-card__price {
    display: inline-flex;
    flex-direction: column;
    position: absolute;
    align-items: flex-start;
    left: 1px;
    min-height: 44px;
}

.p-card__price div:nth-child(1) {
    font-size: 20px;
    line-height: 1em;
    letter-spacing: 0.4px;
    white-space: nowrap;
    display: inline-block;
}

.p-card__price div:nth-child(2) {
    font-size: 14px;
    display: inline-block;
    line-height: 1em;
    letter-spacing: 0.4px;
    font-weight: 700;
    color: #989898;
    margin-top: 6px;
    position: relative;
    white-space: nowrap;
}

.p-card__price div:nth-child(2)::after {
    left: 0;
    right: 0;
    height: 2px;
    content: "";
    position: absolute;
    background-color: #e21b25;
    transform: translateY(6px) rotate(-5deg);
}

.p-card__buy {
    position: relative;
    height: 44px;
    width: 100%;
}

.p-card__btn {
    justify-content: flex-end;
    display: flex;
    height: 100%;
    transition: 0.2s;
    color: #2c2c2c;
}

.p-card__btn-icon {
    right: 0;
    top: 0;
    z-index: 1;
    transition: 0.2s;
    height: 100%;
    color: #ffffff;
    background-color: #e21b25;
    justify-content: center;
    align-items: center;
    width: 64px;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    position: absolute;
}

.p-card__btn-icon-empty {
    right: 0;
    top: 0;
    z-index: 1;
    transition: 0.2s;
    height: 100%;
    color: #ffffff;
    background-color: #e7b820;
    justify-content: center;
    align-items: center;
    width: 64px;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    position: absolute;
}

.p-card__btn-icon-profi {
    right: 0;
    top: 0;
    z-index: 1;
    transition: 0.2s;
    height: 100%;
    color: #ffffff;
    background-color: #11244d;
    justify-content: center;
    align-items: center;
    width: 64px;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    position: absolute;
}

.p-card__btn-count {
    opacity: 0;
    right: 0;
    top: 0;
    position: absolute;
    transition: 0.2s;
    width: 68px;
    pointer-events: none;
    height: 100%;
    display: flex;
    border-radius: 4px;
    justify-content: center;
    align-items: center;
    background-color: #f5f6fa;
}

.p-card__btn-count::after {
    content: var(--count);
    letter-spacing: 1px;
    font-size: 12px;
    margin-left: 8px;
    font-weight: 700;
    display: inline-block;
    line-height: 1em;
}

.p-card__price-empty {
    font-size: 20px;
    line-height: 1em;
    display: block;
    color: #989898;
    height: 44px;
    transform: translateX(-1px);
}

.p-card .counter__count {
    font-size: 12px;
    line-height: 12px;
}

/* LABELS */
.p-label {
    padding: 10px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    line-height: 12px;
    border-radius: 4px;
    white-space: nowrap;
    letter-spacing: 1px;
    display: inline-block;
    text-decoration: none;
    text-transform: uppercase;
}

.p-label:hover {
    color: #ffffff;
}

.p-label--blue {
    background-color: #98b4df;
}

.p-label--green {
    background-color: #98df9b;
}

.p-label--yellow {
    background-color: #fab718;
}

.n-label {
    --background: #34c369;
    --color: #ffffff;
    display: inline-flex;
    align-items: center;
    line-height: 1em;
    height: 18px;
    padding: 4px 6px;
    gap: 1px;
    position: relative;
    text-transform: uppercase;
    font-size: 10px;
    font-weight: 700;
    border-radius: 4px;
    background-color: var(--background);
    letter-spacing: 0.08em;
    color: var(--color);
    text-underline-position: from-font;
    text-decoration-skip-ink: none;
    white-space: nowrap;
    flex-shrink: 0;
    flex-grow: 0;
}

.n-label svg {
    max-height: 18px;
}

.n-label--lg {
    font-size: 12px;
    padding: 5px 6px;
    height: 20px;
}

.n-label--lg svg {
    min-height: 12px;
    min-width: 12px;
    max-height: 20px;
}

.n-label--discount {
    letter-spacing: 0.02em;
    border-radius: 4px 0 0 4px;
}

.n-label--discount::after {
    content: "";
    position: absolute;
    right: -9px;
    width: 10px;
    height: 100%;
    top: 0;
    clip-path: path(
        "M2.95559 16.7C2.19784 17.5283 1.12259 18 -1.90735e-06 18L-2.50625e-07 -8.3037e-07C1.12259 1.1702e-06 2.19784 0.471732 2.95559 1.3L7.52988 6.3C8.92819 7.82844 8.92819 10.1716 7.52988 11.7L2.95559 16.7Z"
    );
    background-color: var(--background);
}

.n-label--blue {
    --background: #5981e6;
}

.n-label--yellow {
    --background: #fab718;
}

.n-label--green {
    --background: #34c369;
}

.n-label > * {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

.n-label__discount-rect {
    z-index: 0;
    right: -6px;
    width: 9px;
    height: 18px;
    position: absolute;
    pointer-events: none;
    top: 0;
}

.n-label__discount-rect path {
    fill: var(--background);
}

@media (min-width: 992px) {
    .p-card__lottie-wrapper[data-ypos="end"] {
        top: calc(230px - var(--d-height));
    }

    .product-info__lottie {
        width: 528px;
        height: 428px;
        margin: 0;
    }

    .product-info__lottie .p-card__lottie-wrapper[data-ypos="end"] {
        top: calc(428px - var(--d-height));
    }

    .p-card__lottie-wrapper {
        width: var(--d-width);
        height: var(--d-height);
    }

    .p-card__lottie {
        top: calc(var(--d-bottom) * -1);
        right: var(--d-right);
    }

    .n-label {
        font-size: 12px;
    }

    .n-label__icon {
        height: 12px;
        width: auto;
    }

    .n-label--lg {
        font-size: 14px;
        height: 22px;
    }

    .n-label--lg svg {
        min-height: 14px;
        min-width: 14px;
    }
}

@media (min-width: 1200px) {
    .p-card__lottie-wrapper[data-ypos="end"] {
        top: calc(281px - var(--d-height));
    }

    .product-info__lottie {
        width: 634px;
    }
}

/* COUNTER */
.counter {
    width: 100%;
    height: 100%;
    color: #2c2c2c;
    transition: 0.2s;
    overflow: hidden;
    border-radius: 8px;
    background-color: #f5f6fa;
}

.counter * {
    user-select: none;
}

.counter__input,
.counter__enter {
    width: 100%;
    height: 100%;
    display: flex;
}

.counter[data-state="input"] .counter__enter {
    display: none;
}

.counter[data-state="enter"] .counter__input {
    display: none;
}

.counter__count {
    width: 100%;
    height: 100%;
    display: flex;
    cursor: pointer;
    transition: 0.3s;
    font-size: 14px;
    font-weight: 700;
    overflow: hidden;
    line-height: 14px;
    align-items: center;
    letter-spacing: 0.08em;
    justify-content: center;
}

.counter__input-input[data-shaked="true"],
.counter__count[data-shaked="true"] {
    animation: shaker 0.33s linear 0s 4;
}

@keyframes shaker {
    0% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-10px);
    }
    50% {
        transform: translateX(0);
    }
    75% {
        transform: translateX(10px);
    }
    100% {
        transform: translateX(0);
    }
}

.counter__count-text {
    transition: 0.15s transform ease-in;
}

.counter__state {
    display: flex;
    flex: 45px 0 0;
    cursor: pointer;
    transition: 0.3s;
    align-items: center;
    justify-content: center;
}

.counter .counter__input-input {
    width: 100%;
    border: none;
    outline: none;
    font-size: 14px;
    font-weight: 700;
    line-height: 14px;
    text-align: center;
    letter-spacing: 0.08em;
    background-color: #f5f6fa;
}

@media (max-width: 374px) {
    .p-card__images {
        height: calc(100vw / 320 * 220);
    }

    .p-card__btn-count,
    .p-card__btn-icon,
    .p-card .counter {
        max-width: 180px;
    }
}

@media (max-width: 991px) {
    .p-card__images-labels {
        display: none;
    }

    .p-card .p-card__btn .counter {
        width: 68px;
        opacity: 0;
        pointer-events: none;
    }

    .p-card .p-card__btn[data-state="counter"] .counter {
        opacity: 1;
        width: 100%;
        pointer-events: all;
    }

    .p-card .p-card__btn[data-state="counter"] .p-card__btn-icon {
        opacity: 0;
        width: 64px;
        color: #e21b25;
        pointer-events: none;
    }

    .p-card .p-card__btn[data-state="basket"] .p-card__btn-icon {
        opacity: 0;
        width: 64px;
        color: #e21b25;
        pointer-events: none;
    }

    .p-card .p-card__btn[data-state="basket"] .counter {
        opacity: 0;
        width: 64px;
        pointer-events: none;
    }

    .p-card .p-card__btn[data-state="basket"] .p-card__btn-count {
        opacity: 1;
        pointer-events: all;
    }
}

@media (min-width: 992px) {
    .p-card {
        cursor: pointer;
    }

    .p-card:hover .p-card__title {
        color: #e21b25;
    }

    .p-card__subtitle {
        margin-top: 16px;
    }

    .p-card:hover .p-card__subtitle {
        color: #2c2c2c;
    }

    .p-card__images {
        height: 230px;
    }

    .p-card__btn-icon {
        opacity: 0;
        width: 100%;
        color: #e21b25;
        pointer-events: none;
    }

    .p-card[data-hover="true"] .p-card__btn[data-open="false"] .p-card__btn-icon {
        opacity: 1;
        width: 68px;
        color: #ffffff;
        pointer-events: all;
    }

    .p-card[data-hover="true"] .p-card__btn[data-open="false"] .counter {
        width: 68px;
        opacity: 0;
        color: #f5f6fa;
        pointer-events: none;
    }

    .p-card:not([data-hover="true"]) .p-card__btn .counter {
        width: 68px;
        opacity: 0;
        pointer-events: none;
    }

    .p-card:not([data-hover="true"]) .p-card__btn .p-card__btn-icon {
        width: 68px;
        opacity: 0;
    }

    .p-card:not([data-hover="true"]) .p-card__btn[data-open="true"] .p-card__btn-count {
        opacity: 1;
    }

    .p-card[data-hover="true"] .p-card__btn[data-open="true"] .p-card__btn-count {
        opacity: 0;
        width: 100%;
        color: #f5f6fa;
    }

    .p-card:not([data-hover="true"]) .p-card__btn-icon-empty {
        color: #e7b820;
        background-color: #f5f6fa;
    }

    .p-card:not([data-hover="true"]) .p-card__btn-icon-profi {
        color: #11244d;
        background-color: #f5f6fa;
    }

    .p-card__images-container {
        display: block;
        max-width: none;
    }

    .p-card__image {
        width: 100%;
        height: 100%;
        top: 0;
        left: 0;
        transition: 0.3s;
        opacity: 0;
        position: absolute;
    }

    .counter__count:hover,
    .counter__state:hover {
        color: #e21b25;
    }

    .counter__count:hover,
    .counter__state:hover {
        color: #e21b25;
    }

    .p-card__footer {
        margin-top: 20px;
    }
}

@media (min-width: 375px) and (max-width: 575px) {
    .p-card__images {
        height: calc(100vw / 375 * 180);
    }
}

@media (min-width: 576px) and (max-width: 991px) {
    .p-card__images {
        height: 250px;
    }
}

@media (min-width: 1200px) {
    .p-card__images {
        height: 281px;
    }

    .p-card__btn-count,
    .p-card__btn-icon,
    .p-card .counter {
        max-width: 150px;
    }

    .p-card__title {
        font-size: 20px;
        line-height: 24px;
    }
}
