/* ============================================================
   Editorial Carousel — editorial-carousel.css
   Cinematic, full-bleed, editorial photo carousel for WordPress
   ============================================================ */

:root {
    --edcar-height:    520px;
    --edcar-gap:       0px;
    --edcar-ctrl-size: 42px;
    --edcar-ctrl-gap:  8px;
    --edcar-bg:        #e8e8e5;
    --edcar-arrow-color: #111;
    --edcar-arrow-hover: #fff;
    --edcar-arrow-bg:    transparent;
    --edcar-arrow-hover-bg: #111;
    --edcar-radius:    0px;
}

/* ── Wrapper ── */
.edcar-wrap {
    position: relative;
    width: 100%;
    background: var(--edcar-bg);
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
}

/* ── Scrollable track outer ── */
.edcar-track-outer {
    width: 100%;
    overflow: hidden;
    cursor: grab;
}
.edcar-track-outer.edcar-grabbing {
    cursor: grabbing;
}

/* ── Inner track ── */
.edcar-track {
    display: flex;
    flex-direction: row;
    gap: var(--edcar-gap);
    height: var(--edcar-height);
    will-change: transform;
    transition: transform var(--edcar-speed, 600ms) cubic-bezier(0.77, 0, 0.18, 1);
}
.edcar-track.edcar-no-transition {
    transition: none !important;
}

/* ── Individual slides ── */
.edcar-slide {
    flex-shrink: 0;
    height: 100%;
    overflow: hidden;
    border-radius: var(--edcar-radius);
}
.edcar-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    pointer-events: none;
    transition: transform 0.6s ease;
}
.edcar-slide:hover img {
    transform: scale(1.025);
}

/* ── Controls bar ── */
.edcar-controls {
    display: flex;
    align-items: center;
    gap: var(--edcar-ctrl-gap);
    padding: 14px 18px;
    background: var(--edcar-bg);
}

/* ── Arrow buttons ── */
.edcar-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--edcar-ctrl-size);
    height: var(--edcar-ctrl-size);
    border: 1.5px solid var(--edcar-arrow-color);
    border-radius: 50%;
    background: var(--edcar-arrow-bg);
    color: var(--edcar-arrow-color);
    cursor: pointer;
    transition: background 0.22s ease, color 0.22s ease, border-color 0.22s ease,
                transform 0.18s ease, opacity 0.22s ease;
    flex-shrink: 0;
    padding: 0;
    outline: none;
}
.edcar-btn svg {
    width: 18px;
    height: 18px;
    display: block;
}
.edcar-btn:hover {
    background: var(--edcar-arrow-hover-bg);
    color: var(--edcar-arrow-hover);
    border-color: var(--edcar-arrow-hover-bg);
    transform: scale(1.08);
}
.edcar-btn:active {
    transform: scale(0.95);
}
.edcar-btn:focus-visible {
    box-shadow: 0 0 0 3px rgba(0,0,0,0.25);
}
.edcar-btn[disabled] {
    opacity: 0.3;
    cursor: default;
    pointer-events: none;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .edcar-wrap {
        --edcar-height: 260px;
    }
    .edcar-controls {
        padding: 10px 12px;
    }
    .edcar-btn {
        --edcar-ctrl-size: 36px;
    }
    .edcar-btn svg {
        width: 15px;
        height: 15px;
    }
}
@media (max-width: 480px) {
    .edcar-wrap {
        --edcar-height: 200px;
    }
}

/* ── Dark mode support ── */
@media (prefers-color-scheme: dark) {
    .edcar-wrap {
        --edcar-bg: #1a1a1a;
        --edcar-arrow-color: #eee;
        --edcar-arrow-hover-bg: #eee;
        --edcar-arrow-hover: #111;
    }
}
