/* WC Configurator Modern Frontend Styles */

.wcc-frontend-configurator {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.wcc-message {
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: 4px;
    display: none;
}

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

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

.wcc-product-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}

.wcc-product-header h1 {
    margin: 0;
    font-size: 28px;
    color: #333;
}

.wcc-price-display {
    text-align: right;
}

.wcc-total-price {
    font-size: 24px;
    font-weight: bold;
    color: #007cba;
}

.wcc-main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .wcc-main-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

.wcc-image-area {
    position: sticky;
    top: 20px;
    height: fit-content;
}

.wcc-main-image {
    text-align: center;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #e9ecef;
}

.wcc-main-image img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.wcc-configuration-area {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.wcc-config-section {
    padding: 20px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.wcc-config-section h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
    color: #333;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 8px;
}

.wcc-selected-component {
    margin-bottom: 10px;
}

.wcc-component-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.wcc-component-name {
    font-weight: 500;
    color: #333;
}

.wcc-component-price {
    font-weight: bold;
    color: #007cba;
}

.wcc-ring-options,
.wcc-driver-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wcc-ring-option,
.wcc-driver-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #fff;
    border: 2px solid #e9ecef;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.wcc-ring-option:hover,
.wcc-driver-option:hover {
    border-color: #007cba;
    background: #f0f8ff;
}

.wcc-ring-option.selected,
.wcc-driver-option.selected {
    border-color: #007cba;
    background: #e6f3ff;
}

.wcc-ring-option.selected::after,
.wcc-driver-option.selected::after {
    content: "✓";
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: #007cba;
    font-weight: bold;
}

.wcc-default-badge {
    background: #007cba;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.wcc-builtin-label {
    background: #28a745;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.wcc-cart-section {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.wcc-quantity {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wcc-quantity label {
    font-weight: 500;
    color: #333;
}

.wcc-quantity input {
    width: 60px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    text-align: center;
}

.wcc-add-to-cart {
    padding: 12px 24px;
    background: #007cba;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
    flex: 1;
    max-width: 200px;
}

.wcc-add-to-cart:hover {
    background: #005a87;
}

.wcc-add-to-cart:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

/* WooCommerce integration */
.woocommerce .wcc-frontend-configurator {
    margin-top: 0;
}

.woocommerce .wcc-add-to-cart {
    background: var(--wc-primary-color, #007cba);
}

.woocommerce .wcc-add-to-cart:hover {
    background: var(--wc-primary-color-hover, #005a87);
}

/* Responsive design */
@media (max-width: 768px) {
    .wcc-frontend-configurator {
        padding: 15px;
    }
    
    .wcc-product-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .wcc-cart-section {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .wcc-add-to-cart {
        max-width: none;
    }
}
