/* ==========================================================================
   Product Gallery — Widget Styles
   ========================================================================== */

.ppv-gallery {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 100%;
    box-sizing: border-box;
}

.ppv-gallery *, .ppv-gallery *::before, .ppv-gallery *::after {
    box-sizing: border-box;
}

/* ── Main Image ── */
.ppv-gallery-main {
    position: relative;
    overflow: hidden;
    background-color: #f3f4f6;
    border-radius: 20px;
    line-height: 0;
}

.ppv-gallery-main-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    transition: opacity 0.25s ease;
}

.ppv-gallery-main-img.ppv-img-fade {
    opacity: 0;
}

/* ── Overlay Label ── */
.ppv-gallery-label {
    position: absolute;
    z-index: 2;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 4px;
    line-height: 1.4;
    pointer-events: none;
    font-family: inherit;
    white-space: nowrap;
}

/* Label Positions */
.ppv-gallery-label.ppv-label-bottom-left {
    bottom: 12px;
    left: 12px;
}

.ppv-gallery-label.ppv-label-bottom-center {
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
}

.ppv-gallery-label.ppv-label-bottom-right {
    bottom: 12px;
    right: 12px;
}

.ppv-gallery-label.ppv-label-top-left {
    top: 12px;
    left: 12px;
}

.ppv-gallery-label.ppv-label-top-center {
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
}

.ppv-gallery-label.ppv-label-top-right {
    top: 12px;
    right: 12px;
}

/* ── Thumbnails ── */
.ppv-gallery-thumbs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
}

.ppv-gallery-thumbs::-webkit-scrollbar {
    display: none;
}

.ppv-gallery-thumb {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 14px;
    border: 2px solid transparent;
    background-color: #f3f4f6;
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color 0.2s ease, opacity 0.2s ease;
}

.ppv-gallery-thumb:hover {
    border-color: #d1d5db;
}

.ppv-gallery-thumb.ppv-thumb-active {
    border-color: #1a1a1a;
}

/* ── Navigation Arrows ── */
.ppv-gallery .ppv-gallery-main .ppv-gallery-arrow {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 40px !important;
    height: 40px !important;
    border: none !important;
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: 50% !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #1a1a1a !important;
    z-index: 3 !important;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    opacity: 1;
    padding: 0 !important;
    margin: 0 !important;
    min-width: auto !important;
    min-height: auto !important;
    line-height: 1 !important;
    font-size: 0 !important;
    outline: none !important;
}

.ppv-gallery .ppv-gallery-main .ppv-gallery-arrow:hover {
    background: #ffffff !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
    transform: translateY(-50%) scale(1.08) !important;
}

.ppv-gallery .ppv-gallery-main .ppv-arrow-left {
    left: 12px !important;
    right: auto !important;
}

.ppv-gallery .ppv-gallery-main .ppv-arrow-right {
    right: 12px !important;
    left: auto !important;
}

/* ── Dot Indicators ── */
.ppv-gallery-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 3;
}

.ppv-gallery-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.ppv-gallery-dot.ppv-dot-active {
    background: #1a1a1a;
    width: 20px;
    border-radius: 4px;
}

.ppv-gallery-dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

.ppv-gallery-dot.ppv-dot-active:hover {
    background: #1a1a1a;
}

/* ── Responsive ── */

@media (max-width: 768px) {
    .ppv-gallery .ppv-gallery-main .ppv-gallery-arrow {
        width: 36px !important;
        height: 36px !important;
    }

    .ppv-gallery .ppv-gallery-main .ppv-arrow-left {
        left: 8px !important;
    }

    .ppv-gallery .ppv-gallery-main .ppv-arrow-right {
        right: 8px !important;
    }
}

@media (max-width: 768px) {
    .ppv-gallery-main {
        border-radius: 16px;
    }

    .ppv-gallery-label {
        font-size: 12px;
        padding: 5px 10px;
    }

    .ppv-gallery-thumb {
        width: 64px;
        height: 64px;
        border-radius: 6px;
    }
}

@media (max-width: 480px) {
    .ppv-gallery-label {
        font-size: 11px;
        padding: 4px 8px;
    }

    .ppv-gallery-thumb {
        width: 56px;
        height: 56px;
    }
}
