/* Approved framed catalogue: neutral at rest; brand colour only on hover/focus. */
#products {
    --vk-card-surface: #fff;
    --vk-card-line: #cdd5e0;
    --vk-card-ink: #171922;
    --vk-card-muted: #626b78;
    --vk-card-saving: #197348;
    --vk-card-gradient: linear-gradient(110deg, #4f63f6, #8160c2 52%, #c23a8e);
}
html[data-vk-theme="dark"] #products, body.mc-dark #products {
    --vk-card-surface: #1a1f27;
    --vk-card-line: #48515f;
    --vk-card-ink: #f3f4f8;
    --vk-card-muted: #b1bac9;
    --vk-card-saving: #86dfb2;
}
#products.products.product-layout-grid:not(.owl-carousel) {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin: 0;
    padding: 0;
}
#products.products.product-layout-grid.columns-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#products.products.product-layout-grid.columns-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#products.products.product-layout-grid::before, #products.products.product-layout-grid::after { display: none; }
#products.products > li.product-item.vk-catalog-card {
    float: none; clear: none; width: auto; min-width: 0; margin: 0; padding: 0; border: 0;
}
#products .product-item.vk-catalog-card figure.product-inner {
    position: relative; display: flex !important; flex-direction: column;
    box-sizing: border-box; height: 100% !important; margin: 0; padding: 18px;
    border: 1.5px solid var(--vk-card-line); border-radius: 12px;
    background: var(--vk-card-surface) !important; color: var(--vk-card-ink);
    box-shadow: 0 6px 16px rgb(0 0 0 / 5%) !important;
    transform: none !important; transition: none;
}
#products .product-item.vk-catalog-card figure.product-inner::after { display: none; }
#products .product-item.vk-catalog-card figure.product-inner::before {
    content: ''; position: absolute; inset: -1.5px; z-index: 3; pointer-events: none;
    border: 1.5px solid transparent; border-radius: inherit;
    background: var(--vk-card-gradient) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude;
    opacity: 0; transition: opacity 180ms ease;
}
@media (hover: hover) and (pointer: fine) {
    #products .product-item.vk-catalog-card:hover figure.product-inner::before { opacity: 1; }
}
#products .product-item.vk-catalog-card figure.product-inner:has(:focus-visible)::before { opacity: 1; }
#products .vk-catalog-card .image-container { min-width: 0; width: 100%; margin: 0 0 16px; border-radius: 5px; }
#products .vk-catalog-card .product_thumbnail_wrapper { aspect-ratio: 1; border-radius: 5px; overflow: hidden; background: #ededee; }
#products .vk-catalog-card .product_thumbnail { height: 100%; padding: 0; }
#products .vk-catalog-card .product_thumbnail img {
    display: block; width: 100% !important; height: 100% !important; max-height: none;
    object-fit: contain; transform: none !important;
}
#products .vk-catalog-card .product_thumbnail_background { background-size: contain; background-position: center; background-repeat: no-repeat; }
html[data-vk-theme="dark"] #products .vk-catalog-card :is(.product_thumbnail img, .product_thumbnail_background) { filter: none !important; }
#products .vk-catalog-card .quick-view-button {
    display: flex; align-items: center; justify-content: center;
    top: 10px; right: 10px; bottom: auto; left: auto; margin: 0; transform: none;
    width: 36px; height: 36px; min-width: 36px; min-height: 36px; padding: 0; opacity: 1;
    border: 0; border-radius: 5px; background: #fff; color: #333;
}
#products .vk-catalog-card__content {
    display: flex; flex: 1; flex-direction: column; min-width: 0;
    height: auto !important; overflow: visible; margin: 0 !important; padding: 0;
    border: 0 !important; background: transparent !important;
}
#products .vk-catalog-card__category { margin-bottom: 8px; }
#products .vk-catalog-card__category :is(p, a) {
    margin: 0; color: var(--vk-card-muted) !important; font-size: 11px; line-height: 1.4; font-weight: 400; letter-spacing: .04em;
}
#products .vk-catalog-card__title {
    margin: 0 0 18px; min-width: 0; font-size: 18px !important; line-height: 1.35 !important; font-weight: 600;
}
#products .vk-catalog-card__title a { color: var(--vk-card-ink) !important; overflow-wrap: anywhere; }
#products .vk-catalog-card .product_after_shop_loop_price {
    height: auto !important; max-height: none; overflow: visible; transform: none !important;
    border: 0; padding: 0; margin: auto 0 16px;
}
#products .vk-catalog-card .product_after_shop_loop_price > .price {
    display: block; float: none; max-width: 100%; margin: 0; color: var(--vk-card-ink) !important;
    font-size: 25px; font-weight: 650; line-height: 1.3;
}
#products .vk-catalog-card .price > .woocommerce-price-suffix { display: block; margin-top: 5px; color: var(--vk-card-muted); font-size: 12px; font-weight: 400; }
#products .vk-catalog-card .vkpe-sale-price {
    display: grid !important; grid-template-areas: 'current' 'suffix' 'reference' 'saving';
    gap: 5px; width: 100%;
}
#products .vk-catalog-card .vkpe-sale-price__current { grid-area: current; }
#products .vk-catalog-card .vkpe-sale-price__suffix { grid-area: suffix; }
#products .vk-catalog-card .vkpe-sale-price__reference { grid-area: reference; align-items: baseline; margin-top: 4px; padding-top: 7px; border-top: 1px solid var(--vk-card-line); width: 100%; }
#products .vk-catalog-card .vkpe-sale-price .vkpe-sale-price__current,
#products .vk-catalog-card .vkpe-sale-price .vkpe-sale-price__current :is(span, bdi) {
    color: var(--vk-card-ink) !important; font-size: 28px !important; font-weight: 650 !important; line-height: 1.25 !important;
}
#products .vk-catalog-card .vkpe-sale-price .vkpe-sale-price__reference,
#products .vk-catalog-card .vkpe-sale-price .vkpe-sale-price__reference :is(span, bdi) {
    color: var(--vk-card-muted) !important; font-size: 12px !important; font-weight: 400 !important; text-decoration: none !important;
}
#products .vk-catalog-card .vkpe-sale-price .vkpe-sale-price__suffix,
#products .vk-catalog-card .vkpe-sale-price .vkpe-sale-price__suffix :is(span, bdi, small) {
    color: var(--vk-card-muted) !important; font-size: 12px !important; font-weight: 400 !important;
}
#products .vk-catalog-card .vkpe-sale-price .vkpe-sale-price__saving,
#products .vk-catalog-card .vkpe-sale-price .vkpe-sale-price__saving :is(span, bdi) {
    color: var(--vk-card-saving) !important; font-size: 12px !important; font-weight: 500 !important;
}
#products .vk-catalog-card .vkpe-sale-price__saving { grid-area: saving; justify-self: start; margin: 0; padding: 0; background: transparent; }
#products .vk-catalog-card .product_after_shop_loop_buttons {
    display: flex; flex-wrap: wrap; gap: 8px; height: auto !important; overflow: visible; padding: 0; margin: 0;
}
#products .vk-catalog-card .product_after_shop_loop_buttons :is(.button, .added_to_cart) {
    display: inline-flex; flex: 1 1 auto; align-items: center; justify-content: center; gap: 9px;
    box-sizing: border-box; float: none !important; max-width: 100%; width: 100%; height: auto; min-height: 44px;
    margin: 0 !important; padding: 11px 12px !important; border: 0 !important; border-radius: 5px !important;
    background: var(--vk-card-gradient) !important; color: #fff !important;
    font-family: inherit; font-size: 13px !important; font-weight: 500; line-height: 1.4 !important;
    text-transform: none; letter-spacing: 0; white-space: normal; text-align: center;
}
#products .vk-catalog-card .product_after_shop_loop_buttons .button::before {
    content: ''; flex: 0 0 18px; width: 18px; height: 21px; background: currentColor;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 26'%3E%3Cpath d='M3 8h18v16H3zM8 9V6a4 4 0 018 0v3' fill='none' stroke='black' stroke-width='1.6' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
#products .vk-catalog-card .product_after_shop_loop_buttons .button:hover { filter: brightness(1.08); }
#products .vk-catalog-card :is(a, button):focus-visible { outline: 2px solid #8160c2; outline-offset: 3px; }
#products .vk-catalog-card__services { display: flex; align-items: start; justify-content: center; flex-wrap: wrap; gap: 0; margin-top: 12px; }
#products .vk-catalog-service {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px; flex: 1 1 0;
    min-width: 0; min-height: 36px; padding: 4px; color: var(--vk-card-muted) !important;
    font-size: 12px; line-height: 1.4; text-align: center; text-decoration: none;
}
#products .vk-catalog-service + .vk-catalog-service { border-left: 1px solid var(--vk-card-line); }
#products .vk-catalog-service svg { flex: 0 0 17px; width: 17px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
#products .vk-catalog-service:hover { color: var(--vk-card-ink) !important; }
#products .vk-catalog-service[aria-busy="true"] { opacity: .6; }
#products .vk-catalog-card__status { flex-basis: 100%; color: var(--vk-card-muted); font-size: 12px; }
#products .vk-catalog-card__status:empty { display: none; }
#products .vk-catalog-card__list-details { display: none; }
#products .product-item.vkpe-has-native-sale-badge .onsale { display: none !important; }
#products .vk-catalog-card .vkpe-mfg-badges--loop { top: 28px; left: 28px; max-width: calc(100% - 94px); }
#products .vk-catalog-card .vkpe-mfg-badge__label { font-size: 11px; }
#products .vk-catalog-card .vkpe-mfg-badge__amount { font-size: 17px; }

/* Align category, title, complete price, cart and service rows across each grid row. */
@supports (grid-template-rows: subgrid) {
    #products.products.product-layout-grid:not(.owl-carousel) > .vk-catalog-card {
        display: grid; grid-row: span 6; grid-template-rows: subgrid;
    }
    #products.product-layout-grid .vk-catalog-card figure.product-inner {
        display: grid !important; grid-row: span 6; grid-template-rows: subgrid; row-gap: 0;
    }
    #products.product-layout-grid .vk-catalog-card__content { display: contents; }
    #products.product-layout-grid .vk-catalog-card .image-container { grid-row: 1; }
    #products.product-layout-grid .vk-catalog-card__category { grid-row: 2; }
    #products.product-layout-grid .vk-catalog-card__title { grid-row: 3; }
    #products.product-layout-grid .vk-catalog-card .product_after_shop_loop_price { grid-row: 4; margin-top: 0; }
    #products.product-layout-grid .vk-catalog-card .product_after_shop_loop_buttons { grid-row: 5; align-self: end; }
    #products.product-layout-grid .vk-catalog-card__services { grid-row: 6; align-self: start; }
}
#products.product-layout-list .vk-catalog-card { margin-bottom: 18px !important; }
#products.product-layout-list .vk-catalog-card figure.product-inner { display: grid !important; grid-template-columns: minmax(180px, 30%) minmax(0, 1fr); gap: 24px; }
#products.product-layout-list .vk-catalog-card .image-container { align-self: start; }
#products.product-layout-list .vk-catalog-card__content { display: flex; }
#products.product-layout-list .vk-catalog-card .product_after_shop_loop_price { margin-top: 0; }
#products.product-layout-list .vk-catalog-card__list-details { display: block; margin-top: 12px; }
@media (max-width: 1200px) {
    #products.products.product-layout-grid:not(.owl-carousel) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 990px) {
    #products.products.product-layout-grid:not(.owl-carousel) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
    #products .product-item.vk-catalog-card figure.product-inner { padding: 13px; }
    #products .vk-catalog-card__title { font-size: 16px !important; }
    #products .vk-catalog-card .vkpe-sale-price .vkpe-sale-price__current,
    #products .vk-catalog-card .vkpe-sale-price .vkpe-sale-price__current :is(span, bdi) { font-size: 23px !important; }
    #products .vk-catalog-service { min-height: 44px; }
    #products .vk-catalog-service svg { display: none; }
    #products .vk-catalog-card .quick-view-button { width: 44px; height: 44px; }
    #products.product-layout-list .vk-catalog-card figure.product-inner { grid-template-columns: 1fr; }
    #products .vk-catalog-card .vkpe-mfg-badges--loop { top: 23px; left: 23px; max-width: calc(100% - 46px); }
}
@media (max-width: 400px) {
    #products.products.product-layout-grid:not(.owl-carousel) { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
    #products .product-item.vk-catalog-card figure.product-inner::before { transition: none; }
}

