/* OEM PC Builder Styles */
.oem-pc-builder-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    position: relative;
}

/* Header */
.oem-builder-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    color: white;
}

.oem-builder-title {
    margin: 0 0 10px 0;
    font-size: 32px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.oem-icon {
    font-size: 40px;
}

.oem-builder-description {
    margin: 0;
    font-size: 16px;
    opacity: 0.95;
}

/* Content Layout */
.oem-builder-content {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 30px;
}

/* Components List */
.oem-components-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.oem-component-item {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.oem-component-item:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
}

.oem-component-item.has-selection {
    border-color: #10b981;
    background: #f0fdf4;
}

.oem-component-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.oem-component-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.oem-component-icon {
    font-size: 28px;
}

.oem-component-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 10px;
}

.oem-required-badge {
    display: inline-block;
    background: #ef4444;
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

.oem-component-price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.oem-price-label {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 2px;
}

.oem-price-value {
    font-size: 20px;
    font-weight: 700;
    color: #667eea;
}

/* Select Wrapper */
.oem-component-select-wrapper {
    position: relative;
}

.oem-product-select {
    width: 100%;
    padding: 12px 40px 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    color: #1f2937;
    background: white url('data:image/svg+xml;utf8,<svg fill="%23667eea" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>') no-repeat right 10px center;
    background-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.oem-product-select:hover {
    border-color: #667eea;
}

.oem-product-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.oem-product-select option {
    padding: 10px;
    font-size: 14px;
}

.oem-product-loading {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
}

.oem-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f4f6;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Selected Product */
.oem-selected-product {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f9fafb;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    margin-top: 10px;
}

.oem-product-image {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    background: white;
    border: 1px solid #e5e7eb;
}

.oem-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.oem-product-details {
    flex-grow: 1;
}

.oem-product-name {
    margin: 0 0 5px 0;
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
}

.oem-product-sku {
    margin: 0;
    font-size: 12px;
    color: #6b7280;
}

.oem-remove-product {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border: none;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.oem-remove-product:hover {
    background: #dc2626;
    transform: scale(1.1);
}

/* Sidebar */
.oem-builder-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.oem-summary-box,
.oem-info-box {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 25px;
}

.oem-summary-title {
    margin: 0 0 20px 0;
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
    padding-bottom: 15px;
    border-bottom: 2px solid #e5e7eb;
}

.oem-summary-items {
    min-height: 150px;
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.oem-empty-message {
    text-align: center;
    color: #9ca3af;
    font-style: italic;
    padding: 40px 20px;
}

.oem-summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
}

.oem-summary-item:last-child {
    border-bottom: none;
}

.oem-summary-item-name {
    font-size: 13px;
    color: #4b5563;
    flex: 1;
}

.oem-summary-item-price {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
}

.oem-summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-top: 2px solid #e5e7eb;
    margin-bottom: 20px;
}

.oem-total-label {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
}

.oem-total-value {
    font-size: 24px;
    font-weight: 800;
    color: #667eea;
}

/* Action Buttons */
.oem-action-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.oem-btn {
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.oem-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.oem-btn-icon {
    font-size: 18px;
}

.oem-btn-primary {
    background: #667eea;
    color: white;
}

.oem-btn-primary:hover:not(:disabled) {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.oem-btn-success {
    background: #10b981;
    color: white;
}

.oem-btn-success:hover:not(:disabled) {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.oem-btn-secondary {
    background: #f3f4f6;
    color: #6b7280;
}

.oem-btn-secondary:hover:not(:disabled) {
    background: #e5e7eb;
    color: #4b5563;
}

/* Info Box */
.oem-info-box h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
}

.oem-info-box ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.oem-info-box li {
    padding: 8px 0;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.6;
}

/* Loading Overlay */
.oem-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.oem-loading-content {
    background: white;
    padding: 40px;
    border-radius: 15px;
    text-align: center;
}

.oem-loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f4f6;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 20px;
}

.oem-loading-text {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .oem-builder-content {
        grid-template-columns: 1fr;
    }
    
    .oem-builder-sidebar {
        order: -1;
    }
}

@media (max-width: 768px) {
    .oem-pc-builder-wrapper {
        padding: 15px;
    }
    
    .oem-builder-header {
        padding: 20px;
    }
    
    .oem-builder-title {
        font-size: 24px;
    }
    
    .oem-component-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .oem-component-price {
        align-items: flex-start;
    }
    
    .oem-selected-product {
        flex-wrap: wrap;
    }
}

/* Scrollbar Styling */
.oem-summary-items::-webkit-scrollbar {
    width: 6px;
}

.oem-summary-items::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 3px;
}

.oem-summary-items::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.oem-summary-items::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}