/* =========================
   ADMIN GALLERY
========================= */

#pp7-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
    padding: 0;
}

#pp7-preview li {
    list-style: none;
    position: relative;
    cursor: move;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#pp7-preview img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}

#pp7-preview .remove {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #d63638;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    cursor: pointer;
    font-size: 12px;
    line-height: 18px;
    text-align: center;
}

#pp7-preview li.dragging {
    opacity: 0.8;
    transform: scale(1.08);
    z-index: 999;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

.pp7-placeholder {
    background: rgba(0, 0, 0, 0.05);
    border: 2px dashed #999;
    border-radius: 6px;
}

.pp7-image-title {
    margin-top: 6px;
    font-size: 11px;
    line-height: 1.3;
    text-align: center;
    color: #1d2327;
    word-break: break-word;
    max-width: 100px;
}

#pp7-preview li {
    width: 100px;
}

/* =========================
   FRONTEND GRID
========================= */

.pp7-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.pp7-grid img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    display: block;
}

/* =========================
   3-SLIDE CENTERED CAROUSEL
========================= */

.pp7-swiper {
    width: 100%;
    height: 650px;
    max-height: 650px;
    overflow: hidden;
    position: relative;
}

.pp7-swiper .swiper-wrapper {
    height: 100%;
    align-items: stretch;
}

.pp7-swiper .swiper-slide {
    height: 100%;
    overflow: hidden;
    opacity: 0.92;
    transition: opacity 0.3s ease;
}

.pp7-swiper .swiper-slide-active {
    opacity: 1;
}

.pp7-slide-inner {
    width: 100%;
    height: 100%;
}

.pp7-swiper img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

/* Tablet */
@media (max-width: 1023px) {
    .pp7-swiper {
        height: 400px;
        max-height: 400px;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .pp7-swiper {
        height: 300px;
        max-height: 300px;
    }
}

/* =========================
   NAVIGATION
========================= */

.pp7-swiper .swiper-button-prev,
.pp7-swiper .swiper-button-next {
    width: 48px;
    height: 48px;
    margin-top: 0 !important;
    top: 50%;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff !important;
    background: rgba(0, 0, 0, 0.35) !important;
    border-radius: 999px;
    transition: background 0.2s ease, opacity 0.2s ease;
    cursor: pointer;
    background-image: none !important;
}

.pp7-swiper .swiper-button-prev {
    left: 16px;
    transform: translateY(-50%) !important;
}

.pp7-swiper .swiper-button-next {
    right: 16px;
    transform: translateY(-50%) !important;
}

.pp7-swiper .swiper-button-prev:hover,
.pp7-swiper .swiper-button-next:hover {
    background: rgba(0, 0, 0, 0.55) !important;
}

.pp7-swiper .swiper-button-prev::before,
.pp7-swiper .swiper-button-prev::after,
.pp7-swiper .swiper-button-next::before,
.pp7-swiper .swiper-button-next::after {
    content: none !important;
    display: none !important;
    background-image: none !important;
}

.pp7-swiper .swiper-button-prev span,
.pp7-swiper .swiper-button-next span {
    display: block;
    width: 12px;
    height: 12px;
    border-top: 2px solid #fff;
    border-right: 2px solid #fff;
    pointer-events: none;
}

.pp7-swiper .swiper-button-prev span {
    transform: rotate(-135deg) !important;
    margin-left: 4px;
}

.pp7-swiper .swiper-button-next span {
    transform: rotate(45deg) !important;
    margin-right: 4px;
}

@media (max-width: 767px) {
    .pp7-swiper .swiper-button-prev,
    .pp7-swiper .swiper-button-next {
        width: 40px;
        height: 40px;
    }

    .pp7-swiper .swiper-button-prev {
        left: 10px;
    }

    .pp7-swiper .swiper-button-next {
        right: 10px;
    }

    .pp7-swiper .swiper-button-prev span,
    .pp7-swiper .swiper-button-next span {
        width: 10px;
        height: 10px;
    }
}

/* =========================
   PP7 PROPHOTO-STYLE CAROUSEL
========================= */

.pp7-carousel {
    --pp7-carousel-height: 650px;
    --pp7-carousel-gap: 2px;
    position: relative;
    width: 100%;
}

.pp7-carousel-viewport {
    width: 100%;
    height: var(--pp7-carousel-height);
    overflow: hidden;
    position: relative;
    cursor: grab;
    touch-action: pan-y;
}

.pp7-carousel.is-dragging .pp7-carousel-viewport {
    cursor: grabbing;
}

.pp7-carousel-track {
    display: flex;
    align-items: stretch;
    gap: var(--pp7-carousel-gap);
    height: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
    transform: translate3d(0, 0, 0);
    will-change: transform;
}

.pp7-carousel-slide {
    flex: 0 0 auto;
    height: 100%;
    opacity: 0.92;
    transition: opacity 0.3s ease;
    overflow: hidden;
    user-select: none;
}

.pp7-carousel-slide.is-current {
    opacity: 1;
}

.pp7-carousel-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

.pp7-carousel-prev,
.pp7-carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.pp7-carousel-prev {
    left: 16px;
}

.pp7-carousel-next {
    right: 16px;
}

.pp7-carousel-prev span,
.pp7-carousel-next span {
    display: block;
    width: 12px;
    height: 12px;
    border-top: 2px solid #fff;
    border-right: 2px solid #fff;
}

.pp7-carousel-prev span {
    transform: rotate(-135deg);
    margin-left: 4px;
}

.pp7-carousel-next span {
    transform: rotate(45deg);
    margin-right: 4px;
}

@media (max-width: 1023px) {
    .pp7-carousel {
        --pp7-carousel-height: 400px;
    }
}

@media (max-width: 767px) {
    .pp7-carousel {
        --pp7-carousel-height: 300px;
    }

    .pp7-carousel-prev,
    .pp7-carousel-next {
        width: 40px;
        height: 40px;
    }

    .pp7-carousel-prev {
        left: 10px;
    }

    .pp7-carousel-next {
        right: 10px;
    }
}