.elementor-widget-kijo_bundle_builder,
.elementor-widget-kijo_bundle_builder > .elementor-widget-container,
.elementor-widget-kijo_bundle_archive,
.elementor-widget-kijo_bundle_archive > .elementor-widget-container {
    width: 100%; /* widgets inside a flex container otherwise shrink to their content and the grid collapses */
}

.kijo-bundle-archive,
.kijo-bundle-builder__products {
    display: grid;
    grid-template-columns: repeat(var(--kijo-columns, 4), minmax(0, 1fr));
    column-gap: var(--kijo-column-gap, var(--kijo-gap, 20px));
    row-gap: var(--kijo-row-gap, var(--kijo-gap, 20px));
}

.kijo-bundle-product { min-width: 0; }

/* Full range sells everything as one set, so the per-product buttons do nothing. */
.kijo-bundle-builder--full-range .kijo-bundle-add { display: none; }

.kijo-bundle-builder {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--kijo-panel-width, 320px);
    gap: var(--kijo-panel-gap, 40px);
    align-items: start;
}

.kijo-bundle-panel {
    position: sticky;
    top: 128px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px; /* space between each section */
}

.kijo-bundle-panel__heading {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-grow: 0;
    flex-shrink: 0;
}

.kijo-bundle-panel__title,
.kijo-bundle-panel__message { margin: 0; }
.kijo-bundle-panel__meta { margin: 0 !important; }

.kijo-bundle-panel__slots {
    display: grid;
    grid-template-columns: repeat(var(--kijo-slots, 3), 1fr);
    gap: 20px;
    padding: 20px 0;
    border-top: var(--kijo-panel-border-width, 1px) solid var(--kijo-accent, var(--e-global-color-secondary));
    border-bottom: var(--kijo-panel-border-width, 1px) solid var(--kijo-accent, var(--e-global-color-secondary));
}

.kijo-bundle-slot {
    aspect-ratio: 2 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed var(--kijo-accent, var(--e-global-color-secondary));
    background: transparent;
    color: var(--kijo-accent, var(--e-global-color-secondary));
    padding: 0;
    cursor: default;
}

.kijo-bundle-slot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.kijo-bundle-slot { position: relative; }
.kijo-bundle-slot.is-filled { border: 0; }

.kijo-bundle-slot__plus {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--e-global-color-accent);
    color: var(--kijo-accent, var(--e-global-color-secondary));
    -webkit-appearance: none;
    appearance: none;
    font-size: 0; /* the glyph is hidden; the symbol is drawn below so it is centred in every browser, iOS included */
    line-height: 0;
    cursor: default;
}

.kijo-bundle-slot__remove {
    position: absolute;
    top: -10px;
    right: -10px;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--kijo-accent, var(--e-global-color-secondary));
    color: var(--e-global-color-accent);
    -webkit-appearance: none;
    appearance: none;
    font-size: 0; /* the glyph is hidden; the symbol is drawn below so it is centred in every browser, iOS included */
    line-height: 0;
    cursor: pointer;
    transition: linear .2s;
}

@media (hover: hover) {
    .kijo-bundle-slot__remove:hover {
        background: var(--e-global-color-190a9df);
        transition: linear .2s;
    }
}

/* + and x drawn with lines (iPhone text rendering put the glyphs off-centre). Colour is the button's text colour. The 2px thickness and 10px length are even numbers, so the lines centre on whole pixels in the 20px circle (no blurry half-pixel offsets). */
.kijo-bundle-slot__plus::before,
.kijo-bundle-slot__plus::after,
.kijo-bundle-slot__remove::before,
.kijo-bundle-slot__remove::after {
    content: "";
    position: absolute;
    inset: 0; /* with margin: auto, centred exactly in the button; the rotation turns around that centre */
    margin: auto;
    background: currentColor;
}

.kijo-bundle-slot__plus::before { width: 10px; height: 2px; }
.kijo-bundle-slot__plus::after { width: 2px; height: 10px; }

.kijo-bundle-slot__remove::before,
.kijo-bundle-slot__remove::after {
    width: 10px;
    height: 2px;
}

.kijo-bundle-slot__remove::before { transform: rotate(45deg); }
.kijo-bundle-slot__remove::after { transform: rotate(-45deg); }

/* Hovering the remove button shakes the cover it belongs to, for as long as the pointer stays on it. */
@media (hover: hover) {
    .kijo-bundle-slot:has(.kijo-bundle-slot__remove:hover) img {
        animation: kijo-bundle-shake 0.7s ease-in-out infinite;
    }
}

/* Same shake on the product's cover in the grid while its "Remove" button is hovered. */
.kijo-bundle-product:has(.kijo-bundle-add.active.is-hover:not(.is-fresh)[data-label-remove]:not([data-label-remove=""])) .e-loop-item img {
    animation: kijo-bundle-shake 0.7s ease-in-out infinite;
}

/* Hovering "Add to bundle" gives the product's cover a gentle bounce (not once it's added, and not when locked). */
.kijo-bundle-product:has(.kijo-bundle-add.is-hover:not(.active):not(.is-disabled)) .e-loop-item img {
    animation: kijo-bundle-bounce 0.9s ease-in-out infinite;
}

@keyframes kijo-bundle-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

@keyframes kijo-bundle-shake {
    0%, 100% { transform: translateX(0) rotate(0); }
    20% { transform: translateX(-3px) rotate(-2deg); }
    40% { transform: translateX(3px) rotate(2deg); }
    60% { transform: translateX(-2px) rotate(-1deg); }
    80% { transform: translateX(2px) rotate(1deg); }
}

@media (prefers-reduced-motion: reduce) {
    .kijo-bundle-slot:has(.kijo-bundle-slot__remove:hover) img,
    .kijo-bundle-product:has(.kijo-bundle-add.is-hover) .e-loop-item img { animation: none !important; }
}

/* Hidden on desktop. The panel tab and progress lines show at 1024px and below; the slots toggle at 767px and below. */
.kijo-bundle-panel__toggle,
.kijo-bundle-panel__slots-toggle,
.kijo-bundle-panel__progress { display: none; }

.kijo-bundle-panel__message {
    font-family: var(--e-global-typography-text-font-family);
    font-size: var(--e-global-typography-text-font-size);
    font-weight: var(--e-global-typography-text-font-weight);
    font-style: var(--e-global-typography-text-font-style);
    line-height: var(--e-global-typography-text-line-height);
    color: var(--e-global-color-text);
    text-align: center;
    padding: 10px;
    margin: 0 !important;
    background: var(--e-global-color-accent);
}

/* Used for the error message and, in stay-on-page mode, the success message (e.g. the basket call failing). */
.kijo-bundle-panel__message.is-error {
    color: var(--e-global-color-190a9df);
}

.kijo-bundle-panel__message.is-success {
    color: var(--e-global-color-secondary);
}
.kijo-bundle-panel__message:empty { display: none; }

/* Add to Bundle Button widget wrapper */
.elementor-widget-kijo_bundle_add_button,
.elementor-widget-kijo_bundle_add_button:hover {
    transition: linear .2s;
}

/* Buttons are Elementor-style markup, styled by your CSS classes / kit; only the locked state is functional. */
.kijo-bundle-add.is-disabled,
.kijo-bundle-panel__cta.is-disabled,
.kijo-popup__cta.is-disabled { pointer-events: none; }

/* The bundle is full: the Add to bundle buttons of products that aren't in it are locked (JS adds is-disabled). */
.kijo-bundle-product .kijo-bundle-add.is-disabled .elementor-button {
    color: var(--e-global-color-accent);
    background-color: var(--e-global-color-1924047);
    border: 1px solid var(--e-global-color-1924047);
}

/* Adding to the basket: the text and icon give way to a spinner (they stay in place, hidden, so the button keeps its size). */
.kijo-bundle-panel__cta.is-loading,
.kijo-popup__cta.is-loading {
    pointer-events: none;
}

.kijo-bundle-panel__cta.is-loading .elementor-button-content-wrapper,
.kijo-popup__cta.is-loading .elementor-button-content-wrapper {
    position: relative;
}

.kijo-bundle-panel__cta.is-loading .elementor-button-text,
.kijo-bundle-panel__cta.is-loading .elementor-button-icon,
.kijo-popup__cta.is-loading .elementor-button-text,
.kijo-popup__cta.is-loading .elementor-button-icon {
    visibility: hidden;
}

.kijo-bundle-panel__cta.is-loading .elementor-button-content-wrapper::after,
.kijo-popup__cta.is-loading .elementor-button-content-wrapper::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 18px;
    margin: -9px 0 0 -9px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: kijo-bundle-spin 0.7s linear infinite;
}

@keyframes kijo-bundle-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .kijo-bundle-panel__cta.is-loading .elementor-button-content-wrapper::after,
    .kijo-popup__cta.is-loading .elementor-button-content-wrapper::after { animation-duration: 2s; }
}

/* Disabled panel button (the bundle isn't full yet). */
.kijo-bundle-panel .kijo-bundle-panel__cta.is-disabled .elementor-button,
.kijo-popup .kijo-popup__cta.is-disabled .elementor-button {
    background-color: var(--e-global-color-1924047);
}

/* Tablet and below: the panel becomes a bottom drawer. */
@media (max-width: 1024px) {
    .kijo-bundle-builder { display: block; padding-bottom: 220px; }
    .kijo-bundle-panel {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        top: auto;
        z-index: 99;
        padding: 20px;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        box-shadow: 0 -5px 20px 0 rgba(0, 0, 0, 0.25);
    }
    /*
     * Slots stay on one line, 80px each. Up to 5 are visible (3 on phones); any more scroll sideways with a
     * scrollbar underneath. Desktop keeps the 3-column grid.
     */
    .kijo-bundle-panel__slots {
        display: flex;
        flex-wrap: nowrap;
        flex: 1 1 0;
        border: none;
        padding: 10px 10px 20px 0;
        overflow-y: hidden;
    }

    .kijo-bundle-panel__slots::-webkit-scrollbar {
        width: 10px;
        height: 8px;
    }

    .kijo-bundle-panel__slots::-webkit-scrollbar-track {
        background: var(--e-global-color-accent);
        border-radius: 10px;
    }

    .kijo-bundle-panel__slots::-webkit-scrollbar-thumb {
        background: var(--kijo-accent, var(--e-global-color-secondary));
        border-radius: 10px;
    }

    .kijo-bundle-panel__slots::-webkit-scrollbar-thumb:hover {
        background: var(--kijo-accent, var(--e-global-color-secondary));
    }

}

@media (max-width: 1024px) {
    /* Tab on the top-left of the panel: minimises / expands the whole panel. */
    .kijo-bundle-panel__toggle {
        display: block;
        position: absolute;
        top: -26px;
        left: 20px;
        width: 50px;
        height: 26px;
        padding: 0;
        border: 0;
        border-radius: 8px 8px 0 0;
        background-color: var(--e-global-color-accent);
        box-shadow: 0 -2px 8px 0 rgba(0, 0, 0, 0.1);
        cursor: pointer;
    }

    .kijo-bundle-panel__toggle::before {
        content: "";
        position: absolute;
        top: 50%;
        left: 50%;
        width: 8px;
        height: 8px;
        border-right: 1px solid var(--e-global-color-primary);
        border-bottom: 1px solid var(--e-global-color-primary);
        transform: translate(-50%, -75%) rotate(45deg); /* chevron pointing down: minimise */
    }

    .kijo-bundle-panel.is-minimised .kijo-bundle-panel__toggle::before {
        transform: translate(-50%, -25%) rotate(-135deg); /* pointing up: expand */
    }

    .kijo-bundle-panel.is-minimised .kijo-bundle-panel__progress {
        display: flex;
    }

    /* Progress lines: one per slot, filled once a product is in. Shown when the slots (or the panel) are closed. */
    .kijo-bundle-panel__progress {
        flex: 1 1 auto; /* fills the panel row when minimised on tablet */
        gap: 10px;
    }

    .kijo-bundle-panel__bar {
        flex: 1;
        height: 8px;
        border-radius: 10px;
        background: var(--e-global-color-accent);
    }

    .kijo-bundle-panel__bar.is-filled {
        background: var(--kijo-accent, var(--e-global-color-secondary));
    }

    /* Minimised: only the tab and the progress lines remain. */
    .kijo-bundle-panel.is-minimised > :not(.kijo-bundle-panel__toggle):not(.kijo-bundle-panel__progress) {
        display: none;
    }
}

@media (max-width: 1024px) {
    .kijo-bundle-panel .kijo-bundle-slot {
        max-height: 120px;
        width: 80px;
        margin: auto;
        flex-shrink: 0;
    }
}

@media (max-width: 1024px) and (min-width: 768px) {
    .kijo-bundle-panel {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }

    .kijo-bundle-panel__heading {
        align-items: flex-start;
    }
}

@media (max-width: 767px) {
    .kijo-bundle-panel {
        flex-direction: column;
        justify-content: space-between;
        align-items: stretch;
        gap: 20px;
    }

    /* Stacked on phones: the slots use the full panel width; any that don't fit scroll. */
    .kijo-bundle-panel__slots {
        flex: 0 0 auto;
        align-self: center;
        width: 100%;
    }

    /* Same tab-style toggle for the slots, sitting above them. */
    .kijo-bundle-panel__slots-toggle {
        display: block;
        position: relative;
        align-self: flex-start;
        width: 50px;
        height: 26px;
        margin: 0;
        padding: 0;
        border: 0;
        border-radius: 8px;
        background-color: var(--e-global-color-accent);
        cursor: pointer;
    }

    .kijo-bundle-panel__slots-toggle::before {
        content: "";
        position: absolute;
        top: 50%;
        left: 50%;
        width: 8px;
        height: 8px;
        border-right: 1px solid var(--e-global-color-primary);
        border-bottom: 1px solid var(--e-global-color-primary);
        transform: translate(-50%, -75%) rotate(45deg); /* chevron pointing down: minimise / hide */
    }

    .kijo-bundle-panel.is-slots-collapsed .kijo-bundle-panel__slots-toggle::before,
    .kijo-popup.is-slots-collapsed .kijo-bundle-panel__slots-toggle::before {
        transform: translate(-50%, -25%) rotate(-135deg); /* pointing up: show */
    }

    .kijo-bundle-panel.is-slots-collapsed .kijo-bundle-panel__progress,
    .kijo-popup.is-slots-collapsed .kijo-bundle-panel__progress {
        display: flex;
    }

    .kijo-bundle-panel.is-slots-collapsed .kijo-bundle-panel__slots,
    .kijo-popup.is-slots-collapsed .kijo-popup__slots {
        display: none;
    }

}

.kijo-bundle-offer { display: flex; flex-direction: column; }

.kijo-bundle-not-found {
    font-family: var(--e-global-typography-36e93c9-font-family);
    font-size: var(--e-global-typography-36e93c9-font-size);
    font-weight: var(--e-global-typography-36e93c9-font-weight);
    font-style: var(--e-global-typography-36e93c9-font-style);
    line-height: var(--e-global-typography-36e93c9-line-height);
    color: var(--e-global-color-text);
    margin-bottom: 0 !important;
}

.kijo-bundle-panel .elementor-button-content-wrapper {
    justify-content: center;
}

/*
 * A bundle row: title, then its books with their full prices struck through. The same markup is used in the basket,
 * checkout, side cart and order received page, so these rules are written once and apply to all of them.
 */
.kijo-bundle-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.kijo-bundle-row .kijo-bundle-items {
    margin: 0 0 10px;
}

.kijo-bundle-row .kijo-bundle-items .kijo-bundle-items__row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0;
    padding: 0;
}

.kijo-bundle-row .kijo-bundle-items .kijo-bundle-items__row span {
    font-family: var(--e-global-typography-text-font-family) !important;
    font-size: var(--e-global-typography-text-font-size) !important;
    font-weight: var(--e-global-typography-text-font-weight) !important;
    font-style: var(--e-global-typography-text-font-style) !important;
    line-height: var(--e-global-typography-text-line-height) !important;
}

.kijo-bundle-row .kijo-bundle-items .kijo-bundle-items__price {
    text-align: right;
    color: var(--e-global-color-037cce2);
}

.kijo-bundle-row .kijo-bundle-items del {
    display: block;
    text-decoration-color: var(--e-global-color-037cce2);
}

.kijo-bundle-row .kijo-bundle-items del span {
    color: var(--e-global-color-037cce2);
}

/* Side cart: the struck-through full price in the price line, coloured like the books list's struck prices. */
.elementor-menu-cart__product-price del {
    text-decoration-color: var(--e-global-color-037cce2);
}

.elementor-menu-cart__product-price del span {
    color: var(--e-global-color-037cce2);
}

/* The bundle price sits in an <ins>, which browsers underline by default. */
.product-price ins,
.elementor-menu-cart__product-price ins,
.kijo-bundle-row ins {
    text-decoration: none;
}

.kijo-bundle-covers {
    gap: 10px;
    display: flex;
    flex-direction: column;
}



/*
 * Basket / checkout: the Elementor cart widget's sticky right column (.e-sticky-right-column--active) stops
 * sticking when a container around it has overflow: hidden. overflow: clip crops the same way but allows sticky.
 */
@media (min-width: 1025px) {
    .e-con:has(.e-sticky-right-column),
    .elementor-widget:has(.e-sticky-right-column),
    .elementor-widget-container:has(.e-sticky-right-column) {
        overflow: clip !important;
    }
}

.elementor-widget-kijo_bundle_builder {
    overflow: visible;
}

/* ==========================================================================
   "Make it a bundle" popup (shown after adding a bundle product to the basket)
   Colours follow the Elementor kit: Secondary = the teal accents, Primary = text.
   ========================================================================== */
.kijo-popup {
    --kijo-popup-accent: var(--kijo-accent, var(--e-global-color-secondary, #7fb2b0));
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s linear, visibility .2s linear;
}

.kijo-popup.is-open {
    opacity: 1;
    visibility: visible;
}

html.kijo-popup-open {
    overflow: hidden;
}

.kijo-popup__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.kijo-popup__container {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 575px;
    max-height: calc(100vh - 32px);
    margin: 0 20px;
}

.kijo-popup__dialog {
    position: relative;
    display: flex;
    flex: 0 1 auto;
    flex-direction: column;
    gap: 20px;
    box-sizing: border-box;
    width: 100%;
    min-height: 0;
    padding: 20px;
    border-radius: 8px;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--e-global-color-e390767);
    color: var(--e-global-color-primary);
}

/* the tabs sit on the top-left corner, so it stays square */
.kijo-popup__tabs + .kijo-popup__dialog { border-top-left-radius: 0; }

.kijo-popup__dialog > * {
    margin: 0;
}

/* close button, with the × drawn like the slot's (.kijo-bundle-slot__remove) */
.kijo-popup__close {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--e-global-color-primary);
    cursor: pointer;
    transition: .2s linear;
}

.kijo-popup__close:hover { background: var(--e-global-color-190a9df); }

.kijo-popup__close::before,
.kijo-popup__close::after {
    content: "";
    position: absolute;
    inset: 0;
    margin: auto;
    width: 14px; /* even sizes, like the slot ×, so the lines sit on whole pixels in the 30px circle */
    height: 2px;
    background: var(--e-global-color-accent);
    transition: .2s linear;
}

.kijo-popup__close::before { transform: rotate(45deg); }
.kijo-popup__close::after { transform: rotate(-45deg); }

/* Bundle / Full range tabs (only for a product that is in both): they sit on top of the popup, outside it. */
.kijo-popup__tabs {
    display: flex;
    flex: none;
    gap: 4px;
    align-self: flex-start;
}

.kijo-popup__tab {
    height: 30px;
    padding: 0 16px;
    border: 0;
    border-radius: 8px 8px 0 0;
    background-color: var(--e-global-color-accent);
    color: var(--e-global-color-text);
    font-family: var(--e-global-typography-accent-font-family);
    font-size: var(--e-global-typography-accent-font-size);
    font-weight: var(--e-global-typography-accent-font-weight);
    text-transform: var(--e-global-typography-accent-text-transform);
    font-style: var(--e-global-typography-accent-font-style);
    letter-spacing: var(--e-global-typography-accent-letter-spacing);
    line-height: 30px;
    cursor: pointer;
    transition: .2s linear;
}

/* the open tab is the popup's own colour, so it reads as part of it */
.kijo-popup__tab.is-active {
    background-color: var(--e-global-color-e390767);
    color: var(--e-global-color-primary);
    cursor: default;
}

@media (hover: hover) {
    .kijo-popup__tab:not(.is-active):hover { background-color: var(--e-global-color-e390767); }
}

/* Added to basket */
.kijo-popup__added {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 20px;
    padding-right: 30px;
    border-bottom: 1px solid var(--kijo-popup-accent);
}

.kijo-popup__tick {
    position: relative;
    flex: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--kijo-popup-accent);
}

.kijo-popup__tick::after {
    content: "";
    position: absolute;
    top: 45%;
    left: 50%;
    width: 4px;
    height: 8px;
    border-right: 1.5px solid var(--e-global-color-accent);
    border-bottom: 1.5px solid var(--e-global-color-accent);
    transform: translate(-50%, -50%) rotate(45deg);
}

.kijo-popup__thumb { flex: none; }

.kijo-popup__thumb img {
    display: block;
    width: 40px;
    height: 100%;
    max-width: none;
    object-fit: contain;
}

.kijo-popup__added-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.kijo-popup__added-label {
    color: var(--e-global-color-primary);
    font-family: var(--e-global-typography-eb1aee5-font-family);
    font-size: var(--e-global-typography-eb1aee5-font-size);
    font-weight: var(--e-global-typography-eb1aee5-font-weight);
    font-style: var(--e-global-typography-eb1aee5-font-style);
    line-height: var(--e-global-typography-eb1aee5-line-height);
}
.kijo-popup__added-name {
    color: var(--e-global-color-secondary);
    font-family: var(--e-global-typography-text-font-family);
    font-size: var(--e-global-typography-text-font-size);
    font-weight: var(--e-global-typography-text-font-weight);
    font-style: var(--e-global-typography-text-font-style);
    line-height: var(--e-global-typography-text-line-height);
}

.kijo-popup__heading {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.kijo-popup__title {
    color: var(--e-global-color-text);
    font-family: var(--e-global-typography-eb1aee5-font-family);
    font-size: var(--e-global-typography-eb1aee5-font-size);
    font-weight: var(--e-global-typography-eb1aee5-font-weight);
    font-style: var(--e-global-typography-eb1aee5-font-style);
    line-height: var(--e-global-typography-eb1aee5-line-height);
}

.kijo-popup__offer {
    margin: 0 !important;
    color: var(--e-global-color-secondary);
    font-family: var(--e-global-typography-text-font-family);
    font-size: var(--e-global-typography-text-font-size);
    font-weight: var(--e-global-typography-text-font-weight);
    font-style: var(--e-global-typography-text-font-style);
    line-height: var(--e-global-typography-text-line-height);
}

/* slots: the slots themselves use the Bundle Builder panel's .kijo-bundle-slot styles (filled, +, ×, shake). They stay on one line (80px at least each) and scroll sideways when they don't fit, with the panel's scrollbar. */
.kijo-popup__slots {
    display: grid;
    flex: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(80px, 1fr);
    gap: 20px;
    padding: 20px 10px 20px 0;
    border-top: 1px solid var(--kijo-popup-accent);
    border-bottom: 1px solid var(--kijo-popup-accent);
    overflow-x: auto;
    overflow-y: hidden;
}

/* while the scrollbar shows it takes the place of the bottom border */
.kijo-popup__slots.has-scroll { border-bottom: none; }

.kijo-popup__slots::-webkit-scrollbar {
    width: 10px;
    height: 8px;
}

.kijo-popup__slots::-webkit-scrollbar-track {
    background: var(--e-global-color-accent);
    border-radius: 10px;
}

.kijo-popup__slots::-webkit-scrollbar-thumb,
.kijo-popup__slots::-webkit-scrollbar-thumb:hover {
    background: var(--kijo-popup-accent);
    border-radius: 10px;
}

.kijo-popup__cover { display: block; }

.kijo-popup__hint {
    text-align: center;
    font-family: var(--e-global-typography-text-font-family);
    font-size: var(--e-global-typography-text-font-size);
    font-weight: var(--e-global-typography-text-font-weight);
    text-transform: var(--e-global-typography-text-text-transform);
    font-style: var(--e-global-typography-text-font-style);
    line-height: var(--e-global-typography-text-line-height);
    letter-spacing: var(--e-global-typography-text-letter-spacing);
    color: var(--e-global-color-text);
    margin: 0 !important;
}

.kijo-popup__hint strong {
    font-family: var(--e-global-typography-text-font-family);
    font-size: var(--e-global-typography-text-font-size);
    font-weight: var(--e-global-typography-text-font-weight);
    font-style: var(--e-global-typography-text-font-style);
    line-height: var(--e-global-typography-text-line-height);
}

.kijo-popup__hint:empty { display: none; }

/* the other titles to pick from (the full range view shows them all, without the add buttons) */
.kijo-popup__items {
    display: flex;
    flex: none;
    gap: 10px;
    padding: 6px 6px 20px 0;
    overflow-x: auto;
}

/* scrollbar as on the Bundle Builder panel's slots */
.kijo-popup__items::-webkit-scrollbar {
    width: 10px;
    height: 8px;
}

.kijo-popup__items::-webkit-scrollbar-track {
    background: var(--e-global-color-accent);
    border-radius: 10px;
}

.kijo-popup__items::-webkit-scrollbar-thumb,
.kijo-popup__items::-webkit-scrollbar-thumb:hover {
    background: var(--kijo-popup-accent);
    border-radius: 10px;
}

.kijo-popup__item.is-hidden { display: none; }

.kijo-popup__item {
    position: relative;
    display: flex;
    flex: 0 0 74px;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.kijo-popup__item .kijo-popup__cover { width: 100%; }

.kijo-popup__item .kijo-popup__cover img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    box-shadow: 8px 8px 8px -4px rgba(0, 0, 0, 0.1);
}

.kijo-popup__items--range .kijo-popup__item { flex-basis: 70px; }

.kijo-popup__item.is-anchor .kijo-popup__tick {
    position: absolute;
    top: -6px;
    right: -6px;
}

.kijo-popup__add {
    padding: 2px 10px;
    border: 1px solid var(--e-global-color-secondary);
    border-radius: 100px;
    background-color: var(--e-global-color-fb6873f);
    color: var(--e-global-color-text);
    font-family: var(--e-global-typography-accent-font-family);
    font-size: var(--e-global-typography-accent-font-size);
    font-weight: var(--e-global-typography-accent-font-weight);
    text-transform: var(--e-global-typography-accent-text-transform);
    font-style: var(--e-global-typography-accent-font-style);
    line-height: var(--e-global-typography-accent-line-height);
    letter-spacing: var(--e-global-typography-accent-letter-spacing);
    cursor: pointer;
    transition: .2s linear;
}

/* hover, and the "Added" state */
.kijo-popup__add.is-added {
    color: var(--e-global-color-accent);
    background-color: var(--e-global-color-secondary);
}

@media (hover: hover) {
    .kijo-popup__add:hover:not(:disabled) {
        color: var(--e-global-color-accent);
        background-color: var(--e-global-color-secondary);
    }
}

/* Hovering "Added" turns it into Remove, in the Bundle Builder's Remove colours. The word is swapped in with CSS so the button keeps its size. */
@media (hover: hover) {
    .kijo-popup__add.is-added:hover:not(:disabled) {
        position: relative;
        color: transparent;
        background-color: var(--e-global-color-190a9df);
        border-color: var(--e-global-color-190a9df);
    }

    .kijo-popup__add.is-added:hover:not(:disabled)::after {
        content: attr(data-remove);
        position: absolute;
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--e-global-color-accent);
    }
}

.kijo-popup__add:disabled,
.kijo-popup__add.is-disabled {
    cursor: not-allowed;
    color: var(--e-global-color-accent);
    background-color: var(--e-global-color-1924047);
    border: 1px solid var(--e-global-color-1924047);
}

/* buttons */
.kijo-popup__actions {
    display: grid;
    flex: none;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
    gap: 20px;
}

/* Elementor gives widgets a bottom margin; the popup's buttons are laid out by the grid gap instead. */
.kijo-popup__actions .elementor-widget { margin-bottom: 0 !important; }

/* .kijo-popup__message also carries .kijo-bundle-panel__message, so it is styled (success / error / empty) by the panel's rules */

@media (max-width: 767px) {
    .kijo-popup__close {
        width: 24px;
        height: 24px;
    }

    .kijo-popup__close::before,
    .kijo-popup__close::after { width: 12px; }

    .kijo-popup__title { font-size: 20px; }
    .kijo-popup__slots { gap: 12px; }

    .kijo-popup__actions {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    /* Continue shopping sits above the main button, as in the design */
    .kijo-popup__actions .kijo-popup__continue { order: -1; }
}

@media (prefers-reduced-motion: reduce) {
    .kijo-popup { transition: none; }
}

/* The Bundle Popup widget's sample in the Elementor editor: shown in place, not as an overlay, and not clickable. */
.kijo-popup--preview {
    position: relative;
    inset: auto;
    z-index: auto;
    padding: 0;
    opacity: 1;
    visibility: visible;
    pointer-events: none;
}

.kijo-popup--preview .kijo-popup__backdrop {
    display: none;
}

.kijo-popup--preview .kijo-popup__container {
    margin: 0 auto;
    max-height: none;
}

.kijo-popup--preview .kijo-popup__dialog {
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

/* ==========================================================================
   Built-in look. These used to be widget style settings; the widgets now only
   expose wording, so the look lives here and follows the Elementor kit.
   ========================================================================== */

/* Archive grid: 3 columns, 2 on tablet, 1 on mobile, equal height cards */
.kijo-bundle-archive {
    --kijo-columns: 3;
    grid-auto-rows: 1fr;
}
.kijo-bundle-archive__item > .e-loop-item,
.kijo-bundle-archive .e-loop-item > .elementor-section,
.kijo-bundle-archive .e-loop-item > .elementor-section > .elementor-container,
.kijo-bundle-archive .e-loop-item > .e-con,
.kijo-bundle-archive .e-loop-item .elementor-section-wrap > .e-con { height: 100%; }
@media (max-width: 1024px) { .kijo-bundle-archive { --kijo-columns: 2; } }
@media (max-width: 767px) { .kijo-bundle-archive { --kijo-columns: 1; } }

/* Builder: product grid and panel */
.kijo-bundle-builder {
    --kijo-panel-width: 390px;
    --kijo-panel-gap: 60px;
    --kijo-panel-border-width: 1px;
    --kijo-columns: 4;
    --kijo-row-gap: 40px;
}
@media (max-width: 1024px) { .kijo-bundle-builder { --kijo-columns: 3; } }
@media (max-width: 767px) { .kijo-bundle-builder { --kijo-columns: 2; } }

.kijo-bundle-panel {
    background-color: var(--e-global-color-e390767, #f3efeb);
    --kijo-accent: var(--e-global-color-secondary, #77bbba);
}
.kijo-bundle-slot img { box-shadow: 8px 8px 8px -4px rgba(0, 0, 0, 0.1); }

.kijo-bundle-panel__title {
    color: var(--e-global-color-primary, #242424);
    font-family: var(--e-global-typography-eb1aee5-font-family, "Cormorant Garamond", serif);
    font-size: var(--e-global-typography-eb1aee5-font-size, 22px);
    font-weight: var(--e-global-typography-eb1aee5-font-weight, 700);
    line-height: var(--e-global-typography-eb1aee5-line-height, 26px);
}
.kijo-bundle-panel__meta {
    color: var(--e-global-color-secondary, #77bbba);
    font-family: var(--e-global-typography-accent-font-family, "League Spartan", sans-serif);
    font-size: var(--e-global-typography-accent-font-size, 12px);
    font-weight: var(--e-global-typography-accent-font-weight, 600);
    line-height: var(--e-global-typography-accent-line-height, 20px);
    letter-spacing: var(--e-global-typography-accent-letter-spacing, 0.48px);
    text-transform: uppercase;
}

/* Offer (e.g. "3 for" / price): white, centred, two lines with no gap */
.kijo-bundle-offer { align-items: center; text-align: center; gap: 0; color: var(--e-global-color-accent, #fff); }
.kijo-bundle-offer__line1 {
    color: var(--e-global-color-accent, #fff);
    font-family: var(--e-global-typography-accent-font-family, "League Spartan", sans-serif);
    font-size: var(--e-global-typography-accent-font-size, 12px);
    font-weight: var(--e-global-typography-accent-font-weight, 600);
    line-height: var(--e-global-typography-accent-line-height, 20px);
    letter-spacing: var(--e-global-typography-accent-letter-spacing, 0.48px);
    text-transform: uppercase;
}
.kijo-bundle-offer__line2 {
    color: var(--e-global-color-accent, #fff);
    font-family: var(--e-global-typography-eb1aee5-font-family, "Cormorant Garamond", serif);
    font-size: var(--e-global-typography-eb1aee5-font-size, 22px);
    font-weight: var(--e-global-typography-eb1aee5-font-weight, 700);
    line-height: var(--e-global-typography-eb1aee5-line-height, 26px);
}

/* Title count (e.g. "200 titles"): Label style in Gold */
.kijo-bundle-count {
    text-align: left;
    color: var(--e-global-color-d7c9e11, #c4aa8f);
    font-family: var(--e-global-typography-accent-font-family, "League Spartan", sans-serif);
    font-size: var(--e-global-typography-accent-font-size, 12px);
    font-weight: var(--e-global-typography-accent-font-weight, 600);
    line-height: var(--e-global-typography-accent-line-height, 20px);
    letter-spacing: var(--e-global-typography-accent-letter-spacing, 0.48px);
    text-transform: uppercase;
}

/* Add to bundle button: hovering "Added" turns it into Remove (red) */
.kijo-bundle-add.active:not(.is-fresh).is-hover .elementor-button,
.kijo-bundle-add.active:not(.is-fresh) .elementor-button:focus-visible {
    color: var(--e-global-color-accent, #fff);
    background-color: var(--e-global-color-190a9df, #d02424);
    border-color: var(--e-global-color-190a9df, #d02424);
}
.kijo-bundle-add.active:not(.is-fresh).is-hover .elementor-button svg,
.kijo-bundle-add.active:not(.is-fresh) .elementor-button:focus-visible svg { fill: var(--e-global-color-accent, #fff); }

/* Bundle Tag: small pill for product loop items */
.kijo-bundle-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 30px;
    background: var(--e-global-color-secondary);
    box-shadow: none;
    color: var(--e-global-color-accent);
    font-family: var(--e-global-typography-accent-font-family);
    font-size: var(--e-global-typography-accent-font-size);
    font-weight: var(--e-global-typography-accent-font-weight);
    text-transform: var(--e-global-typography-accent-text-transform);
    font-style: var(--e-global-typography-accent-font-style);
    line-height: var(--e-global-typography-accent-line-height);
    letter-spacing: var(--e-global-typography-accent-letter-spacing);
    white-space: nowrap;
}

.kijo-bundle-tags {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

/* Popup buttons: icon before the text and centred, until the Bundle Popup widget says otherwise */
.kijo-popup .kijo-popup__continue .elementor-button-content-wrapper,
.kijo-popup .kijo-popup__cta .elementor-button-content-wrapper { justify-content: center; }
