/* Femmelux — Ecommerce Categories "compact-grid" (Popular By Categories) */
.fx-cat-section {
    --fx-cat-accent: #fd4b6b;
    --fx-cat-heading: #101010;
    --fx-cat-body: #6b6b6b;
    --fx-cat-border: #ececec;
    padding: 30px 0;
    background-color: transparent;
}

.fx-cat-section * {
    box-sizing: border-box;
}

/* Section header */
.fx-cat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 28px;
}

.fx-cat-head__pre {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--fx-cat-accent);
}

.fx-cat-head__heading {
    margin: 0;
    font-size: 28px;
    line-height: 1.2;
    font-weight: 700;
    color: var(--fx-cat-heading);
}

.fx-cat-viewall {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 40px;
    padding: 0 20px;
    border-radius: 6px;
    background: var(--fx-cat-button-bg, #f4f1f6);
    color: var(--fx-cat-heading);
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.fx-cat-viewall svg {
    width: 15px;
    height: 15px;
}

.fx-cat-viewall:hover {
    background: var(--fx-cat-accent);
    color: #fff;
    transform: translateY(-2px);
}

/* Outer curved box. The large top-right radius is the sample's cut corner. */
.fx-cat-box {
    border-radius: 24px;
    padding: 28px;
}

@media (min-width: 1200px) {
    .fx-cat-box {
        border-radius: 24px 88px 24px 24px;
    }
}

@media (max-width: 991px) {
    .fx-cat-box {
        padding: 20px;
    }
}

@media (max-width: 767px) {
    .fx-cat-box {
        padding: 16px;
        border-radius: 16px;
    }
}

/* Category card */
.fx-cat-card {
    position: relative;
    display: flex;
    height: 100%;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--fx-cat-border);
    border-radius: 16px;
    transition: all 0.35s ease;
}

.fx-cat-card:hover {
    border-color: rgba(253, 75, 107, 0.35);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
}

.fx-cat-card__content {
    flex-basis: 65%;
    padding: 22px 0 22px 22px;
}

.fx-cat-card__title {
    margin: 0 0 14px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.1;
}

.fx-cat-card__title a {
    color: var(--fx-cat-heading);
    text-decoration: none;
    transition: color 0.3s ease;
}

.fx-cat-card__title a:hover {
    color: var(--fx-cat-accent);
}

.fx-cat-card__links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.fx-cat-card__links li {
    font-size: 14px;
    line-height: 1.1;
    color: var(--fx-cat-body);
}

.fx-cat-card__links li a {
    position: relative;
    color: var(--fx-cat-body);
    text-decoration: none;
    transition: color 0.3s ease;
}

.fx-cat-card__links li a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100%;
    height: 1px;
    background-color: currentColor;
    transform: scaleX(0);
    transform-origin: right bottom;
    transition: transform 0.3s ease;
}

.fx-cat-card__links li a:hover {
    color: var(--fx-cat-accent);
}

.fx-cat-card__links li a:hover::after {
    transform: scaleX(1);
    transform-origin: left bottom;
}

/* Image + arrow */
.fx-cat-card__thumb {
    position: relative;
    flex-basis: 35%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
}

.fx-cat-card__media {
    display: inline-flex;
    overflow: hidden;
    border: 1px solid var(--fx-cat-border);
    border-radius: 10px;
    background: #fff;
}

.fx-cat-card__cover,
.fx-cat-card__badge {
    display: none;
}

.fx-cat-card__thumb img {
    max-width: 93px;
    height: auto;
    object-fit: contain;
    transition: transform 0.35s ease;
}

.fx-cat-card:hover .fx-cat-card__thumb img {
    transform: scale(1.05);
}

.fx-cat-arrow {
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 50%;
    background: var(--fx-cat-button-bg, #fff);
    border: 1px solid var(--fx-cat-border);
    color: var(--fx-cat-accent);
    transition: all 0.35s ease;
}

.fx-cat-arrow__icon {
    position: absolute;
    display: inline-flex;
    transition: transform 0.4s ease;
}

.fx-cat-arrow__icon svg {
    width: 15px;
    height: 15px;
}

.fx-cat-arrow__icon--bottom {
    transform: translate(-180%, 180%);
}

.fx-cat-card:hover .fx-cat-arrow {
    background: var(--fx-cat-accent);
    border-color: var(--fx-cat-accent);
    color: #fff;
}

.fx-cat-card:hover .fx-cat-arrow__icon {
    transform: translate(180%, -180%);
}

.fx-cat-card:hover .fx-cat-arrow__icon--bottom {
    transform: translate(0, 0);
}

/* Side banner */
.fx-cat-banner {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    padding: 28px 20px 0;
    overflow: hidden;
    text-align: center;
    border-radius: 16px;
    text-decoration: none;
}

.fx-cat-banner--button {
    justify-content: flex-start;
    padding: 32px 24px 24px;
}

.fx-cat-banner--media {
    padding: 0;
    background: transparent;
}

.fx-cat-banner--media .fx-cat-banner__thumb {
    margin: 0;
    height: 100%;
}

.fx-cat-banner--media .fx-cat-banner__thumb a,
.fx-cat-banner--media .fx-cat-banner__thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
}

@media (min-width: 1200px) {
    .fx-cat-layout__banner {
        position: relative;
    }

    .fx-cat-layout__banner > .fx-cat-banner {
        position: absolute;
        inset: 0;
        height: auto;
        min-height: 0;
    }

    .fx-cat-layout__banner .fx-cat-banner__thumb {
        flex: 1 1 auto;
        min-height: 0;
        margin-top: 0;
        overflow: hidden;
    }

    .fx-cat-layout__banner .fx-cat-banner__thumb a,
    .fx-cat-layout__banner .fx-cat-banner__thumb img {
        width: 100%;
        height: 100%;
        max-width: none;
        object-fit: cover;
        object-position: center;
    }

    .fx-cat-banner {
        border-radius: 16px 16px 16px 16px;
    }

    .fx-cat-banner--media .fx-cat-banner__thumb a,
    .fx-cat-banner--media .fx-cat-banner__thumb img {
        border-radius: 16px 16px 16px 16px;
    }
}

.fx-cat-banner__pre {
    margin: 0;
    font-size: 15px;
    color: var(--fx-cat-heading);
}

.fx-cat-banner__title {
    margin: 8px 0 0;
    font-size: 24px;
    line-height: 1.1;
    font-weight: 400;
    color: var(--fx-cat-heading);
}

.fx-cat-banner__title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.fx-cat-banner__title a:hover {
    color: var(--fx-cat-accent);
}

.fx-cat-banner__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 18px;
    height: 44px;
    padding: 0 22px;
    border-radius: 6px;
    background: var(--fx-cat-accent);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.fx-cat-banner__btn svg {
    width: 15px;
    height: 15px;
}

.fx-cat-banner__btn:hover {
    color: #fff;
    filter: brightness(0.95);
    transform: translateY(-2px);
}

.fx-cat-banner__title strong,
.fx-cat-banner__title b {
    font-weight: 700;
}

.fx-cat-banner__sub {
    display: block;
    margin-top: 6px;
    font-size: 22px;
    font-weight: 700;
    color: var(--fx-cat-accent);
}

.fx-cat-banner__thumb {
    margin-top: 14px;
}

.fx-cat-banner__thumb a {
    display: inline-block;
    text-decoration: none;
}

.fx-cat-banner__thumb img {
    max-width: 100%;
    height: auto;
    transition: transform 0.4s ease;
}

.fx-cat-banner:hover .fx-cat-banner__thumb img {
    transform: scale(1.04);
}

/* Responsive */
@media (max-width: 991px) {
    .fx-cat-section {
        padding: 30px 0;
    }

    .fx-cat-head__heading {
        font-size: 24px;
    }
}

@media (max-width: 767.98px) {
    .fx-cat-section .fx-cat-layout .row {
        --bs-gutter-y: 12px;
    }

    .fx-cat-card {
        position: relative;
        flex-direction: column;
        align-items: stretch;
        height: auto;
        padding: 0 16px 16px;
        gap: 14px;
    }

    .fx-cat-card__thumb {
        display: block;
        position: static;
        flex-basis: auto;
        width: 100%;
        order: 1;
        padding: 0;
    }

    .fx-cat-card__media {
        align-self: center;
        margin-top: 16px;
    }

    .fx-cat-card__media.has-cover {
        position: relative;
        display: block;
        width: calc(100% + 32px);
        margin: 0 -16px;
        aspect-ratio: 16 / 10;
        overflow: hidden;
        border: 0;
        border-radius: 15px 15px 0 0;
        background: #f4f4f4;
    }

    .fx-cat-card__media.has-cover .fx-cat-card__photo {
        display: none;
    }

    .fx-cat-card__media.has-cover .fx-cat-card__cover {
        display: block;
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        max-width: none;
        object-fit: cover;
    }

    .fx-cat-card__badge {
        position: absolute;
        top: 10px;
        left: 10px;
        z-index: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 6px;
        background: #fff;
        border: 1px solid var(--fx-cat-border);
        border-radius: 10px;
        line-height: 0;
    }

    .fx-cat-card__badge img {
        width: 44px;
        height: 44px;
        max-width: 44px;
        object-fit: contain;
    }

    .fx-cat-card__content {
        order: 2;
        flex-basis: auto;
        width: 100%;
        min-width: 0;
        padding: 0 46px 0 0;
    }

    .fx-cat-card__title {
        margin-bottom: 8px;
        line-height: 1.3;
        overflow-wrap: anywhere;
    }

    .fx-cat-card__links {
        gap: 6px;
    }

    .fx-cat-card__links li {
        line-height: 1.35;
        overflow-wrap: anywhere;
    }

    .fx-cat-card__photo {
        max-width: 84px;
    }

    .fx-cat-arrow {
        position: absolute;
        top: auto;
        right: 16px;
        bottom: 16px;
        left: auto;
    }
}
