/* =========================================
   GWT: BUNDLE DESIGN 
   ========================================= */

/* 1. Main Wrapper - Absolute Anchor */
.yith-wcpb-product-bundled-item {
    position: relative !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    border: 3px solid #000 !important;
    margin-bottom: 30px !important;
    background: #fff !important;
    padding: 0 !important;
    padding-bottom: 40px !important;
    box-sizing: border-box !important;
}

/* 2. Left Image Column (40%) */
.yith-wcpb-product-bundled-item-image {
    position: static !important;
    width: 40% !important;
    min-width: 40% !important;
    border-right: 3px solid #000 !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    background: #f4f4f4 !important;
}

/* Force Image Wrappers to Fill the Box */
.yith-wcpb-product-bundled-item-image .woocommerce-product-gallery__image,
.yith-wcpb-product-bundled-item-image a {
    display: flex !important;
    flex: 1 1 auto !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.yith-wcpb-product-bundled-item-image img {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
    border-radius: 0 !important;
    margin: 0 !important;
}

/* 3. Right Text Column (60%) */
.yith-wcpb-product-bundled-item-data {
    position: static !important;
    width: 60% !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 10px 20px !important;
    box-sizing: border-box !important;
}

/* 4. Formatting Typography (.gwt-p-large & .gwt-p-small Integrations) */
.yith-wcpb-product-bundled-item-data__title { 
	margin: 0 0 5px 0 !important; 
	padding-top: 0 !important;
}

.yith-wcpb-product-bundled-item-data__title a {
    display: block !important;
    visibility: visible !important;
    color: #000 !important;
    text-decoration: none !important;
    
    /* Injected .gwt-p-large */
    font-family: "halyard-text", sans-serif !important; 
    font-size: 23px !important;
    line-height: 1.3 !important;
    letter-spacing: -0.02em !important; 
    font-weight: 500 !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    font-smooth: never !important;
    text-decoration-thickness: 1.3px !important;
    text-underline-offset: 2px !important;
}

.yith-wcpb-product-bundled-item-data__price { margin-bottom: 10px !important; }
.yith-wcpb-product-bundled-item-data__price .price { 
    color: #000 !important; 
    
    /* Injected .gwt-p-small */
    font-family: "halyard-text", sans-serif !important;
    font-size: 15px !important;
    line-height: 1.2 !important;
    letter-spacing: -0.025em !important;
    font-weight: 500 !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    font-smooth: never !important;
}
.yith-wcpb-product-bundled-item-data__price del { font-weight: 400 !important; margin-right: 8px !important; opacity: 1 !important; text-decoration-color: #000 !important; }
.yith-wcpb-product-bundled-item-data__price ins { text-decoration: none !important; }

.yith-wcpb-product-bundled-item-data__description,
.yith-wcpb-product-bundled-item-data__description p,
.yith-wcpb-product-bundled-item-data__description span,
.yith-wcpb-product-bundled-item-data__description div {
    color: #000 !important;
    margin-bottom: 15px !important;
    
    /* Injected .gwt-p-small */
    font-family: "halyard-text", sans-serif !important;
    font-size: 15px !important;
    line-height: 1.2 !important;
    letter-spacing: -0.025em !important;
    font-weight: 500 !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    font-smooth: never !important;
}

/* 5. Fix Label Overlap (Variations Table) */
.yith-wcpb-product-bundled-item-data table.variations {
    margin-bottom: 0 !important;
    border: none !important;
    width: 100% !important;
}
.yith-wcpb-product-bundled-item-data table.variations tr {
    display: block !important;
    margin-bottom: 0px !important;
}
.yith-wcpb-product-bundled-item-data table.variations td.label {
    display: block !important;
    width: 100% !important;
    padding: 0 0 8px 0 !important;
    margin: 0 !important;
    text-align: left !important;
    line-height: 1 !important;
}
.yith-wcpb-product-bundled-item-data table.variations td.label label {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #000 !important;
    display: block !important;
    line-height: 1.2 !important;
    margin: 0 !important;
    padding: 0 !important;
}
.yith-wcpb-product-bundled-item-data table.variations td.value {
    display: block !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Hide Disabled Swatches & Redundant Data WITHOUT Breaking JS */
.yith-wcpb-product-bundled-item-data .iconic-was-swatches__item:has(.iconic-was-swatch--disabled),
.yith-wcpb-product-bundled-item-data .iconic-was-swatches__item.iconic-was-swatches__item--disabled,
.yith-wcpb-product-bundled-item-data .stock,
.yith-wcpb-product-bundled-item-data__quantity {
    display: none !important;
}

/* Hide variation text, but leave the wrapper so JS can function */
.yith-wcpb-product-bundled-item-data .single_variation_wrap .woocommerce-variation-price,
.yith-wcpb-product-bundled-item-data .single_variation_wrap .woocommerce-variation-availability {
    display: none !important; 
}

/* 6. FULL WIDTH BOTTOM BAR */
.yith-wcpb-bundled-optional-wrapper {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 40px !important; 
    background-color: #dfdfdf !important;
    border-top: 3px solid #000 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    z-index: 10 !important;
    transition: background-color 0.2s ease;
}

/* Active Orange State */
.yith-wcpb-product-bundled-item:has(input[type="checkbox"]:checked) .yith-wcpb-bundled-optional-wrapper {
    background-color: #f6aa20 !important;
}

/* 7. Bulletproof Custom Checkbox */
.yith-wcpb-bundled-optional-wrapper input[type="checkbox"] {
    display: none !important; 
}
.yith-wcpb-bundled-optional-wrapper label {
    display: flex !important;
    align-items: center !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #000 !important;
    cursor: pointer !important;
    margin: 0 !important;
    line-height: 1 !important;
}
.yith-wcpb-bundled-optional-wrapper label::before {
    content: "";
    display: inline-block;
    width: 24px !important;
    height: 24px !important;
    border: 2px solid #000 !important;
    background-color: #fff !important;
    margin-right: 12px !important;
    border-radius: 0 !important;
    box-sizing: border-box !important;
}
.yith-wcpb-bundled-optional-wrapper:has(input[type="checkbox"]:checked) label::before {
    background-color: #fff !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-size: 85% !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}
.yith-wcpb-bundled-optional-wrapper:has(input[type="checkbox"]:checked) label {
    font-size: 0 !important; 
}
.yith-wcpb-bundled-optional-wrapper:has(input[type="checkbox"]:checked) label::after {
    content: "Item Added to Bundle";
    font-size: 18px !important;
    font-style: italic !important;
}

/* 8. Mobile View Stack */
@media(max-width: 768px) {
    .yith-wcpb-product-bundled-item {
        flex-direction: column !important;
    }
    .yith-wcpb-product-bundled-item-image {
        width: 100% !important;
        min-width: 100% !important;
        border-right: none !important;
        border-bottom: 3px solid #000 !important;
        height: 250px !important;
    }
    .yith-wcpb-product-bundled-item-data {
        width: 100% !important;
    }
}

/* =========================================
   GWT: BUNDLE NATIVE DROPDOWNS & SWATCH CLEANUP
   ========================================= */

/* 1. Hide Iconic Swatches inside bundle items only */
.yith-wcpb-product-bundled-item-data ul.iconic-was-swatches {
    display: none !important;
}

/* 2. Unhide and style native variation dropdowns inside bundles */
.yith-wcpb-product-bundled-item-data .woocommerce-select > div {
    display: block !important;
}
.yith-wcpb-product-bundled-item-data select.yith-wcpb-select-for-variables {
    display: block !important;
    visibility: visible !important;
    width: 100% !important;
    padding: 8px 12px !important;
    border: 2px solid #000 !important;
    border-radius: 0 !important;
    background-color: #fff !important;
    color: #000 !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    appearance: auto !important; 
    -webkit-appearance: auto !important;
    margin-bottom: 5px !important;
}
.yith-wcpb-product-bundled-item-data .woocommerce-select {
    background: none !important;
    pointer-events: auto !important;
}

/* 3. Strip theme pseudo-arrows to prevent double-arrow overlaps */
.yith-wcpb-product-bundled-item .woocommerce-select::after,
.yith-wcpb-product-bundled-item .woocommerce-select::before {
    display: none !important;
    content: none !important;
}

/* =========================================
   GWT: FAKE BOTTOM BAR FOR REQUIRED ITEMS
   ========================================= */

/* 1. Restore the 40px space at the bottom of required items */
.yith-wcpb-product-bundled-item:not(:has(.yith-wcpb-bundled-optional-wrapper)) {
    padding-bottom: 40px !important;
}

/* 2. Draw the active yellow bar using ::after */
.yith-wcpb-product-bundled-item:not(:has(.yith-wcpb-bundled-optional-wrapper))::after {
    content: "✓ Item Included in Bundle";
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 40px !important;
    background-color: #f6aa20 !important; /* Active yellow */
    border-top: 3px solid #000 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    font-style: italic !important;
    color: #000 !important;
    box-sizing: border-box !important;
    z-index: 10 !important;
}

/* =========================================
   GWT: DISCOUNT PERCENTAGE STYLING
   ========================================= */

/* 1. Hide the percentage text globally so it doesn't affect standard store pages */
.gwt-discount-text {
    display: none;
}

/* 2. Show the percentage text ONLY inside YITH Bundle items and apply requested color */
.yith-wcpb-product-bundled-item .gwt-discount-text {
    display: inline-block !important;
    color: #F24A08 !important; /* The requested orange */
    font-weight: 700 !important; /* Bold to make it pop */
    margin-left: 6px !important; /* Tiny space between the price and the text */
}

/* =========================================
   2026 September edits
   ========================================= */
.yith-wcpb-product-bundled-items {
    border: none !important;
    box-shadow: none !important;
}

.yith-wcpb-product-bundled-item-data .woocommerce-variation-description {
    display: none !important;
}

.yith-wcpb-bundled-items-heading {
   font-family: halyard-text;
   font-size: 15px !important;
    line-height: 120% !important;
    letter-spacing: -2.5% !important;
    font-weight: 500 !important;
    -webkit-font-smoothing: antialiased;
   -moz-osx-font-smoothing: grayscale;
    font-smooth: never;
}

.yith-wcpb-product-bundled-item-image img {
    object-fit: contain !important;
}

tr.yith-wcpb-child-of-bundle-table-item td.cfw-cart-item-image {
    visibility: hidden !important;
}

main.product-type-yith_bundle .woocommerce-error {
    margin-bottom: 20px !important;
}

/* mobile */
@media only screen and (max-width: 979px) {
    body .yith-wcpb-product-bundled-item-image img {
        object-fit: cover !important;
    }
}