/* ------------------------------------------------------------------
   Palermo: convert WPBakery's classic "Image Carousel"
   (.wpb_images_carousel) — which fails to initialise on this site and
   renders as a broken static block — into a clean, full-width,
   swipeable scroll-snap gallery (matches the wedding-page design).
   ------------------------------------------------------------------ */
.wpb_images_carousel { position: relative; }

/* Unclamp WPBakery's wrappers so the inner track can scroll */
.wpb_images_carousel .vc_carousel-inner,
.wpb_images_carousel .vc_carousel-slideline {
    overflow: visible !important;
    width: auto !important;
    height: auto !important;
}

/* The scroll track */
.wpb_images_carousel .vc_carousel-slideline-inner {
    position: static !important;
    transform: none !important;
    left: auto !important;
    width: 100% !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 8px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;            /* Firefox */
}
.wpb_images_carousel .vc_carousel-slideline-inner::-webkit-scrollbar { display: none; }

/* Slides: 3 across on desktop, plus ~1/8 of the 4th peeking as a "more to
   scroll" cue (3 full slides + 3 gaps + 1/8 slide = the track width). */
.wpb_images_carousel .vc_item {
    flex: 0 0 calc((100% - 24px) / 3.125);
    width: auto !important;
    margin: 0 !important;
    scroll-snap-align: start;
}
.wpb_images_carousel .vc_item .vc_inner,
.wpb_images_carousel .vc_item a { display: block; height: 100%; }
.wpb_images_carousel .vc_item img {
    display: block;
    width: 100%;
    height: clamp(240px, 30vw, 400px);
    object-fit: cover;
    border-radius: 4px;
}

/* Hide WPBakery's native (non-functional) controls */
.wpb_images_carousel .vc_carousel-control { display: none !important; }

/* Custom prev/next arrows */
.pcc-car-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.92);
    color: #2d2d2d;
    font-size: 22px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    transition: background 0.2s ease, color 0.2s ease;
}
.pcc-car-nav:hover { background: #2d2d2d; color: #fff; }
.pcc-car-prev { left: 12px; }
.pcc-car-next { right: 12px; }

/* Tablet: 2 across */
@media (min-width: 601px) and (max-width: 991px) {
    .wpb_images_carousel .vc_item { flex-basis: calc((100% - 8px) / 2); }
}
/* Mobile: ~1 with a peek of the next, rely on swipe (hide arrows) */
@media (max-width: 600px) {
    .wpb_images_carousel .vc_item { flex-basis: 82%; }
    .pcc-car-nav { display: none; }
}

/* ------------------------------------------------------------------
   Click-to-open lightbox. The "View Detail" hover overlay (injected as a
   ::after in functions.php) is otherwise decorative — pcc-gallery.js wires
   each slide to open its full-res image here. Cursor signals it's clickable.
   ------------------------------------------------------------------ */
.wpb_images_carousel .vc_item .vc_inner { cursor: pointer; }

.pcc-lb {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 5vmin;
    background: rgba(20, 18, 16, 0.92);
}
.pcc-lb--open { display: flex; }
.pcc-lb__img {
    max-width: min(92vw, 1000px);
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}
.pcc-lb__close,
.pcc-lb__nav {
    position: absolute;
    border: 0;
    cursor: pointer;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: #2d2d2d;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
    transition: background 0.2s ease, color 0.2s ease;
}
.pcc-lb__close:hover,
.pcc-lb__nav:hover { background: #C19C5C; color: #fff; } /* antique gold accent */
.pcc-lb__close { top: 24px; right: 24px; width: 44px; height: 44px; font-size: 26px; }
.pcc-lb__nav { top: 50%; transform: translateY(-50%); width: 52px; height: 52px; font-size: 30px; }
.pcc-lb__prev { left: 24px; }
.pcc-lb__next { right: 24px; }
@media (max-width: 600px) {
    .pcc-lb__nav { width: 42px; height: 42px; font-size: 24px; }
    .pcc-lb__prev { left: 10px; }
    .pcc-lb__next { right: 10px; }
}
