/* Styles communs : bouton d’image principale + galerie front Proxity */

/* Bouton "Définir comme image principale" dans le formulaire d’upload */

.proxity-main-image-control {
    margin-top: 8px;
    text-align: center;
}

.proxity-main-image-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: #f44336;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

.proxity-main-image-label:hover {
    background: #e53935;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.12);
}

.proxity-main-image-radio {
    margin-right: 6px;
    accent-color: #ff5252;
}

.proxity-main-image-text {
    white-space: normal;
}

/* Etat sélectionné */

.proxity-main-image-selected .proxity-main-image-label {
    background: #ff5252;
    box-shadow: 0 4px 10px rgba(0,0,0,0.16);
}

/* Responsiveness du bouton */

@media (max-width: 767px) {
    .proxity-main-image-label {
        font-size: 11px;
        padding: 5px 10px;
    }
}

/* ========================= */
/*   Galerie front Proxity    */
/* ========================= */

.proxity-front-gallery-wrapper {
    margin-top: 40px;
    margin-bottom: 20px;
    background: #fafafa;
    border-radius: 12px;
    padding: 16px;
}

.proxity-front-gallery-main {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.proxity-front-main-image-container {
    max-width: 100%;
    max-height: 450px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.proxity-front-main-image {
    max-width: 100%;
    max-height: 450px;
    object-fit: contain;
    display: none;
}

.proxity-front-main-image.is-active {
    display: block;
}

.proxity-front-nav {
    background: rgba(0,0,0,0.55);
    color: #fff;
    border: none;
    border-radius: 999px;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin: 0 8px;
    font-size: 18px;
    transition: background 0.2s ease, transform 0.15s ease;
}

.proxity-front-nav:hover {
    background: rgba(0,0,0,0.75);
    transform: translateY(-1px);
}

.proxity-front-zoom-trigger {
    position: absolute;
    right: 12px;
    bottom: 12px;
    border: none;
    border-radius: 999px;
    width: 36px;
    height: 36px;
    background: #f44336;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.25);
    transition: background 0.2s ease, transform 0.15s ease;
}

.proxity-front-zoom-trigger:hover {
    background: #e53935;
    transform: translateY(-1px);
}

/* Thumbnails */

.proxity-front-thumbs {
    display: flex;
    justify-content: center;
    margin-top: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.proxity-front-thumb {
    border: 2px solid transparent;
    padding: 0;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    background: transparent;
}

.proxity-front-thumb img {
    display: block;
    width: 80px;
    height: 60px;
    object-fit: cover;
}

.proxity-front-thumb.is-active {
    border-color: #f44336;
}

/* Lightbox */

.proxity-front-lightbox {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

.proxity-front-lightbox.is-open {
    display: flex;
}

.proxity-front-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.7);
}

.proxity-front-lightbox-inner {
    position: relative;
    max-width: 95%;
    max-height: 90%;
    background: #111;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.proxity-front-lightbox-image-container img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
}

.proxity-front-lightbox-close,
.proxity-front-lightbox-prev,
.proxity-front-lightbox-next {
    position: absolute;
    border: none;
    background: rgba(0,0,0,0.6);
    color: #fff;
    cursor: pointer;
    border-radius: 999px;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.proxity-front-lightbox-close {
    top: 10px;
    right: 10px;
}

.proxity-front-lightbox-prev {
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
}

.proxity-front-lightbox-next {
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}

/* Responsive */

@media (max-width: 767px) {
    .proxity-front-main-image-container {
        max-height: 320px;
    }
    .proxity-front-main-image {
        max-height: 320px;
    }
    .proxity-front-thumb img {
        width: 64px;
        height: 48px;
    }
}
