/*
 * Portrait Category Slider
 * File: /wp-content/themes/YOUR-THEME/css/portrait-slider.css
 *
 * Matches the reference: full-height portrait cards, frosted
 * glass label bottom-left, peek of next card, side arrows.
 */

/* ── SECTION ───────────────────────────────── */
.psl-section {
    background: #ffffff;
    padding: 0;           /* edge-to-edge like reference */
    overflow: hidden;
    position: relative;
}

/* ── CONTAINER ─────────────────────────────── */
.psl-container {
    max-width: 100%;
    padding: 0;
}

/* ── OPTIONAL HEADING ──────────────────────── */
.psl-heading {
    text-align: center;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: #1a1a1a;
    text-transform: uppercase;
    margin: 0;
    padding: 40px 20px 28px;
    background: #ffffff;
}

/* ── OUTER (arrow context) ─────────────────── */
.psl-outer {
    position: relative;
}

/* ── ARROWS ────────────────────────────────── */
.psl-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.92);
    color: #1a1a1a;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
    padding: 0;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.psl-arrow svg {
    width: 18px;
    height: 18px;
    pointer-events: none;
}

.psl-arrow:hover {
    background: #ffffff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.22);
}

.psl-arrow:active {
    transform: translateY(-50%) scale(0.92);
}

/* Arrows sit slightly inside the edge like reference */
.psl-arrow--prev { left:  16px; }
.psl-arrow--next { right: 16px; }

.psl-arrow.psl-hidden {
    opacity: 0;
    pointer-events: none;
}

/* ── TRACK ─────────────────────────────────── */
.psl-track {
    display: flex;
    gap: 4px;                        /* tight gap like reference */
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    cursor: grab;
}

.psl-track:active {
    cursor: grabbing;
}

.psl-track::-webkit-scrollbar {
    display: none;
}

/* ── CARD ──────────────────────────────────── */
.psl-card {
    /* 3 full cards + peek of 4th visible */
    flex: 0 0 calc(33.333% - 3px);
    min-width: 200px;
    scroll-snap-align: start;
    position: relative;
    display: block;
    text-decoration: none;
    overflow: hidden;
    background: #111;
}

/* Hover: slight scale */
.psl-card:hover .psl-card__img {
    transform: scale(1.04);
}

/* ── IMAGE ─────────────────────────────────── */
.psl-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;    /* show face/upper body */
    display: block;
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

/* ── FROSTED GLASS LABEL ───────────────────── */
/*
 * Matches reference: bottom-left pill/rounded rect,
 * frosted glass (blur + semi-transparent white),
 * dark text, medium weight
 */
.psl-card__label {
    position: absolute;
    bottom: 20px;
    left: 16px;

    /* frosted glass */
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    /* pill shape */
    border-radius: 8px;
    padding: 9px 18px 9px 14px;

    /* typography */
    font-size: 15px;
    font-weight: 500;
    color: #1a1a1a;
    letter-spacing: 0.01em;
    white-space: nowrap;

    /* subtle border */
    border: 1px solid rgba(255, 255, 255, 0.6);

    /* slide up on hover */
    transition: transform 0.3s ease, background 0.3s ease;
}

.psl-card:hover .psl-card__label {
    background: rgba(255, 255, 255, 0.72);
    transform: translateY(-3px);
}

/* ── ERROR ─────────────────────────────────── */
.psl-error {
    padding: 14px 18px;
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: 4px;
    font-size: 13px;
    color: #555;
    text-align: center;
    font-family: monospace;
    margin: 20px;
}

/* ══════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════ */

/* Tablet: 2 full + peek */
@media (max-width: 900px) {
    .psl-track {
        height: var(--psl-height, 420px);
    }
    .psl-card {
        flex: 0 0 calc(50% - 2px);
    }
}

/* Mobile: 1 full + peek */
@media (max-width: 600px) {
    .psl-track {
        height: var(--psl-height, 380px);
        gap: 3px;
    }
    .psl-card {
        flex: 0 0 calc(80% - 2px);
        min-width: 160px;
    }
    .psl-card__label {
        font-size: 13px;
        padding: 8px 14px 8px 12px;
        bottom: 14px;
        left: 12px;
    }
    .psl-arrow {
        width: 36px;
        height: 36px;
    }
    .psl-arrow svg {
        width: 15px;
        height: 15px;
    }
    .psl-arrow--prev { left:  10px; }
    .psl-arrow--next { right: 10px; }
    .psl-heading {
        font-size: 18px;
        padding: 32px 20px 22px;
    }
}

/* Small mobile */
@media (max-width: 400px) {
    .psl-card {
        flex: 0 0 calc(88% - 2px);
    }
}