.position-relative {
    position: relative !important;
}


.opacity-0 {
    opacity: 0 !important;

}

/* =========================================
   CORE VARIABLES
========================================= */
:root {
    --gap: 16px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --shadow-sm: 0 5px 12px rgba(0, 0, 0, .15);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, .18);

    --aсcent: #d6a84f;
    --text: #222;
    --muted: #58595b;
    --muted-2: #8b8d90;
    --border: #e5e6ea;
    --bg: #fff;
    --bg-2: #f6f7f9;

    --primary: #1c7ed6;
    --primary-600: #2b8ce0;
    --primary-700: #176bb8;

    --success: #2f9e44;
    --danger: #e03131;

    --skeleton-base: #eceff3;
    --skeleton-highlight: #f7f9fb;

    --fav-size: 30px;
    --fav-expanded: 140px;
    /*--fav-expanded: 140px;*/
    --fav-radius: 5px;
    --fav-border: #ddd;
    --fav-bg: #ededed;
    --fav-fg: #5f6062;
}

/* =========================================
   MINI RESET / UTILITIES
========================================= */
*, *::before, *::after {
    box-sizing: border-box;
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

button {
    font: inherit;
}

a {
    color: inherit;
}

/* Focus ring */
:where(a,button,[tabindex]):focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* =========================================
   GRID (Bootstrap-like, но упрощённо)
========================================= */
/*.row {*/
/*    display: flex;*/
/*    flex-wrap: wrap;*/
/*    margin-inline: calc(-1 * var(--gap) / 2);*/
/*    margin-block: calc(-1 * var(--gap) / 2);*/
/*}*/

/*.col {*/
/*    padding-inline: calc(var(--gap) / 2);*/
/*    padding-block: calc(var(--gap) / 2);*/
/*    width: 100%;*/
/*}*/

/*!* Модификаторы количества колонок *!*/
/*.row-cols-2 .col {*/
/*    width: 50%;*/
/*}*/

/*.row-cols-md-3 .col {*/
/*    width: 33.3333%;*/
/*}*/

/*.row-cols-lg-4 .col {*/
/*    width: 25%;*/
/*}*/

/*!* Breakpoints *!*/
/*@media (max-width: 1024px) {*/
/*    .row-cols-lg-4 .col {*/
/*        width: 33.3333%;*/
/*    }*/
/*}*/

/*@media (max-width: 760px) {*/
/*    .row-cols-md-3 .col, .row-cols-2 .col {*/
/*        width: 50%;*/
/*    }*/
/*}*/

/*@media (max-width: 480px) {*/
/*    .row-cols-2 .col, .row-cols-md-3 .col, .row-cols-lg-4 .col {*/
/*        width: 100%;*/
/*    }*/
/*}*/

/* Контейнер блока (корневой) */
/*.catalog-block {*/
/*}*/

/*!* Внутренняя сетка (селектор из шаблона) *!*/
/*.catalog-items-grid {*/
/*}*/

/* =========================================
   RATIO UTILS (замена .c-ratio/_ratio-80)
========================================= */
.c-ratio {
    position: relative;
    display: block;
    background: #fff;
    border-radius: var(--radius-md);
    overflow: hidden;
}

._ratio-80::before {
    content: "";
    display: block;
    padding-top: 80%; /* 5:4 */
}

.c-ratio > * {
    position: absolute;
    inset: 0;
}

/* Слайды в data-slider — по умолчанию первый виден (JS всё равно управляет) */
[data-slider] [data-slide] {
    position: absolute;
    inset: 0;
    display: none;
}

[data-slider] [data-slide]:first-child {
    display: block;
    opacity: 1;
}

/* =========================================
   PRODUCT CARD
========================================= */

.catalog-items-grid{
    --cols: 4;
    display: grid;
    grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
    gap: 15px;
    margin: 0;
    padding: 0;
}

.product-card{ width: 100%; }


@media (max-width: 1100px){ .catalog-items-grid{ --cols: 3; } }
@media (max-width: 850px) { .catalog-items-grid{ --cols: 2; } }
@media (max-width: 520px) { .catalog-items-grid{ --cols: 1; } }

.catalog-items-grid.grid__3{ --cols: 3; }

/*.catalog-items-grid{*/
/*    display: flex;*/
/*    flex-wrap: wrap;*/
/*    gap: 15px;*/
/*    margin: 0;*/
/*    padding: 0;*/
/*}*/

.product-card {
    /*position: relative;*/
    /*display: flex;*/
    /*flex-direction: column;*/
    /*justify-content: space-between;*/
    /*min-height: 100%;*/
    padding: 33px 10px 18px;
    /*border: 1px solid var(--border);*/
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    background: var(--bg);
    transition: box-shadow .25s ease, transform .2s ease;

    flex: 0 0 calc(25% - 15px);
}

.product-card:hover {
    box-shadow: var(--shadow-sm);
}
/*@media screen and (max-width: 1100px) {*/
/*    .product-card {*/
/*        flex: 0 0 31.50% !important*/
/*    }*/
/*}*/
/*@media screen and (max-width: 850px) {*/
/*    .product-card {*/
/*        flex: 0 0 47% !important*/
/*    }*/
/*}*/
/*@media screen and (max-width: 520px) {*/
/*    .product-card {*/
/*        flex: 1 1 100% !important;*/
/*    }*/
/*}*/

.product-card .property-vendor {
    font-weight: 300;
    /*font-size: .9em;*/
    text-transform: uppercase;
    text-align: center;
    /*color: var(--muted-2);*/
    color: var(--muted);
    margin-bottom: 0.5em;
    margin-left: auto;
    margin-right: auto;

    font-size: 13.5px;
    transition: color .3s ease;
}

.product-card:hover .property-vendor {
    color: #000;
}

.product-card .property-vendor.loading {


}

.text-center {
    text-align: center !important;
}

/* PLACEHOLDER vendor */

.product-card .property-vendor {
}

.product-card.is-loading .placeholder-slider [data-skel] {
    height: 100%;
    width: 100%;
    position: absolute !important;
}

.product-card .property-name {
    margin-top: .75em;

    text-align: center;
    margin-left: auto;
    margin-right: auto;
    display: block;

}

/*.product-card:not(.is-loading) .property-name,*/
/*.product-card:not(.is-loading) .property-factory*/
/*{*/
/*    width: 100%;*/
/*}*/

/*.product-card:not(.is-loading) .property-name,*/
/*.product-card:not(.is-loading) .property-factory*/
/*{*/
/*    width: 100%;*/
/*}*/

.product-card .property-name,
.product-card .property-factory
{
    width: 100%;
}


.product-card .property-name a {
    color: var(--muted);
    font-size: .95em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
}

.product-card .property-name a:hover {
    color: var(--muted);
    /*text-decoration: underline;*/
}

.product-card .property-factory {
    color: var(--muted);
    line-height: 1.4;
    /*font-size: 1.05em;*/
    font-size: 13.5px;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    display: block;
    font-size: 22px !important;
}
.product-card [data-card-prices] {
    text-align: center;
}
.product-card [data-card-prices] > * {
    text-align: center;
    margin-left: auto !important;
    margin-right: auto !important;
    display: block;
}

/* Цены */
.product-card .prices {
    margin-top: .5em;
}

.product-card .price {
    /*font-weight: 600;*/
    font-size: 18px;
    /*font-size: 1.1em;*/
    color: #000;
    margin-right: 8px;
    white-space: nowrap;
}

.product-card:not(.is-loading) .price:not(.price-old) {
/*.product-card:not(.is-loading) .price {*/
    width: 100% !important;
}

.product-card .price-old {
    display: inline-block;
    font-size: .95em;
    position: relative;
    /*color: #8c8f93;*/
    color: #000;
}

.product-card .price-old::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    /*top: 50%;*/
    top: 45%;
    transform: translateY(-50%);
    height: 2px;
    background: var(--danger);
    opacity: .3;
}

/* Hover эффекты изображений — мягкие */
.product-card:hover [data-slider] img {
    transition: transform .25s ease;
    transform: scale3d(1.04, 1.04, 1.04);
}

/* =========================================
   RIBBONS (ленты)
========================================= */
.ribbon {
    position: absolute;
    z-index: 13;
}

.ribbon.ribbon-top,
.ribbon.ribbon-top.js-ribbon-card {
    width: 120px;
    top: -9px !important;
    left: 50%;
    transform: translateX(-50%);
}


.ribbon.ribbon-left, .ribbon.ribbon-top-left {
    /*top: 12px;*/
    /*left: 12px;*/
    /*background: var(--danger);*/
    /*color: #fff;*/
    /*border-radius: 100px;*/

    width: 60px;
    height: 60px;
    left: -1px !important;
    top: -1px !important;
    overflow: hidden;
    padding: 4px 10px;
    font-size: 12px;
    line-height: 1;
}

/* NEW ribbon "New" — внутренняя тень + text-shadow */
.ribbon.ribbon-left span,
.ribbon.ribbon-top-left span {
    width: 111px;
    padding: 0;
    background-color: #3d5896;
    color: #fff;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    right: -18px;
    top: 10px;
    line-height: 23px;

    -webkit-transform: rotate(-45deg);
    transform: rotate(-45deg);

    /*background-image: linear-gradient( to bottom, rgba(0,0,0,.08), rgba(0,0,0,.01) );*/
    /*box-shadow:*/
    /*        inset 0 -6px 12px rgba(0,0,0,.18),*/
    /*        inset 0  1px  0 rgba(0,0,0,.25);*/

    /* тень текста вниз-вправо (одно направление) */
    text-shadow: 0 .5px 0 rgba(0, 0, 0, .25);


    /* мелкие улучшения */
    will-change: transform;
    -webkit-font-smoothing: antialiased;
    border-radius: 4px; /* чуть скруглить — ближе к скидке */
}

/* =========================================
   STRETCHED LINK (растяжка по карточке)
========================================= */
.stretched-link {
    position: relative;
    text-decoration: none;
}

.stretched-link::after {
    content: "";
    position: absolute;
    inset: 0;
}

/* =========================================
   FAVORITE BUTTON (твой, слегка полирнул)
========================================= */
.btn-favorite {
    position: absolute;
    z-index: 10;
    /*top: 10px;*/
    left: 10px;
    bottom: 10px;
    inline-size: var(--fav-size);
    block-size: var(--fav-size);
    display: flex;
    align-items: center;
    padding: 0 4px;
    gap: 4px;

    border: 1px solid var(--fav-border);
    border-radius: var(--fav-radius);
    background: var(--fav-bg);
    color: var(--fav-fg);
    overflow: hidden;
    cursor: pointer;

    opacity: 0;
    transition: inline-size .3s ease, opacity .2s ease;
}

.product-card:hover .btn-favorite {
    opacity: 1;
}

.btn-favorite i {
    flex: 0 0 18px;
    inline-size: 18px;
    block-size: 18px;
    background: center/contain no-repeat url(/local/templates/vabi-alex/svg/heart-gray.svg);
    opacity: .7;
    pointer-events: none;
}

.btn-favorite.active i {
    background-image: url(/local/templates/vabi-alex/svg/heart-fill-red.svg);
    opacity: 1;
}

.btn-favorite span {
    font-size: 12px;
    font-weight: 400;
    padding: 0 4px 0 1em;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    opacity: 0;
    position: relative;
    right: -20px;
    text-transform: lowercase;
    color: #5f6062;

    transition: opacity .3s ease-in .2s, right .4s ease-out .1s;
}

.btn-favorite:hover {
    inline-size: var(--fav-expanded);
    border: 1px solid var(--fav-border);
    /*border-radius: var(--fav-radius);*/
    background: var(--fav-bg);
}

.btn-favorite:hover span {
    opacity: 1;
    right: 0;
    /*color:*/
}

.btn-favorite:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.btn-favorite.active {}

@media (prefers-reduced-motion: reduce) {
    .btn-favorite, .btn-favorite span {
        transition: none;
    }
}

/* =========================================
   CTA BUTTON (одна кнопка со слоями)
   .btn-cta содержит два слоя:
   - .cta__stock  — «В наличии»/«Под заказ»
   - .cta__view   — «Посмотреть» (на hover)
========================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text);
    cursor: pointer;
    transition: background .2s ease, color .2s ease, border-color .2s ease, transform .05s ease;
}

.btn:active {
    transform: translateY(1px);
}

.btn-outline-primary {
    color: var(--primary);
    background: transparent;
    border-color: var(--primary);
}

.btn-outline-primary:hover {
    color: #fff;
    background: var(--primary);
    border-color: var(--primary);
}

.btn-cta {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    overflow: hidden;
}


.product-card:hover .btn-cta {
    background: var(--aсcent);
    border-color: var(--aсcent);
    color: #fff;
}

.btn-cta .cta__stock,
.btn-cta .cta__view {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    transition: opacity .2s ease;
}

.btn-cta .cta__stock {
    opacity: 1;
}

.btn-cta .cta__view {
    opacity: 0;
    pointer-events: none;
}

.product-card:hover .btn-cta .cta__stock {
    opacity: 0;
}

.product-card:hover .btn-cta .cta__view {
    opacity: 1;
}

._green-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;

    margin-right: 6px;
}

._green-dot svg {
    width: 100%;
    height: 100%;
    fill: var(--success);
}

.btn-cta.is-exist {
    border-color: #d9efdf;
    background: #f4fbf6;
}

.btn-cta.is-added {
    border-color: #cbe4ff;
    background: #f2f8ff;
}


.product-card {

}


/* =========================================
   PLACEHOLDERS / SKELETONS
========================================= */
.product-card--skeleton {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg);
    padding: 16px 10px 18px;
}

.skeleton {
    position: relative;
    overflow: hidden;
    background: var(--skeleton-base);
    border-radius: 8px;
}

.skeleton::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, var(--skeleton-highlight), transparent);
    animation: shimmer 1.2s infinite;
}

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}

/* Формы скелетонов */
.skeleton-ratio {
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
}

.skeleton-ratio::before {
    content: "";
    display: block;
    padding-top: 80%;
}

.skeleton-line {
    height: 12px;
}

.skeleton-price {
    width: 120px;
    height: 16px;
}

.skeleton-btn {
    width: 100%;
    height: 42px;
    border-radius: var(--radius-sm);
}

@media (prefers-reduced-motion: reduce) {
    .skeleton::after {
        animation: none;
    }
}

/* =========================================
   PAGINATION AREA (кнопка «Показать ещё»)
========================================= */
[data-more] {
    display: flex;
    justify-content: center;
    margin-top: 16px;
}

[data-role="load-more"].is-loading {
    pointer-events: none;
    opacity: .7;
}

/* =========================================
   MISC
========================================= */

.shadow-sm {
    box-shadow: var(--shadow-sm);
}

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


.text-muted {
    color: var(--muted);
}

.small {
    font-size: .875em;
}


.btn-favorite * {
    pointer-events: none;
}

.btn-favorite {
    pointer-events: auto;
}


[data-has-more="0"] [data-more] {
    display: none;
}

/*[data-card-gallery] {*/
/*    display: block;*/
/*    height: 100%;*/
/*    position: relative;*/
/*}*/


/*[data-card-gallery] [data-slide] {*/
/*    position: absolute;*/
/*    inset: 0;*/
/*}*/

[data-card-gallery] {
    position: relative;
    display: block;
    overflow: hidden;
    height: 100%;
    /*aspect-ratio: 1 / 1; !* или нужный тебе *!*/
}

[data-card-gallery] img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity .25s ease; /* только фейд */
    pointer-events: none; /* чтобы дети не роняли :hover */
    will-change: opacity;
}

[data-card-gallery] img.is-active {
    opacity: 1;
}


/* галерея внутри карточки */
[data-card-gallery]{
    position:relative;
    display:block;
    overflow:hidden;
    height:100%;
    contain: content;            /* важное локальное ограничение области */
    backface-visibility:hidden;
    -webkit-font-smoothing:antialiased;
}

[data-card-gallery] img{
    position:absolute; inset:0;
    width:100%; height:100%;
    object-fit:cover;
    opacity:0;
    /* переход нужен только как fallback/мягкость; GSAP всё равно рулит */
    transition:opacity .18s linear;
    pointer-events:none;
    will-change:opacity;
}

/* первый кадр */
[data-card-gallery] img.is-active{ opacity:1; }

/* необязательный микро-твик: в сетке карточек */
.catalog-items-grid{ contain: layout style; } /* помогает композиту/рефлоу */

.w-max200 {
    max-width: 200px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    display: block;
}

/* ----------------- ================ */
/* NEW */
/* -----------===-=-=-=-=-=-=-=-=-=- */
.product-card.is-loading {
    position: relative;
    cursor: wait;
    box-shadow: none !important;
}
.product-card.is-loading:after {
content: '';
    position: absolute;
    inset: 0;
    z-index: 10;
    border-radius: 8px;
}


.ribbon.ribbon-left span,
.ribbon.ribbon-top-left span {
   /*transition: background .3s ease;*/
   /*transition: background .3s ease, color .3s ease;*/
}
.product-card.is-loading .ribbon.ribbon-left span,
.product-card.is-loading .ribbon.ribbon-top-left span {
    background: var(--skeleton-base);
    color: var(--skeleton-base);
    text-shadow: none;
}


.product-card.is-loading .ribbon.ribbon-top span {
    color: transparent;
}

/*.product-card.is-loading .ribbon.ribbon-top img {*/
/*    !*filter: grayscale(1);*!*/
/*    !*opacity: 0.2;*!*/
/*    display: none;*/
/*}*/

/*.product-card.is-loading .ribbon.ribbon-top span {*/
/*    opacity: 0;*/
/*}*/
.ribbon-top-loading-real {

}
.ribbon-top-loading-placeholder {
    display: none;
}
.product-card.is-loading .ribbon-top-loading-real {
    display: none;
}
.product-card.is-loading .ribbon-top-loading-placeholder {
    display: block;
}



.product-card.is-loading :where([data-skel]) {
    position: relative;
    overflow: hidden;
    border-radius: inherit;
    outline: none !important;
    border-color: transparent !important;
    background-color: transparent !important;

}

.product-card.is-loading :where([data-skel]) > * {
    visibility: hidden;
}

.product-card.is-loading :where([data-skel])::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--skeleton-base);
    z-index: 0;
    border-radius: 8px;
}

.product-card.is-loading :where([data-skel])::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, var(--skeleton-highlight), transparent);
    animation: shimmer 1.2s infinite;
    z-index: 1;

}

:where([data-skel~="inline"]) {
    display: inline-block;
    line-height: 1;
    vertical-align: middle;
}

:where([data-skel~="line"]) {
    min-height: 1em;
    border-radius: 8px;
}

:where([data-skel~="btn"]) {
    min-height: 42px;
    border-radius: var(--radius-sm);
}

:where([data-skel~="media"]) {
    border-radius: var(--radius-md);
}

:where([data-skel~="w-25"]) {
    width: 25%;
}

:where([data-skel~="w-33"]) {
    width: 33.333%;
}

:where([data-skel~="w-50"]) {
    width: 50%;
}

:where([data-skel~="w-66"]) {
    width: 66.666%;
}

:where([data-skel~="w-75"]) {
    width: 75%;
}

:where([data-skel~="w-100"]) {
    width: 100%;
}

/* Motion reduce */
@media (prefers-reduced-motion: reduce) {
    .product-card.is-loading :where([data-skel])::after {
        animation: none;
    }
}

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}