/* ==========================================================================
   Zmienne. Nadpisz je w Blocksy (Dodatkowy CSS) albo na kontenerze .wcps-wrapper
   ========================================================================== */
.wcps-wrapper {
    --wcps-title-color: currentColor;
    --wcps-title-size: 18px;
    --wcps-price-color: currentColor;
    --wcps-price-size: 18px;
    --wcps-image-ratio: 1 / 1;
    --wcps-button-padding: 10px 25px;
    --wcps-arrow-size: 44px;
    --wcps-arrow-top: 40%;
    --wcps-arrow-color: #333;
    --wcps-arrow-bg: #fff;
    --wcps-arrow-hover-color: #fff;
    --wcps-arrow-hover-bg: #000;
    --wcps-bullet-color: #000;
    --swiper-pagination-color: var(--wcps-bullet-color);

    position: relative;
    margin: 20px 0;
    padding: 0 60px;
}

/* ==========================================================================
   Kontener i lista
   ========================================================================== */
.wcps-wrapper .wcps-slider {
    position: relative;
    overflow: hidden;
    padding-bottom: 40px;
}

.wcps-wrapper .wcps-slider ul.products.swiper-wrapper {
    display: flex;
    flex-wrap: nowrap;
    margin: 0;
    padding: 0;
    list-style: none;
}

.wcps-wrapper .wcps-slider ul.products.swiper-wrapper::before,
.wcps-wrapper .wcps-slider ul.products.swiper-wrapper::after {
    content: none;
    display: none;
}

.wcps-wrapper .wcps-slider ul.products > li.swiper-slide {
    display: flex;
    float: none;
    height: auto;
    margin-top: 0;
    margin-bottom: 0;
}

/* ==========================================================================
   Karta
   ========================================================================== */
.wcps-wrapper .wcps-slider ul.products li.product .wcps-product-inner {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    text-align: center;
}

.wcps-wrapper .wcps-slider ul.products li.product .wcps-actions-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin-top: auto;
}

/* ==========================================================================
   Zdjęcia i efekt hover
   ========================================================================== */
.wcps-wrapper .wcps-slider ul.products li.product .wcps-figure {
    position: relative;
    margin: 0 0 15px;
    padding: 0;
    overflow: hidden;
}

.wcps-wrapper .wcps-slider ul.products li.product .wcps-figure a {
    display: block;
}

.wcps-wrapper .wcps-slider ul.products li.product .wcps-figure img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: var(--wcps-image-ratio);
    object-fit: cover;
}

.wcps-wrapper .wcps-slider ul.products li.product .wcps-figure img.wcps-hover-img {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    height: 100%;
    opacity: 0;
    transition: opacity 0.4s ease;
}

@media (hover: hover) {
    .wcps-wrapper .wcps-slider ul.products li.product .wcps-product-inner:hover img.wcps-hover-img {
        opacity: 1;
    }
}

/* ==========================================================================
   Tytuł i cena
   ========================================================================== */
.wcps-wrapper .wcps-slider ul.products li.product .woocommerce-loop-product__title {
    margin: 10px 0 5px;
    padding: 0;
    font-size: var(--wcps-title-size);
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
}

.wcps-wrapper .wcps-slider ul.products li.product .woocommerce-loop-product__title a {
    color: var(--wcps-title-color);
    text-decoration: none;
}

.wcps-wrapper .wcps-slider ul.products li.product .price {
    display: block;
    margin-bottom: 15px;
    font-size: var(--wcps-price-size);
    font-weight: 600;
    color: var(--wcps-price-color);
    text-align: center;
}

/* ==========================================================================
   Przyciski w karcie i lista życzeń
   ========================================================================== */
.wcps-wrapper .wcps-slider ul.products li.product .ct-woo-card-actions {
    display: block;
    width: auto;
}

.wcps-wrapper .wcps-slider ul.products li.product .ct-woo-card-actions .button {
    display: inline-block;
    width: auto;
    padding: var(--wcps-button-padding);
}

/* Po dodaniu do koszyka: ukryj przycisk "Dodaj do koszyka", zostaje tylko link "Zobacz koszyk" */
.wcps-wrapper .wcps-slider ul.products li.product .ct-woo-card-actions .add_to_cart_button.added {
    display: none;
}

.wcps-wrapper .wcps-slider ul.products li.product .ct-woo-card-actions .added_to_cart {
    display: inline-block;
    width: auto;
    padding: var(--wcps-button-padding);
    text-decoration: none;
}

.wcps-wrapper .wcps-slider ul.products li.product .tinv-wraper {
    display: block;
    margin: 0;
    text-align: center;
}

.wcps-wrapper .wcps-slider ul.products li.product .tinv-wraper a {
    display: inline-flex;
    margin: 0;
}

/* ==========================================================================
   Strzałki i paginacja
   ========================================================================== */
.wcps-wrapper .wcps-nav-button {
    --swiper-navigation-size: 16px;

    top: var(--wcps-arrow-top);
    width: var(--wcps-arrow-size);
    height: var(--wcps-arrow-size);
    margin-top: calc(var(--wcps-arrow-size) / -2);
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: var(--wcps-arrow-color);
    background: var(--wcps-arrow-bg);
    box-shadow: 0 2px 10px rgb(0 0 0 / 15%);
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.wcps-wrapper .wcps-prev {
    left: 0;
    right: auto;
}

.wcps-wrapper .wcps-next {
    right: 0;
    left: auto;
}

@media (hover: hover) {
    .wcps-wrapper .wcps-nav-button:hover {
        color: var(--wcps-arrow-hover-color);
        background: var(--wcps-arrow-hover-bg);
    }
}

.wcps-wrapper .wcps-nav-button:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* ==========================================================================
   Mobile
   ========================================================================== */
@media (max-width: 768px) {
    .wcps-wrapper {
        --wcps-arrow-size: 36px;

        padding: 0 42px;
    }

    .wcps-wrapper .wcps-pagination {
        display: none;
    }

    .wcps-wrapper .wcps-slider {
        padding-bottom: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .wcps-wrapper .wcps-slider ul.products li.product .wcps-figure img.wcps-hover-img,
    .wcps-wrapper .wcps-nav-button {
        transition: none;
    }
}

/* ==========================================================================
   Link listy życzeń
   ========================================================================== */
.wcps-wrapper .tinv-wraper a.tinvwl_add_to_wishlist_button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
    border: none;
    box-shadow: none;
}

.wcps-wrapper .tinv-wraper a.tinvwl_add_to_wishlist_button:hover,
.wcps-wrapper .tinv-wraper a.tinvwl_add_to_wishlist_button:focus,
.wcps-wrapper .tinv-wraper a.tinvwl_add_to_wishlist_button:active {
    text-decoration: none;
}

.wcps-wrapper .tinv-wraper a.tinvwl_add_to_wishlist_button::before {
    margin: 0;
    line-height: 1;
}