/* Listado de categorías (estilo mosaico) · assets/css/categories-page.css */

.xo-cats {
    --xo-y: #ffb404;
    --xo-tile: #151515;
    --xo-tile-hover: #1f1f1f;
    --xo-line: rgba(255,255,255,.07);
}

/* ---------- HEADER ---------- */

.xo-cats__head {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0 0 20px;
}

.xo-cats__title { flex: 1 1 auto; min-width: 0; }

.xo-cats__title .widget-title {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0;
    color: #fff;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}
/* línea fina que sigue al título (como en Pornstar & Models) */
.xo-cats__title .widget-title:after {
    content: "";
    display: block;
    flex: 1 1 auto;
    height: 1px;
    background: rgba(255,255,255,.08);
}

.xo-cats__tools { display: flex; align-items: center; flex: 0 0 auto; gap: 10px; }

.xo-cats .xo-cats__search {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 42px;
    margin: 0;
    padding: 0 16px;
    border: 1px solid var(--xo-line);
    border-radius: 999px;
    background: var(--xo-tile);
    color: #8f999f;
    transition: border-color .2s, box-shadow .2s;
}
.xo-cats .xo-cats__search:focus-within { border-color: var(--xo-y); box-shadow: 0 0 0 4px rgba(255,180,4,.12); }
.xo-cats .xo-cats__search svg { flex: 0 0 18px; width: 18px; height: 18px; fill: none; }
.xo-cats .xo-cats__search input[type="search"] {
    -webkit-appearance: none;
    appearance: none;
    flex: 1 1 auto;
    width: 190px;
    min-width: 0;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0 !important;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none !important;
    color: #fff;
    font-size: 14px;
    line-height: 1;
    outline: 0;
}
.xo-cats .xo-cats__search input[type="search"]::placeholder { color: #8f999f; opacity: 1; }
.xo-cats .xo-cats__search input[type="search"]::-webkit-search-cancel-button,
.xo-cats .xo-cats__search input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; display: none; }

.xo-cats__order { display: flex; align-items: center; flex: 0 0 auto; }
.xo-cats__select-wrap { position: relative; display: flex; align-items: center; }
.xo-cats .xo-cats__order select {
    -webkit-appearance: none;
    appearance: none;
    min-width: 170px;
    height: 42px;
    margin: 0;
    padding: 0 34px 0 14px;
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 100px;
    outline: none;
    background: #151515;
    color: rgba(255,255,255,.88);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease;
}
.xo-cats .xo-cats__order select:hover { background: #191919; border-color: rgba(255,180,4,.35); }
.xo-cats .xo-cats__order select:focus { border-color: var(--xo-y); }
.xo-cats__select-arrow {
    position: absolute;
    top: 50%;
    right: 10px;
    display: flex;
    width: 16px;
    height: 16px;
    transform: translateY(-50%);
    pointer-events: none;
    color: rgba(255,255,255,.65);
}
.xo-cats__select-arrow svg { display: block; width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- MOSAICO ---------- */

.xo-cats__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.xo-cat {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 112px;
    padding: 14px 16px;
    overflow: hidden;
    border-radius: 10px;
    background: var(--xo-tile);
    color: #fff;
    text-decoration: none;
    isolation: isolate;
    transition: background .25s ease, transform .2s ease, box-shadow .2s ease;
}
.xo-cat[style*="--bg:"] { background: rgb(var(--bg)); }
.xo-cat:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(0,0,0,.4); }
.xo-cat:not([style*="--bg:"]):hover { background: var(--xo-tile-hover); }
.xo-cat[style*="--bg:"]:hover { background: rgb(var(--bg-h)); }

.xo-cat__name {
    display: block;
    max-width: calc(100% - 80px);
    font-size: 19px;
    font-weight: 700;
    line-height: 1.15;
    overflow-wrap: anywhere;
    hyphens: auto;
}
.xo-cat:hover .xo-cat__name { color: #fff; }

.xo-cat__count {
    text-shadow: 0 1px 6px rgba(0,0,0,.35);
    display: block;
    margin-top: 5px;
    color: rgba(255,255,255,.75);
    font-size: 12px;
    font-weight: 500;
}

/* imagen pequeña inclinada arriba a la derecha */
.xo-cat__media {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: -1;
    display: block;
    width: 76px;
    height: 76px;
    overflow: hidden;
    border-radius: 8px;
    background: #222;
    box-shadow: 0 8px 20px rgba(0,0,0,.5);
    transform: rotate(6deg);
    transition: transform .35s cubic-bezier(.2,.7,.2,1);
}
.xo-cat:hover .xo-cat__media { transform: rotate(0deg) scale(1.1); }

.xo-cat__media img { display: block; width: 100%; height: 100%; object-fit: cover; }

.xo-cat__media.is-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 30% 20%, hsla(var(--h), 75%, 55%, .55), transparent 65%),
        linear-gradient(160deg, #2a2a2a, #141414);
}
.xo-cat__media.is-empty b { color: hsl(var(--h), 85%, 72%); font-size: 34px; font-weight: 800; }

.xo-cat__rank {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--xo-y);
    color: #000;
    font-size: 11px;
    font-weight: 800;
}

.xo-cats__empty { padding: 70px 0; text-align: center; color: #8f999f; }

/* ---------- RESPONSIVE ---------- */

@media (max-width: 768px) {
    .xo-cats__head { flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 15px; }
    .xo-cats__tools { display: contents; }
    .xo-cats__title { order: 1; flex: 1 1 0; min-width: 0; }
    .xo-cats__title .widget-title { font-size: 20px; gap: 10px; }
    .xo-cats__order { order: 2; }
    .xo-cats .xo-cats__order select { min-width: 125px; height: 28px; padding: 0 30px 0 10px; font-size: 11px; }
    .xo-cats .xo-cats__search { order: 3; flex: 1 1 100%; width: 100%; }
    .xo-cats .xo-cats__search input[type="search"] { width: 100%; }

    .xo-cats__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .xo-cat { min-height: 96px; padding: 11px 12px; }
    .xo-cat__name { max-width: calc(100% - 58px); font-size: 15px; }
    .xo-cat__media { top: 10px; right: 10px; width: 54px; height: 54px; border-radius: 6px; }
    .xo-cat__media.is-empty b { font-size: 24px; }
}

@media (hover: none) { .xo-cat:hover { transform: none; } }

@media (prefers-reduced-motion: reduce) {
    .xo-cat, .xo-cat__media { transition: none; }
    .xo-cat:hover, .xo-cat:hover .xo-cat__media { transform: none; }
}