/* Main Container */
.elogik-pc-builder {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #333;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Top Tabs */
.builder-tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
}

.builder-tabs .tab {
    padding: 12px 24px;
    cursor: pointer;
    font-weight: 600;
    color: #666;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
}

.builder-tabs .tab:hover {
    color: #333;
}

.builder-tabs .tab.active {
    color: #0066cc;
    border-bottom-color: #0066cc;
}

/* Two-column layout */
.builder-container {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 20px;
    height: calc(100vh - 150px);
}

/* Left Sidebar */
.builder-sidebar {
    background: #f8f8f8;
    padding: 15px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

/* Component Items with Icons */
.component-selection {
    flex: 1;
    overflow-y: auto;
    padding-right: 10px;
}

.component-item {
    display: flex;
    align-items: center;
    padding: 15px;
    margin: 8px 0;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.component-item:hover {
    background: #f5f5f5;
}

.component-item.active {
    background: #f0f7ff;
}

.category-icon-container {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    background: #f5f5f5;
    border-radius: 4px;
}

.category-icon-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.category-text {
    flex: 1;
}

.component-item h4 {
    margin: 0 0 5px 0;
    font-size: 24px;
    font-weight: 600;
}

.component-status {
    color: #888;
    font-size: 14px;
}

/* Right Content */
.builder-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.product-filters {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 15px;
}

.current-category {
    margin: 0;
    font-size: 18px;
}

.products-grid-container {
    flex: 1;
    overflow-y: auto;
}

/* Product Grid - Single Column */
.products-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    padding-right: 10px;
}

.product-card {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 15px;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.2s ease;
    position: relative;
}

.product-card:hover {
    border-color: #0066cc;
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.1);
}

.product-card.selected {
    border-color: #0066cc;
    background-color: #f0f7ff;
}

/* Product Checkbox */
.product-checkbox {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 2;
}

.product-checkbox input[type="checkbox"] {
    display: none;
}

.product-checkbox label {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #0066cc;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.product-checkbox input[type="checkbox"]:checked + label {
    background-color: #0066cc;
}

.product-checkbox input[type="checkbox"]:checked + label::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.product-image {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9f9f9;
    border-radius: 4px;
    height: 100px;
}

.product-image img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.product-info {
    display: flex;
    flex-direction: column;
}

.product-info h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
}

.product-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 8px 0;
}

.spec-tag {
    display: inline-block;
    padding: 3px 6px;
    background: #f5f5f5;
    border-radius: 3px;
    font-size: 12px;
    color: #555;
}

.current-price {
    font-weight: 700;
    color: #0066cc;
    font-size: 16px;
    margin: 8px 0;
}

/* Loading States */
.loading, .loading-more {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
    grid-column: 1 / -1;
}

/* Total Price */
.total-price {
    display: flex;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #ddd;
    font-weight: 600;
    font-size: 18px;
}

/* Error Messages */
.error {
    color: #e74c3c;
    padding: 20px;
    text-align: center;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .elogik-pc-builder {
        max-width: 100%;
    }
    
    .builder-container {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .builder-sidebar {
        height: auto;
        max-height: 400px;
    }
    
    .component-item {
        padding: 12px;
    }
    
    .category-icon-container {
        width: 60px;
        height: 60px;
    }
    
    .component-item h4 {
        font-size: 20px;
    }
    
    .product-card {
        grid-template-columns: 80px 1fr;
    }
    
    .products-grid-container {
        max-height: none;
    }
}