/* ===================================================
   GLOBAL & CONTAINER
=================================================== */
.bundle-builder-selector-wrap {
    background: #070d1f;
    border: 1px solid #14203d;
    border-radius: 12px;
    padding: 24px;
    color: #e2e8f0;
    box-sizing: border-box;
}

.btn-bundle-add-to-cart{
    border:none !important;
}

.bundle-sec-title {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 6px 0;
}

.bundle-sec-description {
    font-size: 14px;
    color: #94a3b8;
    margin: 0 0 20px 0;
    line-height: 1.5;
}

/* Tracker */
.bundle-tracker-box {
    background: #0d1733;
    border: 1px solid #1c2b52;
    border-left: 4px solid #00d2ff;
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.bundle-tracker-status {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    margin-bottom: 8px;
    color: #cbd5e1;
}

.bundle-slots-count {
    color: #38bdf8;
    font-weight: 600;
}

.bundle-progress-bg {
    width: 100%;
    height: 7px;
    background: #19274a;
    border-radius: 4px;
    overflow: hidden;
}

.bundle-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #0284c7, #00d2ff);
    transition: width 0.25s ease;
}

/* Search Bar */
.bundle-search-wrapper {
    position: relative;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
}

.bundle-search-icon {
    position: absolute;
    left: 14px;
    display: flex;
    align-items: center;
    pointer-events: none;
    z-index: 2;
    color: #64748b;
}

.bundle-search-icon svg {
    display: block;
}

.bundle-search-wrapper input.bundle-product-search {
    width: 100% !important;
    padding: 12px 16px 12px 42px !important;
    background: #040814 !important;
    border: 1px solid #1a2744 !important;
    color: #f8fafc !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    outline: none !important;
    box-sizing: border-box !important;
}

.bundle-search-wrapper input.bundle-product-search:focus {
    border-color: #0284c7 !important;
}

/* ===================================================
   DARK-THEME CUSTOM SCROLLBAR (Firefox & Chrome/Safari)
=================================================== */
.bundle-products-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 520px;
    overflow-y: scroll !important; /* Force scroll track */
    padding-right: 10px;
    scrollbar-width: thin !important;
    scrollbar-color: #1e3a8a #060b18 !important;
}

/* Chrome, Edge, Safari WebKit Engine Scrollbar */
.bundle-products-list::-webkit-scrollbar {
    width: 8px !important;
    height: 8px !important;
    display: block !important;
}

.bundle-products-list::-webkit-scrollbar-track {
    background: #060b18 !important;
    border-radius: 6px !important;
}

.bundle-products-list::-webkit-scrollbar-thumb {
    background-color: #1e3a8a !important;
    border-radius: 6px !important;
    border: 2px solid #060b18 !important;
}

.bundle-products-list::-webkit-scrollbar-thumb:hover {
    background-color: #2563eb !important;
}

.bundle-search-empty-msg {
    padding: 28px 16px;
    text-align: center;
    background: #0b1429;
    border: 1px dashed #1e2e50;
    border-radius: 8px;
    color: #94a3b8;
    font-size: 14px;
    width: 100%;
    box-sizing: border-box;
}

/* ===================================================
   PRODUCT ROWS & SEPARATION OF PRICES
=================================================== */
.bundle-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #0c152e;
    border: 1px solid #172445;
    border-radius: 8px;
    padding: 12px 16px;
    gap: 14px;
    transition: background-color 0.25s ease, border-color 0.25s ease;
}

.bundle-item-row.is-selected {
    background: #0e2247 !important;
    border-color: #0284c7 !important;
    box-shadow: 0 0 14px rgba(2, 132, 199, 0.25) !important;
}

.bundle-item-img img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}

.bundle-item-details {
    flex: 1;
    min-width: 0; /* Prevents text overflow */
}

.bundle-item-title {
    font-size: 15px;
    font-weight: 600;
    color: #e2e8f0;
    display: block;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Clear gap between original price, sale price, and save badge */
.bundle-item-pricing-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px !important; /* Proper breathing room between prices */
}

.bundle-item-pricing-row del.bundle-item-original-price,
.bundle-item-pricing-row del.bundle-item-original-price *,
.bundle-item-pricing-row del.bundle-item-original-price span,
.bundle-item-pricing-row del.bundle-item-original-price bdi {
    color: #64748b !important;
    text-decoration: line-through !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    margin: 0 !important;
}

.bundle-item-pricing-row ins.bundle-item-discount-price,
.bundle-item-pricing-row ins.bundle-item-discount-price *,
.bundle-item-pricing-row ins.bundle-item-discount-price span,
.bundle-item-pricing-row ins.bundle-item-discount-price bdi {
    color: #38bdf8 !important;
    text-decoration: none !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    margin: 0 !important;
}

.bundle-item-save-badge {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 4px;
}

.bundle-item-price {
    color: #38bdf8;
    font-weight: 600;
}

/* ===================================================
   QUANTITY STEPPER CONTROLS (Dead Center Alignment)
=================================================== */
.bundle-item-controls {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #050a17;
    border: 1px solid #1a2a4b;
    border-radius: 8px;
    padding: 4px;
    gap: 4px;
    box-sizing: border-box;
    flex-shrink: 0;
}

/* Span Button: completely immune to Elementor theme button styling */
.bundle-item-controls span.bundle-btn-step {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 6px !important;
    background: #1e3a8a !important;
    color: #ffffff !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    user-select: none !important;
    transition: background-color 0.2s, opacity 0.2s;
}

.bundle-item-controls span.bundle-btn-step svg {
    display: block !important;
    margin: 0 !important;
    pointer-events: none !important;
}

.bundle-item-controls span.bundle-btn-step:hover:not(.is-disabled) {
    background: #2563eb !important;
}

.bundle-item-controls span.bundle-btn-step.is-disabled {
    background: #0e172a !important;
    color: #334155 !important;
    cursor: not-allowed !important;
    opacity: 0.45 !important;
    pointer-events: none !important;
}

.bundle-qty-val {
    width: 24px;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    display: flex !important;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.bundle-sec-disclaimer {
    margin-top: 18px;
    padding-top: 12px;
    border-top: 1px dashed #1a2744;
    font-size: 12px;
    color: #64748b;
}

/* ===================================================
   SUMMARY CARD & BUTTONS
=================================================== */
.bundle-summary-card {
    background: #090e1f;
    border: 1px solid #1a2a4b;
    border-radius: 12px;
    padding: 24px;
    color: #e2e8f0;
    position: sticky;
    top: 30px;
}

.bundle-summary-media {
    margin-bottom: 16px;
    border-radius: 8px;
    overflow: hidden;
}

.bundle-summary-media img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.bundle-summary-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: #ffffff;
}

.bundle-summary-description {
    font-size: 13px;
    color: #94a3b8;
    line-height: 1.5;
    margin: 0 0 16px 0;
}

.bundle-selected-items-list {
    margin-bottom: 20px;
    max-height: 180px;
    overflow-y: auto;
    font-size: 13px;
    border-top: 1px solid #1a2a4b;
    border-bottom: 1px solid #1a2a4b;
    padding: 12px 0;
}

.selected-item-pill {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    color: #cbd5e1;
}

.empty-state-notice {
    color: #64748b;
    margin: 0;
    font-size: 13px;
}

.bundle-pricing-details .summary-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

.line-discount {
    color: #34d399;
}

.line-total {
    font-size: 18px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #1a2a4b;
    color: #38bdf8;
}

button.btn-bundle-add-to-cart {
    width: 100% !important;
    padding: 14px 20px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    cursor: pointer;
    display: block !important;
    text-align: center;
    margin-top: 20px !important;
    transition: all 0.2s ease;
}

button.btn-bundle-add-to-cart:not(:disabled) {
    background-color: #0284c7 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.4) !important;
}

button.btn-bundle-add-to-cart:not(:disabled):hover {
    background-color: #0369a1 !important;
}

button.btn-bundle-add-to-cart:disabled {
    background-color: #131b2e !important;
    color: #475569 !important;
    border: 1px solid #1e293b !important;
    cursor: not-allowed;
    opacity: 0.85;
}

.bundle-cart-msg {
    margin-top: 10px;
    font-size: 13px;
    text-align: center;
}

.bundle-summary-disclaimer {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px dashed #1a2a4b;
    font-size: 11px;
    line-height: 1.4;
    color: #64748b;
}

/* Floating Mobile Footer */
.bundle-mobile-floating-bar {
    display: none;
}

/* ===================================================
   RESPONSIVE DESIGN (MOBILE & TABLET)
=================================================== */
@media (max-width: 767px) {
    .bundle-builder-selector-wrap {
        padding: 16px;
    }

    .bundle-summary-card {
        position: static;
        margin-bottom: 20px;
        padding: 18px;
    }

    .bundle-item-row {
        padding: 10px 12px;
        gap: 10px;
    }

    .bundle-item-img img {
        width: 40px;
        height: 40px;
    }

    .bundle-item-title {
        font-size: 13px;
    }

    .bundle-item-pricing-row {
        gap: 8px !important;
    }

    .bundle-item-pricing-row del.bundle-item-original-price {
        font-size: 11px !important;
    }

    .bundle-item-pricing-row ins.bundle-item-discount-price {
        font-size: 12px !important;
    }

    .bundle-item-controls span.bundle-btn-step {
        width: 28px !important;
        height: 28px !important;
        min-width: 28px !important;
        max-width: 28px !important;
    }

    .bundle-qty-val {
        width: 18px;
        font-size: 13px;
    }

    /* Fixed bottom bar on mobile so the user doesn't lose context */
    .bundle-mobile-floating-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: #090e1f;
        border-top: 1px solid #1a2a4b;
        padding: 12px 16px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        z-index: 999999;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
    }

    .mobile-bar-info {
        display: flex;
        flex-direction: column;
    }

    .mobile-bar-count {
        font-size: 12px;
        color: #94a3b8;
    }

    .mobile-bar-total {
        font-size: 18px;
        font-weight: 700;
        color: #38bdf8;
    }

    .mobile-cart-btn {
        width: auto !important;
        margin-top: 0 !important;
        padding: 10px 20px !important;
        font-size: 14px !important;
    }
}