/* =====================================================
   CATEGORIES PAGE — CSS Variables
   Add these to your theme's :root if not already present
   ===================================================== */
/*
:root {
    --brand:        #8A2BE2;
    --brand-light:  #f5f0ff;
    --brand-border: #d4b8f5;
    --brand-dark:   #5a1a8a;
    --brand-rgb:    138, 43, 226;
    --ink:          #000;
    --muted:        #696969;
    --line:         #e8e8e8;
    --soft:         #fafafa;
}
*/

/* =====================================================
   FH CATEGORIES PAGE — /category/
   ===================================================== */
.fh-categories-page {
    padding: 0 0 48px;
    background: #fff;
}
.fh-categories-page__body-wrap {
    padding-top: 24px;
}

.fh-cat-banner-wrap {
    padding-top: 16px;
}

.fh-cat-slider {
    position: relative;
    width: 100%;
    border-radius: 14px;
    overflow: hidden;
    background: var(--soft);
    box-shadow: 0 8px 32px rgba(var(--brand-rgb), .08);
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
}
.fh-cat-slider__viewport {
    position: relative;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 2.35 / 1;
    background: var(--brand-light);
}
.fh-cat-slider__track {
    position: relative;
    width: 100%;
    height: 100%;
}
.fh-cat-slider__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity .65s cubic-bezier(.22, 1, .36, 1), visibility .65s;
    z-index: 0;
}
.fh-cat-slider__slide.is-active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
}
.fh-cat-slider__link {
    display: block;
    width: 100%;
    height: 100%;
}
.fh-cat-slider__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    transition: transform 1.2s cubic-bezier(.22, 1, .36, 1);
}
.fh-cat-slider__slide.is-active .fh-cat-slider__img {
    transform: scale(1);
}
.fh-cat-slider__arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-top: -22px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    color: var(--brand-dark);
    box-shadow: 0 4px 18px rgba(0, 0, 0, .12);
    cursor: pointer;
    transition: transform .2s ease, background-color .2s ease, color .2s ease, box-shadow .2s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.fh-cat-slider__arrow svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}
.fh-cat-slider__arrow:hover {
    background: var(--brand);
    color: #fff;
    transform: scale(1.06);
    box-shadow: 0 6px 22px rgba(var(--brand-rgb), .28);
}
.fh-cat-slider__arrow:active {
    transform: scale(.96);
}
.fh-cat-slider__arrow--prev { left: 14px; }
.fh-cat-slider__arrow--next { right: 14px; }
.fh-cat-slider__dots {
    position: absolute;
    left: 50%;
    bottom: 14px;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .78);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, .08);
    transform: translateX(-50%);
}
.fh-cat-slider__dot {
    width: 7px;
    height: 7px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(var(--brand-rgb), .25);
    cursor: pointer;
    transition: width .3s ease, background-color .3s ease;
}
.fh-cat-slider__dot.is-active {
    width: 20px;
    background: var(--brand);
}

.fh-categories-page__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 18px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.fh-categories-page__item {
    animation: fh-cat-fade-in .45s ease both;
    animation-delay: var(--fh-cat-delay, 0ms);
}
@keyframes fh-cat-fade-in {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
.fh-categories-page__card {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .04);
    transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.fh-categories-page__card:hover,
.fh-categories-page__card:focus-visible {
    transform: translateY(-4px);
    border-color: var(--brand-border);
    box-shadow: 0 14px 32px rgba(var(--brand-rgb), .14);
}
.fh-categories-page__card.is-pressed {
    transform: scale(.98);
}
.fh-categories-page__media {
    position: relative;
    display: block;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--brand-light);
}
.fh-categories-page__img,
.fh-categories-page__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s ease;
}
.fh-categories-page__card:hover .fh-categories-page__img,
.fh-categories-page__card:hover .fh-categories-page__media img {
    transform: scale(1.06);
}
.fh-categories-page__placeholder {
    display: block;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 30% 30%, rgba(var(--brand-rgb), .18), transparent 55%),
        linear-gradient(135deg, var(--brand-light), #fff);
}
.fh-categories-page__shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 35%, rgba(255,255,255,.35) 50%, transparent 65%);
    transform: translateX(120%);
    transition: transform .6s ease;
    pointer-events: none;
}
.fh-categories-page__card:hover .fh-categories-page__shine {
    transform: translateX(-120%);
}
.fh-categories-page__body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 14px 10px;
    text-align: center;
}
.fh-categories-page__name {
    font-size: 16px;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.35;
}
.fh-categories-page__meta {
    font-size: 13px;
    color: var(--muted);
}
.fh-categories-page__cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: auto;
    padding: 12px 14px 14px;
    font-size: 14px;
    font-weight: 700;
    color: var(--brand);
    border-top: 1px solid var(--line);
    background: rgba(var(--brand-rgb), .03);
}
.fh-categories-page__cta svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}
.fh-categories-page__empty {
    text-align: center;
    padding: 36px 20px;
    border: 1px dashed var(--brand-border);
    border-radius: 16px;
    background: #fff;
    color: var(--muted);
    font-size: 15px;
}
@media (max-width: 520px) {
    .fh-cat-slider__viewport { aspect-ratio: 16 / 9; }
    .fh-cat-slider__arrow { width: 38px; height: 38px; margin-top: -19px; }
    .fh-cat-slider__arrow--prev { left: 10px; }
    .fh-cat-slider__arrow--next { right: 10px; }
    .fh-categories-page__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
    .fh-categories-page__name { font-size: 14px; }
}
