.pd-sec-images-details {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 4px;
    padding: 0;
    margin: 0;
    overflow: hidden;
}

/* ── Main area ─────────────────────────────────────── */
.pdid-main-area {
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.pdid-main-img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1.05 / 1;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
    background-color: #f3f0fa;
    border-radius: 14px;
    overflow: hidden;
    box-sizing: border-box;
    position: relative;
}

.pdid-main-img--empty {
    background: #f3f0fa;
}

.pdid-main-img--png {
    display: flex;
    align-items: center;
    justify-content: center;
}

.pdid-png-img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 88%;
    max-height: 88%;
    object-fit: contain;
    pointer-events: none;
}

/* ── Float button ──────────────────────────────────── */
.pdid-float-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.18s, box-shadow 0.18s;
    box-shadow: 0 2px 10px rgba(91, 33, 182, 0.13);
}

.pdid-float-btn:hover {
    transform: scale(1.12);
    box-shadow: 0 4px 18px rgba(138, 43, 226, 0.28);
}

/* ── Float menu ────────────────────────────────────── */
.pdid-float-menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 54px;
    right: 10px;
    z-index: 20;
    background: #fff;
    border-radius: 13px;
    box-shadow: 0 6px 24px rgba(16, 24, 40, 0.14);
    overflow: hidden;
    min-width: 195px;
}

.pdid-float-menu.open {
    display: flex;
    animation: pdid-menu-in 0.16s cubic-bezier(.4, 0, .2, 1);
}

@keyframes pdid-menu-in {
    from { opacity: 0; transform: translateY(-6px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0)    scale(1);    }
}

.pdid-fm-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 11px;
    padding: 11px 16px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    color: #2b2250;
    text-align: left;
    transition: background 0.13s, color 0.13s;
    border-bottom: 1px solid #f5f6f8;
}

.pdid-fm-item:last-child {
    border-bottom: none;
}

.pdid-fm-item:hover {
    background: #ede9fe;
    color: blueviolet;
}

/* ── Thumbnails row ────────────────────────────────── */
.pdid-thumbs-row {
    position: relative;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.pdid-thumbs-track {
    width: 100%;
    display: flex;
    flex-direction: row;
    gap: 8px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    padding: 4px 0;
    box-sizing: border-box;
}

.pdid-thumbs-track::-webkit-scrollbar {
    display: none;
}

.pdid-thumb {
    flex-shrink: 0;
    width: 68px;
    aspect-ratio: 1 / 1;
    border-radius: 9px;
    border: 2px solid transparent;
    overflow: hidden;
    cursor: pointer;
    padding: 0;
    background: none;
    transition: border-color 0.18s, transform 0.15s;
}

.pdid-thumb.active {
    border-color: blueviolet;
}

.pdid-thumb:hover {
    transform: scale(1.07);
}

.pdid-thumb-inner {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pdid-thumb-png {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 84%;
    max-height: 84%;
    object-fit: contain;
    pointer-events: none;
}

/* ── Nav arrows ────────────────────────────────────── */
.pdid-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s, transform 0.15s;
    padding: 0;
    box-shadow: 0 2px 8px rgba(91, 33, 182, 0.12);
    visibility: hidden;
}

.pdid-nav-btn[aria-label="Précédent"] {
    left: 0;
}

.pdid-nav-btn[aria-label="Suivant"] {
    right: 0;
}

.pdid-nav-btn:hover {
    background: #ede9fe;
    transform: translateY(-50%) scale(1.1);
}

/* ── Mobile: fullwidth cover + floating thumbs ─────── */
@media (max-width: 768px) {
    .pd-sec-images-details {
        position: relative;
        gap: 0;
    }

    .pdid-main-img {
        border-radius: 0;
        width: 100%;
        aspect-ratio: 1.05 / 1;
        background-size: cover;
    }

    .pdid-thumbs-row {
        position: absolute;
        bottom: 12px;
        left: 0;
        right: 0;
        z-index: 10;
        display: flex;
        justify-content: center;
        padding: 0 12px;
    }

    .pdid-thumbs-track {
        width: auto;
        max-width: 100%;
        gap: 6px;
        padding: 6px 10px;
        background: rgba(0, 0, 0, 0.32);
        backdrop-filter: blur(8px);
        border-radius: 12px;
        justify-content: flex-start;
    }

    .pdid-thumb {
        width: 46px;
        border-radius: 7px;
        border-color: transparent;
    }

    .pdid-thumb.active {
        border-color: #fff;
    }

    .pdid-nav-btn {
        display: none;
    }
}
