/* CT Divi Spotlight Gallery — frontend.css */

.ct-dsg-spotlight-module .et_pb_module_inner {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

/* ── Wrapper ─────────────────────────────────────────────── */
.ct-dsg-spotlight-wrapper {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(72px, clamp(72px, 22%, 120px));
    align-items: start;
    gap: 12px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

/* ── Main pane ───────────────────────────────────────────── */
.ct-dsg-main-pane {
    min-width: 0;
    width: 100%;
    overflow: hidden;
    border-radius: 16px;
    background: #f0f0f0;
    aspect-ratio: 5 / 4;
    min-height: 0;
    position: relative;
}

.ct-dsg-main-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 16px;
    transition: opacity 0.3s ease;
}

.ct-dsg-main-img.ct-dsg-fading {
    opacity: 0;
}

/* ── Thumbnails pane ─────────────────────────────────────── */
.ct-dsg-thumbs-pane {
    display: grid;
    gap: 12px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

/* ── Individual thumbnail ────────────────────────────────── */
.ct-dsg-thumb {
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    background: #f0f0f0;
    aspect-ratio: 5 / 4;
    width: 100%;
    min-height: 0;
    box-sizing: border-box;
    position: relative;
}

.ct-dsg-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
    border-radius: 11px;
}

.ct-dsg-thumb:hover {
    transform: scale(1.04);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
    border-color: rgba(255, 255, 255, 0.6);
}

.ct-dsg-thumb:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.ct-dsg-thumb--active {
    border-color: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.22);
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 767px) {
    .ct-dsg-spotlight-wrapper {
        grid-template-columns: 1fr;
    }

    .ct-dsg-thumbs-pane {
        grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
        width: 100%;
    }

    .ct-dsg-thumb {
        min-height: unset;
        height: auto;
    }

    .ct-dsg-main-pane {
        width: 100%;
    }
}

/* ── Empty state ─────────────────────────────────────────── */
.ct-dsg-empty {
    padding: 24px;
    text-align: center;
    color: #888;
    font-style: italic;
}
