/* ==========================================================
   AMA Candle Gallery v7 – Styles
   ========================================================== */

/* ---- Wrapper: full viewport width ---- */
.acg-wrapper {
    width: 100vw;
    max-width: 100vw;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    padding: 0;
    font-family: inherit;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* ---- Controls bar ---- */
.acg-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-bottom: 24px;
    padding: 10px 20px;
}

/* ---- Lit / Unlit toggle switch ---- */
.acg-toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.acg-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.acg-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.acg-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    border-radius: 26px;
    transition: background-color 0.3s ease;
}

.acg-slider::before {
    content: "";
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: #fff;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.acg-switch input:checked + .acg-slider {
    background-color: #E67E22;
}

.acg-switch input:checked + .acg-slider::before {
    transform: translateX(24px);
}

/* ---- Gallery grid ---- */
.acg-gallery {
    display: grid;
    grid-template-columns: repeat(var(--acg-columns, 4), 1fr);
    gap: var(--acg-gap, 10px);
}

/* ---- Individual item ---- */
.acg-item {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    border-radius: 0;
    text-decoration: none;
}

.acg-item:hover {
    opacity: 0.9;
}

/* ---- Image stack ---- */
.acg-image-stack {
    position: relative;
    width: 100%;
    height: 100%;
}

.acg-img-base {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.acg-img-overlay {
    pointer-events: none;
}

/* ---- Responsive: mobile columns from setting ---- */
@media (max-width: 768px) {
    .acg-gallery {
        grid-template-columns: repeat(var(--acg-mobile-columns, 2), 1fr) !important;
    }

    .acg-controls {
        gap: 16px;
    }
}
