/* =====================================================================
   Gateway Gold large image carousel (ggc-)
   Self-contained overlay viewer launched from the listing row thumbnails.
   All classes are prefixed `ggc-` so nothing collides with the existing
   row carousel styles (.carousel-image / .carousel-dots / .dot / etc).
   Reuses the site palette vars (--blue-medium, --white, --font-family).
   ===================================================================== */

.ggc-overlay {
    /* coverflow tuning knobs */
    --cf-spread-x: 150px;
    --cf-rotate: 7deg;
    --cf-depth: 110px;
    --cf-scale-step: 0.16;
    /* focused-image size budget (fraction of viewport, with px caps) */
    --cf-max-vw: 0.58;
    --cf-max-vh: 0.74;
    --cf-max-w: 820px;
    --cf-max-h: 820px;

    position: fixed; inset: 0;
    background: rgba(8, 18, 38, 0.94);
    z-index: 5000;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: var(--font-family, 'Barlow', sans-serif);
    -webkit-user-select: none; user-select: none;
}
.ggc-overlay.ggc-visible { display: flex; }
body.ggc-noscroll { overflow: hidden; }

.ggc-title {
    color: var(--white, #fff);
    font-size: 1.05rem; font-weight: 600; letter-spacing: 0.01em;
    margin-bottom: 0.35rem; text-align: center;
}
/* Reserves its line height always, so toggling it never shifts the image. */
.ggc-note {
    height: 14px; line-height: 14px; margin-bottom: 0.4rem;
    font-size: 0.72rem; color: var(--grey-light-1, #D2DFEF);
    text-align: center; visibility: hidden;
}
.ggc-note.ggc-show { visibility: visible; }

.ggc-stage {
    position: relative;
    width: 92vw; height: 80vh;
    perspective: 2000px;
    touch-action: none;
}

.ggc-item {
    position: absolute; inset: 0; margin: auto;
    /* width/height set per-image in JS so each card hugs its aspect ratio */
    border-radius: 10px;
    overflow: hidden;
    background: var(--white, #fff);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
    transform-style: preserve-3d;
    will-change: transform;
    cursor: grab;
}
.ggc-item img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}
.ggc-report-card {
    position: relative;
    width: 100%;
    height: 100%;
    background: var(--white, #fff);
}
.ggc-report-frame {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    background: var(--white, #fff);
    opacity: 0;
    transition: opacity 0.18s ease;
}
.ggc-report-frame.ggc-loaded {
    opacity: 1;
}
.ggc-report-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 24px;
    background: var(--white, #fff);
    color: var(--blue-dark, #0b305f);
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    z-index: 1;
}
.ggc-report-loading.ggc-hidden {
    display: none;
}
.ggc-report-spinner {
    width: 38px;
    height: 38px;
    border: 4px solid var(--grey-light-2, #d2dfef);
    border-top-color: var(--blue-medium, #1D7AEC);
    border-radius: 50%;
    animation: ggc-report-spin 0.8s linear infinite;
}
@keyframes ggc-report-spin {
    to { transform: rotate(360deg); }
}
.ggc-stage.ggc-dragging .ggc-item { cursor: grabbing; }

.ggc-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 46px; height: 46px; z-index: 5002;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #fff; border-radius: 50%;
    font-size: 1.5rem; line-height: 1; cursor: pointer;
    transition: background .2s;
}
.ggc-nav:hover { background: var(--blue-medium, #1D7AEC); border-color: var(--blue-medium, #1D7AEC); }
.ggc-prev { left: 12px; }
.ggc-next { right: 12px; }

.ggc-counter {
    margin-top: 0.9rem; color: var(--grey-light-1, #D2DFEF);
    font-size: 0.9rem; letter-spacing: 0.05em; font-weight: 500;
}
.ggc-dots { display: flex; gap: 8px; justify-content: center; margin-top: 0.6rem; flex-wrap: wrap; max-width: 80vw; }
.ggc-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    transition: background .25s, transform .25s; cursor: pointer;
}
.ggc-dot:hover { background: rgba(255, 255, 255, 0.5); }
.ggc-dot.ggc-active { background: var(--blue-medium, #1D7AEC); transform: scale(1.3); }

.ggc-close {
    position: absolute; top: 20px; right: 24px; z-index: 5003;
    width: 40px; height: 40px;
    background: transparent; border: none; padding: 0;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: color .2s, transform .2s;
}
.ggc-close:hover { color: #fff; transform: scale(1.12); }
.ggc-close svg { width: 22px; height: 22px; display: block; }

.ggc-hint { margin-top: 0.5rem; color: var(--grey-medium, #8C8C90); font-size: 0.75rem; }

/* --- vertical zoom bar (anchored to the image's top-right while zoomed) --- */
.ggc-zoombar {
    position: absolute; left: 0; top: 0;   /* exact position set in JS */
    z-index: 5002;
    display: none; flex-direction: column; align-items: center; gap: 7px;
    padding: 7px 5px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 14px;
    -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.ggc-zoombar.ggc-visible { display: flex; }
.ggc-zb-btn {
    width: 18px; height: 18px; border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff; font-size: 0.8rem; line-height: 1; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .2s, border-color .2s;
}
.ggc-zb-btn:hover { background: var(--blue-medium, #1D7AEC); border-color: var(--blue-medium, #1D7AEC); }
.ggc-zb-track {
    position: relative; width: 4px; height: 90px;
    background: rgba(255, 255, 255, 0.22); border-radius: 2px; cursor: pointer;
}
.ggc-zb-thumb {
    position: absolute; left: 50%; top: 0;
    transform: translateX(-50%);
    width: 11px; height: 11px; border-radius: 50%;
    background: var(--blue-medium, #1D7AEC); border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
    cursor: grab;
}
.ggc-zb-track.ggc-dragging .ggc-zb-thumb { cursor: grabbing; }
