/* Hide original OpenCart category heading/image/description block */
#product-category #content > h2,
#product-category #content > h2 + .row,
#product-category #content > h2 + .row + hr {
    display: none !important;
}

/* Category Hero */
.figs-category-hero {
    margin: 14px 0 26px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e4e4e4;
}

.figs-category-hero-main {
    display: grid;
    grid-template-columns: minmax(420px, auto) minmax(0, 1fr);
    gap: 34px;
    align-items: start;
}

.figs-category-hero-heading {
    min-width: 0;
    max-width: none;
}

.figs-category-hero-title {
    margin: 0;
    color: #111;
    font-size: 38px;
    line-height: 1.08;
    font-weight: 800;
    letter-spacing: .4px;
    text-transform: uppercase;
    white-space: normal;
}

.figs-category-hero-accent {
    width: 52px;
    height: 3px;
    margin: 16px 0 0;
    background: #ff6600;
    border-radius: 3px;
}

.figs-category-hero-copy {
    min-width: 0;
    padding-top: 5px;
}

/* Description */
.figs-category-hero-description {
    position: relative;
    max-width: 980px;
    max-height: 50px;
    overflow: hidden;
    color: #444;
    font-size: 15px;
    line-height: 1.55;
}

.figs-category-hero-description p {
    margin: 0 0 8px;
}

.figs-category-hero-description::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 38px;
    z-index: 2;
    pointer-events: none;
    background: linear-gradient(
        to bottom,
        rgba(255,255,255,0) 0%,
        rgba(255,255,255,.75) 55%,
        rgba(255,255,255,1) 100%
    );
}

.figs-category-hero-expanded .figs-category-hero-description {
    max-height: none;
}

.figs-category-hero-expanded .figs-category-hero-description::after {
    display: none;
}

/* Button */
.figs-category-hero-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 8px 14px;
    border: 1px solid #e4e4e4;
    border-radius: 999px;
    background: #fff;
    color: #111;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    transition: all .18s ease;
}

.figs-category-hero-toggle:hover {
    border-color: #ff6600;
    color: #ff6600;
    box-shadow: 0 3px 10px rgba(0,0,0,.05);
}

.figs-category-hero-toggle-icon {
    display: inline-block;
    color: #ff6600;
    transition: transform .18s ease;
}

.figs-category-hero-toggle.active .figs-category-hero-toggle-icon {
    transform: rotate(180deg);
}

/* No button needed */
.figs-category-hero:not(.figs-category-hero-has-toggle) .figs-category-hero-description {
    max-height: none;
}

.figs-category-hero:not(.figs-category-hero-has-toggle) .figs-category-hero-description::after {
    display: none;
}

/* No description */
.figs-category-hero-no-description {
    padding-bottom: 18px;
}

.figs-category-hero-no-description .figs-category-hero-main {
    display: block;
}

.figs-category-hero-no-description .figs-category-hero-accent {
    margin-bottom: 0;
}

/* Stack earlier so long titles never overlap */
@media (max-width: 1199px) {
    .figs-category-hero-main {
        display: block;
    }

    .figs-category-hero-accent {
        margin-bottom: 16px;
    }

    .figs-category-hero-copy {
        padding-top: 0;
    }
}

/* Tablet */
@media (max-width: 991px) {
    .figs-category-hero-title {
        font-size: 34px;
    }
}

/* Mobile */
@media (max-width: 600px) {

    .figs-category-hero {
        margin: 10px 0 20px;
        padding-bottom: 18px;
    }

    .figs-category-hero-title {
        font-size: 30px;
        line-height: 1.08;
        letter-spacing: .2px;
    }

    .figs-category-hero-accent {
        width: 48px;
        height: 3px;
        margin: 14px 0 16px;
    }

    .figs-category-hero-description {
        max-height: 48px;
        font-size: 15px;
        line-height: 1.6;
    }

    .figs-category-hero-description::after {
        height: 28px;
        background: linear-gradient(
            to bottom,
            rgba(255,255,255,0) 0%,
            rgba(255,255,255,.30) 40%,
            rgba(255,255,255,.75) 75%,
            rgba(255,255,255,1) 100%
        );
    }

    .figs-category-hero-toggle {
        margin-top: 10px;
        padding: 7px 13px;
        font-size: 13px;
    }
}