/* Categories page */
.all-categories-page {
    padding-top: 18px;
}

.all-categories-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.all-categories-heading h1 {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.65rem;
    font-weight: 600;
    line-height: 1.3;
}

.categories-row {
    margin-left: -10px !important;
    margin-right: -10px !important;
}

.categories-row > div {
    padding-right: 10px !important;
    padding-left: 10px !important;
}

.all-cat-col {
    margin-bottom: 16px;
}

.card-categories-wrapper {
    height: calc(100% - 16px);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 9px;
    background: var(--secondary-color-alt13, #fff);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.06);
    box-shadow: 0 -4px 0px  var(--primary-color);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.card-categories-wrapper:hover {
    border-color: rgba(0, 0, 0, 0.16);
    border-color: color-mix(in srgb, var(--primary-color) 35%, transparent);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.09);
    box-shadow: 0 12px 32px color-mix(in srgb, var(--primary-color) 24%, transparent);
    transform: translateY(-2px);
}

.card-categories {
    overflow: hidden;
    background: var(--secondary-color-alt5, #f5f5f5);
}

.categories-image,
.categories-image-placeholder {
    width: 100%;
    height: 100%;
    border-style: none;
    vertical-align: middle;
}

.categories-image {
    object-fit: cover;
    transition: transform 0.35s ease;
}

.card-categories-wrapper:hover .categories-image {
    transform: scale(1.04);
}

.categories-image-placeholder {
    background:
        linear-gradient(135deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.02)),
        var(--secondary-color-alt5, #f1f1f1);
}

.category-second-card {
    background: var(--secondary-color-alt13, #fff);
}

.card-content {
    display: flex;
    flex-direction: column;
}

.card-header-category {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.categories-hover-content {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: max-height 0.26s ease, opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.card-categories-wrapper:hover .categories-hover-content,
.card-categories-wrapper:focus-within .categories-hover-content {
    max-height: 900px;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.btn-link-categories {
    width: 100%;
    padding: 11px 13px;
    border: 0;
    border-radius: 0;
    color: var(--black-color, #000);
    background: transparent;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.35;
    text-align: inherit;
    text-decoration: none;
}

.btn-link-categories:hover,
.btn-link-categories:focus {
    color: var(--black-color, #000);
    background: rgba(0, 0, 0, 0.035);
    background: color-mix(in srgb, var(--primary-color) 8%, transparent);
    text-decoration: none;
    box-shadow: none;
}

.categories-card-arrow {
    flex: 0 0 auto;
    font-size: 0.9rem;
    color: currentColor;
    opacity: 0.75;
    transition: transform 0.2s ease;
}

.card-categories-wrapper:hover .categories-card-arrow,
.card-categories-wrapper:focus-within .categories-card-arrow {
    transform: rotate(180deg);
}

.categories-card-body {
    display: grid;
    gap: 8px;
    padding: 10px 13px 14px;
}

.categories-title {
    margin: 0;
    color: var(--black-color, #000);
    font-size: 0.94rem;
    font-weight: 600;
    line-height: 1.4;
}

.categories-title a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: inherit;
    text-decoration: none;
}

.categories-sub-arrow {
    flex: 0 0 auto;
    font-size: 0.78rem;
    color: currentColor;
    opacity: 0.68;
    transition: transform 0.2s ease;
}

.categories-title.has-third-level a:hover .categories-sub-arrow {
    transform: rotate(180deg);
}

.categories-title a:hover,
.categories-title a:focus {
    color: var(--black-color, #000);
    text-decoration: none;
}

.categories-subTitle {
    display: grid;
    gap: 4px;
    margin: -4px 0 2px;
    padding: 0 12px 0 0;
    list-style: none;
    border-right: 2px solid rgba(0, 0, 0, 0.1);
    border-right: 2px solid color-mix(in srgb, var(--primary-color) 24%, transparent);
}

.categories-subTitle li a {
    display: block;
    padding: 4px 9px;
    border-radius: 6px;
    color: var(--black-color, #000);
    font-size: 0.88rem;
    font-weight: 400;
    line-height: 1.35;
    text-decoration: none;
}

.categories-subTitle li a:hover,
.categories-subTitle li a:focus {
    color: var(--black-color, #000);
    background: rgba(0, 0, 0, 0.03);
    background: color-mix(in srgb, var(--primary-color) 7%, transparent);
    text-decoration: none;
}

[dir="ltr"] .categories-subTitle {
    padding: 0 0 0 12px;
    border-right: 0;
    border-left: 2px solid rgba(0, 0, 0, 0.1);
    border-left: 2px solid color-mix(in srgb, var(--primary-color) 24%, transparent);
}

.btn:focus,
.btn.focus {
    outline: 0;
}

@media only screen and (max-width: 991.98px) {
    .all-categories-heading h1 {
        font-size: 1.4rem;
    }

    .card-categories-wrapper {
        height: auto;
    }
}

@media only screen and (max-width: 575.98px) {
    .all-categories-page {
        padding-top: 10px;
    }

    .categories-row {
        margin-left: -7px !important;
        margin-right: -7px !important;
    }

    .categories-row > div {
        padding-right: 7px !important;
        padding-left: 7px !important;
    }

    .btn-link-categories {
        padding: 12px;
        font-size: 1rem;
    }
}
