/*** POJEDYNCZY PRODUKT - AMAWID ***/

.woocommerce div.product div.images .woocommerce-product-gallery__image a {
    min-height: 450px;
}

/* =========================================================
   FILM
   ========================================================= */

.amawid-product-video {
    clear: both;
    width: 100%;
    margin: 16px 0 40px;
}

.amawid-product-video-inner {
    width: min(1200px, 100%);
    margin: 0 auto;
}

.amawid-product-video h2 {
    margin: 0 0 18px;
    font-size: 28px;
    line-height: 1.2;
}

.amawid-video-wrap {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

.amawid-video-wrap iframe,
.amawid-video-wrap object,
.amawid-video-wrap embed {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* =========================================================
   PDF POD GŁÓWNYM ZDJĘCIEM - WEWNĄTRZ GALERII
   ========================================================= */

/* PDF dokładnie pod zdjęciem głównym */
#amawid-image-pdf-buttons {
    display: none;
}

#amawid-image-pdf-buttons.is-ready {
    display: block;
}

.single-product div.product .woocommerce-product-gallery {
    display: flex;
    flex-direction: column;
}

.single-product div.product .woocommerce-product-gallery > .woocommerce-product-gallery__wrapper {
    order: 1;
}

.single-product div.product .woocommerce-product-gallery > #amawid-image-pdf-buttons {
    order: 2;
    width: 100%;
    margin-top: 16px;
    margin-bottom: 0;
    float: none;
    clear: both;
}

.single-product div.product .woocommerce-product-gallery > #amawid-image-pdf-buttons .amawid-image-pdf-buttons__inner {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.single-product div.product .woocommerce-product-gallery > #amawid-image-pdf-buttons .amawid-image-pdf-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 50px;
    padding: 12px 16px;
    background: #1f3f95;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    border: 2px solid #1f3f95;
    transition: transform 0.2s ease, opacity 0.2s ease;
    min-width: 320px;
}

.single-product div.product .woocommerce-product-gallery > #amawid-image-pdf-buttons .amawid-image-pdf-button__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    min-width: 22px;
    height: 22px;
    /*background: #fff;*/
    border-radius: 10px;
    color: #1f3f95;
    box-shadow: inset 0 0 0 1px rgba(31, 63, 149, 0.08);
}

.single-product div.product .woocommerce-product-gallery > #amawid-image-pdf-buttons .amawid-image-pdf-button__icon svg {
    width: 24px;
    height: 24px;
    display: block;
    fill: #fff;
}

.single-product div.product .woocommerce-product-gallery > #amawid-image-pdf-buttons .amawid-image-pdf-button__text {
    line-height: 1.2;
}

@media (max-width: 991px) {
    .single-product div.product .woocommerce-product-gallery > #amawid-image-pdf-buttons .amawid-image-pdf-buttons__inner {
        flex-direction: column;
    }

    .single-product div.product .woocommerce-product-gallery > #amawid-image-pdf-buttons .amawid-image-pdf-button {
        width: 100%;
        justify-content: flex-start;
    }
}

/* =========================================================
   GALERIA / SLIDER
   ========================================================= */

.amawid-separated-gallery {
    clear: both;
    width: 100%;
    margin: 40px 0 0;
}

.amawid-separated-gallery__inner {
    width: min(1200px, 100%);
    margin: 0 auto;
}

.amawid-separated-gallery__title {
    margin: 0 0 18px;
    font-size: 28px;
    line-height: 1.2;
}

.amawid-gallery-swiper {
    position: relative;
    padding: 0 42px 40px;
}

.amawid-gallery-swiper .swiper-slide {
    height: auto;
}

.amawid-separated-gallery__item {
    display: block;
    text-decoration: none;
}

.amawid-separated-gallery__item img {
    display: block;
    width: 100%;
    height: 260px;
    object-fit: cover;
    cursor: zoom-in;
}

.amawid-gallery-button-prev,
.amawid-gallery-button-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: auto;
    height: auto;
    margin-top: 0;
    z-index: 10;
    cursor: pointer;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.amawid-gallery-button-prev {
    left: 8px;
}

.amawid-gallery-button-next {
    right: 8px;
}

.amawid-gallery-button-prev::after {
    content: '‹';
    font-size: 42px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.amawid-gallery-button-next::after {
    content: '›';
    font-size: 42px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

/* =========================================================
   LIGHTBOX
   ========================================================= */

.amawid-lightbox {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.9);
    z-index: 999999;
}

.amawid-lightbox.is-open {
    display: flex;
}

.amawid-lightbox-image {
    display: block;
    max-width: 92vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    background: #fff;
}

.amawid-lightbox-close {
    position: absolute;
    top: 12px;
    right: 18px;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 42px;
    line-height: 1;
    cursor: pointer;
}

.amawid-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 54px;
    height: 54px;
    border: 0;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 42px;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
}

.amawid-lightbox-prev {
    left: 20px;
}

.amawid-lightbox-next {
    right: 20px;
}

body.amawid-lightbox-open {
    overflow: hidden;
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 991px) {
    .single-product div.product .amawid-image-pdf-buttons {
        float: none;
        width: 100%;
        clear: both;
    }

    .single-product div.product .amawid-image-pdf-buttons__inner {
        flex-direction: column;
    }

    .single-product div.product .amawid-image-pdf-button {
        width: 100%;
        justify-content: flex-start;
    }

    .amawid-gallery-swiper {
        padding-left: 0;
        padding-right: 0;
    }

    .amawid-gallery-button-prev,
    .amawid-gallery-button-next {
        display: none;
    }

    .amawid-separated-gallery__item img {
        height: 220px;
    }
}