/* ── Product Categories – card style ───────────────────── */
.kitify-product-categories__item {
    text-align: center;
}

.kitify-product-categories__item--inner {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Image wrapper: clickable, relative for badge */
.kitify-product-categories__item .cat-image-wrap {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    text-decoration: none;
    will-change: transform;
    transition: transform 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.kitify-product-categories__item .cat-image-wrap:hover {
    transform: translateY(-5px);
}

/* Image fills wrapper, maintains aspect ratio */
.kitify-product-categories__item .cat-image {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 4; /* default; overridden by Elementor control */
    object-fit: cover;
    will-change: transform;
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.kitify-product-categories__item .cat-image--placeholder {
    aspect-ratio: 3 / 4;
    background: #f0f0f0;
}

.kitify-product-categories__item .cat-image-wrap:hover .cat-image {
    transform: scale(1.04);
}

/* Count badge – bottom-right corner of image */
.kitify-product-categories__item .cat-count {
    position: absolute;
    bottom: 8px;
    right: 8px;
    min-width: 26px;
    height: 26px;
    padding: 0 7px;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: 100px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: #111;
    line-height: 1;
    z-index: 2;
}

/* Category name */
.kitify-product-categories__item .cat-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: #111;
}

.kitify-product-categories__item .cat-name a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.kitify-product-categories__item .cat-name a:hover {
    color: var(--site-accent-color, #555);
}

/* Inline count next to title */
.kitify-product-categories__item .cat-name-count {
    display: inline-block;
    margin-left: 4px;
    font-size: 0.78em;
    font-weight: 400;
    opacity: 0.6;
    vertical-align: middle;
}

/* Custom source: image-wrap inside cat-image-wrap */
.kitify-product-categories__item .cat-image-wrap .kitify-custom-categories__image-wrap {
    display: block;
    width: 100%;
}

.kitify-product-categories__item .cat-image-wrap .kitify-custom-categories__image {
    display: block;
    margin: 0;
    width: 100%;
    aspect-ratio: 3 / 4; /* default; overridden by Elementor control */
    overflow: hidden;
}

.kitify-product-categories__item .cat-image-wrap .kitify-custom-categories__image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    will-change: transform;
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.kitify-product-categories__item .cat-image-wrap:hover .kitify-custom-categories__image img {
    transform: scale(1.04);
}

/* ── Custom categories (legacy standalone) ──────────────── */
.kitify-custom-categories__item-inner {
    position: relative;
}

.kitify-custom-categories__item-inner .kitify-custom-categories__link {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.kitify-custom-categories__item-inner .kitify-custom-categories__image-wrap {
    position: relative;
    width: 100%;
}

.kitify-custom-categories__item-inner .kitify-custom-categories__content-wrap {
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.kitify-custom-categories__item-inner .kitify-custom-categories__content-wrap .kitify-custom-categories__title {
    font-size: 1.5rem;
    text-transform: uppercase;
    margin-bottom: 0;
}

.kitify-custom-categories__item-inner .kitify-custom-categories__button-wrap {
    display: flex;
    position: absolute;
    flex-direction: column;
    align-items: center;
    bottom: 0;
    width: 100%;
    z-index: 3;
}

.icon-align-right .kitify-custom-categories__button {
    display: flex;
    align-items: center;
}

.icon-align-right .kitify-custom-categories__button .kitify-custom-categories__button-icon {
    order: 2;
}
