/**
 * SCS WooCommerce Bundles - Frontend Styles
 */

.scs-bundle-card {
    background: #fff;
    border: 2px solid #7cbd6c !important;
    border-radius: 12px !important;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05) !important;
    margin: 20px 0;
    max-width: 800px;
    transition: box-shadow 0.3s ease;
}

.scs-bundle-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.08) !important;
}

.scs-bundle-image {
    position: relative;
    width: 100%;
    padding-bottom: 75%; /* 4:3 aspect ratio (3/4 = 0.75) */
    overflow: hidden;
    background: #f5f5f5;
}

.scs-bundle-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.scs-bundle-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #e74c3c;
    color: #fff;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.scs-bundle-content {
    padding: 30px;
}

/* Loading state */
.scs-loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Variation Selector */
.scs-bundle-variation-selector {
    margin: 20px 0;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.scs-bundle-variation-selector label {
    display: block;
    margin-bottom: 8px;
    font-size: 16px;
    color: #333;
}

.scs-bundle-variation-selector select {
    width: 100%;
    max-width: 300px;
    padding: 10px 15px;
    font-size: 16px;
    border: 2px solid #7cbd6c;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.scs-bundle-variation-selector select:hover {
    border-color: #5fa34f;
}

.scs-bundle-variation-selector select:focus {
    outline: none;
    border-color: #5fa34f;
    box-shadow: 0 0 0 3px rgba(124, 189, 108, 0.1);
}

.scs-bundle-title {
    margin: 0 0 15px 0;
    font-size: 28px;
    font-weight: bold;
    color: #333;
}

.scs-bundle-description {
    margin-bottom: 20px;
    color: #666;
    line-height: 1.6;
}

.scs-bundle-products {
    background-color: #f8f9fa !important;
    border-radius: 8px;
    padding: 20px !important;
    margin-bottom: 20px;
}

.scs-bundle-products h4 {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #555;
    margin-bottom: 15px !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.scs-bundle-products ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.scs-bundle-products li {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px 15px !important;
    margin-bottom: 10px !important;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.scs-bundle-products li:last-child {
    margin-bottom: 0;
}

.scs-bundle-products li::before {
    content: '✓';
    color: #7cbd6c;
    font-weight: 900;
    margin-right: 12px;
    font-size: 16px;
}

.scs-bundle-products .product-name {
    font-weight: 500;
    font-size: 1em;
    color: #333;
}

.scs-bundle-pricing {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Hide the "Individual Total" row */
.scs-bundle-price-row:not(.bundle-price-main) {
    display: none !important;
}

.scs-bundle-price-row.bundle-price-main {
    margin-bottom: 0 !important;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.scs-bundle-price-row.bundle-price-main .label {
    font-size: 14px !important;
    color: #666 !important;
    font-weight: 500 !important;
    margin-bottom: 5px !important;
    text-transform: none !important;
}

.scs-bundle-price-row .bundle-price {
    color: #0d2c54 !important;
    font-size: 32px !important;
    font-weight: bold;
}

.scs-bundle-savings {
    border-top: none !important;
    padding-top: 0 !important;
    text-align: left !important;
    background: #7cbd6c;
    color: white;
    padding: 4px 10px !important;
    border-radius: 4px;
    font-weight: bold;
    font-size: 14px !important;
    display: inline-block;
}

.scs-bundle-savings .savings-amount {
    display: none !important;
}

.scs-bundle-savings .savings-percent {
    color: white !important;
    font-size: 14px !important;
}

.scs-bundle-actions {
    flex-direction: column;
    gap: 10px;
}

.scs-bundle-add-to-cart {
    width: 100%;
    background-color: #6aa85e !important;
    border-radius: 8px !important;
    padding: 15px !important;
    text-transform: uppercase;
    font-size: 16px !important;
    letter-spacing: 0.5px;
    font-weight: bold;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background 0.3s ease;
}

.scs-bundle-add-to-cart:hover {
    background-color: #5a964e !important;
}

.scs-bundle-add-to-cart:disabled,
.scs-bundle-out-of-stock {
    background: #95a5a6;
    cursor: not-allowed;
}

.scs-bundle-view-details {
    background: transparent !important;
    border: none !important;
    color: #666 !important;
    text-decoration: underline !important;
    font-size: 14px !important;
    padding: 5px !important;
    width: auto !important;
    text-transform: capitalize;
    display: inline-block;
}

.scs-bundle-view-details:hover {
    color: #333 !important;
    background: transparent !important;
}

.scs-bundle-message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 4px;
    text-align: center;
}

.scs-bundle-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.scs-bundle-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive */
@media (max-width: 768px) {
    .scs-bundle-content {
        padding: 20px;
    }
    
    .scs-bundle-title {
        font-size: 24px;
    }
    
    .scs-bundle-actions {
        flex-direction: column;
    }
    
    .scs-bundle-add-to-cart,
    .scs-bundle-view-details {
        width: 100%;
        text-align: center;
    }
}

/* Product Variations Styles */
.scs-product-variations,
.scs-product-variations-compact {
    margin-top: 12px;
    padding: 12px;
    background: #f9f9f9;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.scs-variation-attribute {
    margin-bottom: 12px;
}

.scs-variation-attribute:last-child {
    margin-bottom: 0;
}

.scs-variation-attribute label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    color: #333;
}

.scs-variation-select-attr {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.scs-variation-select-attr:hover {
    border-color: #7cbd6c;
}

.scs-variation-select-attr:focus {
    outline: none;
    border-color: #7cbd6c;
    box-shadow: 0 0 0 2px rgba(124, 189, 108, 0.1);
}

/* Compact variation style for shortcode */
.scs-product-variations-compact {
    padding: 8px;
    margin-top: 8px;
}

.scs-product-variations-compact .scs-variation-select-attr {
    padding: 6px 10px;
    font-size: 13px;
    margin-bottom: 6px;
}

.scs-product-variations-compact .scs-variation-select-attr:last-of-type {
    margin-bottom: 0;
}

/* Single page product grid variations */
.scs-bundle-products-grid .scs-product-variations {
    margin-top: 15px;
}

