/* PS Kochbuch Carousel */

.ps-kochbuch {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: inherit;
}

.ps-kochbuch-header {
    text-align: center;
    margin-bottom: 48px;
}
.ps-kochbuch-header h1 {
    font-size: 2.4em;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 10px;
}
.ps-kochbuch-header p {
    color: #666;
    font-size: 1.1em;
}

/* Carousel Wrapper */
.ps-carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
}

.ps-carousel-track-outer {
    overflow: hidden;
    flex: 1;
    border-radius: 16px;
}

.ps-carousel-track {
    display: flex;
    gap: 20px;
    transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

/* Slides */
.ps-carousel-slide {
    flex: 0 0 calc(33.333% - 14px);
    min-width: 0;
}

@media (max-width: 900px) {
    .ps-carousel-slide { flex: 0 0 calc(50% - 10px); }
}
@media (max-width: 580px) {
    .ps-carousel-slide { flex: 0 0 100%; }
}

/* Karte */
.ps-rezept-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,.10);
    transition: transform .3s, box-shadow .3s;
    cursor: pointer;
    height: 100%;
}
.ps-rezept-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(0,0,0,.15);
}

.ps-rezept-img-wrap {
    position: relative;
    height: 240px;
    overflow: hidden;
    background: #f5f0eb;
}
.ps-rezept-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s;
}
.ps-rezept-card:hover .ps-rezept-img-wrap img {
    transform: scale(1.05);
}

.ps-rezept-schwierigkeit {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0,0,0,.55);
    color: #fff;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
}

.ps-rezept-body {
    padding: 18px 20px 20px;
}
.ps-rezept-body h3 {
    font-size: 1em;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 10px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.8em;
}

.ps-rezept-meta {
    display: flex;
    gap: 14px;
    font-size: 0.82em;
    color: #888;
}

/* Navigation Buttons */
.ps-carousel-btn {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid #e0e0e0;
    background: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #333;
    transition: all .2s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.ps-carousel-btn:hover {
    background: #1a1a2e;
    color: #fff;
    border-color: #1a1a2e;
}
.ps-carousel-btn:disabled {
    opacity: 0.3;
    cursor: default;
}

/* Hover Overlay auf Karte */
.ps-rezept-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.45);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .3s;
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: .5px;
}
.ps-rezept-card:hover .ps-rezept-overlay {
    opacity: 1;
}
.ps-rezept-card { cursor: pointer; }

/* ── Modal ─────────────────────────────────────────────── */
.ps-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.65);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
}
.ps-modal-overlay.open {
    display: flex;
}

.ps-modal {
    background: #fff;
    border-radius: 20px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 40px 36px 36px;
    box-shadow: 0 24px 80px rgba(0,0,0,.25);
    animation: ps-modal-in .3s cubic-bezier(.34,1.56,.64,1);
}
@keyframes ps-modal-in {
    from { transform: scale(.85); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}

.ps-modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 28px;
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    line-height: 1;
    transition: color .2s;
    padding: 0;
}
.ps-modal-close:hover { color: #333; }

/* Rundes Bild */
.ps-modal-img-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}
.ps-modal-img-wrap img {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #f0ede8;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
}

/* Titel */
.ps-modal h2 {
    text-align: center;
    font-size: 1.6em;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 14px;
    line-height: 1.3;
}

/* Meta */
.ps-modal-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0ede8;
}
.ps-modal-meta span {
    font-size: 13px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Body: Zutaten + Schritte nebeneinander */
.ps-modal-body {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 28px;
}
@media (max-width: 560px) {
    .ps-modal-body { grid-template-columns: 1fr; }
}

.ps-modal-zutaten h3,
.ps-modal-schritte h3 {
    font-size: 1em;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f0ede8;
}

.ps-modal-zutaten ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.ps-modal-zutaten ul li {
    padding: 5px 0;
    font-size: 13px;
    color: #444;
    border-bottom: 1px solid #f9f7f5;
    display: flex;
    align-items: flex-start;
    gap: 6px;
}
.ps-modal-zutaten ul li::before {
    content: '✓';
    color: #22c55e;
    font-weight: 700;
    flex-shrink: 0;
}

.ps-modal-schritte ol {
    padding: 0 0 0 18px;
    margin: 0;
}
.ps-modal-schritte ol li {
    padding: 6px 0;
    font-size: 13px;
    color: #444;
    line-height: 1.6;
}

/* Loading Spinner */
.ps-modal-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}
.ps-modal-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f0ede8;
    border-top-color: #1a1a2e;
    border-radius: 50%;
    animation: ps-spin .7s linear infinite;
}
@keyframes ps-spin { to { transform: rotate(360deg); } }

/* Dots */
.ps-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}
.ps-carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: all .2s;
    border: none;
    padding: 0;
}
.ps-carousel-dot.active {
    background: #1a1a2e;
    width: 24px;
    border-radius: 4px;
}
