/* =============================================
   WC Advanced Gallery Slider — Frontend Styles
   ============================================= */

:root {
    --wc-ags-primary: #0073aa;
    --wc-ags-active-border: 2px solid #0073aa;
    --wc-ags-thumb-gap: 8px;
    --wc-ags-transition: 0.35s ease;
    --wc-ags-arrow-size: 40px;
    --wc-ags-arrow-bg: rgba(0,0,0,0.5);
    --wc-ags-arrow-color: #fff;
    --wc-ags-radius: 4px;
}

/* ---- Wrapper ---- */
.wc-ags-wrapper {
    display: flex;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
    gap: var(--wc-ags-thumb-gap);
}

/* ---- Layout Variants ---- */
.wc-ags-wrapper.layout-thumbs-bottom { flex-direction: column; }
.wc-ags-wrapper.layout-thumbs-left   { flex-direction: row; }
.wc-ags-wrapper.layout-thumbs-right  { flex-direction: row-reverse; }
.wc-ags-wrapper.layout-no-thumbs     { flex-direction: column; }

/* ---- Main Area ---- */
.wc-ags-main-area {
    position: relative;
    flex: 1;
    overflow: hidden;
    border-radius: var(--wc-ags-radius);
}

.wc-ags-main-slider {
    display: flex;
    transition: transform var(--wc-ags-transition);
    will-change: transform;
    height: 100%;
}

.wc-ags-main-slider.fade-mode {
    display: block;
    position: relative;
}

/* ---- Slides ---- */
.wc-ags-slide {
    min-width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wc-ags-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: transform 0.4s ease;
}

/* Fade mode slides */
.wc-ags-main-slider.fade-mode .wc-ags-slide {
    min-width: 100%;
    position: absolute;
    top: 0; left: 0;
    opacity: 0;
    transition: opacity var(--wc-ags-transition);
    pointer-events: none;
}
.wc-ags-main-slider.fade-mode .wc-ags-slide.active {
    opacity: 1;
    position: relative;
    pointer-events: auto;
}

/* Zoom on hover */
.wc-ags-wrapper.zoom-enabled .wc-ags-slide:hover img {
    transform: scale(1.06);
}

/* Lightbox link cursor */
.wc-ags-lightbox-trigger {
    display: block;
    width: 100%;
    height: 100%;
    cursor: zoom-in;
}

/* ---- Navigation Arrows ---- */
.wc-ags-prev,
.wc-ags-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: var(--wc-ags-arrow-bg);
    color: var(--wc-ags-arrow-color);
    border: none;
    cursor: pointer;
    width: var(--wc-ags-arrow-size);
    height: var(--wc-ags-arrow-size);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    border-radius: 50%;
    transition: background 0.2s;
    outline: none;
}
.wc-ags-prev { left: 10px; }
.wc-ags-next { right: 10px; }
.wc-ags-prev:hover, .wc-ags-next:hover { background: rgba(0,0,0,0.8); }

/* ---- Dots ---- */
.wc-ags-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
}
.wc-ags-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    padding: 0;
    transition: background 0.2s, transform 0.2s;
}
.wc-ags-dot.active {
    background: #fff;
    transform: scale(1.3);
}

/* ---- Thumbnail Strip ---- */
.wc-ags-thumb-strip {
    display: flex;
    gap: var(--wc-ags-thumb-gap);
    padding: 4px 2px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
    flex-shrink: 0;
}

/* Vertical thumbs (left/right layouts) */
.layout-thumbs-left .wc-ags-thumb-strip,
.layout-thumbs-right .wc-ags-thumb-strip {
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: 500px;
}

.wc-ags-thumb {
    flex-shrink: 0;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: var(--wc-ags-radius);
    overflow: hidden;
    transition: border-color 0.2s, opacity 0.2s;
    opacity: 0.65;
}
.wc-ags-thumb img {
    display: block;
    object-fit: cover;
    width: 100%;
    height: 100%;
}
.wc-ags-thumb:hover {
    opacity: 0.9;
}
.wc-ags-thumb.active {
    border-color: var(--wc-ags-primary);
    opacity: 1;
}

/* ---- No image placeholder ---- */
.wc-ags-no-image img {
    width: 100%;
    max-height: 500px;
    object-fit: contain;
}

/* ---- Lightbox Overlay ---- */
.wc-ags-lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: wc-ags-fade-in 0.25s ease;
}

@keyframes wc-ags-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.wc-ags-lightbox-images {
    position: relative;
    display: flex;
    max-width: 90vw;
    max-height: 90vh;
}

.wc-ags-lightbox-img {
    display: none;
    align-items: center;
    justify-content: center;
}
.wc-ags-lightbox-img.active {
    display: flex;
}
.wc-ags-lightbox-img img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}

.wc-ags-lightbox-close {
    position: fixed;
    top: 20px;
    right: 24px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    z-index: 1000000;
    padding: 4px 10px;
    transition: color 0.2s;
}
.wc-ags-lightbox-close:hover { color: #f00; }

.wc-ags-lightbox-prev,
.wc-ags-lightbox-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 16px 12px;
    z-index: 1000000;
    border-radius: 4px;
    transition: background 0.2s;
}
.wc-ags-lightbox-prev { left: 20px; }
.wc-ags-lightbox-next { right: 20px; }
.wc-ags-lightbox-prev:hover, .wc-ags-lightbox-next:hover { background: rgba(255,255,255,0.3); }

.wc-ags-lightbox-counter {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    font-family: sans-serif;
}

/* ---- Elementor placeholder ---- */
.wc-ags-elementor-notice {
    padding: 20px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    font-family: sans-serif;
    color: #856404;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .layout-thumbs-left .wc-ags-thumb-strip,
    .layout-thumbs-right .wc-ags-thumb-strip {
        flex-direction: row;
        max-height: none;
        overflow-x: auto;
        overflow-y: hidden;
    }
    .wc-ags-wrapper.layout-thumbs-left,
    .wc-ags-wrapper.layout-thumbs-right {
        flex-direction: column;
    }
    .wc-ags-lightbox-prev,
    .wc-ags-lightbox-next {
        padding: 10px 8px;
        font-size: 18px;
    }
}
