.grid-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;

}

.grid-item {
    flex: 1;
    min-width: 400px;
    margin: 10px;
    background-color: #f0f0f0;
    padding: 20px;
}

.grid-container-product {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;

}

.grid-item-product {
    flex: 1;
    min-width: 200px;
    margin: 10px;
    background-color: #f0f0f0;
    padding: 20px;
}

.grid-container-schematic {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    text-align: center;
}

.grid-item-schematic {
    flex: 1;
    min-width: 400px;
    max-height: 500px;
    margin: 10px;
    background-color: #f0f0f0;
    padding: 30px;
    text-align: center;
}

.grid-container-brand {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    text-align: center;
}

.grid-item-brand {
    flex: 1;
    min-width: 300px;
    max-height: 500px;
    margin: 10px;
    background-color: #f0f0f0;
    padding: 30px;
    text-align: center;
}

@media screen and (max-width: 768px) {
    .grid-item {
        min-width: calc(100% - 20px); /* Adjust the width and margin as needed */
    }
    .grid-item-product {
        min-width: calc(100% - 20px); /* Adjust the width and margin as needed */
    }
    .grid-item-schematic {
        min-width: calc(100% - 20px); /* Adjust the width and margin as needed */
    }
    .grid-item-brand {
        min-width: calc(100% - 20px); /* Adjust the width and margin as needed */
    }
}

/* Schematic Image Container Styles */
.schematic-image-container {
    position: relative;
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #fff;
}

.schematic-image-container.schematic-loading {
    opacity: 0.6;
    pointer-events: none;
}

.schematic-image-container.schematic-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1000;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Remove Image Button Styles */
.remove-image-btn {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin-top: 10px;
    transition: background-color 0.3s ease;
}

.remove-image-btn:hover {
    background-color: #c82333;
}

.remove-image-btn:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

/* Image Header Styles */
.image-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.image-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

/* Add SKU Section Styles */
.add-sku-section {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    margin: 15px 0;
}

.add-sku-section h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #495057;
}

.add-sku-form {
    display: flex;
    gap: 10px;
    align-items: end;
    flex-wrap: wrap;
}

.add-sku-form .form-group {
    flex: 1;
    min-width: 120px;
}

.add-sku-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #495057;
}

.add-sku-form input[type="text"],
.add-sku-form input[type="number"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
}

.add-sku-button {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
    transition: background-color 0.3s ease;
}

.add-sku-button:hover {
    background-color: #218838;
}

.add-sku-button:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

/* Parts Table Styles */
.parts-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: #fff;
}

.parts-table th,
.parts-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.parts-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

.parts-table tbody tr:hover {
    background-color: #f8f9fa;
}

.remove-item-btn {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.3s ease;
}

.remove-item-btn:hover {
    background-color: #c82333;
}

/* Message Styles */
.schematic-message {
    padding: 12px 16px;
    margin: 15px 0;
    border-radius: 4px;
    font-size: 14px;
}

.schematic-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.schematic-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .add-sku-form {
        flex-direction: column;
    }
    
    .add-sku-form .form-group {
        min-width: 100%;
    }
    
    .image-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .parts-table {
        font-size: 12px;
    }
    
    .parts-table th,
    .parts-table td {
        padding: 8px;
    }
}
