/* Gameplay Games — Frontend */

/* ── Single spil ──────────────────────────────────────────────── */

.gp-single {
    padding: 48px 0 64px;
}

/* Hero */
.gp-single__hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
    margin-bottom: 56px;
}

.gp-single__image {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: #ffffff;
    aspect-ratio: 1 / 1;
}

.gp-single__featured {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gp-single__no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
}

.gp-single__no-image svg {
    width: 64px;
    height: 64px;
}

.gp-single__hero-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-top: 8px;
}

/* Kategori badges */
.gp-single__cats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.gp-single__cat-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 100px;
    border: 1.5px solid currentColor;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
    color: #555;
    transition: color 0.15s, border-color 0.15s;
}

.gp-single__cat-badge:hover {
    color: #111;
}

.gp-single__title {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 800;
    line-height: 1.15;
    margin: 0;
    letter-spacing: -0.02em;
}

/* Meta liste */
.gp-single__meta-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1.5px solid #e8e8e8;
    border-radius: 12px;
    overflow: hidden;
}

.gp-single__meta-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 16px;
    border-bottom: 1px solid #f0f0f0;
}

.gp-single__meta-item:last-child {
    border-bottom: none;
}

.gp-single__meta-icon {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    color: #888;
    display: flex;
}

.gp-single__meta-icon svg {
    width: 100%;
    height: 100%;
}

.gp-single__meta-label {
    font-size: 0.85rem;
    color: #888;
    flex: 1;
}

.gp-single__meta-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: #111;
}

/* Vejledning knap */
.gp-single__manual-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    background: #111;
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background 0.15s, transform 0.15s;
    align-self: flex-start;
}

.gp-single__manual-btn:hover {
    background: #333;
    transform: translateY(-1px);
    color: #fff;
}

.gp-single__manual-btn svg {
    width: 16px;
    height: 16px;
}

/* Sektionsoverskrifter */
.gp-single__section-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
    letter-spacing: -0.01em;
}

/* Beskrivelse */
.gp-single__description {
    margin-bottom: 48px;
}

.gp-single__description-body {
    font-size: 1rem;
    line-height: 1.8;
    color: #333;
}

/* Galleri */
.gp-single__gallery {
    margin-bottom: 48px;
}

.gp-single__gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.gp-single__gallery-item {
    display: block;
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 10px;
    background: #f0f0f0;
}

.gp-single__gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.gp-single__gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
    color: #fff;
}

.gp-single__gallery-overlay svg {
    width: 28px;
    height: 28px;
}

.gp-single__gallery-item:hover img {
    transform: scale(1.06);
}

.gp-single__gallery-item:hover .gp-single__gallery-overlay {
    opacity: 1;
}

/* What's in the box */
.gp-single__inbox {
    margin-bottom: 48px;
}

.gp-single__inbox-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
}

.gp-single__inbox-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #f8f8f8;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #333;
}

.gp-single__inbox-list li::before {
    content: '';
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #111;
}

/* Responsive */
@media (max-width: 768px) {
    .gp-single__hero {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .gp-single__image {
        max-height: 360px;
        aspect-ratio: 4 / 3;
    }

    .gp-single__gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }

    .gp-single__inbox-list {
        grid-template-columns: 1fr;
    }
}

/* ── Games Grid ────────────────────────────────────────────────── */

.gp-grid {
    display: grid;
    grid-template-columns: repeat(var(--gp-cols, 3), 1fr);
    gap: 24px;
}

@media (max-width: 1024px) {
    .gp-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 540px) {
    .gp-grid { grid-template-columns: 1fr; }
}

/* Kortene i grid er ikke flex-shrink som i karusel */
.gp-grid .gp-game-card {
    flex: none;
    width: 100%;
}

/* ── Carousel ──────────────────────────────────────────────────── */

.gp-carousel-wrap {
    position: relative;
    overflow: hidden;
    width: 100%;
    min-width: 0;
    display: block;
    box-sizing: border-box;
}

/* Elementor widget container stretch */
.elementor-widget-gameplay_games_carousel,
.elementor-widget-gameplay_games_carousel .elementor-widget-container,
.elementor-widget-gameplay_games_grid,
.elementor-widget-gameplay_games_grid .elementor-widget-container {
    width: 100%;
    min-width: 0;
}

.gp-carousel-track {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
}

.gp-carousel-track::-webkit-scrollbar {
    display: none;
}

/* Kortbredde — 4 pr. række på desktop, 2 på tablet, 1 på mobil */
.gp-game-card {
    flex: 0 0 calc(25% - 15px);
    min-width: 180px;
    text-decoration: none;
    color: inherit;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
}

.gp-game-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.gp-game-card__image {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f0f0f0;
}

.gp-game-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.gp-game-card:hover .gp-game-card__image img {
    transform: scale(1.04);
}

.gp-game-card__no-image {
    width: 100%;
    height: 100%;
    background: #e5e5e5;
}

.gp-game-card__body {
    padding: 14px 16px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.gp-game-card__cats {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #888;
}

.gp-game-card__title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
}

.gp-game-card__meta {
    list-style: none;
    margin: 4px 0 0;
    padding: 0;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.gp-game-card__meta li {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    color: #555;
}

.gp-game-card__meta svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}

/* Navigationsknapper */
.gp-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.15s;
}

.gp-carousel-btn:hover {
    background: #f5f5f5;
}

.gp-carousel-btn--prev {
    left: 0;
}

.gp-carousel-btn--next {
    right: 0;
}

/* Responsive */
@media (max-width: 1024px) {
    .gp-game-card { flex: 0 0 calc(33.33% - 14px); }
}

@media (max-width: 768px) {
    .gp-game-card { flex: 0 0 calc(50% - 10px); }
}

@media (max-width: 480px) {
    .gp-game-card { flex: 0 0 85%; }
}
