:root {
    --pg-gap: 20px;
    --pg-radius: 16px;
    --pg-shadow: 0 10px 30px rgba(0, 0, 0, .15);
    --pg-hover: 0 14px 40px rgba(0, 0, 0, .25);
    /* 4:3 Aspect */
    --aspect-w: 4;
    --aspect-h: 3;
}

/* =============== HERO / SEARCH =============== */
.pg-hero {
    display: grid;
    grid-auto-flow: row;
    justify-items: center;
    align-content: center;
    gap: 14px;
    max-width: 960px;
    margin: 0 auto 28px;
    padding: 12px 18px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .05);
    backdrop-filter: blur(6px);
    box-shadow: 0 4px 18px rgba(0, 0, 0, .25)
}

.pg-hero h1 {
    margin: 0;
    font-size: clamp(20px, 2.6vw, 28px);
    font-weight: 700;
    letter-spacing: .4px
}

.pg-actions {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap
}

.pg-actions .search-wrap {
    position: relative;
    width: 100%;
    max-width: 520px;
    margin: 0 auto
}

.pg-actions .search-wrap::before {
    content: "🔍";
    position: absolute;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    font-size: 16px;
    opacity: .7
}

.pg-actions .search-wrap input[type="search"] {
    width: 100%;
    padding: 10px 14px 10px 38px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .15);
    background: rgba(255, 255, 255, .08);
    color: #fff;
    font-size: 15px;
    outline: none;
    transition: border .2s, background .2s;
    text-align: left
}

.pg-actions .search-wrap input[type="search"]:focus {
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, .12)
}

.pg-actions select {
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, .15);
    background: rgba(255, 255, 255, .08);
    color: #fff;
    font-size: 15px;
    cursor: pointer;
    appearance: none;
    outline: none;
    background-image: url("data:image/svg+xml,%3Csvg fill='white' viewBox='0 0 24 24' width='18' height='18' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px
}

.pg-actions select:hover,
.pg-actions select:focus {
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, .12)
}

.pg-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
    justify-content: center
}

/* =============== CATEGORY =============== */
.pg-category {
    margin-bottom: 40px
}

.pg-category h2 {
    text-align: center;
    margin: 10px 0 18px;
    font-size: clamp(20px, 3vw, 26px);
    font-weight: 700;
    color: #f5b94d
}

.pg-cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--pg-gap);
    justify-content: center;
    justify-items: center
}

/* =============== TILES (4:3) =============== */
.pg-tile {
    position: relative;
    width: 100%;
    max-width: 560px;
    border-radius: var(--pg-radius);
    overflow: hidden;
    box-shadow: var(--pg-shadow);
    background: #1115;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease
}

.pg-tile:hover {
    transform: translateY(-2px);
    box-shadow: var(--pg-hover)
}

.pg-imgwrap {
    position: relative;
    width: 100%;
    aspect-ratio: var(--aspect-w) / var(--aspect-h);
    /* 4:3 */
    background: #0f0f0f;
    border-radius: var(--pg-radius);
    overflow: hidden
}

.pg-imgwrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: saturate(1.05)
}

.pg-imgwrap::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 34%;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, .35) 100%);
    pointer-events: none
}

/* Titel */
.pg-title {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    margin: 0;
    padding: 4px 10px;
    font-weight: 700;
    font-size: clamp(15px, 2.5vw, 20px);
    color: #fff;
    text-align: center;
    text-shadow: 0 2px 6px rgba(0, 0, 0, .7);
    background: rgba(0, 0, 0, .35);
    border-radius: 8px;
    max-width: 85%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

/* Badges IM Bild */
.pg-info {
    position: absolute;
    inset: 0;
    pointer-events: none
}

.pg-time,
.pg-price {
    position: absolute;
    bottom: 10px;
    padding: 6px 10px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 13px;
    color: #fff;
    background: rgba(0, 0, 0, .55);
    backdrop-filter: blur(2px);
    text-shadow: 0 1px 3px rgba(0, 0, 0, .55);
    pointer-events: auto
}

.pg-time {
    left: 10px;
    opacity: .95
}

.pg-price {
    right: 10px;
    background: var(--accent-color, #e9a624);
    color: #111
}

/* =============== SKELETONS / PAGER / CHIPS (unverändert) =============== */
.is-skeleton {
    pointer-events: none
}

.pg-skel-img,
.pg-skel-line {
    background: linear-gradient(90deg, #333, #444, #333);
    animation: sk 1.2s linear infinite
}

.pg-skel-img {
    width: 100%;
    height: 100%
}

.pg-skel-line {
    height: 10px;
    border-radius: 6px
}

.pg-skel-line.w60 {
    width: 60%
}

.pg-skel-line.w30 {
    width: 30%
}

@keyframes sk {
    0% {
        background-position: 0 0
    }

    100% {
        background-position: 200% 0
    }
}

.pg-pager {
    display: flex;
    justify-content: center;
    margin: 16px 0 8px
}

.pg-pager-inner {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap
}

.pg-page {
    padding: 6px 10px;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    background: rgba(255, 255, 255, .08);
    color: var(--text-color, #fff)
}

.pg-page:hover {
    background: rgba(255, 255, 255, .14)
}

.pg-page.active {
    background: var(--accent-color, #e9a624);
    color: #111;
    font-weight: 700
}

.pg-ellipsis {
    opacity: .7;
    padding: 0 2px
}

.pg-categories .chip {
    display: inline-block;
    margin: 0 6px 6px 0;
    padding: 6px 14px;
    border-radius: 16px;
    border: 1px solid var(--border-color, #444);
    background: var(--chip-bg, #2a2d33);
    color: var(--chip-color, #ddd);
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, border-color .2s, transform .2s
}

.pg-categories .chip:not(.active):hover {
    background: var(--chip-bg-hover, #3a3e45);
    border-color: var(--border-color-hover, #666);
    transform: translateY(-1px)
}

.pg-categories .chip.active,
.pg-categories .chip.active:hover,
.pg-categories .chip.active:focus {
    background: var(--accent-color, #e9a624) !important;
    border-color: var(--accent-color, #e9a624) !important;
    color: #111 !important;
    transform: none
}

body.dark-mode .pg-categories .chip.active,
body.dark-mode .pg-categories .chip.active:hover {
    background: var(--accent-color, #e9a624);
    color: #000;
    border-color: var(--accent-color, #e9a624);
    font-weight: 600
}

/* --- Chips: weiße Schrift auf Akzent-Hintergrund --- */

/* Preis-Badge im Bild */
.pg-price {
    color: #fff !important;
    /* statt #111 */
    text-shadow: 0 1px 2px rgba(0, 0, 0, .25);
}

/* Aktive Kategorie-Chips */
.pg-categories .chip.active,
.pg-categories .chip.active:hover,
.pg-categories .chip.active:focus {
    color: #eee !important;
    background: #111 !important;
}

/* ===== Light-Mode: Kategorienüberschriften in Schwarz statt Akzentfarbe ===== */
body.light-mode .pg-category h2 {
    color: #111 !important;
}

/* ===== Dark-Mode: Preis-Badge wie Druckzeit (schwarz mit weißer Schrift) ===== */
body.dark-mode .pg-price {
    background: rgba(0, 0, 0, 0.55) !important;
    color: #fff !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(2px);
}