/* =========================================================
   JOY DECOR – VIANOČNÝ TREE CAROUSEL
   KOMPLETNÝ AKTUÁLNY CSS
   ========================================================= */


/* =========================================================
   CELÝ BLOK
   ========================================================= */

.jd-tree-carousel {
    position: relative;
    width: 100%;
    padding: 42px 0 34px;
    overflow: visible !important;
}

.jd-tree-carousel > .container {
    position: relative;
    overflow: visible !important;
}


/* =========================================================
   NADPIS
   ========================================================= */

.jd-tree-carousel__header {
    text-align: center;
    margin: 0 0 30px;
}

.jd-tree-carousel__header h2 {
    margin: 0 0 8px;
    font-size: 32px;
    line-height: 1.2;
    font-weight: 700;
}

.jd-tree-carousel__header p {
    margin: 0;
    font-size: 17px;
    line-height: 1.45;
    color: #666;
}


/* =========================================================
   TRACK – POSUVNÝ RIADOK
   ========================================================= */

.jd-tree-track {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;

    width: 100%;

    gap: 28px;

    overflow-x: auto !important;
    overflow-y: hidden !important;

    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;

    scrollbar-width: none;
    -ms-overflow-style: none;

    margin: 0;
    padding: 0;

    box-sizing: border-box;
}

.jd-tree-track::-webkit-scrollbar {
    display: none;
}


/* =========================================================
   KARTA
   DESKTOP = 3 KARTY
   ========================================================= */

.jd-tree-card {
    display: block !important;

    flex: 0 0 calc((100% - 56px) / 3) !important;

    width: calc((100% - 56px) / 3) !important;
    min-width: calc((100% - 56px) / 3) !important;
    max-width: calc((100% - 56px) / 3) !important;

    margin: 0 !important;
    padding: 0 !important;

    scroll-snap-align: start;

    box-sizing: border-box;
}


/* =========================================================
   VNÚTRO KARTY
   ========================================================= */

.jd-tree-card__inner {
    display: flex !important;
    flex-direction: column !important;

    width: 100%;
    height: 100%;

    margin: 0;
    padding: 0;

    background: #f3efea;

    border-radius: 18px;
    overflow: hidden;

    box-sizing: border-box;
}


/* =========================================================
   OBRÁZOK
   ========================================================= */

.jd-tree-card__image {
    display: block !important;
    position: relative;

    width: 100% !important;
    height: auto !important;

    aspect-ratio: 4 / 5;

    margin: 0 !important;
    padding: 0 !important;

    overflow: hidden;

    flex: 0 0 auto;
}

.jd-tree-card__image img {
    display: block !important;

    width: 100% !important;
    height: 100% !important;

    min-width: 0 !important;
    max-width: none !important;

    margin: 0 !important;
    padding: 0 !important;

    object-fit: cover !important;
    object-position: center center !important;

    border: 0 !important;
}


/* =========================================================
   TEXTOVÁ ČASŤ
   ========================================================= */

.jd-tree-card__body {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;

    flex: 1 1 auto;

    width: 100%;

    padding: 24px 24px 28px;

    text-align: center;

    box-sizing: border-box;
}

.jd-tree-card__body h3 {
    margin: 0 0 13px !important;
    padding: 0 !important;

    font-size: 21px;
    line-height: 1.25;
    font-weight: 700;
}

.jd-tree-card__body h3 a {
    color: #111 !important;
    text-decoration: none !important;
}

.jd-tree-card__body p {
    margin: 0 0 22px !important;
    padding: 0 !important;

    font-size: 15px;
    line-height: 1.5;

    color: #111;
}


/* =========================================================
   CTA TLAČIDLO
   ========================================================= */

.jd-tree-card__button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;

    margin: auto 0 0 !important;

    min-width: 200px;

    padding: 12px 24px !important;

    border: 0 !important;
    border-radius: 999px !important;

    background: #fff !important;
    color: #111 !important;

    text-decoration: none !important;

    box-shadow: 0 3px 10px rgba(0, 0, 0, .12);

    transition:
        background .2s ease,
        color .2s ease,
        transform .2s ease;
}

.jd-tree-card__button:hover {
    background: #bf458a !important;
    color: #fff !important;

    transform: translateY(-1px);
}


/* =========================================================
   ŠÍPKY
   ========================================================= */

/* =========================================================
   JOY DECOR CAROUSEL – ŠÍPKY
   ========================================================= */

.jd-tree-carousel > .container {
    position: relative !important;
}


/* obe tlačidlá */
.jd-tree-carousel button.jd-tree-arrow {
    position: absolute !important;

    /* približne stred fotografie */
    top: 46% !important;
    transform: translateY(-50%) !important;

    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;

    margin: 0 !important;
    padding: 0 !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    border: 0 !important;
    border-radius: 50% !important;

    background: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 3px 14px rgba(0,0,0,.22) !important;

    opacity: 1 !important;
    visibility: visible !important;

    cursor: pointer !important;
    pointer-events: auto !important;

    z-index: 999 !important;

    font-size: 0 !important;

    appearance: none !important;
    -webkit-appearance: none !important;
}


/* šípku nakreslíme sami */
.jd-tree-carousel button.jd-tree-arrow::after {
    content: "" !important;

    display: block !important;

    width: 11px !important;
    height: 11px !important;

    border-top: 3px solid #222 !important;
    border-right: 3px solid #222 !important;
}


/* ĽAVÁ */
.jd-tree-carousel button.jd-tree-arrow--prev {
    left: 18px !important;
    right: auto !important;
}

.jd-tree-carousel button.jd-tree-arrow--prev::after {
    transform: rotate(-135deg) !important;
    margin-left: 4px !important;
}


/* PRAVÁ */
.jd-tree-carousel button.jd-tree-arrow--next {
    right: 18px !important;
    left: auto !important;
}

.jd-tree-carousel button.jd-tree-arrow--next::after {
    transform: rotate(45deg) !important;
    margin-right: 4px !important;
}


/* hover */
.jd-tree-carousel button.jd-tree-arrow:hover {
    background: #bf458a !important;
}

.jd-tree-carousel button.jd-tree-arrow:hover::after {
    border-color: #fff !important;
}


/* infinite carousel = obe šípky sú stále viditeľné */
.jd-tree-carousel button.jd-tree-arrow:disabled,
.jd-tree-carousel button.jd-tree-arrow.is-hidden {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}


/* mobil */
@media (max-width: 767px) {

    .jd-tree-carousel button.jd-tree-arrow {
        width: 42px !important;
        height: 42px !important;
        min-width: 42px !important;
    }

    .jd-tree-carousel button.jd-tree-arrow--prev {
        left: 8px !important;
    }

    .jd-tree-carousel button.jd-tree-arrow--next {
        right: 8px !important;
    }
}


/* =========================================================
   SHOPTET FOOTER WRAPPER
   banner sa len technicky renderuje vo footeri
   ========================================================= */

.custom-footer__banner80:has(.jd-tree-carousel) {
    width: 100% !important;
    max-width: none !important;

    margin: 0 !important;
    padding: 0 !important;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 991px) {

    .jd-tree-carousel {
        padding: 34px 0 28px;
    }

    .jd-tree-track {
        gap: 20px;
    }

    .jd-tree-card {
        flex: 0 0 calc((100% - 20px) / 2) !important;

        width: calc((100% - 20px) / 2) !important;
        min-width: calc((100% - 20px) / 2) !important;
        max-width: calc((100% - 20px) / 2) !important;
    }

    .jd-tree-arrow--prev {
        left: -6px !important;
    }

    .jd-tree-arrow--next {
        right: -6px !important;
    }
}


/* =========================================================
   MOBIL
   ========================================================= */

@media (max-width: 767px) {

    .jd-tree-carousel {
        padding: 28px 0 22px;
    }


    .jd-tree-carousel__header {
        margin-bottom: 22px;
        padding: 0 15px;
    }

    .jd-tree-carousel__header h2 {
        font-size: 25px;
    }

    .jd-tree-carousel__header p {
        font-size: 15px;
    }


    .jd-tree-track {
        gap: 14px;

        padding-left: 15px;
        padding-right: 15px;

        scroll-padding-left: 15px;
    }


    /* zámerne 86 %, aby bolo vidno časť ďalšej karty */

    .jd-tree-card {
        flex: 0 0 86% !important;

        width: 86% !important;
        min-width: 86% !important;
        max-width: 86% !important;
    }


    .jd-tree-card__body {
        padding: 22px 18px 25px;
    }

    .jd-tree-card__body h3 {
        font-size: 20px;
    }


    .jd-tree-arrow {
        width: 42px !important;
        height: 42px !important;
        min-width: 42px !important;
    }

    .jd-tree-arrow--prev {
        left: 5px !important;
    }

    .jd-tree-arrow--next {
        right: 5px !important;
    }

}