/* Collections index + single collection + "More like this" rail */

/* ---- Index grid ---- */
.collection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    margin: 12px 0;
}

.collection-tile {
    display: flex;
    flex-direction: column;
    background: var(--theme-surface);
    border: 1px solid var(--theme-border);
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.collection-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px var(--theme-shadow);
    border-color: var(--theme-border-strong);
}

.collection-tile-thumbs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background: var(--theme-border);
    aspect-ratio: 2 / 1;
}

.collection-tile-thumb {
    overflow: hidden;
    background: var(--theme-surface-deep);
}

.collection-tile-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.collection-tile-body {
    padding: 8px 10px 10px;
}

.collection-tile-title {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--theme-text);
    line-height: 1.25;
}

.collection-tile-meta {
    display: block;
    margin-top: 3px;
    font-size: 12px;
    color: var(--theme-muted);
}

/* ---- Single collection ---- */
.collection-back {
    margin: 4px 0 10px;
    font-size: 13px;
}

.collection-back a {
    color: var(--theme-accent);
    text-decoration: none;
}

.collection-back a:hover {
    text-decoration: underline;
}

/* ---- "More like this" rail on the series page ---- */
.collection-related {
    margin: 18px 0 4px;
}

.collection-related-scroller {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 4px 2px 10px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.collection-related-item {
    flex: 0 0 auto;
    width: 116px;
    text-decoration: none;
    scroll-snap-align: start;
}

.collection-related-thumb {
    position: relative;
    width: 116px;
    height: 164px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--theme-surface-deep);
    border: 1px solid var(--theme-border);
}

.collection-related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.collection-related-rating {
    position: absolute;
    left: 5px;
    bottom: 5px;
    padding: 1px 6px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    color: var(--theme-on-media);
    background: rgba(0, 0, 0, 0.65);
}

.collection-related-title {
    margin-top: 5px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.25;
    color: var(--theme-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
