/* Bundle Items - Simple and Clean */
.bundle-items {
    margin-bottom: 1.5em;
}

.bundle-items h3 {
    margin: 0 0 1em 0;
    font-size: 1.1em;
    font-weight: 600;
    color: #333;
}

/* Individual Bundle Item */
.bundle-item {
    border: 1px solid #e5e5e5;
    padding: 1em;
    margin-bottom: 0.8em;
    background: #fff;
    border-radius: 4px;
    transition: border-color 0.2s ease;
}

.bundle-item:hover {
    border-color: #ccc;
}

/* Bundle Item Header */
.bundle-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8em;
}

/* Bundle Item Gallery */
.bundle-item-gallery {
    margin-bottom: 1em;
}

/* Bundle item gallery - 4 per row */
.bundle-item-gallery-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    /* max-width: 280px; */
}

.bundle-item-gallery-list li {
    display: block;
    margin: 0;
}

.bundle-gallery-link {
    display: block;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    overflow: hidden;
    transition: border-color 0.2s ease;
    aspect-ratio: 1;
}

.bundle-gallery-link:hover {
    border-color: #999;
}

.bundle-gallery-thumb {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bundle-item-images .no-images {
    color: #999;
    font-style: italic;
    font-size: 0.9em;
}

/* Loading indicator */
.bundle-gallery-loading {
    color: #666;
    font-size: 0.9em;
    padding: 10px;
    text-align: center;
    position: relative;
}

.bundle-gallery-loading:before {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 8px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #2c5aa0;
    border-radius: 50%;
    animation: bundle-gallery-spin 1s linear infinite;
    vertical-align: middle;
}

@keyframes bundle-gallery-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


.bundle-item-header h4 {
    margin: 0;
    font-size: 1em;
    font-weight: 600;
    color: #333;
}

.bundle-item-quantity {
    background: #f5f5f5;
    color: #666;
    padding: 0.2em 0.6em;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 500;
}

/* Variations Styling */
.bundle-item-variations {
    margin-bottom: 0.8em;
}

/* Bundle Variations Container */
.bundle-variations-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.bundle-variation-item {
    display: flex;
    flex-direction: column;
}

.bundle-variation-label {
    margin-bottom: 8px;
}

.bundle-variation-label label {
    font-weight: 600;
    color: #333;
    font-size: 0.95em;
}

.bundle-variation-value {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Bundle Attribute Swatches */
.bundle-attribute-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.bundle-swatch {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.swatch-image-container {
    width: 50px;
    height: 50px;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.swatch-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.swatch-label {
    margin-top: 6px;
    padding: 4px 8px;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    background: #fff;
    font-size: 11px;
    font-weight: 500;
    color: #333;
    text-align: center;
    min-width: 50px;
    transition: all 0.2s ease;
}

.bundle-swatch:hover .swatch-image-container {
    border-color: #999;
    transform: scale(1.05);
}

.bundle-swatch:hover .swatch-label {
    border-color: #999;
    background: #f8f9fa;
}

.bundle-swatch.selected .swatch-image-container {
    border-color: #2c5aa0;
    box-shadow: 0 0 0 2px rgba(44, 90, 160, 0.3);
}

.bundle-swatch.selected .swatch-label {
    border-color: #2c5aa0;
    background: #2c5aa0;
    color: white;
}

.bundle-swatch .swatch-text {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 10px;
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
    padding: 2px;
    background: #f8f9fa;
    color: #333;
    border-radius: 4px;
}

.bundle-swatch.selected .swatch-text {
    background: #2c5aa0;
    color: white;
}

/* No longer need tooltip since we have labels */

.bundle-item-variations .variations {
    width: 100%;
}

.bundle-item-variations .variations td {
    padding: 0.4em 0;
    vertical-align: middle;
}

.bundle-item-variations .variations .label {
    width: 25%;
    font-weight: 500;
    color: #555;
    font-size: 0.9em;
    border: none !important;
}

.bundle-item-variations .variations td.value {
    border: none !important;
}

.bundle-item-variations .variations select {
    width: 100%;
    padding: 0.5em;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 0.9em;
    background: white;
    color: #333;
    transition: border-color 0.2s ease;
}

.bundle-item-variations .variations select:focus {
    outline: none;
    border-color: #999;
}

.bundle-item-variations .variations select.error {
    border-color: #e74c3c;
}

/* Bundle Item Price */
.bundle-item-price {
    font-size: 1em;
    font-weight: 600;
    color: #2c5aa0;
    text-align: right;
}

/* Bundle Summary - Clean and Simple */
.bundle-summary {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 1.2em;
    margin-bottom: 1.5em;
    border-radius: 4px;
}

.bundle-summary h3 {
    margin: 0 0 0.5em 0;
    font-size: 1.1em;
    font-weight: 600;
    color: #333;
    border: none;
    padding: 0;
}

.bundle-total-price {
    font-size: 1.4em;
    font-weight: 600;
    color: #2c5aa0;
}

.bundle-total-price del {
    color: #999;
    font-weight: 400;
    margin-right: 0.5em;
    font-size: 0.9em;
}

.bundle-discount {
    display: inline-block;
    background: #28a745;
    color: white;
    padding: 0.2em 0.6em;
    font-size: 0.8em;
    border-radius: 3px;
    margin-left: 0.5em;
    font-weight: 500;
}

/* Quantity and Add to Cart - Simple */
.bundle-quantity {
    margin-bottom: 1em;
}

.bundle-quantity label {
    display: block;
    margin-bottom: 0.4em;
    font-weight: 500;
    font-size: 0.9em;
    color: #555;
}

.bundle-quantity .quantity {
    display: block !important;
}

.bundle-quantity .quantity.hidden {
    display: block !important;
}

.bundle-quantity .quantity input[type="hidden"] {
    display: none;
}

.bundle-quantity .quantity input[type="number"] {
    display: inline-block !important;
    width: 80px;
    padding: 0.5em;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 0.9em;
    text-align: center;
    background: white;
    transition: border-color 0.2s ease;
}

.bundle-quantity .quantity input[type="number"]:focus {
    outline: none;
    border-color: #999;
}

/* Add to Cart Button - Use theme defaults */
.single_add_to_cart_button_wrapper {
    margin-top: 1em;
}

.bundle_form .single_add_to_cart_button {
    width: 100%;
}

/* Responsive Design - Simple */
@media (max-width: 768px) {
    .bundle-item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5em;
    }
    
    .bundle-item-variations .variations .label {
        width: 100%;
        display: block;
        margin-bottom: 0.3em;
    }
    
    .bundle-item-variations .variations td {
        display: block;
        padding: 0.2em 0;
    }
    
    /* Gallery responsive adjustments */
    .bundle-gallery-thumb {
        /* width: 40px; */
        height: 40px;
    }
    
    /* Swatch responsive adjustments */
    .swatch-image-container {
        width: 45px;
        height: 45px;
    }
    
    .swatch-label {
        font-size: 10px;
        padding: 3px 6px;
        min-width: 45px;
    }
    
    .bundle-swatch .swatch-text {
        font-size: 9px;
    }
}

/* Cart styles */
.bundled-cart-item {
    background: #f9f9f9;
    border-left: 3px solid #77a464;
}

.bundled-cart-item td:first-child {
    padding-left: 2.5em !important;
}

.bundled-cart-item .product-thumbnail {
    width: 32px !important;
    opacity: 0.7;
}

.bundled-cart-item .product-name {
    font-size: 0.9em;
    color: #666;
}

.bundled-cart-item .product-name::before {
    content: "└ ";
    color: #77a464;
    font-weight: bold;
    margin-right: 0.5em;
}

.bundle-parent-item {
    border-bottom: 2px solid #e1e1e1;
}

.bundled-cart-item td {
    padding-top: 0.8em !important;
    padding-bottom: 0.8em !important;
    border-top: 1px solid #f1f1f1 !important;
}

.bundled-item-price,
.bundled-item-subtotal {
    color: #77a464;
    font-style: italic;
    font-size: 0.9em;
}

.bundled-cart-item .quantity input {
    display: none !important;
}

.bundled-cart-item .quantity::before {
    content: attr(data-quantity);
    display: inline-block;
    padding: 0.3em 0.6em;
    background: #f1f1f1;
    border-radius: 3px;
    min-width: 2em;
    text-align: center;
}

.bundle-header-info {
    display: block;
    font-size: 0.85em;
    color: #666;
    margin-top: 0.5em;
}

/* Order styles */
.bundled-order-item {
    background: #f9f9f9;
}

.bundled-order-items {
    margin-top: 1em;
    padding: 1em;
    background: #f1f1f1;
    border-radius: 4px;
}

.bundle-discount-info {
    margin-top: 0.5em;
    font-weight: bold;
    color: #77a464;
}

/* Custom Lightbox Styles */
.bundle-lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bundle-lightbox-container {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bundle-lightbox-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bundle-lightbox-image-container {
    max-width: 80vw;
    max-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bundle-lightbox-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

.bundle-lightbox-close {
    position: absolute !important;
    top: -40px;
    right: -40px;
    background: none;
    border: none;
    color: white;
    font-size: 2em;
    cursor: pointer;
    z-index: 10001;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.bundle-lightbox-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.bundle-lightbox-prev,
.bundle-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 2em;
    cursor: pointer;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.bundle-lightbox-prev {
    left: -60px;
}

.bundle-lightbox-next {
    right: -60px;
}

.bundle-lightbox-prev:hover,
.bundle-lightbox-next:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.bundle-lightbox-counter {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    background: rgba(0, 0, 0, 0.7);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
}

@media (max-width: 768px) {
    .bundle-lightbox-close {
        top: 10px;
        right: 10px;
    }
    
    .bundle-lightbox-prev,
    .bundle-lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 1.5em;
    }
    
    .bundle-lightbox-prev {
        left: 10px;
    }
    
    .bundle-lightbox-next {
        right: 10px;
    }
    
    .bundle-lightbox-counter {
        bottom: 10px;
    }
}

/* Hide Elementor lightbox interference */
div#elementor-lightbox-slideshow-single-img {
    display: none !important;
}