/* ==========================================================================
   WooCommerce Product Gallery Block — Frontend Styles (Splide)
   ========================================================================== */


.product_cat-cuisines .wp-block-wpcgb-product-gallery {
    background-color: #F9FAFB;
}
.wp-block-wpcgb-product-gallery {
    max-width: 100%;
    position: relative;
    width: 100%;
    background-color: #faf8f5;
}

/* ---- Main Wrapper (slider + floating content) ------------------------- */

.wpcgb-main-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 6px 6px 0 0;
}

/* ---- Main Slider ------------------------------------------------------ */

.wpcgb-main-slider {
    position: relative;
    z-index: 1;
}

.wpcgb-main-slider .splide__track {
    overflow: hidden;
}

/* Cover slide — image only, no overlay */
.wpcgb-cover {
    width: 100%;
    height: 85vh;
    position: relative;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}
.wpcgb-cover::after {
    content: '';
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.70) 0%, rgba(0, 0, 0, 0.00) 40%, rgba(0, 0, 0, 0.00) 100%);
}

/* ---- InnerBlocks Content (floats above all slides) -------------------- */

.wpcgb-cover__inner {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    width: 100%;
    max-width: var(--wp--style--global--wide-size);
    height: 100%;
    margin: 0 auto;
    padding-bottom: var(--wp--preset--spacing--tw-4);
    box-sizing: border-box;
    color: #ffffff;
    pointer-events: none;
}

/* Re-enable pointer events on actual content elements inside */
.wpcgb-cover__inner > * {
    pointer-events: all;
    max-width: 70%;
}

.wpcgb-cover__inner .taxonomy-product_tag a {
    text-decoration: none;
}


/* ---- Splide Arrow Overrides ------------------------------------------- */

.wpcgb-main-slider .splide__arrows {
    width: 100%;
    position: absolute;
    inset: 0;
    z-index: 3;
    justify-content: space-between;
    pointer-events: none;
}
.wpcgb-main-slider .splide__arrow {
    width: 48px !important;
    height: 48px !important;
    border: 1px solid rgba(255, 255, 255, 0.30) !important;
    background: rgba(255, 255, 255, 0.10) !important;
    backdrop-filter: blur(6px) !important;
}
.wpcgb-main-slider .splide__arrow--prev {
    margin-left: var(--wp--preset--spacing--tw-6) !important;
}
.wpcgb-main-slider .splide__arrow--next {
    margin-right: var(--wp--preset--spacing--tw-6) !important;
}

.wpcgb-main-slider .wpcgb-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 1;
    z-index: 3;
    pointer-events: all;
}

.wpcgb-main-slider .wpcgb-nav--prev {
    left: 16px;
}

.wpcgb-main-slider .wpcgb-nav--next {
    right: 16px;
}

.wpcgb-main-slider .wpcgb-nav:hover {
    background: rgba(0, 0, 0, 0.7);
}

.wpcgb-main-slider .wpcgb-nav:active {
    transform: translateY(-50%) scale(0.93);
}

.wpcgb-main-slider .wpcgb-nav svg {
    fill: #fff;
    width: 22px;
    height: 22px;
}

/* ---- Thumbnail Slider ------------------------------------------------- */

.wpcgb-thumb-slider {
    padding: var(--wp--preset--spacing--tw-4) 0 40px;
    max-width: var(--wp--style--global--wide-size);
    margin: 0 auto;
}

.wpcgb-thumb-slider .splide__track {
    overflow: visible;
}

.wpcgb-thumb-slider .splide__list {
    justify-content: flex-start !important;
    transform: none !important;
}

.wpcgb-thumb-slider .splide__slide {
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.55;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.00);
    transition: border-color 0.2s ease, opacity 0.2s ease, transform 0.15s ease;
}

.wpcgb-thumb-slider .splide__slide:hover {
    opacity: 0.85;
    transform: scale(1.05);
}

.wpcgb-thumb-slider .splide__slide.is-active {
    border: none !important;
    box-shadow: 0 0 0 1px #FAF8F5, 0 0 0 3px #B64E10;
    opacity: 1;
}

.wpcgb-thumb-slider .splide__slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ---- Responsive ------------------------------------------------------- */

@media (max-width: 1299px) {
    .wpcgb-main-slider {
        height: 60vh;
    }
    .wpcgb-thumb-slider {
        padding: var(--wp--preset--spacing--tw-4) 32px 40px;
    }
    .wpcgb-cover__inner {
        height: inherit;
        padding: 0 var(--wp--preset--spacing--tw-6) var(--wp--preset--spacing--tw-4);
    }
    .wpcgb-main-slider .splide__slide {
        height: 60vh !important;
    }
    .wpcgb-main-slider .splide__slide .wpcgb-cover {
        height: inherit;
    }
}
@media (max-width: 1024px) {
    
}
@media (max-width: 767px) {
    .wpcgb-cover__inner > * {
        max-width: 100%;
    }
    .wpcgb-thumb-slider {
        display: none;
    }
    .wpcgb-main-slider {
        height: 375px;
    }
    .wpcgb-main-slider .splide__slide {
        height: 375px !important;
    }
    .wpcgb-main-slider .splide__slide .wpcgb-cover {
        min-height: auto !important;
    }
}