/* Catalog media: product thumbs, category/brand chips, lazyload fallbacks */

:root {
    --catalog-card-shadow: 0 2px 10px rgba(0, 0, 0, 0.07), 0 1px 3px rgba(0, 0, 0, 0.04);
    --catalog-card-shadow-hover: 0 8px 20px rgba(0, 0, 0, 0.1), 0 2px 6px rgba(0, 0, 0, 0.05);
}

/* --- Category & brand chips (.topcategory / .top-f-filter) --- */
.horizontalscroll:has(.topcategory) {
    padding-top: 12px;
    padding-bottom: 16px;
    margin-top: -4px;
    overflow-y: visible;
}

.horizontalscroll .topcategory {
    display: inline-block;
    float: none !important;
    flex: 0 0 200px;
    width: 200px;
    max-width: 200px;
    min-width: 168px;
    padding: 0 8px 10px;
    white-space: normal;
    vertical-align: top;
    box-sizing: border-box;
}

.topcategory .top-f-filter {
    margin-bottom: 0;
    background: #fff;
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.09);
    box-shadow: var(--catalog-card-shadow);
    overflow: hidden;
    transition:
        transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
        border-color 0.3s ease,
        box-shadow 0.3s ease;
}

.topcategory:hover .top-f-filter,
.topcategory .top-f-filter:focus-within {
    transform: translateY(-3px);
    border-color: rgba(94, 157, 244, 0.35);
    box-shadow: var(--catalog-card-shadow-hover);
}

.topcategory .top-f-filter a {
    display: block;
    width: 100%;
    padding: 0;
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

.topcategory .top-f-filter a:hover,
.topcategory .top-f-filter a:focus {
    text-decoration: none;
    box-shadow: none;
    outline: none;
}

.topcategory .top-f-filter a img {
    display: block;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
    margin: 0;
    object-fit: cover;
    object-position: center;
    border-radius: 0;
    background: linear-gradient(145deg, #f4f4f4 0%, #e8e8e8 100%);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.topcategory:hover .top-f-filter a img {
    transform: scale(1.05);
}

.topcategory .top-f-filter a h4 {
    margin: 0;
    padding: 11px 10px 12px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: #2a2a2a;
    border-top: 1px solid #f0f0f0;
    background: linear-gradient(180deg, #fafafa 0%, #fff 100%);
    text-align: center;
    min-height: 2.8em;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease, background 0.2s ease;
}

.topcategory:hover .top-f-filter a h4 {
    color: #111;
    background: #fff;
}

body.page-search .topcategory .top-f-filter a img.lazyload,
body.page-browse .topcategory .top-f-filter a img.lazyload {
    opacity: 0;
}

body.page-search .topcategory .top-f-filter a img.lazyloading,
body.page-search .topcategory .top-f-filter a img.lazyloaded,
body.page-browse .topcategory .top-f-filter a img.lazyloading,
body.page-browse .topcategory .top-f-filter a img.lazyloaded {
    opacity: 1;
    transition: opacity 0.25s ease;
}

@media (max-width: 767px) {
    .horizontalscroll .topcategory {
        flex: 0 0 148px;
        width: 148px;
        max-width: 148px;
        min-width: 132px;
    }

    .topcategory .top-f-filter a h4 {
        font-size: 12px;
        padding: 9px 6px 10px;
        min-height: 2.6em;
    }
}

/* --- Product grid cards (.product-vp) --- */
.product-vp {
    margin-bottom: 20px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.09);
    box-shadow: var(--catalog-card-shadow);
    transition:
        transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
        border-color 0.3s ease,
        box-shadow 0.3s ease;
}

.product-vp:hover,
.product-vp:focus-within {
    transform: translateY(-3px);
    border-color: rgba(94, 157, 244, 0.32);
    box-shadow: var(--catalog-card-shadow-hover);
}

/* Grid column spacing so card shadows are not clipped */
.row.m-t-10.rtl-on-m > [class*="col-"],
.grid-pro-m > [class*="col-"] {
    padding-left: 8px;
    padding-right: 8px;
    margin-bottom: 4px;
}

/* Image link only (title link is inside .pvp-text) */
.product-vp > a:has(> img) {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 14px 14px 0 0;
    background: linear-gradient(145deg, #f4f4f4 0%, #ebebeb 100%);
}

.product-vp > a img,
.product-vp > a:first-of-type img {
    aspect-ratio: 1 / 1;
    object-fit: cover;
    object-position: center;
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: 0;
    transform: scale(1);
    transition:
        transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.25s ease;
}

.product-vp:hover > a img,
.product-vp:focus-within > a img,
.product-vp > a:hover img {
    transform: scale(1.1);
}

/* Carousels: image zoom only (no card lift — Owl clip + parent transform hid the effect) */
.owl-carousel .product-vp:hover,
.owl-carousel .product-vp:focus-within,
.carousel2 .product-vp:hover,
.carousel2 .product-vp:focus-within {
    transform: none;
}

.owl-carousel .product-vp:hover > a img,
.carousel2 .product-vp:hover > a img,
.grid-pro-m .product-vp:hover > a img {
    transform: scale(1.1);
}

/* Owl carousels: equal card height in each row */
.owl-carousel .owl-item {
    display: flex;
    align-items: stretch;
}

.owl-carousel .owl-item .product-vp {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
}

.owl-carousel .product-vp .pvp-text {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

.product-vp .pvp-text {
    padding: 11px 12px 14px;
    background: #fff;
    border-radius: 0 0 14px 14px;
}

.product-vp .pvp-text > a {
    display: block;
    text-decoration: none;
    overflow: hidden;
    margin: 0 0 10px;
}

.product-vp .pvp-text .productname {
    --product-title-lh: 1.45;
    --product-title-lines: 2;
    font-size: 13px;
    font-weight: 600;
    line-height: var(--product-title-lh);
    color: #2a2a2a;
    padding: 0;
    margin: 0;
    min-height: calc(var(--product-title-lines) * var(--product-title-lh) * 1em);
    max-height: calc(var(--product-title-lines) * var(--product-title-lh) * 1em);
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: var(--product-title-lines);
    line-clamp: var(--product-title-lines);
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: right;
    transition: color 0.2s ease;
}

.product-vp:hover .pvp-text .productname {
    color: #111;
}

.product-vp .pvp-text .productprice {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
    margin-top: 0;
    min-height: 0;
    max-height: none;
    padding: 0;
    line-height: 1.5;
    text-align: right;
    float: none !important;
}

.product-vp .pvp-text .productprice d {
    font-size: 11px;
    font-weight: 500;
    color: #666;
}

.product-vp .pvp-text del {
    float: none;
    display: block;
    font-size: 11px;
    margin-bottom: 4px;
    text-align: right;
}

.product-vp .pvp-text .pricebadge {
    float: none;
    display: inline-block;
    margin: 0 0 6px 0;
    border-radius: 6px;
    font-weight: 600;
}

.product-vp > a img.lazyload,
.product-vp > a img.lazyloading,
.product-vp > a img[data-src] {
    background-color: #ececec;
}

.product-vp > a img.lazyload {
    opacity: 0;
}

.product-vp > a img.lazyloading,
.product-vp > a img.lazyloaded {
    opacity: 1;
    transition:
        transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.25s ease;
}

img.img-fallback {
    background-color: #ececec;
    object-fit: contain;
    object-position: center;
}

.topcategory .top-f-filter a img.img-fallback,
.productscategoryfilters img.img-fallback {
    object-fit: cover;
}