/* ─── Categories Showcase ─── */
.categories-showcase-section {
    margin-bottom: 0.5rem;
    font-family: "Inter", sans-serif;
}

.categories-showcase-section__subtitle {
    margin: -0.35rem 0 1.25rem;
    font-size: 0.88rem;
    color: #5f6f6a;
    line-height: 1.5;
}

.categories-showcase {
    position: relative;
}

.categories-showcase__viewport {
    position: relative;
}

.categories-showcase__viewport::before,
.categories-showcase__viewport::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0.5rem;
    width: clamp(28px, 4vw, 64px);
    z-index: 2;
    pointer-events: none;
}

.categories-showcase__viewport::before {
    left: 0;
    background: linear-gradient(90deg, #fff 0%, rgba(255, 255, 255, 0) 100%);
}

.categories-showcase__viewport::after {
    right: 0;
    background: linear-gradient(270deg, #fff 0%, rgba(255, 255, 255, 0) 100%);
}

.categories-showcase .categories.categories-scroll-row {
    gap: 1.1rem;
    padding: 0.35rem 0.25rem 0.75rem;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
}

.categories-showcase__nav {
    position: absolute;
    top: 42%;
    transform: translateY(-50%);
    z-index: 3;
    width: 2.25rem;
    height: 2.25rem;
    border: 1px solid rgba(4, 93, 72, 0.14);
    border-radius: 50%;
    background: #fff;
    color: #045d48;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(4, 93, 72, 0.12);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.categories-showcase:hover .categories-showcase__nav {
    opacity: 1;
    visibility: visible;
}

.categories-showcase__nav:hover {
    background: #045d48;
    color: #fff;
}

.categories-showcase__nav--prev {
    left: -0.35rem;
}

.categories-showcase__nav--next {
    right: -0.35rem;
}

/* Category card */
.category-item-wrapper {
    width: 100%;
    max-width: 7.75rem;
    flex-shrink: 0;
    scroll-snap-align: start;
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    color: inherit;
}

.category-card__visual {
    position: relative;
    width: 118px;
    height: 118px;
    padding: 4px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(4, 93, 72, 0.18) 0%, rgba(201, 162, 39, 0.28) 100%);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover .category-card__visual {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(4, 93, 72, 0.14);
}

.category-card__ring {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    background: #f4f8f7;
    border: 2px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.category-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    transition: transform 0.35s ease;
}

.category-card:hover .category-card__image {
    transform: scale(1.06);
}

.category-card__placeholder {
    display: none;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(145deg, #e8f5f1 0%, #f7faf9 100%);
    color: #045d48;
    font-size: 1.65rem;
}

.category-card__ring.is-placeholder .category-card__placeholder {
    display: flex;
}

.category-card__ring.is-placeholder .category-card__image {
    display: none;
}

.category-card__title {
    display: block;
    width: 100%;
    max-width: 7.75rem;
    margin: 0;
    padding: 0 2px;
    font-size: 0.78rem;
    font-weight: 500;
    line-height: 1.35;
    text-align: center;
    color: #4b5563;
    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: auto;
    transition: color 0.2s ease;
}

.category-card:hover .category-card__title {
    color: #045d48;
}

/* Legacy class hooks (guest categories grid, etc.) */
.category-item-wrapper .category-item {
    display: none;
}

.category-item-wrapper .category-item-title {
    display: none;
}

@media (max-width: 767.98px) {
    .categories-showcase .categories.categories-scroll-row .category-item-wrapper {
        flex: 0 0 calc(33.333% - 0.75rem);
        max-width: none;
        width: auto;
        min-width: 0;
    }

    .category-card__visual {
        width: 96px;
        height: 96px;
    }

    .categories-showcase__nav {
        display: none;
    }

    .categories-showcase__viewport::before,
    .categories-showcase__viewport::after {
        width: 20px;
    }
}

@media (max-width: 480px) {
    .categories-showcase .categories.categories-scroll-row .category-item-wrapper {
        flex: 0 0 calc(40% - 0.5rem);
    }

    .category-card__visual {
        width: 88px;
        height: 88px;
    }

    .category-card__title {
        font-size: 0.72rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .categories-showcase .categories.categories-scroll-row {
        scroll-behavior: auto;
    }

    .category-card__visual,
    .category-card__image {
        transition: none;
    }
}
