/* =========================================================
   CATEGORY PAGE  (assets/css/category-page.css)
========================================================= */

.xorgasmo-category-page {
    --category-accent: var(--main-color, #ffb300);
    width: 100%;
    margin: 0 auto 30px !important;
    color: #fff;
    box-sizing: border-box;
}

.xorgasmo-category-page *,
.xorgasmo-category-page *::before,
.xorgasmo-category-page *::after {
    box-sizing: border-box;
}

.xorgasmo-category-page a {
    text-decoration: none;
}

/* ---------- HERO ---------- */

.xorgasmo-category-hero {
    overflow: hidden;
    position: relative;
    border-radius: 12px;
    margin-top: 20px;
    margin-bottom: 20px;
    border-top: 1px solid rgba(255, 255, 255, .08);
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.xorgasmo-category-hero-cover-image {
    position: absolute;
    z-index: 1;
    top: -90px;
    right: -35px;
    width: 58%;
    height: 430px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    pointer-events: none;
    user-select: none;
}

.xorgasmo-category-hero-cover-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: .18;
    filter: saturate(1.15);
    transform: rotate(-6deg) scale(1.08);
    transform-origin: center;
    user-select: none;
    -webkit-user-drag: none;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.18) 7%, rgba(0,0,0,.65) 15%, #000 25%, #000 100%);
    mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.18) 7%, rgba(0,0,0,.65) 15%, #000 25%, #000 100%);
}

.xorgasmo-category-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(5,8,10,.98) 0%, rgba(5,8,10,.92) 25%, rgba(5,8,10,.72) 48%, rgba(5,8,10,.42) 70%, rgba(5,8,10,.18) 100%),
        linear-gradient(180deg, rgba(5,8,10,.12) 0%, transparent 36%, rgba(5,8,10,.56) 100%);
}

.xorgasmo-category-hero-content {
    position: relative;
    z-index: 3;
    padding: 45px 32px 32px;
    max-width: 820px;
}

/* ---------- TITLE ---------- */

.xorgasmo-category-title-row {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
}

.xorgasmo-category-image {
    width: 90px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 7px;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.15);
    font-size: 58px;
    line-height: 1;
}

.xorgasmo-category-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 4px;
    user-select: none;
    -webkit-user-drag: none;
}

.xorgasmo-category-title {
    margin: 0;
    color: #fff;
    font-size: clamp(42px, 5vw, 62px);
    line-height: 1;
    font-weight: 700;
    letter-spacing: -1.5px;
}

/* ---------- DESCRIPTION ---------- */

.xorgasmo-category-description {
    max-width: 720px;
    margin: 0;
    color: #d1d6d9;
    font-size: 15px;
    line-height: 1.55;
}

.xorgasmo-category-description p { margin: 0 0 8px; }
.xorgasmo-category-description p:last-child { margin-bottom: 0; }
.xorgasmo-category-description a { color: var(--category-accent); }

/* ---------- STATS ---------- */

.xorgasmo-category-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 24px;
}

.xorgasmo-category-stat {
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 11px 15px;
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 7px;
    background: rgba(5,8,10,.68);
    backdrop-filter: blur(7px);
}

.xorgasmo-category-stat-icon {
    width: 27px;
    height: 27px;
    flex-shrink: 0;
    color: var(--category-accent);
    fill: none;
}

.xorgasmo-category-stat-number {
    display: block;
    color: #fff;
    font-size: 20px;
    line-height: 1.1;
    font-weight: 700;
}

.xorgasmo-category-stat-label {
    display: block;
    color: #aeb6bb;
    font-size: 12px;
}

/* ---------- TABS (filtros desktop) ---------- */

.xorgasmo-category-page .actor-tabs {
    display: flex;
    align-items: center;
    gap: 35px;
    overflow-x: auto;
    scrollbar-width: none;
}

.xorgasmo-category-page .actor-tabs::-webkit-scrollbar { display: none; }

.xorgasmo-category-page .actor-tabs a {
    position: relative;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    color: #7f8a91;
    font-size: 14px;
    white-space: nowrap;
    transition: color .2s ease;
}

.xorgasmo-category-page .actor-tabs a:hover { color: #fff; }

.xorgasmo-category-page .actor-tabs a.active {
    color: #fff;
    font-weight: 500;
}

.xorgasmo-category-page .actor-tabs a.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 3px;
    background: var(--category-accent);
}

/* ---------- SECTIONS ---------- */

.xorgasmo-category-section {
    width: 100%;
    margin-bottom: 20px;
}

.xorgasmo-category-section:last-child { margin-bottom: 0; }

/* Secciones con fondo (actores y países) */
.xorgasmo-category-section--band {
    padding: 20px 10px;
    background: rgba(255, 255, 255, .055);
    border-top: 1px solid rgba(255, 255, 255, .08);
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    margin-bottom: 0;
}

/* Slider de países: va arriba de los videos */
#countries.xorgasmo-category-section--band {
    margin-bottom: 20px;
}

.xorgasmo-category-section--band + .xorgasmo-category-section--band {
    border-top: 0;
}

.xorgasmo-category-section--band + .xorgasmo-category-section:not(.xorgasmo-category-section--band) {
    margin-top: 20px;
}

.xorgasmo-category-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 15px;
}

.xorgasmo-category-section-header .widget-title {
    margin-bottom: 0;
    font-size: 18px;
}

.xorgasmo-category-section-link {
    color: #ececec;
    font-size: 12px;
    white-space: nowrap;
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
}

.xorgasmo-category-section-link:hover { color: var(--main-color); }

/* ---------- SLIDER (actores / países) ---------- */

.xorgasmo-category-slider {
    position: relative;
    width: 100%;
}

.xorgasmo-category-slider-viewport {
    overflow: hidden;
    width: 100%;
}

.xorgasmo-category-actors {
    display: flex;
    flex-wrap: nowrap;
    gap: 18px;
    width: 100%;
    transition: transform .45s ease;
    will-change: transform;
}

.xorgasmo-category-actor {
    flex: 0 0 calc((100% - 162px) / 10);
    display: block;
    min-width: 0;
    text-align: center;
    color: #fff;
}

.xorgasmo-slider-btn {
    position: absolute;
    top: 42px;
    z-index: 5;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 50%;
    color: #000;
    background: rgba(5, 8, 10, .85);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.xorgasmo-slider-btn svg { fill: none; }
.xorgasmo-slider-btn:hover { color: #fff; }

.xorgasmo-slider-btn[disabled] {
    opacity: 0;
    pointer-events: none;
}

.xorgasmo-slider-prev { left: -14px; }
.xorgasmo-slider-next { right: -14px; }

.xorgasmo-category-actor-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    margin: 0 auto 9px;
    overflow: hidden;
}

.xorgasmo-category-actor-image img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 100%;
    object-fit: cover;
}

.xorgasmo-category-actor-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #777f84;
    font-size: 30px;
    font-weight: 600;
    border-radius: 100%;
    background: hwb(0deg 100% 0% / 10%);
}

/* Variante bandera (países): rectangular */
.xorgasmo-category-actor--flag .xorgasmo-category-actor-image {
    aspect-ratio: 3 / 2;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, .12);
}

.xorgasmo-category-actor--flag .xorgasmo-category-actor-image img,
.xorgasmo-category-actor--flag .xorgasmo-category-actor-placeholder {
    border-radius: 0;
}

.xorgasmo-category-actor--flag .xorgasmo-category-actor-placeholder {
    font-size: 22px;
    letter-spacing: 1px;
}

.xorgasmo-category-actor--flag .xorgasmo-category-actor-image { margin-top: 12px; }

.xorgasmo-category-actor-name {
    display: block;
    overflow: hidden;
    color: #fff;
    font-size: 13px;
    line-height: 1.25;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.xorgasmo-category-actor-count {
    display: block;
    margin-top: 3px;
    color: #8f999f;
    font-size: 11px;
}

/* ---------- CATEGORIES / TAGS ---------- */

.xorgasmo-category-taxonomies {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    gap: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.xorgasmo-category-taxonomies::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: -1px;
    left: calc(33.333% - 10px);
    width: 1px;
    background: rgba(255, 255, 255, .08);
    pointer-events: none;
}

.xorgasmo-category-taxonomies::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: -1px;
    left: calc(66.666% + 10px);
    width: 1px;
    background: rgba(255, 255, 255, .08);
    pointer-events: none;
}

.xorgasmo-category-taxonomy-column .widget-title {
    margin-bottom: 15px;
    margin-top: 20px;
    font-size: 18px;
}

.xorgasmo-category-taxonomy-column .widget-title:after { display: none; }

.xorgasmo-category-taxonomy-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 70px 150px;
    align-items: center;
    gap: 12px;
    min-height: 47px;
    background: rgba(255, 255, 255, .055);
    border-radius: 6px;
    padding: 5px 10px;
    margin-bottom: 7px;
}

.xorgasmo-category-taxonomy-name {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    overflow: hidden;
    color: #d8dde0;
    font-size: 14px;
}

.xorgasmo-category-taxonomy-label {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.xorgasmo-category-taxonomy-thumb {
    display: inline-flex;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    overflow: hidden;
    border-radius: 6px;
    background: #1b1b1b;
}

.xorgasmo-category-taxonomy-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.xorgasmo-category-taxonomy-tagicon {
    display: flex;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    padding: 7px;
    justify-content: center;
    align-items: center;
    background: hsl(0deg 0% 100% / 10%);
    border-radius: 6px;
}

.xorgasmo-category-taxonomy-tagicon svg {
    fill: none;
    width: 24px;
    height: 24px;
}

.xorgasmo-category-taxonomy-count {
    color: #d9dde0;
    text-align: right;
    font-size: 12px;
}

.xorgasmo-category-taxonomy-bar {
    height: 8px;
    overflow: hidden;
    border-radius: 10px;
    background: hwb(0deg 100% 0% / 10%);
}

.xorgasmo-category-taxonomy-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--category-accent);
}

.xorgasmo-category-taxonomy-more {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 15px;
    padding: 9px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 6px;
    color: #fff;
    background: rgba(255, 255, 255, .015);
    font-size: 14px;
    font-weight: 500;
}

.xorgasmo-category-taxonomy-more svg {
    fill: none;
    width: 20px;
    height: 20px;
    margin-top: 2px;
}

.xorgasmo-category-taxonomy-more:hover {
    color: var(--category-accent);
    background: rgba(255,255,255,.05);
}

/* ---------- RELATED SEARCHES ---------- */

.xorgasmo-category-searches {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.xorgasmo-category-search {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 8px 13px;
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 7px;
    color: #cdd3d6;
    background: #1f1e1e;
    font-size: 12px;
}

.xorgasmo-category-search:hover {
    color: #fff;
    border-color: var(--category-accent);
}

.xorgasmo-category-search svg {
    width: 15px;
    height: 15px;
    color: currentColor;
    fill: none;
}

/* ---------- VIDEO FILTERS ---------- */

.xorgasmo-category-video-filters {
    margin-left: auto;
    flex-shrink: 0;
}

.xorgasmo-category-video-filter-dropdown {
    display: none;
    position: relative;
    margin-left: auto;
    flex-shrink: 0;
}

.xorgasmo-category-video-filter-dropdown button:hover { background: none !important; }

.xorgasmo-category-video-filter-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin: 0;
    padding: 0;
    border: 0;
    outline: none;
    color: #d8dde0;
    background: transparent !important;
    font-family: inherit;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
}

.xorgasmo-category-video-filter-toggle svg {
    display: block;
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    fill: none;
    transition: transform .2s ease;
}

.xorgasmo-category-video-filter-dropdown.open .xorgasmo-category-video-filter-toggle svg {
    transform: rotate(180deg);
}

.xorgasmo-category-video-filter-menu {
    position: absolute;
    top: calc(100% + 9px);
    right: 0;
    z-index: 100;
    display: none;
    min-width: 155px;
    padding: 5px;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 7px;
    background: #15191c;
    box-shadow: 0 12px 30px rgba(0,0,0,.45);
}

.xorgasmo-category-video-filter-dropdown.open .xorgasmo-category-video-filter-menu { display: block; }

.xorgasmo-category-video-filter-menu a {
    display: block;
    padding: 9px 11px;
    border-radius: 5px;
    color: #aeb7bc;
    font-size: 13px;
    line-height: 1.2;
    white-space: nowrap;
    transition: background .15s ease, color .15s ease;
}

.xorgasmo-category-video-filter-menu a:hover {
    color: #fff;
    background: rgba(255,255,255,.07);
}

.xorgasmo-category-video-filter-menu a.active {
    color: var(--category-accent);
    background: rgba(255,255,255,.05);
}

/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1100px) {

    .xorgasmo-category-actor {
        flex-basis: calc((100% - 90px) / 6);
    }
}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 750px) {

    .xorgasmo-category-video-filters { display: none; }
    .xorgasmo-category-video-filter-dropdown { display: block; }

    .xorgasmo-category-section-header { gap: 10px; }
    .xorgasmo-category-section-header .widget-title { min-width: 0; }

    .xorgasmo-category-page {
        padding: 0 10px;
        overflow-x: clip;
    }

    @supports not (overflow: clip) {
        .xorgasmo-category-page { overflow-x: hidden; }
    }

    .xorgasmo-category-hero {
        min-height: auto;
        margin-bottom: 20px;
        margin-top: 0;
        margin-left: -10px;
        margin-right: -10px;
        border-radius: 0;
        border-top: 0;
    }

    .xorgasmo-category-hero-cover-image {
        top: -40px;
        right: -65px;
        width: 95%;
        height: 300px;
    }

    .xorgasmo-category-hero-cover-image img {
        opacity: .13;
        filter: saturate(1.1);
        transform: rotate(-5deg) scale(1.03);
        -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.22) 9%, rgba(0,0,0,.7) 20%, #000 31%, #000 100%);
        mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.22) 9%, rgba(0,0,0,.7) 20%, #000 31%, #000 100%);
    }

    .xorgasmo-category-hero-content { padding: 28px 17px 22px; }

    .xorgasmo-category-title-row { gap: 13px; }

    .xorgasmo-category-image {
        width: 64px;
        height: 44px;
        font-size: 41px;
    }

    .xorgasmo-category-title { font-size: 38px; }

    .xorgasmo-category-description {
        font-size: 13px;
        line-height: 1.5;
    }

    .xorgasmo-category-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        margin-top: 19px;
    }

    .xorgasmo-category-stat {
        min-height: auto;
        gap: 8px;
        padding: 8px;
    }

    .xorgasmo-category-stat-icon {
        width: 20px;
        height: 20px;
    }

    .xorgasmo-category-stat-number { font-size: 15px; }
    .xorgasmo-category-stat-label { font-size: 10px; }

    .xorgasmo-category-videos .videos-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px 9px;
    }

    /* Secciones con fondo a pantalla completa en móvil */
    .xorgasmo-category-section--band {
        position: relative;
        width: 100vw;
        max-width: 100vw;
        margin-left: calc(50% - 50vw);
        margin-right: calc(50% - 50vw);
        padding: 20px 10px;
        overflow: hidden;
        margin-bottom: 0;
    }

    .xorgasmo-category-section-link { font-size: 11px; }

    /* Slider móvil: scroll nativo, sin JS */
    .xorgasmo-slider-btn { display: none; }

    .xorgasmo-category-slider-viewport {
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: none;
        overscroll-behavior-x: contain;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        width: calc(100% + 40px);
        margin-left: -20px;
        margin-right: -20px;
        padding-left: 20px;
        padding-right: 20px;
    }

    .xorgasmo-category-slider-viewport::-webkit-scrollbar { display: none; }

    .xorgasmo-category-actors {
        width: max-content;
        gap: 12px;
        transform: none !important;
        transition: none;
        padding-right: 20px;
    }

    .xorgasmo-category-actor {
        flex: 0 0 82px;
        scroll-snap-align: start;
    }

    .xorgasmo-category-actor-image { max-width: 82px; }
    .xorgasmo-category-actor-name { font-size: 11px; }
    .xorgasmo-category-actor-count { font-size: 9px; }

    .xorgasmo-category-taxonomies {
        grid-template-columns: 1fr;
        padding-bottom: 0;
        border-bottom: 0;
    }

    .xorgasmo-category-taxonomies::before,
    .xorgasmo-category-taxonomies::after { display: none; }

    .xorgasmo-category-taxonomy-item {
        grid-template-columns: minmax(0, 1fr) 55px 90px;
        gap: 7px;
    }

    .xorgasmo-category-taxonomy-column .widget-title { margin-top: 0; }
    .xorgasmo-category-taxonomy-name { font-size: 12px; }
    .xorgasmo-category-taxonomy-count { font-size: 11px; }

    /* Related searches: slider horizontal en móvil */
    .xorgasmo-category-searches {
        flex-wrap: nowrap;
        gap: 8px;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: none;
        overscroll-behavior-x: contain;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        width: calc(100% + 20px);
        margin-left: -10px;
        margin-right: -10px;
        padding: 2px 10px 8px;
    }

    .xorgasmo-category-searches::-webkit-scrollbar { display: none; }

    .xorgasmo-category-search {
        flex: 0 0 auto;
        scroll-snap-align: start;
        min-height: 34px;
        padding: 7px 11px;
        font-size: 11px;
    }
}

/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 430px) {

    .xorgasmo-category-title { font-size: 34px; }
    .xorgasmo-category-actor { flex-basis: 70px; }
    .xorgasmo-category-actor-image { max-width: 70px; }
    .xorgasmo-category-actor-name { font-size: 10px; }
}