/* vst_cart_rule_bundles — "Better together" front-office widget */

.vst-bundle {
    margin: 30px 0;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.vst-bundle__title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 18px;
}

.vst-bundle__layout {
    display: flex;
    align-items: stretch;
}

.vst-bundle__carousel-wrap {
    flex: 1 1 auto;
    min-width: 0; /* allow slick to shrink inside the flex item */
}

.vst-bundle__summary {
    flex: 0 0 275px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    padding-left: 16px;
}

.vst-bundle__save,
.vst-bundle__total {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px;
    font-size: 15px;
    color: #333;
}

.vst-bundle__total {
    font-weight: 700;
    border-top: 1px solid #eee;
    padding-top: 6px;
    margin-top: 2px;
}

/* When the "Спестяваш:" row above is hidden (0% bundle, or partial selection
   that wouldn't trigger the rule) the Total row stands alone — drop the
   border-top so it doesn't hang orphaned above nothing. */
.vst-bundle__total.is-standalone {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
}

/* percent on top, amount below, both right-aligned next to the "Спестяваш:" label */
.vst-bundle__save-values {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

/* mirrors the theme's .product-miniature .discount-percentage badge */
.vst-bundle__save-percent {
    font-size: 12px !important;
    font-weight: 500 !important;
    height: 18px;
    color: #fff;
    background: #e40044;
    padding: 3px;
    border-radius: 3px;
    min-width: 36px;
    display: flex;
    align-content: center;
    justify-content: center;
    align-items: center;
    margin-right: 5px;
}

.vst-bundle__add {
    margin-top: 12px;
    padding: 12px 18px;
    background: #fff;
    color: #e40044;
    border: 2px solid #e40044;
    border-radius: 999px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.vst-bundle__add:hover,
.vst-bundle__add:focus {
    background: #e40044;
    color: #fff;
}

/* ── product row (horizontal scroll, no carousel) ─────────────────────── */

.vst-bundle__products {
    position: relative;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 0;
    /* hide native scrollbars on most platforms but keep wheel/drag scrolling */
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
    -webkit-overflow-scrolling: touch;
}

.vst-bundle__products::-webkit-scrollbar {
    height: 8px;
}
.vst-bundle__products::-webkit-scrollbar-track {
    background: transparent;
}
.vst-bundle__products::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.vst-bundle__slide {
    position: relative;
    flex: 0 0 20%;
    min-width: 220px;
    text-align: left;
}

/* "+" between products: a real element belonging to the right-side slide,
   absolutely positioned at its left edge so it visually sits in the gap
   between the two product cards (centered vertically with the image area). */
.vst-bundle__plus {
    position: absolute;
    left: 0;
    /* slide has padding-top: 15px (from .luigi-style-bundles .js-product) and a 144px-tall
       image area; vertical centre of the image relative to slide top = 15 + 72 = 87px. */
    top: 87px;
    transform: translate(-50%, -50%);
    font-size: 41px;
    font-weight: 400;
    line-height: 1;
    color: #333;
    pointer-events: none;
    user-select: none;
    z-index: 2;
}

/* The product cards inherit the alignment from the theme's .luigi-recco /
   .luigi-product styles (fixed-height title, stars row, price block, etc.).
   We only override the bits that don't belong inside a bundle widget. */

.vst-bundle__slide .wishlist-button-add,
.vst-bundle__slide .product-flags,
.vst-bundle__slide .highlighted-informations,
.vst-bundle__slide .promo-sticker,
.vst-bundle__slide .second-promo-sticker,
.vst-bundle__slide .fmm_sticker_base_span,
.vst-bundle__slide .sticker-top-wrapper,
.vst-bundle__slide .discount-percentage,
.vst-bundle__slide .add-to-cart-holder,
.vst-bundle__slide .quick-view,
.vst-bundle__slide .nxtal-compare-icon {
    display: none !important;
}

/* The theme's 2-line clamp recipe (custom.css ~9294) is scoped to #index,
   #product .elementor-slick-slider, #category .elementor-slick-slider, etc.
   Our bundle widget isn't in any of those, so apply the same clamp here. */
.vst-bundle__slide .product-miniature .product-title a,
.vst-bundle__slide .product-miniature .product-title .custom-link {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 100%;
    text-overflow: ellipsis;
}
.vst-bundle__slide .product-miniature .product-title a:hover,
.vst-bundle__slide .product-miniature .product-title .custom-link:hover {
    text-decoration: underline;
}

.vst-bundle__current {
    margin-top: 6px;
    font-size: 12px;
    font-style: italic;
    color: #666;
    min-height: 1.2em; /* reserve space so non-current cards align with the current one */
    line-height: 1.2;
}

.vst-bundle__current.is-empty {
    visibility: hidden;
}

/* ── custom checkbox ──────────────────────────────────────────────────── */

.vst-bundle__pick {
    margin-top: 12px;
    text-align: center;
}

.vst-bundle__pick input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.vst-bundle__pick label {
    display: inline-block;
    width: 22px;
    height: 22px;
    border-radius: 4px;
    border: 1px solid #ccc;
    background: #fff;
    cursor: pointer;
    position: relative;
    margin: 0;
    transition: background 0.15s, border-color 0.15s;
}

.vst-bundle__pick input[type="checkbox"]:checked + label {
    background: #e40044;
    border-color: #e40044;
}

.vst-bundle__pick input[type="checkbox"]:checked + label::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 3px;
    width: 7px;
    height: 12px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.vst-bundle__pick.is-locked input[type="checkbox"]:checked + label::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 3px;
    width: 7px;
    height: 12px;
    border: solid #e40044;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.vst-bundle__pick.is-locked label {
    cursor: not-allowed;
    opacity: 0.85;
    background: #fff !important;
    border-color: #fff !important;
}

/* ── responsive ───────────────────────────────────────────────────────── */

@media (max-width: 991px) {
    .vst-bundle__layout {
        flex-direction: column;
    }
    .vst-bundle__summary {
        flex: 1 1 auto;
        align-items: stretch;
        padding-left: 0;
        border-top: 1px solid #eee;
        padding-top: 16px;
    }
}

@media (max-width: 600px) {
    .vst-bundle__plus {
        font-size: 36px;
    }
}

/* ── Luigi-style cards ────────────────────────────────────────────────────
   Copied verbatim from themes/alleop-child/assets/css/custom.css (.luigi-recco
   rules ~lines 1154–11280) and renamed to .luigi-style-bundles. We can't reuse
   the original class because the theme's footer.tpl JS queries `.luigi-recco`
   and tries to process it as a search-results carousel, which conflicts with
   slick already running on our bundle. Pure CSS rename — no other changes. */

#product .luigi-style-bundles .nxtal-compare-icon,
#product .luigi-style-bundles .wishlist-button-add,
#category .luigi-style-bundles .nxtal-compare-icon,
#category .luigi-style-bundles .wishlist-button-add,
#manufacturer .luigi-style-bundles .nxtal-compare-icon,
#manufacturer .luigi-style-bundles .wishlist-button-add {
    display: none !important;
}

.luigi-style-bundles .featured-carousel {
    margin: 0 auto !important;
}

.luigi-style-bundles .slick-slider .slick-next,
.luigi-style-bundles .slick-slider .slick-prev {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    opacity: 1;
    margin: 0;
    transition: none;
    background: #ffffff !important;
    border: 1px solid #707070;
}
.luigi-style-bundles .slick-slider .slick-next:hover,
.luigi-style-bundles .slick-slider .slick-prev:hover {
    background: #707070 !important;
}
.luigi-style-bundles .slick-slider .slick-next:hover::before,
.luigi-style-bundles .slick-slider .slick-prev:hover::before {
    color: #ffffff;
}
.luigi-style-bundles .slick-slider .slick-next::before,
.luigi-style-bundles .slick-slider .slick-prev::before {
    font-size: 28px;
}

.luigi-style-bundles .slick-list {
    padding: 15px 5px;
    margin-left: -10px;
}

.luigi-style-bundles .js-product {
    background: #fff;
    border-radius: 5px;
    box-shadow: none;
    max-width: none !important;
    padding: 15px 24px !important;
    justify-content: flex-start;
    position: relative;
}

.luigi-style-bundles .product-miniature .thumbnail-container .product-thumbnail img {
    width: 144px;
    height: auto;
}

.luigi-style-bundles .product-discount .regular-price {
    font-size: 12px;
    color: #999;
    text-decoration: line-through;
}
.luigi-style-bundles .product-price-and-shipping .price {
    font-size: 18px;
}

.luigi-style-bundles .slick-slide .slick-slide-inner,
.luigi-style-bundles .slick-slide > div {
    justify-content: center;
}

.luigi-style-bundles .product-miniature .ets_rv_grade_stars .ets-rv-comments-nb {
    font-weight: 300;
    color: #000000;
    font-size: 12px !important;
    height: unset;
    margin-left: 3px;
    line-height: 1;
    float: right;
    padding-top: 2px;
}
.luigi-style-bundles .product-miniature .ets_rv_grade_stars {
    line-height: 1.4 !important;
    margin-top: 0 !important;
}

.luigi-style-bundles .ets_svg_icon span {
    font-size: 20px;
    line-height: 6px;
}
.page-product .luigi-style-bundles .ets_svg_icon span {
    line-height: 16px;
}

.luigi-style-bundles .product-miniature .product-title {
    margin-top: 6px;
    min-height: 34px !important;
}
.luigi-style-bundles .product-miniature .product-description {
    padding-top: 6px;
}
.luigi-style-bundles .product-miniature .discount-percentage {
    font-size: 12px !important;
    font-weight: 500 !important;
}
.luigi-style-bundles .js-product .product-title {
    height: 34px;
}

.luigi-style-bundles .fmm_title_text_sticker.fmm_sticker_base_span {
    display: none !important;
}
.luigi-style-bundles .nxtal-compare-icon,
.luigi-style-bundles .wishlist-button-add {
    display: none !important;
}

@media (max-width: 991px) {
    .luigi-style-bundles .slick-slider .slick-next,
    .luigi-style-bundles .slick-slider .slick-prev {
        display: none !important;
    }
}

@media (min-width: 992px) {
    .luigi-style-bundles .ets_svg_icon span {
        font-size: 24px;
        line-height: 6px;
    }
    .page-product .luigi-style-bundles .ets_svg_icon span {
        line-height: 16px;
    }
    .luigi-style-bundles .product-miniature .ets_rv_grade_stars .ets-rv-comments-nb {
        font-weight: 300;
        color: #000000;
        font-size: 15px !important;
        height: unset;
        margin-left: 3px;
        line-height: 1;
        float: right;
        padding-top: 3px;
    }
}