/* Approved floating category rail. Native links/counts stay in one row. */
html[data-vk-theme] #archive-categories,
#archive-categories {
    --vk-category-surface: #fff;
    --vk-category-line: #d2d9e2;
    --vk-category-ink: #242b36;
    --vk-category-muted: #697383;
    --vk-category-gradient: linear-gradient(110deg, #4f63f6, #8160c2 52%, #c23a8e);
    position: relative;
    z-index: 40;
    top: 0;
    margin: -28px 0 32px;
    background: transparent !important;
}
html[data-vk-theme="dark"] #archive-categories {
    --vk-category-surface: #15191f;
    --vk-category-line: #353c47;
    --vk-category-ink: #e9ecf2;
    --vk-category-muted: #9aa3b0;
}
html[data-vk-theme] #archive-categories .category-box,
html[data-vk-theme] #archive-categories .category-box:hover,
#archive-categories .category-box {
    padding: 6px;
    border: 1px solid var(--vk-category-line) !important;
    border-radius: 14px;
    background: var(--vk-category-surface) !important;
    box-shadow: 0 12px 32px rgb(0 0 0 / 20%);
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    html[data-vk-theme] #archive-categories,
    #archive-categories { --vk-category-surface: rgb(255 255 255 / 94%); }
    html[data-vk-theme="dark"] #archive-categories { --vk-category-surface: rgb(18 23 29 / 88%); }
    #archive-categories .category-box { -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
}
#archive-categories .vk-category-anchor { display: block; width: 100%; height: 0; pointer-events: none; }
#archive-categories.is-fixed { min-height: var(--vk-category-slot-height, 78px); }
#archive-categories.is-fixed .category-box {
    position: fixed;
    z-index: 40;
    top: var(--vk-category-top);
    left: var(--vk-category-left);
    width: var(--vk-category-width);
    padding-block: 4px;
}
#archive-categories.is-fixed .list_shop_categories li.category_item > a { min-height: 54px; }
#archive-categories.is-fixed .list_shop_categories .category-item-desc h4 { font-size: 15px !important; }
#archive-categories.is-fixed .list_shop_categories .category-item-desc .cat-count { margin-top: 3px; font-size: 11px; }
#archive-categories .list_shop_categories {
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    min-width: 0;
    margin: 0;
    padding: 0;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-behavior: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--vk-category-line) transparent;
    list-style: none;
    text-align: left;
}
#archive-categories .list_shop_categories::-webkit-scrollbar { height: 4px; }
#archive-categories .list_shop_categories::-webkit-scrollbar-thumb { border-radius: 4px; background: var(--vk-category-line); }
#archive-categories .list_shop_categories::-webkit-scrollbar-track { background: transparent; }
#archive-categories .list_shop_categories li.category_item {
    display: block;
    flex: 1 0 auto;
    float: none;
    width: auto;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0 !important;
    text-align: left;
    transition: none;
}
#archive-categories .list_shop_categories li.category_item > a {
    display: flex;
    float: none;
    width: 100%;
    height: auto;
    min-height: 64px;
    align-items: center;
    padding: 8px 12px;
    border-radius: 6px;
    background: transparent !important;
    opacity: 1 !important;
    filter: none !important;
    text-align: left;
    text-decoration: none;
    transition: none;
}
#archive-categories .list_shop_categories .caterory-thumb { display: none !important; }
#archive-categories .list_shop_categories .category-item-desc { display: block; float: none; }
#archive-categories .list_shop_categories .category-item-desc h4 {
    margin: 0;
    padding: 0;
    color: var(--vk-category-ink) !important;
    font-family: inherit;
    font-size: 16px !important;
    font-weight: 500 !important;
    line-height: 1.35 !important;
    letter-spacing: -.01em;
    white-space: nowrap;
}
#archive-categories .list_shop_categories .category-item-desc .cat-count {
    display: block;
    margin-top: 5px;
    color: var(--vk-category-muted) !important;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.35;
    letter-spacing: 0;
    text-transform: none;
    white-space: nowrap;
    transition: color 160ms ease;
}
#archive-categories .list_shop_categories a:is(:hover, :focus-visible) .cat-count { color: var(--vk-category-ink) !important; }
#archive-categories .list_shop_categories a:focus-visible { outline: 2px solid #7686ff; outline-offset: -2px; }
@supports ((background-clip: text) or (-webkit-background-clip: text)) {
    #archive-categories .list_shop_categories a:is(:hover, :focus-visible) h4 {
        background: var(--vk-category-gradient);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent !important;
        -webkit-text-fill-color: transparent;
    }
}
@media (max-width: 640px) {
    html[data-vk-theme] #archive-categories { margin-top: -20px; margin-bottom: 24px; }
    #archive-categories .list_shop_categories li.category_item { flex: 0 0 auto; }
    #archive-categories .list_shop_categories li.category_item > a { padding-inline: 14px; }
    #archive-categories .list_shop_categories .category-item-desc h4 { font-size: 15px !important; }
}
@media (prefers-reduced-motion: reduce) {
    #archive-categories .list_shop_categories .category-item-desc .cat-count { transition: none; }
}
@media (forced-colors: active) {
    #archive-categories .list_shop_categories a:is(:hover, :focus-visible) h4 { background: none; color: LinkText !important; -webkit-text-fill-color: LinkText; }
}

/* 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)); }
@media (min-width: 1201px) {
    body.home #products.products.product-layout-grid:not(.owl-carousel) { grid-template-columns: repeat(5, 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;
    position: relative; z-index: 0;
}
/* Contain legacy hover layers beneath the floating navigation without clipping cards. */
#products.products:has(> li.product-item.vk-catalog-card) {
    position: relative; isolation: isolate; z-index: 0;
}
#products.products > li.product-item.vk-catalog-card:is(:hover, :focus-within) { z-index: 1; }
#products .product-item.vk-catalog-card figure.product-inner,
#products .product-item.vk-catalog-card figure.product-inner:hover { z-index: 1; }
#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 { position: relative; container: vk-catalog-media / inline-size; 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__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,
#products .vk-catalog-card .vkpe-variable-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; }
/* Every loop badge is bounded by the actual image, including list/carousel cards. */
#products .vk-catalog-card .vkpe-mfg-badges--loop { top: 10px; left: 10px; width: 45%; max-width: 45%; }
#products .vk-catalog-card .vkpe-mfg-badges--loop .vkpe-mfg-badge {
    box-sizing: border-box; width: 100%; min-width: 0; max-width: 100%; min-height: 0;
    padding: clamp(4px, 2cqw, 6px) clamp(5px, 3cqw, 9px) clamp(4px, 2cqw, 6px) clamp(7px, 4cqw, 12px);
}
#products .vk-catalog-card .vkpe-mfg-badges--loop .vkpe-mfg-badge__value { min-width: 0; width: 100%; }
#products .vk-catalog-card .vkpe-mfg-badges--loop .vkpe-mfg-badge::before { inset: 0 auto 0 0; }
#products .vk-catalog-card .vkpe-mfg-badges--loop .vkpe-mfg-badge__label {
    max-width: 100%; font-size: clamp(9px, 5cqw, 11px); overflow-wrap: anywhere;
}
#products .vk-catalog-card .vkpe-mfg-badges--loop .vkpe-mfg-badge__amount { max-width: 100%; font-size: clamp(12px, 7cqw, 17px); }
#products .vk-catalog-card .vkpe-mfg-badges--loop .vkpe-mfg-badge__countdown {
    box-sizing: border-box; flex-wrap: wrap; gap: 2px 4px; padding: 4px 5px 4px 7px;
    font-size: clamp(9px, 5cqw, 11px); white-space: normal; overflow-wrap: anywhere;
}
#products .vk-catalog-card .vkpe-mfg-badges--loop .vkpe-mfg-badge__countdown-icon { font-size: clamp(12px, 7cqw, 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; width: 100% !important; max-width: none !important; }
#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.product-layout-list .vk-catalog-card figure.product-inner { grid-template-columns: 1fr; }
}
@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; }
}

