/* WPGens Bought Together Frontend Styles */

/* Container */
.wpgens-bt-container {
    max-width: 600px;
    margin: 24px auto;
    background: #fff;
    border: 1px solid #4B61D1;
    border-radius: 16px;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    position: relative;
}

/* Simple Title */
.wpgens-bt-title {
    margin: 0;
    padding: 20px 24px 12px 24px;
    font-size: 21px;
    font-weight: 700;
    text-align: center;
    color: #2c3e50;
    border-bottom: 1px solid #f1f3f4;
    background: linear-gradient(90deg, #e3f2fd 0%, #f3e5f5 100%);
}

.wpgens-bt-description {
    padding: 0 24px 20px 24px;
    margin: 0;
    font-size: 16px;
    color: #666;
    text-align: center;
    border-bottom: 1px solid #f1f3f4;
}

/* Product Images Row */
.wpgens-bt-images-row {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 20px;
    background: #fff;
}

.wpgens-bt-product-image {
    position: relative;
    flex-shrink: 0;
    margin: 0 6px;
    transition: transform 0.3s ease;
}

.wpgens-bt-product-image:hover {
    transform: translateY(-3px);
}

.wpgens-bt-product-image img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    transition: border-color 0.3s ease;
}

.wpgens-bt-product-image:hover img {
    border-color: #667eea;
}

.wpgens-bt-plus {
    font-size: 20px;
    font-weight: 300;
    color: #6c757d;
    margin: 0 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wpgens-bt-discount-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #ff4757;
    color: white;
    font-size: 9px;
    font-weight: 600;
    padding: 3px 5px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

/* Items List */
.wpgens-bt-items-list {
    padding: 0;
    border-top: 1px solid #f1f3f4;
}

.wpgens-bt-item {
    display: flex;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid #f1f3f4;
    transition: background-color 0.2s ease;
}

.wpgens-bt-item:hover {
    background-color: #f8f9fa;
}

.wpgens-bt-item:last-child {
    border-bottom: none;
}

.wpgens-bt-main-item {
    background: #f8f9fa;
}

.wpgens-bt-item-checkbox {
    margin-right: 15px;
}

.wpgens-bt-item-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    accent-color: #667eea;
}

.wpgens-bt-item-checkbox input[type="checkbox"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.wpgens-bt-item-details {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wpgens-bt-item-info {
    flex: 1;
}

.wpgens-bt-item-label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
    margin-right: 8px;
}

.wpgens-bt-item-name a {
    color: #2c3e50;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: color 0.2s ease;
}

.wpgens-bt-item-name a:hover {
    color: #667eea;
}

.wpgens-bt-item-qty {
    color: #6c757d;
    font-size: 14px;
    margin-left: 8px;
}

.wpgens-bt-item-price {
    text-align: right;
    margin-right: 15px;
}

.wpgens-bt-original-price {
    text-decoration: line-through;
    color: #999;
    font-size: 14px;
    display: block;
    margin-bottom: 2px;
}

.wpgens-bt-discounted-price {
    color: #e74c3c;
    font-weight: 700;
    font-size: 18px;
}

.wpgens-bt-current-price {
    color: #2c3e50;
    font-weight: 600;
    font-size: 16px;
}

.wpgens-bt-quantity-selector {
    margin-left: 10px;
}

.wpgens-bt-quantity-selector input {
    width: 60px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
}

/* Footer Section */
.wpgens-bt-footer {
    background: #f8f9fa;
    padding: 6px 24px 24px 24px;
    border-top: 1px solid #e9ecef;
}

.wpgens-bt-savings-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e9ecef;
}

.wpgens-bt-savings-label {
    font-size: 16px;
    font-weight: 600;
    color: #28a745;
}

.wpgens-bt-savings-amount {
    color: #28a745;
    font-weight: 600;
    font-size: 18px;
}



.wpgens-bt-total-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px 0;
    border-bottom: 2px solid #dee2e6;
}

.wpgens-bt-total-label {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

.wpgens-bt-total-price {
    text-align: right;
    display: flex;
    align-items: center;
    gap: 10px;
}

.wpgens-bt-total-original {
    text-decoration: line-through;
    color: #999;
    font-size: 16px;
}



.wpgens-bt-total-final {
    color: #2c3e50;
    font-weight: 700;
    font-size: 24px;
    margin-left: 5px;
}

/* Action Button */
.wpgens-bt-actions {
    text-align: center;
}

.wpgens-bt-add-all-btn {
    background: #e2648f!important;
    border: none;
    color: white;
    padding: 18px 40px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-width: 280px;
}

.wpgens-bt-add-all-btn:hover {
    transform: translateY(-2px);
}

.wpgens-bt-add-all-btn:active {
    transform: translateY(0);
}

.wpgens-bt-add-all-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.wpgens-bt-add-all-btn:hover::before {
    left: 100%;
}

.wpgens-bt-btn-text {
    position: relative;
    z-index: 1;
}

.wpgens-bt-item-count {
    margin-left: 8px;
    opacity: 0.9;
}







/* Variations */
.wpgens-bt-variations {
    margin-top: 8px;
    padding: 8px 0;
    border-top: 1px solid #eee;
}

.wpgens-bt-main-variations {
}

.wpgens-bt-variation-select {
    margin-bottom: 8px;
}

.wpgens-bt-variation-select:last-child {
    margin-bottom: 0;
}

.wpgens-bt-variation-selector {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    background: white;
}

.wpgens-bt-variation-selector:focus {
    border-color: #667eea;
    outline: none;
}

.wpgens-bt-unavailable {
    opacity: 0.6;
}

.wpgens-bt-unavailable .wpgens-bt-item-name {
    text-decoration: line-through;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .wpgens-bt-container {
        margin: 20px 15px;
        border-radius: 12px;
    }
    
    .wpgens-bt-title {
        padding: 20px;
        font-size: 20px;
    }
    
    .wpgens-bt-description {
        padding: 0 20px 20px 20px;
    }
    
    .wpgens-bt-images-row {
        padding: 25px 15px;
        flex-wrap: wrap;
    }
    
    .wpgens-bt-product-image img {
        width: 60px;
        height: 60px;
    }
    
    .wpgens-bt-plus {
        margin: 0 8px;
        font-size: 16px;
    }
    
    .wpgens-bt-item {
        padding: 15px 20px;
        flex-wrap: wrap;
    }
    
    .wpgens-bt-item-details {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }
    
    .wpgens-bt-item-price {
        margin: 10px 0 0 0;
        text-align: left;
    }
    
    .wpgens-bt-footer {
        padding: 20px;
    }
    
    .wpgens-bt-savings-section {
        padding: 10px 0;
    }
    
    .wpgens-bt-total-price {
        text-align: center;
        margin-top: 10px;
        gap: 8px;
    }
    
    .wpgens-bt-total-final {
        font-size: 20px !important;
    }
    
    .wpgens-bt-add-all-btn {
        padding: 15px 24px;
        min-width: 250px;
        font-size: 14px;
    }
}



/* Theme Integration */
.woocommerce .wpgens-bt-container {
    margin-top: 24px;
}

.single-product .wpgens-bt-container {
    margin-bottom: 24px;
} 